2 * Copyright (C) 2002-2012 Free Software Foundation, Inc.
4 * Author: Nikos Mavrogiannopoulos
6 * This file is part of GnuTLS.
8 * The GnuTLS is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>
23 #ifndef AUTH_DH_COMMON
24 #define AUTH_DH_COMMON
26 #include <gnutls_auth.h>
33 gnutls_datum_t generator
;
34 gnutls_datum_t public_key
;
37 void _gnutls_free_dh_info (dh_info_st
* dh
);
38 int _gnutls_gen_dh_common_client_kx_int (gnutls_session_t
, gnutls_buffer_st
*, gnutls_datum_t
*pskkey
);
39 int _gnutls_gen_dh_common_client_kx (gnutls_session_t
, gnutls_buffer_st
*);
40 int _gnutls_proc_dh_common_client_kx (gnutls_session_t session
,
41 uint8_t * data
, size_t _data_size
,
42 bigint_t p
, bigint_t g
,
43 gnutls_datum_t
* psk_key
);
44 int _gnutls_dh_common_print_server_kx (gnutls_session_t
, bigint_t g
,
45 bigint_t p
, unsigned int q_bits
,
46 gnutls_buffer_st
* data
);
47 int _gnutls_proc_dh_common_server_kx (gnutls_session_t session
, uint8_t * data
,