diff options
Diffstat (limited to 'arch/s390/crypto/aes_s390.c')
-rw-r--r-- | arch/s390/crypto/aes_s390.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c index 85246112ab5e..46c97058ebe1 100644 --- a/arch/s390/crypto/aes_s390.c +++ b/arch/s390/crypto/aes_s390.c | |||
@@ -234,13 +234,10 @@ static int fallback_blk_dec(struct blkcipher_desc *desc, | |||
234 | struct crypto_blkcipher *tfm; | 234 | struct crypto_blkcipher *tfm; |
235 | struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); | 235 | struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); |
236 | 236 | ||
237 | memcpy(crypto_blkcipher_crt(sctx->fallback.blk)->iv, desc->info, | ||
238 | AES_BLOCK_SIZE); | ||
239 | |||
240 | tfm = desc->tfm; | 237 | tfm = desc->tfm; |
241 | desc->tfm = sctx->fallback.blk; | 238 | desc->tfm = sctx->fallback.blk; |
242 | 239 | ||
243 | ret = crypto_blkcipher_decrypt(desc, dst, src, nbytes); | 240 | ret = crypto_blkcipher_decrypt_iv(desc, dst, src, nbytes); |
244 | 241 | ||
245 | desc->tfm = tfm; | 242 | desc->tfm = tfm; |
246 | return ret; | 243 | return ret; |
@@ -254,13 +251,10 @@ static int fallback_blk_enc(struct blkcipher_desc *desc, | |||
254 | struct crypto_blkcipher *tfm; | 251 | struct crypto_blkcipher *tfm; |
255 | struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); | 252 | struct s390_aes_ctx *sctx = crypto_blkcipher_ctx(desc->tfm); |
256 | 253 | ||
257 | memcpy(crypto_blkcipher_crt(sctx->fallback.blk)->iv, desc->info, | ||
258 | AES_BLOCK_SIZE); | ||
259 | |||
260 | tfm = desc->tfm; | 254 | tfm = desc->tfm; |
261 | desc->tfm = sctx->fallback.blk; | 255 | desc->tfm = sctx->fallback.blk; |
262 | 256 | ||
263 | ret = crypto_blkcipher_encrypt(desc, dst, src, nbytes); | 257 | ret = crypto_blkcipher_encrypt_iv(desc, dst, src, nbytes); |
264 | 258 | ||
265 | desc->tfm = tfm; | 259 | desc->tfm = tfm; |
266 | return ret; | 260 | return ret; |