Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543747
| From | Tom Herbert <tom@herbertland.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF |
| Date | 2016-12-16 22:00 +0100 |
| Message-ID | <sP7LH-5f-17@gated-at.bofh.it> (permalink) |
| References | <sP6FY-7TO-9@gated-at.bofh.it> <sP7C2-8t1-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Dec 16, 2016 at 12:41 PM, George Spelvin
<linux@sciencehorizons.net> wrote:
> Tom Herbert wrote:
>> Tested this. Distribution and avalanche effect are still good. Speed
>> wise I see about a 33% improvement over siphash (20 nsecs/op versus 32
>> nsecs). That's about 3x of jhash speed (7 nsecs). So that might closer
>> to a more palatable replacement for jhash. Do we lose any security
>> advantages with halfsiphash?
>
> What are you testing on? And what input size? And does "33% improvement"
> mean 4/3 the rate and 3/4 the time? Or 2/3 the time and 3/2 the rate?
>
Sorry, that is over an IPv4 tuple. Intel(R) Xeon(R) CPU E5-2660 0 @
2.20GHz. Recoded the function I was using to look like more like 64
bit version and yes it is indeed slower.
> These are very odd results. On a 64-bit machine, SipHash should be the
> same speed per round, and faster because it hashes more data per round.
> (Unless you're hitting some unexpected cache/decode effect due to REX
> prefixes.)
>
> On a 32-bit machine (other than ARM, where your results might make sense,
> or maybe if you're hashing large amounts of data), the difference should
> be larger.
>
> And yes, there is a *significant* security loss. SipHash is 128 bits
> ("don't worry about it"). hsiphash is 64 bits, which is known breakable
> ("worry about it"), so we have to do a careful analysis of the cost of
> a successful attack.
>
> As mentioned in the e-mails that just flew by, hsiphash is intended
> *only* for 32-bit machines which bog down on full SipHash. On all 64-bit
> machines, it will be implemented as an alias for SipHash and the security
> concerns will Just Go Away.
>
> The place where hsiphash is expected to make a big difference is 32-bit
> x86. If you only see 33% difference with "gcc -m32", I'm going to be
> very confused.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-16 04:50 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-16 13:50 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-16 17:00 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-16 18:40 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-16 19:10 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-16 21:20 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF Theodore Ts'o <tytso@mit.edu> - 2016-12-16 21:50 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-16 23:20 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-17 00:50 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-17 02:50 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-17 03:20 +0100
Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF Theodore Ts'o <tytso@mit.edu> - 2016-12-17 16:50 +0100
Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF Jeffrey Walton <noloader@gmail.com> - 2016-12-17 17:20 +0100
Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-19 18:30 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-16 23:20 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF Andy Lutomirski <luto@amacapital.net> - 2016-12-16 23:20 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-17 13:50 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF Tom Herbert <tom@herbertland.com> - 2016-12-16 20:50 +0100
Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF Daniel Micay <danielmicay@gmail.com> - 2016-12-16 21:50 +0100
Re: [kernel-hardening] Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-16 22:10 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-16 21:50 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF Tom Herbert <tom@herbertland.com> - 2016-12-16 22:00 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-17 16:30 +0100
RE: [PATCH v5 1/4] siphash: add cryptographically secure PRF David Laight <David.Laight@ACULAB.COM> - 2016-12-19 15:20 +0100
RE: [PATCH v5 1/4] siphash: add cryptographically secure PRF "George Spelvin" <linux@sciencehorizons.net> - 2016-12-19 19:20 +0100
Re: [PATCH v5 1/4] siphash: add cryptographically secure PRF "Jason A. Donenfeld" <Jason@zx2c4.com> - 2016-12-16 21:50 +0100
csiph-web