Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenSSL command line secp384r1 / SHA-256 digital signatures

Is it possible to generate digital signatures using secp384r1 / SHA-256 from the OpenSSL command line (I'm using version 1.0.1c)? After some experimentation I can generate signatures with SHA-1 using:

openssl dgst -sign ec-key.pem -ecdsa-with-SHA1 -binary < test.bin > sig.bin 

but

openssl dgst -sign ec-key.pem -ecdsa-with-SHA256 -binary < test.bin > sig.bin 

just gives me a known option for '-ecdsa-with-SHA256'?

Thanks in advance

like image 672
user2166777 Avatar asked Nov 03 '22 02:11

user2166777


1 Answers

Try use -sha256 instead of -ecdsa-with-SHA256, and use an EC key to sign it.

like image 144
Chiara Hsieh Avatar answered Nov 08 '22 05:11

Chiara Hsieh