NAME
d2iRSAPublicKey, i2dRSAPublicKey, d2iRSAPrivateKey, i2dRSAPrivateKey, d2iRSAPUBKEY, i2dRSAPUBKEY, i2dNetscapeRSA,d2iNetscapeRSA - RSA public and private key encoding functions.
SYNOPSIS
#include
#include
RSA * d2iRSAPublicKey(RSA **a, unsigned char **pp, long length); int i2dRSAPublicKey(RSA *a, unsigned char **pp); RSA * d2iRSAPUBKEY(RSA **a, unsigned char **pp, long length); int i2dRSAPUBKEY(RSA *a, unsigned char **pp); RSA * d2iRSAPrivateKey(RSA **a, unsigned char **pp, long length); int i2dRSAPrivateKey(RSA *a, unsigned char **pp); int i2dNetscapeRSA(RSA *a, unsigned char **pp, int (*cb)()); RSA * d2iNetscapeRSA(RSA **a, unsigned char **pp, long length, int (*cb)());DESCRIPTION
d2iRSAPublicKey() and i2dRSAPublicKey() decode and encode a PKCS#1
RSAPublicKey structure. d2iRSAPUBKEY() and i2dRSAPUBKEY() decode and encode an RSA public key using a SubjectPublicKeyInfo (certificate public key) structure.d2iRSAPrivateKey(), i2dRSAPrivateKey() decode and encode a PKCS#1
RSAPrivateKey structure. d2iNetscapeRSA(), i2dNetscapeRSA() decode and encode an RSA private key in NET format. The usage of all of these functions is similar to the d2iX509() and i2dX509() described in the d2iX509(3) manual page. NNOOTTEESS The RRSSAA structure passed to the private key encoding functions shouldhave 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
d2iX509(3) HISTORY TBA0.9.7l 2003-12-10 d2iRSAPublicKey(3)