svn rev #23389: trunk/src/lib/crypto/builtin/des/

ghudson@MIT.EDU ghudson at MIT.EDU
Mon Nov 30 14:03:58 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=23389
Commit By: ghudson
Log Message:
ticket: 6588
subject: Fix ivec chaining for DES iov encryption
tags: pullup
target_version: 1.7.1

krb5int_des_cbc_decrypt_iov was using a plaintext block to update the
ivec.  Fix it to use the last cipher block, borrowing from the
corresponding des3 function.  The impact of this bug is not serious
since ivec chaining is not typically used with IOV encryption in 1.7.



Changed Files:
U   trunk/src/lib/crypto/builtin/des/f_aead.c
Modified: trunk/src/lib/crypto/builtin/des/f_aead.c
===================================================================
--- trunk/src/lib/crypto/builtin/des/f_aead.c	2009-11-30 16:19:24 UTC (rev 23388)
+++ trunk/src/lib/crypto/builtin/des/f_aead.c	2009-11-30 19:03:58 UTC (rev 23389)
@@ -188,6 +188,9 @@
         krb5int_c_iov_put_block(data, num_data, oblock, MIT_DES_BLOCK_LENGTH, &output_pos);
     }
 
-    if (ivec != NULL)
-        memcpy(ivec, oblock, MIT_DES_BLOCK_LENGTH);
+    if (ivec != NULL) {
+        op = ivec;
+        PUT_HALF_BLOCK(ocipherl, op);
+        PUT_HALF_BLOCK(ocipherr, op);
+    }
 }




More information about the cvs-krb5 mailing list