Hello!

I would like to use the command-line to create a signature (and verify it) from a digest. Due to some reasons I don't want to use the original text to create a hash and next the signature. For this reason, the use of openssl dgst -sha1 is not valid for me

In order to get the hash I'm using openssl sha1 --binary

After, I would like to get a signature using this hash.
I have tested to use  rsautl  this way:

openssl rsautl -sign -in hash.sha1 -inkey kt.pem -out signature.sha1
and to verify it I'm using openssl rsautl -verify.
Then I have to compare the hash values and this way works!
However I would like to know if there is other command-line tool that makes this process. That is, the signature and the verification from a hash, not from a file.
And if not, is there any way to sign with the hash in a PKCS#1 format? because the way I'm using is not PKCS#1 compliant. I'm signing the hash however it should be an ASN.1 structure telling the hash OID and the hash value.


Could you help me to solve my problem, please?
Regards,
Antonio.

--
------------------------------------------------------
Antonio Ruiz Martínez
Faculty of Computer Science-University of Murcia
30071 Murcia - Spain
e-mail: [EMAIL PROTECTED] or arm [at] dif [dot] um [dot] es
------------------------------------------------------

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to