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>
This commit is contained in:
@@ -85,8 +85,9 @@ static int ctr_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_ctr.iv);
|
||||
rc = nx_build_sg_lists(nx_ctx, desc->info, dst, src,
|
||||
&to_process, processed,
|
||||
csbcpb->cpb.aes_ctr.iv);
|
||||
if (rc)
|
||||
goto out;
|
||||
|
||||
|
Reference in New Issue
Block a user