提交 9e5fe439 编写于 作者: A Andy Polyakov

xts128.c: fix bug introduced in commit#20704. Bug affected encryption of

vectors whose lenght was not multiples of 16 bytes.
上级 74fac927
......@@ -89,8 +89,8 @@ int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16],
scratch.u[1] ^= tweak.u[1];
memcpy(out,scratch.c,16);
#else
((u64*)out)[0] = scratch.u[0]^tweak.u[0];
((u64*)out)[1] = scratch.u[1]^tweak.u[1];
((u64*)out)[0] = scratch.u[0]^=tweak.u[0];
((u64*)out)[1] = scratch.u[1]^=tweak.u[1];
#endif
inp += 16;
out += 16;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册