1gnutls_dh_params_generate2(3)       gnutls       gnutls_dh_params_generate2(3)
2
3
4

NAME

6       gnutls_dh_params_generate2 - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_dh_params_generate2(gnutls_dh_params_t dparams, unsigned int
12       bits);
13

ARGUMENTS

15       gnutls_dh_params_t dparams
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

DESCRIPTION

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

RETURNS

34       On  success,  GNUTLS_E_SUCCESS  (0)  is  returned, otherwise a negative
35       error code is returned.
36

REPORTING BUGS

38       Report bugs to <bugs@gnutls.org>.
39       Home page: http://www.gnutls.org
40
41
43       Copyright © 2001-2014 Free Software Foundation, Inc..
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

SEE ALSO

49       The full documentation for gnutls is maintained as  a  Texinfo  manual.
50       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
51       visit
52
53       http://www.gnutls.org/manual/
54
55gnutls                              3.3.29       gnutls_dh_params_generate2(3)
Impressum