This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Failed to use curve25519 in M52810

Hi,

I am testing curve25519 in M52810.

The following is snippet.

nrf_crypto_ecc_curve25519_private_key_t       bob_private_key;
nrf_crypto_ecc_curve25519_public_key_t        bob_public_key;

nrf_crypto_ecc_key_pair_generate( NULL,
(nrf_crypto_ecc_curve_info_t*)&g_nrf_crypto_ecc_curve25519_curve_info,
(nrf_crypto_ecc_private_key_t*)&bob_private_key,
(nrf_crypto_ecc_public_key_t*)&bob_public_key );

Build is successful. When run the program, a fatal error occurred when I tried to generate key pair.

How to cope with the issue?

Thanks,

Jianxuan

Parents Reply
  • I see. Then the NRF_ERROR_CRYPTO_INTERNAL return value should come from either line 124 or line 141 in <SDK 15.2>\components\libraries\crypto\backend\mbedtls\mbedtls_backend_ecc.c. Can you check using a debugger which it is?

    If the error is returned on line 124, then can you see the return value from mbedtls_ecp_group_load() on line 75? And if it comes from the call to mbedtls_ecp_gen_keypair(), what is the return value from it?

Children
Related