mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Fix review comment
This commit is contained in:
@ -5123,8 +5123,10 @@ void GHASH(Aes* aes, const byte* a, word32 aSz, const byte* c,
|
|||||||
}
|
}
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
/* store AAD partial tag for next call */
|
/* store AAD partial tag for next call */
|
||||||
aes->aadH[0] = (word32)x[0];
|
aes->aadH[0] = (word32)((x[0] & 0xFFFFFFFF00000000) >> 32);
|
||||||
aes->aadH[1] = (word32)x[1];
|
aes->aadH[1] = (word32)(x[0] & 0xFFFFFFFF);
|
||||||
|
aes->aadH[2] = (word32)((x[1] & 0xFFFFFFFF00000000) >> 32);
|
||||||
|
aes->aadH[3] = (word32)(x[1] & 0xFFFFFFFF);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5136,8 +5138,8 @@ void GHASH(Aes* aes, const byte* a, word32 aSz, const byte* c,
|
|||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
/* Start from last AAD partial tag */
|
/* Start from last AAD partial tag */
|
||||||
if(aes->aadLen) {
|
if(aes->aadLen) {
|
||||||
x[0] = (word64)aes->aadH[0];
|
x[0] = ((word64)aes->aadH[0]) << 32 | aes->aadH[1];
|
||||||
x[1] = (word64)aes->aadH[1];
|
x[1] = ((word64)aes->aadH[2]) << 32 | aes->aadH[3];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
while (blocks--) {
|
while (blocks--) {
|
||||||
|
@ -146,7 +146,7 @@ typedef struct Aes {
|
|||||||
#ifdef HAVE_AESGCM
|
#ifdef HAVE_AESGCM
|
||||||
ALIGN16 byte H[AES_BLOCK_SIZE];
|
ALIGN16 byte H[AES_BLOCK_SIZE];
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
word32 aadH[2]; /* additional authenticated data GASH */
|
word32 aadH[4]; /* additional authenticated data GHASH */
|
||||||
word32 aadLen; /* additional authenticated data len */
|
word32 aadLen; /* additional authenticated data len */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user