Updated with review comments
This commit is contained in:
parent
f9e364f893
commit
dc5d11fef4
@ -5123,8 +5123,8 @@ void GHASH(Aes* aes, const byte* a, word32 aSz, const byte* c,
|
||||
}
|
||||
#ifdef OPENSSL_EXTRA
|
||||
/* store AAD partial tag for next call */
|
||||
aes->aadH[0] = x[0];
|
||||
aes->aadH[1] = x[1];
|
||||
aes->aadH[0] = (word32)x[0];
|
||||
aes->aadH[1] = (word32)x[1];
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -5136,8 +5136,8 @@ void GHASH(Aes* aes, const byte* a, word32 aSz, const byte* c,
|
||||
#ifdef OPENSSL_EXTRA
|
||||
/* Start from last AAD partial tag */
|
||||
if(aes->aadLen) {
|
||||
x[0] = aes->aadH[0];
|
||||
x[1] = aes->aadH[1];
|
||||
x[0] = (word64)aes->aadH[0];
|
||||
x[1] = (word64)aes->aadH[1];
|
||||
}
|
||||
#endif
|
||||
while (blocks--) {
|
||||
@ -5168,7 +5168,7 @@ void GHASH(Aes* aes, const byte* a, word32 aSz, const byte* c,
|
||||
len[0] = aSz; len[1] = cSz;
|
||||
#ifdef OPENSSL_EXTRA
|
||||
if (aes->aadLen)
|
||||
len[0] = aes->aadLen;
|
||||
len[0] = (word64)aes->aadLen;
|
||||
#endif
|
||||
/* Lengths are in bytes. Convert to bits. */
|
||||
len[0] *= 8;
|
||||
@ -5567,7 +5567,7 @@ int AES_GCM_encrypt_C(Aes* aes, byte* out, const byte* in, word32 sz,
|
||||
byte *ctr;
|
||||
byte scratch[AES_BLOCK_SIZE];
|
||||
#ifdef OPENSSL_EXTRA
|
||||
word64 aadTemp;
|
||||
word32 aadTemp;
|
||||
#endif
|
||||
ctr = counter;
|
||||
XMEMSET(initialCounter, 0, AES_BLOCK_SIZE);
|
||||
|
@ -35,8 +35,8 @@
|
||||
/* Padding types */
|
||||
#define RSA_PKCS1_PADDING 0
|
||||
#define RSA_PKCS1_OAEP_PADDING 1
|
||||
#define RSA_NO_PADDING 3
|
||||
#define RSA_PKCS1_PSS_PADDING 6
|
||||
#define RSA_NO_PADDING 2
|
||||
#define RSA_PKCS1_PSS_PADDING 3
|
||||
|
||||
#ifndef WOLFSSL_RSA_TYPE_DEFINED /* guard on redeclaration */
|
||||
typedef struct WOLFSSL_RSA WOLFSSL_RSA;
|
||||
|
@ -146,8 +146,8 @@ typedef struct Aes {
|
||||
#ifdef HAVE_AESGCM
|
||||
ALIGN16 byte H[AES_BLOCK_SIZE];
|
||||
#ifdef OPENSSL_EXTRA
|
||||
word64 aadH[2]; /* additional authenticated data hash */
|
||||
word64 aadLen; /* additional authenticated data len */
|
||||
word32 aadH[2]; /* additional authenticated data GASH */
|
||||
word32 aadLen; /* additional authenticated data len */
|
||||
#endif
|
||||
|
||||
#ifdef GCM_TABLE
|
||||
|
Loading…
x
Reference in New Issue
Block a user