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                   The parameters
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. This may take long time.
24
25       It  is  recommended  not  to  set  the number of bits directly, but use
26       gnutls_sec_param_to_pk_bits() instead.  Also note that the  DH  parame‐
27       ters are only useful to servers.  Since clients use the parameters sent
28       by the server, it's of no use to call this in client side.
29
30       The parameters generated are of the DSA form. It also  is  possible  to
31       generate  provable  parameters  (following the Shawe-Taylor algorithm),
32       using  gnutls_x509_privkey_generate2()  with   DSA   option   and   the
33       GNUTLS_PRIVKEY_FLAG_PROVABLE  flag  set. These can the be imported with
34       gnutls_dh_params_import_dsa().
35
36       It is no longer recommended for applications  to  generate  parameters.
37       See the "Parameter generation" section in the manual.
38

RETURNS

40       On  success,  GNUTLS_E_SUCCESS  (0)  is  returned, otherwise a negative
41       error code is returned.
42

REPORTING BUGS

44       Report bugs to <bugs@gnutls.org>.
45       Home page: https://www.gnutls.org
46
47
49       Copyright © 2001- Free Software Foundation, Inc., and others.
50       Copying and distribution of this file, with  or  without  modification,
51       are  permitted  in  any  medium  without royalty provided the copyright
52       notice and this notice are preserved.
53

SEE ALSO

55       The full documentation for gnutls is maintained as  a  Texinfo  manual.
56       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
57       visit
58
59       https://www.gnutls.org/manual/
60
61gnutls                              3.6.15       gnutls_dh_params_generate2(3)
Impressum