2024-05-24 08:10 AM
I implemented a ECDSA signature generation and checking on STM32H743ZI NUCLEO using STM32CubeExpansion_Crypto_V4.2.0 library example ECDSA_SignVerify.
I did similiar with Python using https://pypi.org/project/ecdsa/
Unfortunately signature generated by one fail to verify with the other although using the same input for hash, private and public key and curve. I used SECP256k1 / SECP256K1 and NIST256p / SECP256R1 on Python / STM32.
Any suggestions? What are the tools ST verified the libraries with?
Verification on the same platform works fine in both cases.
Thanks for any help.
Solved! Go to Solution.
2024-06-20 01:16 AM
Python's ecdsa function verify always does a hash internally, I needed to use verify_digest.
2024-05-24 08:22 AM - edited 2024-05-24 08:24 AM
I used patterns here for SECP256K1
Using a early version of Easy ECC, something I can build readily with MSVC, KEIL and GNU/GCC without a complete circus. I have to address some endian issues, but I understand them..
For the SECP192R1 / SECP256R1 I used NIST's materials directly, ie FIPS 186-2 and/or FIPS 186-4
Using SigGen.txt [P-256,SHA-256] test vectors
2024-06-20 01:16 AM
Python's ecdsa function verify always does a hash internally, I needed to use verify_digest.