Skip to contentSkip to conversation

s390 AES: Copy the IV back for chaining support

PATCH New Sebastian Siewior 1 participant 1 message Dec 7, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390 AES: Copy the IV back for chaining support

This is required for one or two crypto users in tree which chain the IV.

---
 arch/s390/crypto/aes_s390.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/s390/crypto/aes_s390.c +6 -0
index 8524611..a2eae49 100644
@@ -242,6 +242,9 @@ static int fallback_blk_dec(struct blkcipher_desc *desc,
 
 	ret = crypto_blkcipher_decrypt(desc, dst, src, nbytes);
 
+	memcpy(desc->info, crypto_blkcipher_crt(sctx->fallback.blk)->iv,
+		AES_BLOCK_SIZE);
+
 	desc->tfm = tfm;
 	return ret;
 }
@@ -262,6 +265,9 @@ static int fallback_blk_enc(struct blkcipher_desc *desc,
 
 	ret = crypto_blkcipher_encrypt(desc, dst, src, nbytes);
 
+	memcpy(desc->info, crypto_blkcipher_crt(sctx->fallback.blk)->iv,
+		AES_BLOCK_SIZE);
+
 	desc->tfm = tfm;
 	return ret;
 }
Signature · 1 line
1.5.3.4