diff options
author | beck <> | 2000-03-19 11:13:58 +0000 |
---|---|---|
committer | beck <> | 2000-03-19 11:13:58 +0000 |
commit | 796d609550df3a33fc11468741c5d2f6d3df4c11 (patch) | |
tree | 6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/doc/dh.pod | |
parent | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff) | |
download | openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2 openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libcrypto/doc/dh.pod')
-rw-r--r-- | src/lib/libcrypto/doc/dh.pod | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/lib/libcrypto/doc/dh.pod b/src/lib/libcrypto/doc/dh.pod new file mode 100644 index 0000000000..0a9b7c03a2 --- /dev/null +++ b/src/lib/libcrypto/doc/dh.pod | |||
@@ -0,0 +1,68 @@ | |||
1 | =pod | ||
2 | |||
3 | =head1 NAME | ||
4 | |||
5 | dh - Diffie-Hellman key agreement | ||
6 | |||
7 | =head1 SYNOPSIS | ||
8 | |||
9 | #include <openssl/dh.h> | ||
10 | |||
11 | DH * DH_new(void); | ||
12 | void DH_free(DH *dh); | ||
13 | |||
14 | int DH_size(DH *dh); | ||
15 | |||
16 | DH * DH_generate_parameters(int prime_len, int generator, | ||
17 | void (*callback)(int, int, void *), void *cb_arg); | ||
18 | int DH_check(DH *dh, int *codes); | ||
19 | |||
20 | int DH_generate_key(DH *dh); | ||
21 | int DH_compute_key(unsigned char *key, BIGNUM *pub_key, DH *dh); | ||
22 | |||
23 | void DH_set_default_method(DH_METHOD *meth); | ||
24 | DH_METHOD *DH_get_default_method(void); | ||
25 | DH_METHOD *DH_set_method(DH *dh, DH_METHOD *meth); | ||
26 | DH *DH_new_method(DH_METHOD *meth); | ||
27 | DH_METHOD *DH_OpenSSL(void); | ||
28 | |||
29 | int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(), | ||
30 | int (*dup_func)(), void (*free_func)()); | ||
31 | int DH_set_ex_data(DH *d, int idx, char *arg); | ||
32 | char *DH_get_ex_data(DH *d, int idx); | ||
33 | |||
34 | DH * d2i_DHparams(DH **a, unsigned char **pp, long length); | ||
35 | int i2d_DHparams(DH *a, unsigned char **pp); | ||
36 | |||
37 | int DHparams_print_fp(FILE *fp, DH *x); | ||
38 | int DHparams_print(BIO *bp, DH *x); | ||
39 | |||
40 | =head1 DESCRIPTION | ||
41 | |||
42 | These functions implement the Diffie-Hellman key agreement protocol. | ||
43 | The generation of shared DH parameters is described in | ||
44 | L<DH_generate_parameters(3)|DH_generate_parameters(3)>; L<DH_generate_key(3)|DH_generate_key(3)> describes how | ||
45 | to perform a key agreement. | ||
46 | |||
47 | The B<DH> structure consists of several BIGNUM components. | ||
48 | |||
49 | struct | ||
50 | { | ||
51 | BIGNUM *p; // prime number (shared) | ||
52 | BIGNUM *g; // generator of Z_p (shared) | ||
53 | BIGNUM *priv_key; // private DH value x | ||
54 | BIGNUM *pub_key; // public DH value g^x | ||
55 | // ... | ||
56 | }; | ||
57 | DH | ||
58 | |||
59 | =head1 SEE ALSO | ||
60 | |||
61 | L<dhparam(1)|dhparam(1)>, L<bn(3)|bn(3)>, L<dsa(3)|dsa(3)>, L<err(3)|err(3)>, | ||
62 | L<rand(3)|rand(3)>, L<rsa(3)|rsa(3)>, L<DH_set_method(3)|DH_set_method(3)>, | ||
63 | L<DH_new(3)|DH_new(3)>, L<DH_get_ex_new_index(3)|DH_get_ex_new_index(3)>, | ||
64 | L<DH_generate_parameters(3)|DH_generate_parameters(3)>, | ||
65 | L<DH_compute_key(3)|DH_compute_key(3)>, L<d2i_DHparams(3)|d2i_DHparams(3)>, | ||
66 | L<RSA_print(3)|RSA_print(3)> | ||
67 | |||
68 | =cut | ||