提交 fdc520aa 编写于 作者: S Sebastian Siewior 提交者: Herbert Xu

[CRYPTO] geode: Use correct encrypt/decrypt function in fallback

crypto_blkcipher_decrypt is wrong because it does not care about
the IV.
Signed-off-by: NSebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 5de8f1b5
...@@ -190,7 +190,7 @@ static int fallback_blk_dec(struct blkcipher_desc *desc, ...@@ -190,7 +190,7 @@ static int fallback_blk_dec(struct blkcipher_desc *desc,
tfm = desc->tfm; tfm = desc->tfm;
desc->tfm = op->fallback.blk; 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; desc->tfm = tfm;
return ret; return ret;
...@@ -206,7 +206,7 @@ static int fallback_blk_enc(struct blkcipher_desc *desc, ...@@ -206,7 +206,7 @@ static int fallback_blk_enc(struct blkcipher_desc *desc,
tfm = desc->tfm; tfm = desc->tfm;
desc->tfm = op->fallback.blk; 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; desc->tfm = tfm;
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册