Manual Page Search Parameters
RSA(3) Library Functions Manual RSA(3)


rsaRSA public key cryptosystem


#include <openssl/rsa.h>


These functions implement RSA public key encryption and signatures as defined in PKCS #1 v2.0 [RFC 2437].
The RSA structure consists of several BIGNUM components. It can contain public as well as private RSA keys:
typdef 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 NULL.
p, q, dmp1, dmq1, and iqmp may be NULL in private keys, but the RSA operations are much faster when these values are available.
Note that RSA keys may use non-standard RSA_METHOD implementations, either directly or by the use of ENGINE modules. In some cases (e.g. an ENGINE providing support for hardware-embedded keys), these BIGNUM values will not be used by the implementation or may be used for alternative data storage. For this reason, applications should generally avoid using RSA structure elements directly and instead use API functions to query or modify keys.


bn(3), d2i_RSAPublicKey(3), dh(3), dsa(3), engine(3), EVP_PKEY_set1_RSA(3), RSA_blinding_on(3), RSA_check_key(3), RSA_generate_key(3), RSA_get_ex_new_index(3), RSA_new(3), RSA_padding_add_PKCS1_type_1(3), RSA_print(3), RSA_private_encrypt(3), RSA_public_encrypt(3), RSA_set_method(3), RSA_sign(3), RSA_sign_ASN1_OCTET_STRING(3), RSA_size(3)


SSL, PKCS #1 v2.0
RSA was covered by a US patent which expired in September 2000.
November 6, 2016 OpenBSD-current