fixup! Implement AES-CTS in wolfCrypt

This commit is contained in:
Juliusz Sosinowicz
2025-04-14 17:45:34 +02:00
parent 62bf90c09c
commit e320b3c90d
2 changed files with 4 additions and 6 deletions

View File

@@ -273,7 +273,7 @@ int test_wc_AesCtsEncryptDecrypt(void)
#if !defined(NO_AES) && defined(WOLFSSL_AES_CTS) && \
defined(HAVE_AES_DECRYPT) && defined(WOLFSSL_AES_128)
/* Test vectors taken form RFC3962 Appendix B */
struct {
const struct {
const char* input;
const char* output;
size_t inLen;
@@ -330,7 +330,7 @@ int test_wc_AesCtsEncryptDecrypt(void)
64, 64
}
};
byte keyBytes[AES_128_KEY_SIZE] = {
const byte keyBytes[AES_128_KEY_SIZE] = {
0x63, 0x68, 0x69, 0x63, 0x6b, 0x65, 0x6e, 0x20,
0x74, 0x65, 0x72, 0x69, 0x79, 0x61, 0x6b, 0x69
};

View File

@@ -14925,8 +14925,7 @@ int wc_AesCtsEncrypt(const byte* key, word32 keySz, byte* out,
#ifdef WOLFSSL_SMALL_STACK
Aes *aes = NULL;
#else
Aes _aes;
Aes *aes = &_aes;
Aes aes[1];
#endif
int ret = 0;
word32 outSz = inSz;
@@ -14964,8 +14963,7 @@ int wc_AesCtsDecrypt(const byte* key, word32 keySz, byte* out,
#ifdef WOLFSSL_SMALL_STACK
Aes *aes = NULL;
#else
Aes _aes;
Aes *aes = &_aes;
Aes aes[1];
#endif
int ret = 0;
word32 outSz = inSz;