@@ -3726,8 +3726,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
3726
3726
#if !defined(WOLFSSL_STM32_CUBEMX ) || defined(STM32_HAL_V2 )
3727
3727
ByteReverseWords (rk , rk , keylen );
3728
3728
#endif
3729
- #if defined(WOLFSSL_AES_CFB ) || defined(WOLFSSL_AES_COUNTER ) || \
3730
- defined(WOLFSSL_AES_OFB )
3729
+ #if defined(WOLFSSL_AES_COUNTER ) || defined(WOLFSSL_AES_CFB ) || \
3730
+ defined(WOLFSSL_AES_OFB ) || defined( WOLFSSL_AES_XTS )
3731
3731
aes -> left = 0 ;
3732
3732
#endif
3733
3733
return wc_AesSetIV (aes , iv );
@@ -3807,8 +3807,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
3807
3807
if (iv )
3808
3808
XMEMCPY (aes -> reg , iv , AES_BLOCK_SIZE );
3809
3809
3810
- #if defined(WOLFSSL_AES_CFB ) || defined(WOLFSSL_AES_COUNTER ) || \
3811
- defined(WOLFSSL_AES_OFB )
3810
+ #if defined(WOLFSSL_AES_COUNTER ) || defined(WOLFSSL_AES_CFB ) || \
3811
+ defined(WOLFSSL_AES_OFB ) || defined( WOLFSSL_AES_XTS )
3812
3812
aes -> left = 0 ;
3813
3813
#endif
3814
3814
@@ -3838,8 +3838,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
3838
3838
aes -> rounds = keylen /4 + 6 ;
3839
3839
XMEMCPY (aes -> key , userKey , keylen );
3840
3840
3841
- #if defined(WOLFSSL_AES_CFB ) || defined(WOLFSSL_AES_COUNTER ) || \
3842
- defined(WOLFSSL_AES_OFB )
3841
+ #if defined(WOLFSSL_AES_COUNTER ) || defined(WOLFSSL_AES_CFB ) || \
3842
+ defined(WOLFSSL_AES_OFB ) || defined( WOLFSSL_AES_XTS )
3843
3843
aes -> left = 0 ;
3844
3844
#endif
3845
3845
@@ -3890,8 +3890,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
3890
3890
if (rk == NULL )
3891
3891
return BAD_FUNC_ARG ;
3892
3892
3893
- #if defined(WOLFSSL_AES_CFB ) || defined(WOLFSSL_AES_COUNTER ) || \
3894
- defined(WOLFSSL_AES_OFB )
3893
+ #if defined(WOLFSSL_AES_COUNTER ) || defined(WOLFSSL_AES_CFB ) || \
3894
+ defined(WOLFSSL_AES_OFB ) || defined( WOLFSSL_AES_XTS )
3895
3895
aes -> left = 0 ;
3896
3896
#endif
3897
3897
@@ -3971,8 +3971,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
3971
3971
XMEMCPY (aes -> key , userKey , keylen );
3972
3972
ret = nrf51_aes_set_key (userKey );
3973
3973
3974
- #if defined(WOLFSSL_AES_CFB ) || defined(WOLFSSL_AES_COUNTER ) || \
3975
- defined(WOLFSSL_AES_OFB )
3974
+ #if defined(WOLFSSL_AES_COUNTER ) || defined(WOLFSSL_AES_CFB ) || \
3975
+ defined(WOLFSSL_AES_OFB ) || defined( WOLFSSL_AES_XTS )
3976
3976
aes -> left = 0 ;
3977
3977
#endif
3978
3978
@@ -4028,7 +4028,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
4028
4028
aes -> rounds = keylen /4 + 6 ;
4029
4029
4030
4030
XMEMCPY (aes -> key , userKey , keylen );
4031
- #if defined(WOLFSSL_AES_COUNTER )
4031
+ #if defined(WOLFSSL_AES_COUNTER ) || defined(WOLFSSL_AES_CFB ) || \
4032
+ defined(WOLFSSL_AES_OFB ) || defined(WOLFSSL_AES_XTS )
4032
4033
aes -> left = 0 ;
4033
4034
#endif
4034
4035
return wc_AesSetIV (aes , iv );
@@ -4520,8 +4521,8 @@ static void AesSetKey_C(Aes* aes, const byte* key, word32 keySz, int dir)
4520
4521
#endif
4521
4522
}
4522
4523
4523
- #if defined(WOLFSSL_AES_CFB ) || defined(WOLFSSL_AES_COUNTER ) || \
4524
- defined(WOLFSSL_AES_OFB )
4524
+ #if defined(WOLFSSL_AES_COUNTER ) || defined(WOLFSSL_AES_CFB ) || \
4525
+ defined(WOLFSSL_AES_OFB ) || defined( WOLFSSL_AES_XTS )
4525
4526
aes -> left = 0 ;
4526
4527
#endif
4527
4528
0 commit comments