[7/*,CRYPTO] Kill obsolete iv check in cbc_process()
diff mbox series

Message ID 20050322112231.GA7224@gondor.apana.org.au
State New, archived
Headers show
  • [7/*,CRYPTO] Kill obsolete iv check in cbc_process()
Related show

Commit Message

Herbert Xu March 22, 2005, 11:22 a.m. UTC

Here's some more optimisations plus a bug fix for a pathological case
where in_place might not be set correctly which can't happen with any
of the current users.  Here is the first one:

We have long since stopped using a null cit_iv as a means of doing null
encryption.  In fact it doesn't work here anyway since we need to copy
src into dst to achieve null encryption.

No user of cbc_encrypt_iv/cbc_decrypt_iv does this either so let's just
get rid of this check which is sitting in the fast path.

diff mbox series

===== cipher.c 1.24 vs edited =====
--- 1.24/crypto/cipher.c	2005-03-21 18:41:41 +11:00
+++ edited/cipher.c	2005-03-22 21:28:00 +11:00
@@ -145,11 +145,7 @@ 
 			cryptfn_t fn, int enc, void *info)
 	u8 *iv = info;
-	/* Null encryption */
-	if (!iv)
-		return;
 	if (enc) {
 		tfm->crt_u.cipher.cit_xor_block(iv, src);
 		fn(crypto_tfm_ctx(tfm), dst, iv);