Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions wolfcrypt/src/aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -8441,6 +8441,7 @@ static void GMULT(byte *x, byte m[256][WC_AES_BLOCK_SIZE])

XMEMCPY(x, Z, WC_AES_BLOCK_SIZE);
#elif defined(WC_32BIT_CPU)
#ifndef WOLFSSL_USE_ALIGN
byte Z[WC_AES_BLOCK_SIZE + WC_AES_BLOCK_SIZE];
byte a;
word32* pZ;
Expand Down Expand Up @@ -8472,6 +8473,24 @@ static void GMULT(byte *x, byte m[256][WC_AES_BLOCK_SIZE])
pm = (word32*)(m[x[0]]);
px[0] = pZ[0] ^ pm[0]; px[1] = pZ[1] ^ pm[1];
px[2] = pZ[2] ^ pm[2]; px[3] = pZ[3] ^ pm[3];
#else
byte Z[WC_AES_BLOCK_SIZE + WC_AES_BLOCK_SIZE];
byte a;
int i;

XMEMCPY(Z + 16, m[x[15]], WC_AES_BLOCK_SIZE);
a = Z[16 + 15];
Z[15] = R[a][0];
Z[16] ^= R[a][1];
for (i = 14; i > 0; i--) {
xorbuf(Z + i + 1, m[x[i]], WC_AES_BLOCK_SIZE);
a = Z[16 + i];
Z[i] = R[a][0];
Z[i+1] ^= R[a][1];
}
xorbuf(Z + 1, m[x[0]], WC_AES_BLOCK_SIZE);
XMEMCPY(x, Z + 1, WC_AES_BLOCK_SIZE);
#endif
#else
byte Z[WC_AES_BLOCK_SIZE + WC_AES_BLOCK_SIZE];
byte a;
Expand Down
11 changes: 6 additions & 5 deletions wolfcrypt/src/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ void wc_MemZero_Free(void)
int i;
fprintf(stderr, "[MEM_ZERO] Unseen: %d\n", nextIdx);
for (i = 0; i < nextIdx; i++) {
fprintf(stderr, " %s - %p:%ld\n", memZero[i].name, memZero[i].addr,
memZero[i].len);
fprintf(stderr, " %s - %p:%lu\n", memZero[i].name, memZero[i].addr,
(unsigned long)memZero[i].len);
}
}
/* Uninitialized value in next index. */
Expand Down Expand Up @@ -301,9 +301,10 @@ void wc_MemZero_Check(void* addr, size_t len)
for (j = 0; j < memZero[i].len; j++) {
if (((unsigned char*)memZero[i].addr)[j] != 0) {
/* Byte not zero - abort! */
fprintf(stderr, "\n[MEM_ZERO] %s:%p + %ld is not zero\n",
memZero[i].name, memZero[i].addr, j);
fprintf(stderr, "[MEM_ZERO] Checking %p:%ld\n", addr, len);
fprintf(stderr, "\n[MEM_ZERO] %s:%p + %lu is not zero\n",
memZero[i].name, memZero[i].addr, (unsigned long)j);
fprintf(stderr, "[MEM_ZERO] Checking %p:%lu\n", addr,
(unsigned long)len);
#ifndef TEST_ALWAYS_RUN_TO_END
abort();
#endif
Expand Down
32 changes: 16 additions & 16 deletions wolfcrypt/src/port/arm/armv8-32-curve25519_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
#if !defined(CURVE25519_SMALL) || !defined(ED25519_SMALL)

#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
WC_OMIT_FRAME_POINTER void fe_init()
WC_OMIT_FRAME_POINTER void fe_init(void)
#else
WC_OMIT_FRAME_POINTER void fe_init()
WC_OMIT_FRAME_POINTER void fe_init(void)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
Expand All @@ -81,9 +81,9 @@ WC_OMIT_FRAME_POINTER void fe_init()

void fe_add_sub_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
WC_OMIT_FRAME_POINTER void fe_add_sub_op()
WC_OMIT_FRAME_POINTER void fe_add_sub_op(void)
#else
WC_OMIT_FRAME_POINTER void fe_add_sub_op()
WC_OMIT_FRAME_POINTER void fe_add_sub_op(void)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
Expand Down Expand Up @@ -300,9 +300,9 @@ WC_OMIT_FRAME_POINTER void fe_add_sub_op()

void fe_sub_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
WC_OMIT_FRAME_POINTER void fe_sub_op()
WC_OMIT_FRAME_POINTER void fe_sub_op(void)
#else
WC_OMIT_FRAME_POINTER void fe_sub_op()
WC_OMIT_FRAME_POINTER void fe_sub_op(void)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
Expand Down Expand Up @@ -379,9 +379,9 @@ WC_OMIT_FRAME_POINTER void fe_sub(fe r, const fe a, const fe b)

void fe_add_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
WC_OMIT_FRAME_POINTER void fe_add_op()
WC_OMIT_FRAME_POINTER void fe_add_op(void)
#else
WC_OMIT_FRAME_POINTER void fe_add_op()
WC_OMIT_FRAME_POINTER void fe_add_op(void)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
Expand Down Expand Up @@ -2510,9 +2510,9 @@ WC_OMIT_FRAME_POINTER void fe_cmov_table(fe* r, const fe* base, signed char b)
#if defined(WOLFSSL_ARM_ARCH) && (WOLFSSL_ARM_ARCH < 6)
void fe_mul_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
WC_OMIT_FRAME_POINTER void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op(void)
#else
WC_OMIT_FRAME_POINTER void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op(void)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
Expand Down Expand Up @@ -2905,9 +2905,9 @@ WC_OMIT_FRAME_POINTER void fe_mul_op()
#else
void fe_mul_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
WC_OMIT_FRAME_POINTER void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op(void)
#else
WC_OMIT_FRAME_POINTER void fe_mul_op()
WC_OMIT_FRAME_POINTER void fe_mul_op(void)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
Expand Down Expand Up @@ -3086,9 +3086,9 @@ WC_OMIT_FRAME_POINTER void fe_mul(fe r, const fe a, const fe b)
#if defined(WOLFSSL_ARM_ARCH) && (WOLFSSL_ARM_ARCH < 6)
void fe_sq_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
WC_OMIT_FRAME_POINTER void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op(void)
#else
WC_OMIT_FRAME_POINTER void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op(void)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
Expand Down Expand Up @@ -3374,9 +3374,9 @@ WC_OMIT_FRAME_POINTER void fe_sq_op()
#else
void fe_sq_op(void);
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
WC_OMIT_FRAME_POINTER void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op(void)
#else
WC_OMIT_FRAME_POINTER void fe_sq_op()
WC_OMIT_FRAME_POINTER void fe_sq_op(void)
#endif /* !WOLFSSL_NO_VAR_ASSIGN_REG */
{
#ifndef WOLFSSL_NO_VAR_ASSIGN_REG
Expand Down
Loading
Loading