[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170112150417.GA15951@gondor.apana.org.au>
Date: Thu, 12 Jan 2017 23:04:17 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Eric Biggers <ebiggers3@...il.com>
Cc: Jason@...c4.com, davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, jeanphilippe.aumasson@...il.com,
torvalds@...ux-foundation.org, David.Laight@...lab.com,
eric.dumazet@...il.com
Subject: Re: [PATCH net-next 1/4] siphash: add cryptographically secure PRF
Eric Biggers <ebiggers3@...il.com> 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
> that it's actually typedefed to u64[2]. Have you considered making it a struct
> instead, something like this?
>
> 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.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists