linux/include/crypto/internal
Eric Biggers 84a9c938e5 crypto: ahash - introduce crypto_grab_ahash()
Currently, ahash spawns are initialized by using ahash_attr_alg() or
crypto_find_alg() to look up the ahash algorithm, then calling
crypto_init_ahash_spawn().

This is different from how skcipher, aead, and akcipher spawns are
initialized (they use crypto_grab_*()), and for no good reason.  This
difference introduces unnecessary complexity.

The crypto_grab_*() functions used to have some problems, like not
holding a reference to the algorithm and requiring the caller to
initialize spawn->base.inst.  But those problems are fixed now.

So, let's introduce crypto_grab_ahash() so that we can convert all
templates to the same way of initializing their spawns.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-01-09 11:30:55 +08:00
..
acompress.h crypto: algapi - make unregistration functions return void 2019-12-20 14:58:35 +08:00
aead.h crypto: aead - pass instance to crypto_grab_aead() 2020-01-09 11:30:54 +08:00
akcipher.h crypto: akcipher - pass instance to crypto_grab_akcipher() 2020-01-09 11:30:54 +08:00
blake2s.h crypto: blake2s - implement generic shash driver 2019-11-17 09:02:42 +08:00
chacha.h crypto: chacha - fix warning message in header file 2019-12-11 16:48:38 +08:00
cryptouser.h crypto: user - fix potential warnings in cryptouser.h 2019-08-02 14:44:31 +10:00
des.h crypto: remove CRYPTO_TFM_RES_WEAK_KEY 2020-01-09 11:30:53 +08:00
geniv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
hash.h crypto: ahash - introduce crypto_grab_ahash() 2020-01-09 11:30:55 +08:00
kpp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
poly1305.h crypto: x86/poly1305 - depend on generic library not generic shash 2019-11-17 09:02:41 +08:00
rng.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
rsa.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
scompress.h crypto: algapi - make unregistration functions return void 2019-12-20 14:58:35 +08:00
simd.h crypto: simd,testmgr - introduce crypto_simd_usable() 2019-03-22 20:57:27 +08:00
skcipher.h crypto: skcipher - pass instance to crypto_grab_skcipher() 2020-01-09 11:30:54 +08:00