Re: Difference between RSA_sign and RSA_private_encrypt
On Wed, Aug 10, 2005, Bhupendra K Joshi wrote:
> I have used RSA_private_encrypt instead of using RSA_sign and RSA_public_decrypt instead of using RSA_verify.
> For verifying I have compared the hash to complete the verification.
> Can there be a problem in this?
> What is the difference between RSA_private_encrypt and RSA_sign?
RSA_sign() uses the PKCS#1 standard for signing whereas using
RSA_private_encrypt() is non standard.
Specifically RSA_sign() includes details of the digest algorithm used as well
as the digest value itself. Wheres if you use RSA_private_encrypt() you just
include the raw digest.