aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/crypto.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-07-13 20:42:27 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-20 21:41:03 -0400
commitdf89820ebd5bbf4f3c6b5f8ee7d9e983107f6a91 (patch)
treea782e2662cbdb6c7ad7591f2697d06008048f966 /include/linux/crypto.h
parentc907ee76d8456fe1d98f40b5febfc7802a73b784 (diff)
[CRYPTO] cipher: Removed special IV checks for ECB
This patch makes IV operations on ECB fail through nocrypt_iv rather than calling BUG(). This is needed to generalise CBC/ECB using the template mechanism. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/crypto.h')
-rw-r--r--include/linux/crypto.h2
1 files changed, 0 insertions, 2 deletions
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