I'm working on an mimx1170-evk and I'm currently facing an issue with ECDH.
In mbedtls configuration file (ksdk_mbedtls.config.h) I've enabled the curve secp521r1 (#define MBEDTLS_ECP_DP_SECP521R1_ENABLED) and with this curve I get an error when I call the function "mbedtls_ecdh_calc_secret".
This error doesn't happen with the other curves and if I remove the CAAM acceleration (remove CRYPTO_USE_CAAM from project defines) everything works fine. From what I can see, with this curve there is an error in the computation of the public key.
Have you never seen this?
Is there any known limit about the usage of secp521r1 curve?