mirror of https://github.com/wolfSSL/wolfssl.git
Merge pull request #8379 from douzzer/20250125-aarch64-armasm-AES-ECB-fix
20250125-aarch64-armasm-AES-ECB-fixpull/8385/head
commit
127e7e9109
|
@ -11847,7 +11847,13 @@ static WARN_UNUSED_RESULT int _AesEcbEncrypt(
|
||||||
#elif defined(__aarch64__) && defined(WOLFSSL_ARMASM) && \
|
#elif defined(__aarch64__) && defined(WOLFSSL_ARMASM) && \
|
||||||
!defined(WOLFSSL_ARMASM_NO_HW_CRYPTO)
|
!defined(WOLFSSL_ARMASM_NO_HW_CRYPTO)
|
||||||
if (aes->use_aes_hw_crypto) {
|
if (aes->use_aes_hw_crypto) {
|
||||||
|
word32 i;
|
||||||
|
|
||||||
|
for (i = 0; i < sz; i += WC_AES_BLOCK_SIZE) {
|
||||||
AES_encrypt_AARCH64(in, out, (byte*)aes->key, (int)aes->rounds);
|
AES_encrypt_AARCH64(in, out, (byte*)aes->key, (int)aes->rounds);
|
||||||
|
in += WC_AES_BLOCK_SIZE;
|
||||||
|
out += WC_AES_BLOCK_SIZE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
@ -11905,7 +11911,13 @@ static WARN_UNUSED_RESULT int _AesEcbDecrypt(
|
||||||
#elif defined(__aarch64__) && defined(WOLFSSL_ARMASM) && \
|
#elif defined(__aarch64__) && defined(WOLFSSL_ARMASM) && \
|
||||||
!defined(WOLFSSL_ARMASM_NO_HW_CRYPTO)
|
!defined(WOLFSSL_ARMASM_NO_HW_CRYPTO)
|
||||||
if (aes->use_aes_hw_crypto) {
|
if (aes->use_aes_hw_crypto) {
|
||||||
|
word32 i;
|
||||||
|
|
||||||
|
for (i = 0; i < sz; i += WC_AES_BLOCK_SIZE) {
|
||||||
AES_decrypt_AARCH64(in, out, (byte*)aes->key, (int)aes->rounds);
|
AES_decrypt_AARCH64(in, out, (byte*)aes->key, (int)aes->rounds);
|
||||||
|
in += WC_AES_BLOCK_SIZE;
|
||||||
|
out += WC_AES_BLOCK_SIZE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue