Imported Upstream version 3.3.5
[platform/upstream/gnutls.git] / lib / gnutls_srp.h
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 <http://www.gnu.org/licenses/>
20  *
21  */
22
23 #ifdef ENABLE_SRP
24
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,
29                              bigint_t v, 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,
32                              bigint_t a, 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);
36
37 /* g is defined to be 2 */
38 #define SRP_MAX_HASH_SIZE 24
39
40 #endif