nRF9160 DK Ethereum Ecdsa "s problem"

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)
We are comparing the results with signs of other projects and we see that our program computes the same sign but we ascertain that our "s" is wrong.
What should we do?
The ECDSA sample doesn't provide the Keccak256 algorithm so we implemented it ourselves. We think that there is a mistake with the procedure to obtain the "s value".
Please help us.

Parents
  • What is our "s" that is wrong?

    Correct

    f86d0c850ba43b7400831e8480946fb6ba99b8a9f1330c1e83ec309c1dab81906e63880de0b6b3a7640000801ca0c4a47c3979ee3f169f2b1ad8b4754a0ea66297594af3b8d9e6f9a1dd01bd8152a0142e95021d0d979b1e49744421cbb0dbadcf48b3eba2b20957740f57a8e56d3b

    Wrong

    f86d0c850ba43b7400831e8480946fb6ba99b8a9f1330c1e83ec309c1dab81906e63880de0b6b3a7640000801ca0c4a47c3979ee3f169f2b1ad8b4754a0ea66297594af3b8d9e6f9a1dd01bd8152a0ebd16afde2f26864e1b68bbbde344f230cdf9432c3a5ee32685e4f352750d406

    The first output comes from the Python program (web3 library), and the second output comes from the Nordic ECDSA example.

Reply
  • What is our "s" that is wrong?

    Correct

    f86d0c850ba43b7400831e8480946fb6ba99b8a9f1330c1e83ec309c1dab81906e63880de0b6b3a7640000801ca0c4a47c3979ee3f169f2b1ad8b4754a0ea66297594af3b8d9e6f9a1dd01bd8152a0142e95021d0d979b1e49744421cbb0dbadcf48b3eba2b20957740f57a8e56d3b

    Wrong

    f86d0c850ba43b7400831e8480946fb6ba99b8a9f1330c1e83ec309c1dab81906e63880de0b6b3a7640000801ca0c4a47c3979ee3f169f2b1ad8b4754a0ea66297594af3b8d9e6f9a1dd01bd8152a0ebd16afde2f26864e1b68bbbde344f230cdf9432c3a5ee32685e4f352750d406

    The first output comes from the Python program (web3 library), and the second output comes from the Nordic ECDSA example.

Children
No Data
Related