From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: libnettle/libhogweed WIP Date: Wed, 31 May 2017 14:17:54 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87o9u8q4a5.fsf@lifelogs.com> References: <8337daggnj.fsf@gnu.org> <87d1cdwxt6.fsf@lifelogs.com> <83tw5pg1q3.fsf@gnu.org> <87zifhulc2.fsf@lifelogs.com> <83h91og80k.fsf@gnu.org> <87pogbuhoe.fsf@lifelogs.com> <834lxndmd9.fsf@gnu.org> <87efwrug6z.fsf@lifelogs.com> <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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1496254737 14854 195.159.176.226 (31 May 2017 18:18:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 May 2017 18:18:57 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 31 20:18:52 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 1dG8Co-0003Vd-Bx for ged-emacs-devel@m.gmane.org; Wed, 31 May 2017 20:18:50 +0200 Original-Received: from localhost ([::1]:33257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG8Ct-0005oC-Pe for ged-emacs-devel@m.gmane.org; Wed, 31 May 2017 14:18:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dG8C9-0005mU-Q8 for emacs-devel@gnu.org; Wed, 31 May 2017 14:18:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dG8C5-0003gd-GC for emacs-devel@gnu.org; Wed, 31 May 2017 14:18:09 -0400 Original-Received: from [195.159.176.226] (port=55899 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dG8C5-0003g0-8V for emacs-devel@gnu.org; Wed, 31 May 2017 14:18:05 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dG8Bw-0000xo-LA for emacs-devel@gnu.org; Wed, 31 May 2017 20:17:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 24 Original-X-Complaints-To: usenet@blaine.gmane.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Cancel-Lock: sha1:K8XqKGDgUbrB89hjenoh5gmJy6o= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:215372 Archived-At: On Wed, 17 May 2017 16:05:01 -0400 Ted Zlatanov wrote: I've pushed the last commits I wanted to introduce to the scratch/tzz/nettle branch: generate IVs using GNUTLS_RND_NONCE. The input spec and the output of the functions is changed slightly. The docs and tests are updated. The output is now (OUTPUT ACTUAL-IV) which lets callers grab the IV that was used. This detail will be hidden by wrapper libraries but maybe a plist or alist would be better than a simple list? I'm not sure. I had an alternate IV generator working following https://tools.ietf.org/html/rfc5116#section-3.2 generating a fixed hash with the key and appending a counter, but was not happy with the performance using hashtables. Also hashtables don't seem to work well with binary keys and the C mechanics got really annoying. The main requirement is that an IV is never reused with the same key, which I think GNUTLS_RND_NONCE satisfies pretty well. Comments welcome. I'd love to merge this branch, if there are no objections or comments on the two items above or otherwise. It's been sitting for a while. Thanks Ted