SECP256K1 curve encryption not working

Hi, 

We are using ncs 2.4.0, working with a custom project based in matter lock sample.

We were using SECP256R1 curves for encryption, without issues, but we need to move to SECP256K1, and we are getting MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE error when trying to sign a message. 

Going deeper I´ve found the function returning error is mbedtls_ecdsa_sign, but AFAIU the implementation is within nrfxlib/nrf_security/src/libmbedcrypto.a

Then I cannot check why it is returning this error

I have already enabled MBEDTLS_ECP_DP_SECP256K1_ENABLED in config file.

Any help will be appreciated.

Hugo

Parents Reply Children
  • OK I solved my case with this setting. 

    // <i> The nRF HW backend provide access to RNG peripheral in nRF5x devices.
    //==========================================================
    #ifndef NRF_CRYPTO_BACKEND_NRF_HW_RNG_ENABLED
    #define NRF_CRYPTO_BACKEND_NRF_HW_RNG_ENABLED 1
    #endif
    // <q> NRF_CRYPTO_BACKEND_NRF_HW_RNG_MBEDTLS_CTR_DRBG_ENABLED  - Enable mbed TLS CTR-DRBG algorithm.
     
    
    // <i> Enable mbed TLS CTR-DRBG standardized by NIST (NIST SP 800-90A Rev. 1). The nRF HW RNG is used as an entropy source for seeding.
    
    #ifndef NRF_CRYPTO_BACKEND_NRF_HW_RNG_MBEDTLS_CTR_DRBG_ENABLED
    #define NRF_CRYPTO_BACKEND_NRF_HW_RNG_MBEDTLS_CTR_DRBG_ENABLED 1
    #endif

Related