added new functions
[gnutls.git] / lib / gnutls_srp.h
blobc04f7a614aee508131707c47639a10673675d531
1 /*
2 * Copyright (C) 2000-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 #ifdef ENABLE_SRP
25 bigint_t _gnutls_calc_srp_B (bigint_t * ret_b, bigint_t g, bigint_t n,
26 bigint_t v);
27 bigint_t _gnutls_calc_srp_u (bigint_t A, bigint_t B, bigint_t N);
28 bigint_t _gnutls_calc_srp_S1 (bigint_t A, bigint_t b, bigint_t u, bigint_t v,
29 bigint_t n);
30 bigint_t _gnutls_calc_srp_A (bigint_t * a, bigint_t g, bigint_t n);
31 bigint_t _gnutls_calc_srp_S2 (bigint_t B, bigint_t g, bigint_t x, bigint_t a,
32 bigint_t u, bigint_t n);
33 int _gnutls_calc_srp_x (char *username, char *password, uint8_t * salt,
34 size_t salt_size, size_t * size, void *digest);
35 int _gnutls_srp_gn (uint8_t ** ret_g, uint8_t ** ret_n, int bits);
37 /* g is defined to be 2 */
38 #define SRP_MAX_HASH_SIZE 24
40 #endif