0

I use the following command line to generate the ECDSA signature in Linux. In Linux, you can use the command line to verify the signature. This is no problem

In Windows, the same command line can also be signed and verified successfully

openssl ecparam -name secp192k1 -genkey -out ec.key
openssl ec -in ec.key -pubout -out ec.pubkey
openssl dgst -sha1 -sign ec.key -out ec.sig content.txt
openssl dgst -sha1 -verify ec.pubkey -signature ec.sig content.txt

But here's the thing.

I put all files generated in Linux into Windows, and then use the command line to verify the signature, the result is an error, why?

Lai Pang
  • 3
  • 2

1 Answers1

0

content.txt, Linux generates content that ends in a byte 0x0a, but Windows creates content that doesn't end in a byte 0x0A. So, in fact, Linux and Windows sign different content, so Windows verifies that Linux doesn't sign it correctly

Lai Pang
  • 3
  • 2