Date: Fri, 16 Dec 2016 14:15:57 -0800 From: Andy Lutomirski <luto@...capital.net> To: George Spelvin <linux@...encehorizons.net> Cc: "Ted Ts'o" <tytso@....edu>, Andi Kleen <ak@...ux.intel.com>, "David S. Miller" <davem@...emloft.net>, David Laight <David.Laight@...lab.com>, "D. J. Bernstein" <djb@...yp.to>, Eric Biggers <ebiggers3@...il.com>, Hannes Frederic Sowa <hannes@...essinduktion.org>, "Jason A. Donenfeld" <Jason@...c4.com>, Jean-Philippe Aumasson <jeanphilippe.aumasson@...il.com>, "kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>, Linux Crypto Mailing List <linux-crypto@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Network Development <netdev@...r.kernel.org>, Tom Herbert <tom@...bertland.com>, Linus Torvalds <torvalds@...ux-foundation.org>, Vegard Nossum <vegard.nossum@...il.com> Subject: Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF On Fri, Dec 16, 2016 at 2:13 PM, George Spelvin <linux@...encehorizons.net> wrote: >> What should we do with get_random_int() and get_random_long()? In >> some cases it's being used in performance sensitive areas, and where >> anti-DoS protection might be enough. In others, maybe not so much. > > This is tricky. The entire get_random_int() structure is an abuse of > the hash function and will need to be thoroughly rethought to convert > it to SipHash. Remember, SipHash's security goals are very different > from MD5, so there's no obvious way to do the conversion. > > (It's *documented* as "not cryptographically secure", but we know > where that goes.) > >> If we rekeyed the secret used by get_random_int() and >> get_random_long() frequently (say, every minute or every 5 minutes), >> would that be sufficient for current and future users of these >> interfaces? > > Remembering that on "real" machines it's full SipHash, then I'd say that > 64-bit security + rekeying seems reasonable. > > The question is, the idea has recently been floated to make hsiphash = > SipHash-1-3 on 64-bit machines. Is *that* okay? > > > The annoying thing about the currently proposed patch is that the *only* > chaining is the returned value. What I'd *like* to do is the same > pattern as we do with md5, and remember v[0..3] between invocations. > But there's no partial SipHash primitive; we only get one word back. > > Even > *chaining += ret = siphash_3u64(...) > > would be an improvement. This is almost exactly what I suggested in my email on the other thread from a few seconds ago :) --Andy
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.