Skip to content

Commit

Permalink
[CRYPTO] geode: Use correct encrypt/decrypt function in fallback
Browse files Browse the repository at this point in the history
crypto_blkcipher_decrypt is wrong because it does not care about
the IV.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Sebastian Siewior authored and Herbert Xu committed Jan 10, 2008
1 parent 5de8f1b commit fdc520a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/geode-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static int fallback_blk_dec(struct blkcipher_desc *desc,
tfm = desc->tfm;
desc->tfm = op->fallback.blk;

ret = crypto_blkcipher_decrypt(desc, dst, src, nbytes);
ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes);

desc->tfm = tfm;
return ret;
Expand All @@ -206,7 +206,7 @@ static int fallback_blk_enc(struct blkcipher_desc *desc,
tfm = desc->tfm;
desc->tfm = op->fallback.blk;

ret = crypto_blkcipher_encrypt(desc, dst, src, nbytes);
ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes);

desc->tfm = tfm;
return ret;
Expand Down

0 comments on commit fdc520a

Please sign in to comment.