From a7bd03960c2ebae298e0242422e99bde140386cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Wed, 9 Jun 1999 18:01:49 +0000 Subject: [PATCH] des_cbc_encrypt / des_ncbc_encrypt issue. --- CHANGES | 7 +++---- crypto/des/des.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index f09222f1ca..32f6ff1181 100644 --- a/CHANGES +++ b/CHANGES @@ -14,10 +14,9 @@ *) DES CBC did not update the IV. Weird. [Ben Laurie] #else - Look at des.c, cbc3_enc.c etc.: Those rely on that bevaviour of - des_cbc_encrypt and copy IVs themselves when they have to. - Either all those have to be changed too, or things must stay as they - are. + des_cbc_encrypt does not update the IV, but des_ncbc_encrypt does. + Changing the behaviour of the former might break existing programs -- + where IV updating is needed, des_ncbc_encrypt can be used. #endif *) When bntest is run from "make test" it drives bc to check its diff --git a/crypto/des/des.h b/crypto/des/des.h index 7c029e01ee..141526ba05 100644 --- a/crypto/des/des.h +++ b/crypto/des/des.h @@ -151,6 +151,7 @@ void des_ecb3_encrypt(const_des_cblock *input, des_cblock *output, DES_LONG des_cbc_cksum(const unsigned char *input,des_cblock *output, long length,des_key_schedule schedule, const_des_cblock *ivec); +/* des_cbc_encrypt does not update the IV! Use des_ncbc_encrypt instead. */ void des_cbc_encrypt(const unsigned char *input,unsigned char *output, long length,des_key_schedule schedule,des_cblock *ivec, int enc); -- 2.25.1