Skip to main content
Associate
July 24, 2024
Solved

STM32 cryptographic firmware ECDSA

  • July 24, 2024
  • 2 replies
  • 1581 views

Hi ST,

     What tool generated the following data?Can you send me this tool? thanks.

 

https://www.st.com/en/embedded-software/x-cube-cryptolib.html

STM32 cryptographic firmware library software expansion for STM32Cube.

 

The path of the code is as follows:

.\STM32CubeExpansion_Crypto_V4.2.0\Projects\NUCLEO-G474RE\Applications\ECC\ECDSA_SignVerify\Src\main.c

 

Roger0x0000_1-1721790709207.png

 

 

 

Best answer by Tesla DeLorean

https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/digital-signatures
https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/dss2/ecdsa2vs.pdf
https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/dss/186-4ecdsatestvectors.zip (SigGen.txt this vector about 10% into file, grep or search for it)

 

If you want to replicate, convert the message into a byte array, run SHA-224, check d

Use your signing code, the private key and the random data to recreate the signing, and then verify

Make a "pretty printer" to output info in this format for your own keys or whatever.

This is really just a validation pattern people can use to assure the algo is implemented and working correctly.

2 replies

Joe WILLIAMS
ST Employee
July 26, 2024

Hi Roger0x0000

 

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

 

Kind Regards

Joe

STMicro Support

Tesla DeLorean
Guru
July 26, 2024

Looks to be cut from the NIST test vectors. For some of the newer ones they had .PY scripts too.

But you could test and make your own with things like Micro ECC and there are other Windows tools

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
July 26, 2024

https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/digital-signatures
https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/dss2/ecdsa2vs.pdf
https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm-Validation-Program/documents/dss/186-4ecdsatestvectors.zip (SigGen.txt this vector about 10% into file, grep or search for it)

 

If you want to replicate, convert the message into a byte array, run SHA-224, check d

Use your signing code, the private key and the random data to recreate the signing, and then verify

Make a "pretty printer" to output info in this format for your own keys or whatever.

This is really just a validation pattern people can use to assure the algo is implemented and working correctly.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..