Heinz Markgraf wrote:
Hi!I would like to ask why there two pairs of RSA functions. Would one not be enough? What's the difference? int RSA_public_encrypt(int flen, unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_private_decrypt(int flen, unsigned char *from, unsigned char *to, RSA *rsa, int padding); int RSA_private_encrypt(int flen, unsigned char *from, unsigned char *to, RSA *rsa,int padding); int RSA_public_decrypt(int flen, unsigned char *from, unsigned char *to, RSA *rsa,int padding);
You may encrypt/decrypt using a private key (yours), or encrypt/decrypt using the public key of another party. The latter is commonly done when verifying signatures, though encrypting with another's public key is a common enveloping technique. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
