提交 a7bd0396 编写于 作者: B Bodo Möller

des_cbc_encrypt / des_ncbc_encrypt issue.

上级 5765e24f
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册