nRF9160DK ECDSA non-deterministic

Hello!
We are trying to sign our data using ECDSA (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/crypto/ecdsa/README.html), so we can send our information to an Ethereum Blockchain. We discovered that ECDSA non-deterministic algorithm is not so accurate. There is the possibility that the sign of ECDSA is not correct on the first attempt, but we need to execute our application more times.
Thank you all!

Parents Reply
  • Hi,

    The issue is not whether your keccak256 is correct or not. There is a notion on the algorithm being used. Even though keccak256 and sha-256 have the same length, they cannot be used interchangeably. You use PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256) in the code, but even with hashed input, the result might be wrong. It is important that you use same hash algorithm as the input.

    Best regards,
    Dejan

Children
Related