mirror of
https://github.com/openssl/openssl.git
synced 2025-02-23 14:42:15 +08:00
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)
This commit is contained in:
parent
3352dc185f
commit
1d724b5e82
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user