d2iDSAPublicKey(3) OpenSL d2iDSAPublicKey(3)
NAME
d2iDSAPublicKey, i2dDSAPublicKey, d2iDSAPrivateKey, i2dDSAPri-
vateKey, d2iDSAPUBKEY, i2dDSAPUBKEY, d2iDSASIG, i2dDSASIG - DSA
key encoding and parsing functions.
SYNOPSIS
#include
#include
DSA * d2iDSAPublicKey(DSA **a, const unsigned char **pp, long length);
int i2dDSAPublicKey(const DSA *a, unsigned char **pp);
DSA * d2iDSAPUBKEY(DSA **a, const unsigned char **pp, long length);
int i2dDSAPUBKEY(const DSA *a, unsigned char **pp);
DSA * d2iDSAPrivateKey(DSA **a, const unsigned char **pp, long length);
int i2dDSAPrivateKey(const DSA *a, unsigned char **pp);
DSA * d2iDSAparams(DSA **a, const unsigned char **pp, long length);
int i2dDSAparams(const DSA *a, unsigned char **pp);
DSA * d2iDSASIG(DSASIG **a, const unsigned char **pp, long length);
int i2dDSASIG(const DSASIG *a, unsigned char **pp);
DESCRIPTION
d2iDSAPublicKey() and i2dDSAPublicKey() decode and encode the DSA
public key components structure.
d2iDSAPUBKEY() and i2dDSAPUBKEY() decode and encode an DSA public
key using a SubjectPublicKeyInfo (certificate public key) structure.
d2iDSAPrivateKey(), i2dDSAPrivateKey() decode and encode the DSA pri-
vate key components.
d2iDSAparams(), i2dDSAparams() decode and encode the DSA parameters
using a Dss-Parms structure as defined in RFC2459.
d2iDSASIG(), i2dDSASIG() decode and encode a DSA signature using a
Dss-Sig-Value structure as defined in RFC2459.
The usage of all of these functions is similar to the d2iX509() and
i2dX509() described in the d2iX509(3) manual page.
NOTES
The DSA structure passed to the private key encoding functions should
have all the private key components present.
The data encoded by the private key functions is unencrypted and there-
fore offers no private key security.
The DSAPUBKEY functions should be used in preference to the DSAPub-
licKey functions when encoding public keys because they use a standard
format.
The DSAPublicKey functions use an non standard format the actual data
encoded depends on the value of the writeparams field of the a key
parameter. If writeparams is zero then only the pubkey field is
encoded as an INTEGER. If writeparams is 1 then a SEQUENCE consisting
of the p, q, g and pubkey respectively fields are encoded.
The DSAPrivateKey functions also use a non standard structure consiting
consisting of a SEQUENCE containing the p, q, g and pubkey and
privkey fields respectively.
SEE ALSO
d2iX509(3)
HISTORY
TBA
0.9.7i 2003-12-10 d2iDSAPublicKey(3)
|