Re: [PATCH v2 09/11] crypto: blake2s - share the "shash" API boilerplate code

2020-12-22 Thread Eric Biggers
On Sat, Dec 19, 2020 at 01:01:53AM +0100, Jason A. Donenfeld wrote: > Hey Eric, > > The solution you've proposed at the end of your email is actually kind > of similar to what we do with curve25519. Check out > include/crypto/curve25519.h. The critical difference between that and > the blake propo

Re: [PATCH v2 09/11] crypto: blake2s - share the "shash" API boilerplate code

2020-12-18 Thread Jason A. Donenfeld
Hey Eric, The solution you've proposed at the end of your email is actually kind of similar to what we do with curve25519. Check out include/crypto/curve25519.h. The critical difference between that and the blake proposal is that it's in the header for curve25519, so the indirection disappears. C

Re: [PATCH v2 09/11] crypto: blake2s - share the "shash" API boilerplate code

2020-12-18 Thread Eric Biggers
On Fri, Dec 18, 2020 at 05:14:58PM +0100, Jason A. Donenfeld wrote: > On Thu, Dec 17, 2020 at 11:25 PM Eric Biggers wrote: > > > > From: Eric Biggers > > > > Move the boilerplate code for setkey(), init(), update(), and final() > > from blake2s_generic.ko into a new module blake2s_helpers.ko, and

Re: [PATCH v2 09/11] crypto: blake2s - share the "shash" API boilerplate code

2020-12-18 Thread Jason A. Donenfeld
On Thu, Dec 17, 2020 at 11:25 PM Eric Biggers wrote: > > From: Eric Biggers > > Move the boilerplate code for setkey(), init(), update(), and final() > from blake2s_generic.ko into a new module blake2s_helpers.ko, and export > it so that it can be used by other shash implementations of BLAKE2s. >

[PATCH v2 09/11] crypto: blake2s - share the "shash" API boilerplate code

2020-12-17 Thread Eric Biggers
From: Eric Biggers Move the boilerplate code for setkey(), init(), update(), and final() from blake2s_generic.ko into a new module blake2s_helpers.ko, and export it so that it can be used by other shash implementations of BLAKE2s. setkey() and init() are exported as-is, while update() and final(