diff options
author | Eric Biggers <ebiggers@google.com> | 2019-10-13 06:39:15 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-10-23 10:46:58 +0200 |
commit | 7740bd51efd697fe3750c7317229ec83571f5d98 (patch) | |
tree | 2e40c28085ac630f59d207bd5029a832ab01fe67 /drivers/crypto/nx/nx-aes-cbc.c | |
parent | crypto: padlock-aes - convert to skcipher API (diff) | |
download | linux-7740bd51efd697fe3750c7317229ec83571f5d98.tar.xz linux-7740bd51efd697fe3750c7317229ec83571f5d98.zip |
crypto: nx - don't abuse blkcipher_desc to pass iv around
The NX crypto driver is using 'struct blkcipher_desc' to pass the IV
around, even for AEADs (for which it creates the struct on the stack).
This is not appropriate since this structure is part of the "blkcipher"
API, which is deprecated and will be removed.
Just pass around the IV directly instead.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/nx/nx-aes-cbc.c')
-rw-r--r-- | drivers/crypto/nx/nx-aes-cbc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/nx/nx-aes-cbc.c b/drivers/crypto/nx/nx-aes-cbc.c index e631f9979127..482a203a9260 100644 --- a/drivers/crypto/nx/nx-aes-cbc.c +++ b/drivers/crypto/nx/nx-aes-cbc.c @@ -72,8 +72,9 @@ static int cbc_aes_nx_crypt(struct blkcipher_desc *desc, do { to_process = nbytes - processed; - rc = nx_build_sg_lists(nx_ctx, desc, dst, src, &to_process, - processed, csbcpb->cpb.aes_cbc.iv); + rc = nx_build_sg_lists(nx_ctx, desc->info, dst, src, + &to_process, processed, + csbcpb->cpb.aes_cbc.iv); if (rc) goto out; |