BIO_new_bio_pair() was unnecessarily described in it's own page as well as in
[oweals/openssl.git] / doc / crypto / d2i_DSAPublicKey.pod
1 =pod
2
3 =head1 NAME
4
5 d2i_DSAPublicKey, i2d_DSAPublicKey, d2i_DSAPrivateKey, i2d_DSAPrivateKey,
6 d2i_DSA_PUBKEY, i2d_DSA_PUBKEY, d2i_DSA_SIG, i2d_DSA_SIG - DSA key encoding
7 and parsing functions.
8
9 =head1 SYNOPSIS
10
11  #include <openssl/dsa.h>
12
13  DSA * d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
14
15  int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
16
17  DSA * d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
18
19  int i2d_DSA_PUBKEY(const DSA *a, unsigned char **pp);
20
21  DSA * d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
22
23  int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
24
25  DSA * d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
26
27  int i2d_DSAparams(const DSA *a, unsigned char **pp);
28
29  DSA * d2i_DSA_SIG(DSA_SIG **a, const unsigned char **pp, long length);
30
31  int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
32
33 =head1 DESCRIPTION
34
35 d2i_DSAPublicKey() and i2d_DSAPublicKey() decode and encode the DSA public key
36 components structure.
37
38 d2i_DSA_PUKEY() and i2d_DSA_PUKEY() decode and encode an DSA public key using a
39 SubjectPublicKeyInfo (certificate public key) structure.
40
41 d2i_DSAPrivateKey(), i2d_DSAPrivateKey() decode and encode the DSA private key
42 components.
43
44 d2i_DSAparams(), i2d_DSAparams() decode and encode the DSA parameters using
45 a B<Dss-Parms> structure as defined in RFC2459.
46
47 d2i_DSA_SIG(), i2d_DSA_SIG() decode and encode a DSA signature using a
48 B<Dss-Sig-Value> structure as defined in RFC2459.
49
50 The usage of all of these functions is similar to the d2i_X509() and
51 i2d_X509() described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
52
53 =head1 NOTES
54
55 The B<DSA> structure passed to the private key encoding functions should have
56 all the private key components present.
57
58 The data encoded by the private key functions is unencrypted and therefore 
59 offers no private key security.
60
61 The B<DSA_PUBKEY> functions should be used in preference to the B<DSAPublicKey>
62 functions when encoding public keys because they use a standard format.
63
64 The B<DSAPublicKey> functions use an non standard format the actual data encoded
65 depends on the value of the B<write_params> field of the B<a> key parameter.
66 If B<write_params> is zero then only the B<pub_key> field is encoded as an
67 B<INTEGER>. If B<write_params> is 1 then a B<SEQUENCE> consisting of the
68 B<p>, B<q>, B<g> and B<pub_key> respectively fields are encoded.
69
70 The B<DSAPrivateKey> functions also use a non standard structure consiting
71 consisting of a SEQUENCE containing the B<p>, B<q>, B<g> and B<pub_key> and
72 B<priv_key> fields respectively.
73
74 =head1 SEE ALSO
75
76 L<d2i_X509(3)|d2i_X509(3)>
77
78 =head1 HISTORY
79
80 TBA
81
82 =cut