From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: libnettle/libhogweed WIP Date: Sat, 15 Jul 2017 12:15:20 +0300 Message-ID: <8360euf4d3.fsf@gnu.org> References: <87r30qu5av.fsf@lifelogs.com> <874lxmtxyy.fsf@lifelogs.com> <87r30prvwt.fsf@lifelogs.com> <8337d4csez.fsf@gnu.org> <87r30nq9el.fsf@lifelogs.com> <83inlyc1k2.fsf@gnu.org> <87inlyrfni.fsf@lifelogs.com> <837f2eb845.fsf@gnu.org> <87ziedpyy1.fsf@lifelogs.com> <83d1b75u8a.fsf@gnu.org> <87r2znntaq.fsf@lifelogs.com> <87o9u8q4a5.fsf@lifelogs.com> <83tw3xbklg.fsf@gnu.org> <87zictm415.fsf@lifelogs.com> <83podoqchd.fsf@gnu.org> <87podnnbi2.fsf@lifelogs.com> <8760ewi3rw.fsf@lifelogs.com> <87r2xjgilq.fsf@lifelogs.com> <83iniug7ql.fsf@gnu.org> <87fudyhkhy.fsf@lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1500110128 13355 195.159.176.226 (15 Jul 2017 09:15:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2017 09:15:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 15 11:15:22 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWJAY-00036n-1c for ged-emacs-devel@m.gmane.org; Sat, 15 Jul 2017 11:15:22 +0200 Original-Received: from localhost ([::1]:41262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWJAd-0005fz-Dp for ged-emacs-devel@m.gmane.org; Sat, 15 Jul 2017 05:15:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWJAX-0005fu-9R for emacs-devel@gnu.org; Sat, 15 Jul 2017 05:15:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWJAT-00008k-9s for emacs-devel@gnu.org; Sat, 15 Jul 2017 05:15:21 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWJAT-00008e-6C; Sat, 15 Jul 2017 05:15:17 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1396 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dWJAS-00031t-I4; Sat, 15 Jul 2017 05:15:17 -0400 In-reply-to: <87fudyhkhy.fsf@lifelogs.com> (message from Ted Zlatanov on Fri, 14 Jul 2017 15:43:53 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216675 Archived-At: > From: Ted Zlatanov > Date: Fri, 14 Jul 2017 15:43:53 -0400 > > EZ> Also, the 7th test fails for me as below; any idea? > EZ> Test test-gnutls-005-aead-ciphers condition: > EZ> (ert-test-failed > EZ> ((should > EZ> (gnutls-tests-hexstring-equal input reverse)) > EZ> :form > EZ> (gnutls-tests-hexstring-equal " " " ► ► ∟\231\202 \200") > EZ> :value nil)) > EZ> FAILED 7/7 test-gnutls-005-aead-ciphers > > It works for me, on Ubuntu 17.04, GnuTLS 3.5.6 and a fresh checkout. > > Could you run with `make gnutls-tests GNUTLS_TEST_VERBOSE=1' and look at > the output? This full output is normally silenced because it's so > verbose, but in this case we'll need it because so many different test > cases are attempted. I've run the test under a debugger. Tell me what you want to know. What I see (without really understanding what should happen) is that gnutls-symmetric-decrypt returns a string that is 32-byte long, whereas the original input before encryption was a 16-byte string. In the decrypted string, the first 16 bytes are identical to the input before encryption, the rest seem to be binary garbage. When the original 16-byte input is encrypted by gnutls-symmetric-encrypt, the result is a 32-byte string. All of this happens in the first call to encryption and decryption functions produced by the loop in test-gnutls-005-aead-ciphers. Does this makes sense and/or ring any bells? Do you need me to provide any further information? The version of GnuTLS library I have here is 3.4.15, btw.