=pod

=head1 NAME

rsa - RSA public key cryptosystem

=head1 SYNOPSIS

 #include <openssl/rsa.h>
 #include <openssl/engine.h>

 RSA * RSA_new(void);
 void RSA_free(RSA *rsa);

 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_sign(int type, unsigned char *m, unsigned int m_len,
    unsigned char *sigret, unsigned int *siglen, RSA *rsa);
 int RSA_verify(int type, unsigned char *m, unsigned int m_len,
    unsigned char *sigbuf, unsigned int siglen, RSA *rsa);

 int RSA_size(RSA *rsa);

 RSA *RSA_generate_key(int num, unsigned long e,
    void (*callback)(int,int,void *), void *cb_arg);

 int RSA_check_key(RSA *rsa);

 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
 void RSA_blinding_off(RSA *rsa);

 void RSA_set_default_openssl_method(RSA_METHOD *meth);
 RSA_METHOD *RSA_get_default_openssl_method(void);
 int RSA_set_method(RSA *rsa, ENGINE *engine);
 RSA_METHOD *RSA_get_method(RSA *rsa);
 RSA_METHOD *RSA_PKCS1_SSLeay(void);
 RSA_METHOD *RSA_PKCS1_RSAref(void);
 RSA_METHOD *RSA_null_method(void);
 int RSA_flags(RSA *rsa);
 RSA *RSA_new_method(ENGINE *engine);

 int RSA_print(BIO *bp, RSA *x, int offset);
 int RSA_print_fp(FILE *fp, RSA *x, int offset);

 int RSA_get_ex_new_index(long argl, char *argp, int (*new_func)(),
    int (*dup_func)(), void (*free_func)());
 int RSA_set_ex_data(RSA *r,int idx,char *arg);
 char *RSA_get_ex_data(RSA *r, int idx);

 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);

 int RSA_sign_ASN1_OCTET_STRING(int dummy, unsigned char *m,
    unsigned int m_len, unsigned char *sigret, unsigned int *siglen,
    RSA *rsa);
 int RSA_verify_ASN1_OCTET_STRING(int dummy, unsigned char *m,
    unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
    RSA *rsa);

=head1 DESCRIPTION

These functions implement RSA public key encryption and signatures
as defined in PKCS #1 v2.0 [RFC 2437].

The B<RSA> structure consists of several BIGNUM components. It can
contain public as well as private RSA keys:

 struct
        {
        BIGNUM *n;		// public modulus
        BIGNUM *e;		// public exponent
        BIGNUM *d;		// private exponent
        BIGNUM *p;		// secret prime factor
        BIGNUM *q;		// secret prime factor
        BIGNUM *dmp1;		// d mod (p-1)
        BIGNUM *dmq1;		// d mod (q-1)
        BIGNUM *iqmp;		// q^-1 mod p
	// ...
        };
 RSA

In public keys, the private exponent and the related secret values are
B<NULL>.

B<p>, B<q>, B<dmp1>, B<dmq1> and B<iqmp> may be B<NULL> in private
keys, but the RSA operations are much faster when these values are
available.

=head1 CONFORMING TO

SSL, PKCS #1 v2.0

=head1 PATENTS

RSA was covered by a US patent which expired in September 2000.

=head1 SEE ALSO

L<rsa(1)|rsa(1)>, L<bn(3)|bn(3)>, L<dsa(3)|dsa(3)>, L<dh(3)|dh(3)>,
L<rand(3)|rand(3)>, L<RSA_new(3)|RSA_new(3)>,
L<RSA_public_encrypt(3)|RSA_public_encrypt(3)>,
L<RSA_sign(3)|RSA_sign(3)>, L<RSA_size(3)|RSA_size(3)>,
L<RSA_generate_key(3)|RSA_generate_key(3)>,
L<RSA_check_key(3)|RSA_check_key(3)>,
L<RSA_blinding_on(3)|RSA_blinding_on(3)>,
L<RSA_set_method(3)|RSA_set_method(3)>, L<RSA_print(3)|RSA_print(3)>,
L<RSA_get_ex_new_index(3)|RSA_get_ex_new_index(3)>,
L<RSA_private_encrypt(3)|RSA_private_encrypt(3)>,
L<RSA_sign_ASN_OCTET_STRING(3)|RSA_sign_ASN_OCTET_STRING(3)>,
L<RSA_padding_add_PKCS1_type_1(3)|RSA_padding_add_PKCS1_type_1(3)> 

=cut
