diff options
author | cvs2svn <admin@example.com> | 2002-05-15 02:29:24 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2002-05-15 02:29:24 +0000 |
commit | 027351f729b9e837200dae6e1520cda6577ab930 (patch) | |
tree | e25a717057aa4529e433fc3b1fac8d4df8db3a5c /src/lib/libcrypto/doc/DSA_set_method.pod | |
parent | aeeae06a79815dc190061534d47236cec09f9e32 (diff) | |
download | openbsd-027351f729b9e837200dae6e1520cda6577ab930.tar.gz openbsd-027351f729b9e837200dae6e1520cda6577ab930.tar.bz2 openbsd-027351f729b9e837200dae6e1520cda6577ab930.zip |
This commit was manufactured by cvs2git to create branch 'unlabeled-1.1.1'.
Diffstat (limited to 'src/lib/libcrypto/doc/DSA_set_method.pod')
-rw-r--r-- | src/lib/libcrypto/doc/DSA_set_method.pod | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/src/lib/libcrypto/doc/DSA_set_method.pod b/src/lib/libcrypto/doc/DSA_set_method.pod new file mode 100644 index 0000000000..0b13ec9237 --- /dev/null +++ b/src/lib/libcrypto/doc/DSA_set_method.pod | |||
@@ -0,0 +1,111 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | DSA_set_default_method, DSA_get_default_method, DSA_set_method, | ||
6 | DSA_new_method, DSA_OpenSSL - select RSA method | ||
7 | |||
8 | =head1 SYNOPSIS | ||
9 | |||
10 | #include <openssl/DSA.h> | ||
11 | |||
12 | void DSA_set_default_method(DSA_METHOD *meth); | ||
13 | |||
14 | DSA_METHOD *DSA_get_default_method(void); | ||
15 | |||
16 | DSA_METHOD *DSA_set_method(DSA *dsa, DSA_METHOD *meth); | ||
17 | |||
18 | DSA *DSA_new_method(DSA_METHOD *meth); | ||
19 | |||
20 | DSA_METHOD *DSA_OpenSSL(void); | ||
21 | |||
22 | =head1 DESCRIPTION | ||
23 | |||
24 | A B<DSA_METHOD> specifies the functions that OpenSSL uses for DSA | ||
25 | operations. By modifying the method, alternative implementations | ||
26 | such as hardware accelerators may be used. | ||
27 | |||
28 | Initially, the default is to use the OpenSSL internal implementation. | ||
29 | DSA_OpenSSL() returns a pointer to that method. | ||
30 | |||
31 | DSA_set_default_method() makes B<meth> the default method for all B<DSA> | ||
32 | structures created later. | ||
33 | |||
34 | DSA_get_default_method() returns a pointer to the current default | ||
35 | method. | ||
36 | |||
37 | DSA_set_method() selects B<meth> for all operations using the structure B<DSA>. | ||
38 | |||
39 | DSA_get_method() returns a pointer to the method currently selected | ||
40 | for B<DSA>. | ||
41 | |||
42 | DSA_new_method() allocates and initializes a B<DSA> structure so that | ||
43 | B<method> will be used for the DSA operations. If B<method> is B<NULL>, | ||
44 | the default method is used. | ||
45 | |||
46 | =head1 THE DSA_METHOD STRUCTURE | ||
47 | |||
48 | struct | ||
49 | { | ||
50 | /* name of the implementation */ | ||
51 | const char *name; | ||
52 | |||
53 | /* sign */ | ||
54 | DSA_SIG *(*dsa_do_sign)(const unsigned char *dgst, int dlen, | ||
55 | DSA *dsa); | ||
56 | |||
57 | /* pre-compute k^-1 and r */ | ||
58 | int (*dsa_sign_setup)(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, | ||
59 | BIGNUM **rp); | ||
60 | |||
61 | /* verify */ | ||
62 | int (*dsa_do_verify)(const unsigned char *dgst, int dgst_len, | ||
63 | DSA_SIG *sig, DSA *dsa); | ||
64 | |||
65 | /* compute rr = a1^p1 * a2^p2 mod m. May be NULL */ | ||
66 | int (*dsa_mod_exp)(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, | ||
67 | BIGNUM *a2, BIGNUM *p2, BIGNUM *m, | ||
68 | BN_CTX *ctx, BN_MONT_CTX *in_mont); | ||
69 | |||
70 | /* compute r = a ^ p mod m. May be NULL */ | ||
71 | int (*bn_mod_exp)(DSA *dsa, BIGNUM *r, BIGNUM *a, | ||
72 | const BIGNUM *p, const BIGNUM *m, | ||
73 | BN_CTX *ctx, BN_MONT_CTX *m_ctx); | ||
74 | |||
75 | /* called at DSA_new */ | ||
76 | int (*init)(DSA *DSA); | ||
77 | |||
78 | /* called at DSA_free */ | ||
79 | int (*finish)(DSA *DSA); | ||
80 | |||
81 | int flags; | ||
82 | |||
83 | char *app_data; /* ?? */ | ||
84 | |||
85 | } DSA_METHOD; | ||
86 | |||
87 | =head1 RETURN VALUES | ||
88 | |||
89 | DSA_OpenSSL(), DSA_get_default_method() and DSA_get_method() return | ||
90 | pointers to the respective B<DSA_METHOD>s. | ||
91 | |||
92 | DSA_set_default_method() returns no value. | ||
93 | |||
94 | DSA_set_method() returns a pointer to the B<DSA_METHOD> previously | ||
95 | associated with B<dsa>. | ||
96 | |||
97 | DSA_new_method() returns B<NULL> and sets an error code that can be | ||
98 | obtained by L<ERR_get_error(3)|ERR_get_error(3)> if the allocation | ||
99 | fails. Otherwise it returns a pointer to the newly allocated | ||
100 | structure. | ||
101 | |||
102 | =head1 SEE ALSO | ||
103 | |||
104 | L<dsa(3)|dsa(3)>, L<DSA_new(3)|DSA_new(3)> | ||
105 | |||
106 | =head1 HISTORY | ||
107 | |||
108 | DSA_set_default_method(), DSA_get_default_method(), DSA_set_method(), | ||
109 | DSA_new_method() and DSA_OpenSSL() were added in OpenSSL 0.9.4. | ||
110 | |||
111 | =cut | ||