mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
Fix for AEC CTR mode with STM32 and CubeMX.
This commit is contained in:
@@ -3313,6 +3313,8 @@ int wc_AesSetIV(Aes* aes, const byte* iv)
|
|||||||
hcryp.Init.Algorithm = CRYP_AES_CTR;
|
hcryp.Init.Algorithm = CRYP_AES_CTR;
|
||||||
ByteReverseWords(iv, aes->reg, AES_BLOCK_SIZE);
|
ByteReverseWords(iv, aes->reg, AES_BLOCK_SIZE);
|
||||||
hcryp.Init.pInitVect = (STM_CRYPT_TYPE*)iv;
|
hcryp.Init.pInitVect = (STM_CRYPT_TYPE*)iv;
|
||||||
|
#else
|
||||||
|
hcryp.Init.pInitVect = (STM_CRYPT_TYPE*)aes->reg;
|
||||||
#endif
|
#endif
|
||||||
HAL_CRYP_Init(&hcryp);
|
HAL_CRYP_Init(&hcryp);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user