d2i_RSAPublicKey 3 2004-03-19 0.9.9-dev OpenSSL

NAME

d2i_RSAPublicKey, i2d_RSAPublicKey, d2i_RSAPrivateKey, i2d_RSAPrivateKey, d2i_RSA_PUBKEY, i2d_RSA_PUBKEY, i2d_Netscape_RSA, d2i_Netscape_RSA - RSA public and private key encoding functions.

LIBRARY

libcrypto, -lcrypto

SYNOPSIS


 #include 
 #include 


 RSA * d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length);


 int i2d_RSAPublicKey(RSA *a, unsigned char **pp);


 RSA * d2i_RSA_PUBKEY(RSA **a, unsigned char **pp, long length);


 int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);


 RSA * d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length);


 int i2d_RSAPrivateKey(RSA *a, unsigned char **pp);


 int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)());


 RSA * d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)());

DESCRIPTION

_d_2_i___R_S_A_P_u_b_l_i_c_K_e_y_(_) and _i_2_d___R_S_A_P_u_b_l_i_c_K_e_y_(_) decode and encode a PKCS#1 RSAPublicKey structure.

_d_2_i___R_S_A___P_U_B_K_E_Y_(_) and _i_2_d___R_S_A___P_U_B_K_E_Y_(_) decode and encode an RSA public key using a SubjectPublicKeyInfo (certificate public key) structure.

_d_2_i___R_S_A_P_r_i_v_a_t_e_K_e_y_(_), _i_2_d___R_S_A_P_r_i_v_a_t_e_K_e_y_(_) decode and encode a PKCS#1 RSAPrivateKey structure.

_d_2_i___N_e_t_s_c_a_p_e___R_S_A_(_), _i_2_d___N_e_t_s_c_a_p_e___R_S_A_(_) decode and encode an RSA private key in NET format.

The usage of all of these functions is similar to the _d_2_i___X_5_0_9_(_) and _i_2_d___X_5_0_9_(_) described in the _d_2_i___X_5_0_9(3) manual page.

NOTES

The RRSSAA structure passed to the private key encoding functions should have all the PKCS#1 private key components present.

The data encoded by the private key functions is unencrypted and therefore offers no private key security.

The NET format functions are present to provide compatibility with certain very old software. This format has some severe security weaknesses and should be avoided if possible.

SEE ALSO

_d_2_i___X_5_0_9(3)

HISTORY

TBA