diff --git a/ctaocrypt/src/aes.c b/ctaocrypt/src/aes.c index 6cb0dcd94..1aea29f8c 100644 --- a/ctaocrypt/src/aes.c +++ b/ctaocrypt/src/aes.c @@ -569,6 +569,9 @@ int AesSetKey(Aes* aes, const byte* userKey, word32 keylen, const byte* iv, if (!((keylen == 16) || (keylen == 24) || (keylen == 32))) return BAD_FUNC_ARG; + if (rk == NULL) + return BAD_FUNC_ARG; + aes->rounds = keylen/4 + 6; cau_aes_set_key(userKey, keylen*8, rk); diff --git a/cyassl/ctaocrypt/settings.h b/cyassl/ctaocrypt/settings.h index 6f5a3d70a..0ca3f350e 100644 --- a/cyassl/ctaocrypt/settings.h +++ b/cyassl/ctaocrypt/settings.h @@ -152,10 +152,26 @@ #endif /* MBED */ #ifdef CYASSL_TYTO + #include "rand.h" #define FREERTOS #define NO_FILESYSTEM #define CYASSL_USER_IO #define NO_DEV_RANDOM + #define HAVE_ECC + #define HAVE_ECC_ENCRYPT + #define ECC_SHAMIR + #define HAVE_HKDF + #define USE_FAST_MATH + #define TFM_TIMING_RESISTANT + #define FP_MAX_BITS 512 + #define NO_OLD_TLS + #define NO_MD4 + #define NO_RABBIT + #define NO_HC128 + #define NO_RSA + #define NO_DSA + #define NO_PWDBASED + #define NO_PSK #endif #ifdef FREERTOS_WINSIM