1 /* 2 * Copyright (C) 2000-2012 Free Software Foundation, Inc. 3 * 4 * Author: Nikos Mavrogiannopoulos 5 * 6 * This file is part of GnuTLS. 7 * 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 2.1 of 11 * the License, or (at your option) any later version. 12 * 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. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/> 20 * 21 */ 22 23 #ifndef GNUTLS_LIB_SRP_H 24 #define GNUTLS_LIB_SRP_H 25 26 #include <config.h> 27 28 #ifdef ENABLE_SRP 29 30 bigint_t _gnutls_calc_srp_B(bigint_t * ret_b, bigint_t g, bigint_t n, 31 bigint_t v); 32 bigint_t _gnutls_calc_srp_u(bigint_t A, bigint_t B, bigint_t N); 33 bigint_t _gnutls_calc_srp_S1(bigint_t A, bigint_t b, bigint_t u, 34 bigint_t v, bigint_t n); 35 bigint_t _gnutls_calc_srp_A(bigint_t * a, bigint_t g, bigint_t n); 36 bigint_t _gnutls_calc_srp_S2(bigint_t B, bigint_t g, bigint_t x, 37 bigint_t a, bigint_t u, bigint_t n); 38 int _gnutls_calc_srp_x(char *username, char *password, uint8_t * salt, 39 size_t salt_size, size_t * size, void *digest); 40 int _gnutls_srp_gn(uint8_t ** ret_g, uint8_t ** ret_n, int bits); 41 42 /* g is defined to be 2 */ 43 #define SRP_MAX_HASH_SIZE 24 44 45 #endif 46 47 #endif /* GNUTLS_LIB_SRP_H */ 48