1109998Smarkm=pod
2109998Smarkm
3109998Smarkm=head1 NAME
4109998Smarkm
5109998Smarkmd2i_DSAPublicKey, i2d_DSAPublicKey, d2i_DSAPrivateKey, i2d_DSAPrivateKey,
6290207Sjkimd2i_DSA_PUBKEY, i2d_DSA_PUBKEY, d2i_DSAparams, i2d_DSAparams, d2i_DSA_SIG, i2d_DSA_SIG - DSA key encoding
7109998Smarkmand parsing functions.
8109998Smarkm
9109998Smarkm=head1 SYNOPSIS
10109998Smarkm
11109998Smarkm #include <openssl/dsa.h>
12127128Snectar #include <openssl/x509.h>
13109998Smarkm
14109998Smarkm DSA * d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);
15109998Smarkm
16109998Smarkm int i2d_DSAPublicKey(const DSA *a, unsigned char **pp);
17109998Smarkm
18109998Smarkm DSA * d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);
19109998Smarkm
20109998Smarkm int i2d_DSA_PUBKEY(const DSA *a, unsigned char **pp);
21109998Smarkm
22109998Smarkm DSA * d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);
23109998Smarkm
24109998Smarkm int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);
25109998Smarkm
26109998Smarkm DSA * d2i_DSAparams(DSA **a, const unsigned char **pp, long length);
27109998Smarkm
28109998Smarkm int i2d_DSAparams(const DSA *a, unsigned char **pp);
29109998Smarkm
30109998Smarkm DSA * d2i_DSA_SIG(DSA_SIG **a, const unsigned char **pp, long length);
31109998Smarkm
32109998Smarkm int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);
33109998Smarkm
34109998Smarkm=head1 DESCRIPTION
35109998Smarkm
36109998Smarkmd2i_DSAPublicKey() and i2d_DSAPublicKey() decode and encode the DSA public key
37109998Smarkmcomponents structure.
38109998Smarkm
39127128Snectard2i_DSA_PUBKEY() and i2d_DSA_PUBKEY() decode and encode an DSA public key using
40127128Snectara SubjectPublicKeyInfo (certificate public key) structure.
41109998Smarkm
42109998Smarkmd2i_DSAPrivateKey(), i2d_DSAPrivateKey() decode and encode the DSA private key
43109998Smarkmcomponents.
44109998Smarkm
45109998Smarkmd2i_DSAparams(), i2d_DSAparams() decode and encode the DSA parameters using
46109998Smarkma B<Dss-Parms> structure as defined in RFC2459.
47109998Smarkm
48109998Smarkmd2i_DSA_SIG(), i2d_DSA_SIG() decode and encode a DSA signature using a
49109998SmarkmB<Dss-Sig-Value> structure as defined in RFC2459.
50109998Smarkm
51109998SmarkmThe usage of all of these functions is similar to the d2i_X509() and
52109998Smarkmi2d_X509() described in the L<d2i_X509(3)|d2i_X509(3)> manual page.
53109998Smarkm
54109998Smarkm=head1 NOTES
55109998Smarkm
56109998SmarkmThe B<DSA> structure passed to the private key encoding functions should have
57109998Smarkmall the private key components present.
58109998Smarkm
59109998SmarkmThe data encoded by the private key functions is unencrypted and therefore 
60109998Smarkmoffers no private key security.
61109998Smarkm
62109998SmarkmThe B<DSA_PUBKEY> functions should be used in preference to the B<DSAPublicKey>
63109998Smarkmfunctions when encoding public keys because they use a standard format.
64109998Smarkm
65109998SmarkmThe B<DSAPublicKey> functions use an non standard format the actual data encoded
66109998Smarkmdepends on the value of the B<write_params> field of the B<a> key parameter.
67109998SmarkmIf B<write_params> is zero then only the B<pub_key> field is encoded as an
68109998SmarkmB<INTEGER>. If B<write_params> is 1 then a B<SEQUENCE> consisting of the
69109998SmarkmB<p>, B<q>, B<g> and B<pub_key> respectively fields are encoded.
70109998Smarkm
71109998SmarkmThe B<DSAPrivateKey> functions also use a non standard structure consiting
72109998Smarkmconsisting of a SEQUENCE containing the B<p>, B<q>, B<g> and B<pub_key> and
73109998SmarkmB<priv_key> fields respectively.
74109998Smarkm
75109998Smarkm=head1 SEE ALSO
76109998Smarkm
77109998SmarkmL<d2i_X509(3)|d2i_X509(3)>
78109998Smarkm
79109998Smarkm=head1 HISTORY
80109998Smarkm
81109998SmarkmTBA
82109998Smarkm
83109998Smarkm=cut
84