diff options
| author | Eric Biggers <ebiggers@google.com> | 2025-05-05 12:10:41 -0700 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-05-12 13:32:53 +0800 |
| commit | d8aeec147affcb6cb65060ed5fe095a2d0fe8a20 (patch) | |
| tree | a84c81e2c5459131e6c023c566a4b6f5b95966d4 /crypto/geniv.c | |
| parent | crypto: gcm - use memcpy_sglist() instead of null skcipher (diff) | |
| download | linux-d8aeec147affcb6cb65060ed5fe095a2d0fe8a20.tar.gz linux-d8aeec147affcb6cb65060ed5fe095a2d0fe8a20.zip | |
crypto: geniv - use memcpy_sglist() instead of null skcipher
For copying data between two scatterlists, just use memcpy_sglist()
instead of the so-called "null skcipher". This is much simpler.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/geniv.c')
| -rw-r--r-- | crypto/geniv.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/crypto/geniv.c b/crypto/geniv.c index bee4621b4f12..42eff6a7387c 100644 --- a/crypto/geniv.c +++ b/crypto/geniv.c @@ -9,7 +9,6 @@ #include <crypto/internal/geniv.h> #include <crypto/internal/rng.h> -#include <crypto/null.h> #include <linux/err.h> #include <linux/kernel.h> #include <linux/module.h> @@ -125,15 +124,10 @@ int aead_init_geniv(struct crypto_aead *aead) if (err) goto out; - ctx->sknull = crypto_get_default_null_skcipher(); - err = PTR_ERR(ctx->sknull); - if (IS_ERR(ctx->sknull)) - goto out; - child = crypto_spawn_aead(aead_instance_ctx(inst)); err = PTR_ERR(child); if (IS_ERR(child)) - goto drop_null; + goto out; ctx->child = child; crypto_aead_set_reqsize(aead, crypto_aead_reqsize(child) + @@ -143,10 +137,6 @@ int aead_init_geniv(struct crypto_aead *aead) out: return err; - -drop_null: - crypto_put_default_null_skcipher(); - goto out; } EXPORT_SYMBOL_GPL(aead_init_geniv); @@ -155,7 +145,6 @@ void aead_exit_geniv(struct crypto_aead *tfm) struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm); crypto_free_aead(ctx->child); - crypto_put_default_null_skcipher(); } EXPORT_SYMBOL_GPL(aead_exit_geniv); |
