A couple more comments: On Thu, Oct 10, 2019 at 04:10:05PM +0200, David Sterba wrote: > +static void blake2b_set_lastnode(struct blake2b_state *S) > +{ > + S->f[1] = (u64)-1; > +} > + [...] > +static void blake2b_set_lastblock(struct blake2b_state *S) > +{ > + if (S->last_node) > + blake2b_set_lastnode(S); > + last_node is never true, so this is dead code. > +struct digest_desc_ctx { > + struct blake2b_state S[1]; > +}; This indirection isn't needed. Just use struct blake2b_state directly as the shash_desc_ctx. - Eric