aboutsummaryrefslogtreecommitdiff
path: root/crypto/modes/xts128.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2011-04-23 09:15:03 +0000
committerAndy Polyakov <appro@openssl.org>2011-04-23 09:15:03 +0000
commit9e5fe439b4e8fb4198f241f2ba16a029a480d5f5 (patch)
tree774ffa75b889b937a741bdd750b974e33626a131 /crypto/modes/xts128.c
parent74fac927b0b7d89aa6cdb88b12669e1cd8f4e841 (diff)
downloadopenssl-9e5fe439b4e8fb4198f241f2ba16a029a480d5f5.zip
openssl-9e5fe439b4e8fb4198f241f2ba16a029a480d5f5.tar.gz
openssl-9e5fe439b4e8fb4198f241f2ba16a029a480d5f5.tar.bz2
xts128.c: fix bug introduced in commit#20704. Bug affected encryption of
vectors whose lenght was not multiples of 16 bytes.
Diffstat (limited to 'crypto/modes/xts128.c')
-rw-r--r--crypto/modes/xts128.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/modes/xts128.c b/crypto/modes/xts128.c
index ebdc5ea..e7f1641 100644
--- a/crypto/modes/xts128.c
+++ b/crypto/modes/xts128.c
@@ -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;