Hello,

I'm writing a program that has to sign a SHA1-hash value. I'm using OpenSSL
to do this. My program has to do the same thing as another program which
makes use of Microsoft Crypto API. In that program the method
"CryptSignHash" was used in order to sign the hash value.

When I try to sign a dummy hash value with RSA_sign, the result is different
from the result I get from CryptSignHash. I've been searching for a while to
find the reason for this, but haven't found the solution yet.

I've also tried to sign the hash with other signature methods in OpenSSL:
RSA_private_encrypt and EVP_SignFinal. Those gave me an error when I tried
them, but I don't really know the difference between those 3 methods, the
documentation isn't very clear, and I'm very new to cryptography functions
and OpenSSL.

Can anyone help me with this and tell me what I should use to get the same
result as CryptSignHash returns? 

If you need to see my code in order to help me, just ask, then I'll post it.
-- 
View this message in context: 
http://www.nabble.com/Difference-between-RSA_sign-and-CryptSignHash-signature-tp22575898p22575898.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to