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