When I am trying to connect and perform a SSL handshake to a HTTPS server, the function "mbedtls_ssl_handshake" return the following error: -0x0023 MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE.
I am able to use the SDK example "eaimxrt1062_lwip_httpscli_mbedTLS_freertos" to create a HTTPS client and connect to the test server which sends a 128 bit AES key. The server I am trying to connect to sends a 256 bit AES key and the function "mbedtls_aes_setkey_enc" in ksdk_mbedtls.c is the origin of the error message:
#ifdef MBEDTLS_AES_ALT_NO_256
if (keybits == 256u)
{
return (MBEDTLS_ERR_AES_FEATURE_UNAVAILABLE);
}
#endif
Is there any support for AES-256?
I am using a Embedded Artists imx-rt1062-developers-kit with the following 2.9.3 version of the SDK.
Solved! Go to Solution.
Hi
The mbedtls library includes AES256 as SW implementation in the file aes.c so you should not be missing the support itself.
What happens if you remove the define
MBEDTLS_AES_ALT_NO_256
from the configuration file or the pre-processor defines?
Regards
Mark
Hi
The mbedtls library includes AES256 as SW implementation in the file aes.c so you should not be missing the support itself.
What happens if you remove the define
MBEDTLS_AES_ALT_NO_256
from the configuration file or the pre-processor defines?
Regards
Mark
Thanks, I removed the hardware acceleration code in the folder /port and increased the SSL frame buffer (MBEDTLS_SSL_MAX_CONTENT_LEN) in the mbedtls_config_client.h