Difference between RSA_sign and RSA_private_encrypt

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Difference between RSA_sign and RSA_private_encrypt

Bhupendra K Joshi
Hello,
 
         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?
 
Please Help
 
Thanks in advance,
Bhupendra
 


Start your day with Yahoo! - make it your home page
Reply | Threaded
Open this post in threaded view
|

Re: Difference between RSA_sign and RSA_private_encrypt

Dr. Stephen Henson
On Wed, Aug 10, 2005, Bhupendra K Joshi wrote:

> Hello,
>  
>          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.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]