Topic: AesCbcDecrypt hardfaulting on STmicro
I am trying to get Aes to work and I am having an issue with it hard faulting.
I call this to generate the key
ret = wc_RNG_GenerateBlock(&sysRNG,iv,AESSIZE);
ret=wc_AesSetKey(&denc,aesKey,AESSIZE,iv,AES_DECRYPTION);
And then call this to decrypt each packet as it comes in.
wc_AesCbcDecrypt(&denc,block,cipher,*size);
and this is my settings.h file
#ifdef WOLFSSL_STM32F2
#define SIZEOF_LONG_LONG 8
#define NO_DEV_RANDOM
#define NO_WOLFSSL_DIR
#define NO_RABBIT
#define STM32F2_RNG
#define STM32F2_CRYPTO
#define KEIL_INTRINSICS
#define NO_WRITEV
#define NO_FILESYSTEM
#define NO_DES3
#undef NO_AES
#define SINGLE_THREADED
#define WOLFSSL_KEY_GEN
#define RSA_DECODE_EXTRA
#endif
Any ideas I am using an STM32F4 but the crypto block is supposed to be compatible