d2i_DSAPublicKey.pod 2.4 KB
Newer Older
D
Dr. Stephen Henson 已提交
1 2 3 4 5
=pod

=head1 NAME

d2i_DSAPublicKey, i2d_DSAPublicKey, d2i_DSAPrivateKey, i2d_DSAPrivateKey,
M
Matt Caswell 已提交
6
d2i_DSA_PUBKEY, i2d_DSA_PUBKEY, d2i_DSAparams, i2d_DSAparams, d2i_DSA_SIG, i2d_DSA_SIG - DSA key encoding
D
Dr. Stephen Henson 已提交
7 8 9 10 11
and parsing functions.

=head1 SYNOPSIS

 #include <openssl/dsa.h>
12
 #include <openssl/x509.h>
D
Dr. Stephen Henson 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

 DSA * d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);

 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);

 DSA * d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);

 int i2d_DSA_PUBKEY(const DSA *a, unsigned char **pp);

 DSA * d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);

 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);

 DSA * d2i_DSAparams(DSA **a, const unsigned char **pp, long length);

 int i2d_DSAparams(const DSA *a, unsigned char **pp);

 DSA * d2i_DSA_SIG(DSA_SIG **a, const unsigned char **pp, long length);

 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);

=head1 DESCRIPTION

d2i_DSAPublicKey() and i2d_DSAPublicKey() decode and encode the DSA public key
components structure.

39 40
d2i_DSA_PUBKEY() and i2d_DSA_PUBKEY() decode and encode an DSA public key using
a SubjectPublicKeyInfo (certificate public key) structure.
D
Dr. Stephen Henson 已提交
41 42 43 44 45 46 47 48 49 50 51

d2i_DSAPrivateKey(), i2d_DSAPrivateKey() decode and encode the DSA private key
components.

d2i_DSAparams(), i2d_DSAparams() decode and encode the DSA parameters using
a B<Dss-Parms> structure as defined in RFC2459.

d2i_DSA_SIG(), i2d_DSA_SIG() decode and encode a DSA signature using a
B<Dss-Sig-Value> structure as defined in RFC2459.

The usage of all of these functions is similar to the d2i_X509() and
R
Rich Salz 已提交
52
i2d_X509() described in the L<d2i_X509(3)> manual page.
D
Dr. Stephen Henson 已提交
53 54 55 56 57 58 59 60 61 62 63 64

=head1 NOTES

The B<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 therefore 
offers no private key security.

The B<DSA_PUBKEY> functions should be used in preference to the B<DSAPublicKey>
functions when encoding public keys because they use a standard format.

D
Dr. Stephen Henson 已提交
65 66 67
The B<DSAPublicKey> functions use a non standard format which is a
B<SEQUENCE> consisting of the B<p>, B<q>, B<g> and B<pub_key> fields
respectively.
D
Dr. Stephen Henson 已提交
68

69
The B<DSAPrivateKey> functions also use a non standard structure consisting
D
Dr. Stephen Henson 已提交
70 71 72 73 74
consisting of a SEQUENCE containing the B<p>, B<q>, B<g> and B<pub_key> and
B<priv_key> fields respectively.

=head1 SEE ALSO

R
Rich Salz 已提交
75
L<d2i_X509(3)>
D
Dr. Stephen Henson 已提交
76 77 78 79 80 81

=head1 HISTORY

TBA

=cut