1gnutls_dh_params_generate2(3) gnutls gnutls_dh_params_generate2(3)
2
3
4
6 gnutls_dh_params_generate2 - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_dh_params_generate2(gnutls_dh_params_t params, unsigned int
12 bits);
13
15 gnutls_dh_params_t params
16 Is the structure that the DH parameters will be stored
17
18 unsigned int bits
19 is the prime's number of bits
20
22 This function will generate a new pair of prime and generator for use
23 in the Diffie-Hellman key exchange. The new parameters will be allo‐
24 cated using gnutls_malloc() and will be stored in the appropriate
25 datum. This function is normally slow.
26
27 Do not set the number of bits directly, use
28 gnutls_sec_param_to_pk_bits() to get bits for GNUTLS_PK_DSA. Also note
29 that the DH parameters are only useful to servers. Since clients use
30 the parameters sent by the server, it's of no use to call this in
31 client side.
32
34 On success, GNUTLS_E_SUCCESS (zero) is returned, otherwise an error
35 code is returned.
36
38 Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page:
39 http://www.gnu.org/software/gnutls/ General help using GNU software:
40 http://www.gnu.org/gethelp/
41
43 Copyright © 2008 Free Software Foundation.
44 Copying and distribution of this file, with or without modification,
45 are permitted in any medium without royalty provided the copyright
46 notice and this notice are preserved.
47
49 The full documentation for gnutls is maintained as a Texinfo manual.
50 If the info and gnutls programs are properly installed at your site,
51 the command
52
53 info gnutls
54
55 should give you access to the complete manual.
56
57
58
59gnutls 2.12.6.1 gnutls_dh_params_generate2(3)