00001 /* 00002 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation 00003 * 00004 * Author: Nikos Mavrogiannopoulos 00005 * 00006 * This file is part of GNUTLS. 00007 * 00008 * The GNUTLS library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00021 * USA 00022 * 00023 */ 00024 00025 #ifndef GNUTLS_DH_H 00026 # define GNUTLS_DH_H 00027 00028 const mpi_t *MHD_gtls_dh_params_to_mpi (MHD_gtls_dh_params_t); 00029 mpi_t MHD_gtls_calc_dh_secret (mpi_t * ret_x, mpi_t g, mpi_t prime); 00030 mpi_t MHD_gtls_calc_dh_key (mpi_t f, mpi_t x, mpi_t prime); 00031 int MHD_gtls_dh_generate_prime (mpi_t * ret_g, mpi_t * ret_n, unsigned bits); 00032 00033 MHD_gtls_dh_params_t 00034 MHD_gtls_get_dh_params (MHD_gtls_dh_params_t dh_params, 00035 MHD_gnutls_params_function * func, 00036 MHD_gtls_session_t session); 00037 00038 #endif