diff options
-rw-r--r-- | crypto/cipher.c | 2 | ||||
-rw-r--r-- | include/linux/crypto.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/cipher.c b/crypto/cipher.c index 56406a4a88d4..aebc4a2adc80 100644 --- a/crypto/cipher.c +++ b/crypto/cipher.c | |||
@@ -399,6 +399,8 @@ int crypto_init_cipher_ops(struct crypto_tfm *tfm) | |||
399 | case CRYPTO_TFM_MODE_ECB: | 399 | case CRYPTO_TFM_MODE_ECB: |
400 | ops->cit_encrypt = ecb_encrypt; | 400 | ops->cit_encrypt = ecb_encrypt; |
401 | ops->cit_decrypt = ecb_decrypt; | 401 | ops->cit_decrypt = ecb_decrypt; |
402 | ops->cit_encrypt_iv = nocrypt_iv; | ||
403 | ops->cit_decrypt_iv = nocrypt_iv; | ||
402 | break; | 404 | break; |
403 | 405 | ||
404 | case CRYPTO_TFM_MODE_CBC: | 406 | case CRYPTO_TFM_MODE_CBC: |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 053bfab43e8d..dbdfc7c79367 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -422,7 +422,6 @@ static inline int crypto_cipher_encrypt_iv(struct crypto_tfm *tfm, | |||
422 | unsigned int nbytes, u8 *iv) | 422 | unsigned int nbytes, u8 *iv) |
423 | { | 423 | { |
424 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | 424 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); |
425 | BUG_ON(tfm->crt_cipher.cit_mode == CRYPTO_TFM_MODE_ECB); | ||
426 | return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); | 425 | return tfm->crt_cipher.cit_encrypt_iv(tfm, dst, src, nbytes, iv); |
427 | } | 426 | } |
428 | 427 | ||
@@ -441,7 +440,6 @@ static inline int crypto_cipher_decrypt_iv(struct crypto_tfm *tfm, | |||
441 | unsigned int nbytes, u8 *iv) | 440 | unsigned int nbytes, u8 *iv) |
442 | { | 441 | { |
443 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); | 442 | BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); |
444 | BUG_ON(tfm->crt_cipher.cit_mode == CRYPTO_TFM_MODE_ECB); | ||
445 | return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); | 443 | return tfm->crt_cipher.cit_decrypt_iv(tfm, dst, src, nbytes, iv); |
446 | } | 444 | } |
447 | 445 | ||