Mbedtls on imxrt1176 : ECDH error with curve secp521r1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mbedtls on imxrt1176 : ECDH error with curve secp521r1

Jump to solution
1,072 Views
emilianocarnati
Contributor II

Hi,
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?

Thanks
Emiliano

0 Kudos
1 Solution
1,025 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Emiliano,

Thanks for your patience with this thread.  This issue was captured during the MbedTLS update to version 2.26.0. It's caused by a missing A parameter in our ECP alt implementation. The fix will be included in future releases of the SDK. 

Regards,
Victor 

View solution in original post

3 Replies
1,003 Views
emilianocarnati
Contributor II

Thank you so much!

 

0 Kudos
1,060 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Emiliano,

I'm checking this internally, I will provide you an update as soon as possible. 

Regards,
Victor 

0 Kudos
1,026 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Emiliano,

Thanks for your patience with this thread.  This issue was captured during the MbedTLS update to version 2.26.0. It's caused by a missing A parameter in our ECP alt implementation. The fix will be included in future releases of the SDK. 

Regards,
Victor