summaryrefslogtreecommitdiffstats
path: root/crypto/modes
diff options
context:
space:
mode:
authorZhang Jinde <zjd5536@163.com>2020-09-24 14:48:28 +0800
committerTomas Mraz <tomas@openssl.org>2021-02-19 12:24:03 +0100
commit1d724b5e82ba36fb50fd24db3cd664da570daf84 (patch)
tree495b03aaca321dcdb3793b02483a7c125be20cdb /crypto/modes
parent3352dc185fde9861b58ca7621b4062bb42ec1b55 (diff)
CRYPTO_gcm128_decrypt: fix mac or tag calculation
The incorrect code is in #ifdef branch that is normally not compiled in. Signed-off-by: Zhang Jinde <zjd5536@163.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12968)
Diffstat (limited to 'crypto/modes')
-rw-r--r--crypto/modes/gcm128.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c
index 4f52073d7f..a6147e41a1 100644
--- a/crypto/modes/gcm128.c
+++ b/crypto/modes/gcm128.c
@@ -1359,8 +1359,8 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
else
ctx->Yi.d[3] = ctr;
for (i = 0; i < 16 / sizeof(size_t); ++i) {
- size_t c = in[i];
- out[i] = c ^ ctx->EKi.t[i];
+ size_t c = in_t[i];
+ out_t[i] = c ^ ctx->EKi.t[i];
ctx->Xi.t[i] ^= c;
}
GCM_MUL(ctx);