Skip to content

Commit fb91f1c

Browse files
committed
Update the ARM asm files with a missing initialization for SHA2-256 and
the AesCtrSetKey function for AES-CTR.
1 parent d866144 commit fb91f1c

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

wolfcrypt/src/port/arm/armv8-aes.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5719,6 +5719,12 @@ int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
57195719
}
57205720
return 0;
57215721
}
5722+
5723+
int wc_AesCtrSetKey(Aes* aes, const byte* key, word32 len,
5724+
const byte* iv, int dir)
5725+
{
5726+
return wc_AesSetKey(aes, key, len, iv, AES_ENCRYPTION);
5727+
}
57225728
#endif /* WOLFSSL_AES_COUNTER */
57235729

57245730
#ifdef HAVE_AESCCM

wolfcrypt/src/port/arm/armv8-sha256.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ static int InitSha256(wc_Sha256* sha256)
8585
sha256->loLen = 0;
8686
sha256->hiLen = 0;
8787

88+
#ifdef WOLFSSL_HASH_FLAGS
89+
sha256->flags = 0;
90+
#endif
91+
8892
return ret;
8993
}
9094

@@ -1575,6 +1579,9 @@ int wc_Sha256Transform(wc_Sha256* sha256, const unsigned char* data)
15751579
sha224->loLen = 0;
15761580
sha224->hiLen = 0;
15771581

1582+
#ifdef WOLFSSL_HASH_FLAGS
1583+
sha224->flags = 0;
1584+
#endif
15781585
return ret;
15791586
}
15801587

0 commit comments

Comments
 (0)