Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-12 Thread Jason A. Donenfeld
On Thu, Jan 12, 2017 at 4:04 PM, Herbert Xu wrote: >> typedef struct { >>u64 v[2]; >> } siphash_key_t; > > If it's just an 128-bit value then we have u128 in crypto/b128ops.h > that could be generalised for this. Nope, it's actually two 64-bit values. Yes,

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-12 Thread Jason A. Donenfeld
On Thu, Jan 12, 2017 at 4:04 PM, Herbert Xu wrote: >> typedef struct { >>u64 v[2]; >> } siphash_key_t; > > If it's just an 128-bit value then we have u128 in crypto/b128ops.h > that could be generalised for this. Nope, it's actually two 64-bit values. Yes, the user fills it in as one

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-12 Thread Herbert Xu
Eric Biggers wrote: > Hi Jason, just a few comments: > > On Fri, Jan 06, 2017 at 09:10:52PM +0100, Jason A. Donenfeld wrote: >> +#define SIPHASH_ALIGNMENT __alignof__(u64) >> +typedef u64 siphash_key_t[2]; > > I was confused by all the functions passing siphash_key_t "by

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-12 Thread Herbert Xu
Eric Biggers wrote: > Hi Jason, just a few comments: > > On Fri, Jan 06, 2017 at 09:10:52PM +0100, Jason A. Donenfeld wrote: >> +#define SIPHASH_ALIGNMENT __alignof__(u64) >> +typedef u64 siphash_key_t[2]; > > I was confused by all the functions passing siphash_key_t "by value" until I > saw >

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-07 Thread Jason A. Donenfeld
Hi Eric, Thanks for the review. I wish we had gotten to this much earlier before the merge, when there were quite a few revisions and refinements, but better late than never, and I'm quite pleased to have your feedback for making this patchset perfect. Comments are inline below. On Sat, Jan 7,

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-07 Thread Jason A. Donenfeld
Hi Eric, Thanks for the review. I wish we had gotten to this much earlier before the merge, when there were quite a few revisions and refinements, but better late than never, and I'm quite pleased to have your feedback for making this patchset perfect. Comments are inline below. On Sat, Jan 7,

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Eric Biggers
Hi Jason, just a few comments: On Fri, Jan 06, 2017 at 09:10:52PM +0100, Jason A. Donenfeld wrote: > +#define SIPHASH_ALIGNMENT __alignof__(u64) > +typedef u64 siphash_key_t[2]; I was confused by all the functions passing siphash_key_t "by value" until I saw that it's actually typedefed to

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Eric Biggers
Hi Jason, just a few comments: On Fri, Jan 06, 2017 at 09:10:52PM +0100, Jason A. Donenfeld wrote: > +#define SIPHASH_ALIGNMENT __alignof__(u64) > +typedef u64 siphash_key_t[2]; I was confused by all the functions passing siphash_key_t "by value" until I saw that it's actually typedefed to

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread David Miller
Please do not quote an entire large patch, just to make a small comment or annotation. This makes it so that every reader of your posting has to scroll down a lot just to see a small amount of new content. Simply edit down the quoted material to the actually required context, and then add the

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread David Miller
Please do not quote an entire large patch, just to make a small comment or annotation. This makes it so that every reader of your posting has to scroll down a lot just to see a small amount of new content. Simply edit down the quoted material to the actually required context, and then add the

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jean-Philippe Aumasson
> > > On Fri, Jan 6, 2017 at 9:11 PM Jason A. Donenfeld wrote: > > SipHash is a 64-bit keyed hash function that is actually a > cryptographically secure PRF, like HMAC. Except SipHash is super fast, > and is meant to be used as a hashtable keyed lookup function, or as a > general

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jean-Philippe Aumasson
> > > On Fri, Jan 6, 2017 at 9:11 PM Jason A. Donenfeld wrote: > > SipHash is a 64-bit keyed hash function that is actually a > cryptographically secure PRF, like HMAC. Except SipHash is super fast, > and is meant to be used as a hashtable keyed lookup function, or as a > general PRF for short

[PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jason A. Donenfeld
SipHash is a 64-bit keyed hash function that is actually a cryptographically secure PRF, like HMAC. Except SipHash is super fast, and is meant to be used as a hashtable keyed lookup function, or as a general PRF for short input use cases, such as sequence numbers or RNG chaining. For the first

[PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jason A. Donenfeld
SipHash is a 64-bit keyed hash function that is actually a cryptographically secure PRF, like HMAC. Except SipHash is super fast, and is meant to be used as a hashtable keyed lookup function, or as a general PRF for short input use cases, such as sequence numbers or RNG chaining. For the first

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jason A. Donenfeld
Will resubmit. Sorry. I had this in earlier series and dropped it in this one. Apologies. Give me 30 minutes and you'll have a beautiful and conformant patch series.

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jason A. Donenfeld
Will resubmit. Sorry. I had this in earlier series and dropped it in this one. Apologies. Give me 30 minutes and you'll have a beautiful and conformant patch series.

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread David Miller
Proper patch series submissions require a header "[PATCH 0/N] ..." posting explaining at a high level, what the series is doing, how it is doing it, and why it is doing it that way.

Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread David Miller
Proper patch series submissions require a header "[PATCH 0/N] ..." posting explaining at a high level, what the series is doing, how it is doing it, and why it is doing it that way.

[PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jason A. Donenfeld
SipHash is a 64-bit keyed hash function that is actually a cryptographically secure PRF, like HMAC. Except SipHash is super fast, and is meant to be used as a hashtable keyed lookup function, or as a general PRF for short input use cases, such as sequence numbers or RNG chaining. For the first

[PATCH net-next 1/4] siphash: add cryptographically secure PRF

2017-01-06 Thread Jason A. Donenfeld
SipHash is a 64-bit keyed hash function that is actually a cryptographically secure PRF, like HMAC. Except SipHash is super fast, and is meant to be used as a hashtable keyed lookup function, or as a general PRF for short input use cases, such as sequence numbers or RNG chaining. For the first