OpenSSL  1.0.1c
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Classes | Macros | Typedefs | Functions
srp.h File Reference
#include <stdio.h>
#include <string.h>
#include <openssl/safestack.h>
#include <openssl/bn.h>
#include <openssl/crypto.h>

Go to the source code of this file.

Classes

struct  SRP_gN_cache_st
 
struct  SRP_user_pwd_st
 
struct  SRP_VBASE_st
 
struct  SRP_gN_st
 

Macros

#define SRP_NO_ERROR   0
 
#define SRP_ERR_VBASE_INCOMPLETE_FILE   1
 
#define SRP_ERR_VBASE_BN_LIB   2
 
#define SRP_ERR_OPEN_FILE   3
 
#define SRP_ERR_MEMORY   4
 
#define DB_srptype   0
 
#define DB_srpverifier   1
 
#define DB_srpsalt   2
 
#define DB_srpid   3
 
#define DB_srpgN   4
 
#define DB_srpinfo   5
 
#define DB_NUMBER   6
 
#define DB_SRP_INDEX   'I'
 
#define DB_SRP_VALID   'V'
 
#define DB_SRP_REVOKED   'R'
 
#define DB_SRP_MODIF   'v'
 
#define SRP_MINIMAL_N   1024
 

Typedefs

typedef struct SRP_gN_cache_st SRP_gN_cache
 
typedef struct SRP_user_pwd_st SRP_user_pwd
 
typedef struct SRP_VBASE_st SRP_VBASE
 
typedef struct SRP_gN_st SRP_gN
 

Functions

SRP_VBASESRP_VBASE_new (char *seed_key)
 
int SRP_VBASE_free (SRP_VBASE *vb)
 
int SRP_VBASE_init (SRP_VBASE *vb, char *verifier_file)
 
SRP_user_pwdSRP_VBASE_get_by_user (SRP_VBASE *vb, char *username)
 
char * SRP_create_verifier (const char *user, const char *pass, char **salt, char **verifier, const char *N, const char *g)
 
int SRP_create_verifier_BN (const char *user, const char *pass, BIGNUM **salt, BIGNUM **verifier, BIGNUM *N, BIGNUM *g)
 
char * SRP_check_known_gN_param (BIGNUM *g, BIGNUM *N)
 
SRP_gNSRP_get_default_gN (const char *id)
 
BIGNUMSRP_Calc_server_key (BIGNUM *A, BIGNUM *v, BIGNUM *u, BIGNUM *b, BIGNUM *N)
 
BIGNUMSRP_Calc_B (BIGNUM *b, BIGNUM *N, BIGNUM *g, BIGNUM *v)
 
int SRP_Verify_A_mod_N (BIGNUM *A, BIGNUM *N)
 
BIGNUMSRP_Calc_u (BIGNUM *A, BIGNUM *B, BIGNUM *N)
 
BIGNUMSRP_Calc_x (BIGNUM *s, const char *user, const char *pass)
 
BIGNUMSRP_Calc_A (BIGNUM *a, BIGNUM *N, BIGNUM *g)
 
BIGNUMSRP_Calc_client_key (BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x, BIGNUM *a, BIGNUM *u)
 
int SRP_Verify_B_mod_N (BIGNUM *B, BIGNUM *N)
 

Macro Definition Documentation

#define DB_NUMBER   6

Definition at line 139 of file srp.h.

#define DB_SRP_INDEX   'I'

Definition at line 141 of file srp.h.

#define DB_SRP_MODIF   'v'

Definition at line 144 of file srp.h.

#define DB_SRP_REVOKED   'R'

Definition at line 143 of file srp.h.

#define DB_SRP_VALID   'V'

Definition at line 142 of file srp.h.

#define DB_srpgN   4

Definition at line 136 of file srp.h.

#define DB_srpid   3

Definition at line 135 of file srp.h.

#define DB_srpinfo   5

Definition at line 137 of file srp.h.

#define DB_srpsalt   2

Definition at line 134 of file srp.h.

#define DB_srptype   0

Definition at line 132 of file srp.h.

#define DB_srpverifier   1

Definition at line 133 of file srp.h.

#define SRP_ERR_MEMORY   4

Definition at line 130 of file srp.h.

#define SRP_ERR_OPEN_FILE   3

Definition at line 129 of file srp.h.

#define SRP_ERR_VBASE_BN_LIB   2

Definition at line 128 of file srp.h.

#define SRP_ERR_VBASE_INCOMPLETE_FILE   1

Definition at line 127 of file srp.h.

#define SRP_MINIMAL_N   1024

Definition at line 165 of file srp.h.

#define SRP_NO_ERROR   0

Definition at line 126 of file srp.h.

Typedef Documentation

typedef struct SRP_gN_st SRP_gN
typedef struct SRP_gN_cache_st SRP_gN_cache
typedef struct SRP_user_pwd_st SRP_user_pwd
typedef struct SRP_VBASE_st SRP_VBASE

Function Documentation

BIGNUM* SRP_Calc_A ( BIGNUM a,
BIGNUM N,
BIGNUM g 
)

Definition at line 235 of file srp_lib.c.

BIGNUM* SRP_Calc_B ( BIGNUM b,
BIGNUM N,
BIGNUM g,
BIGNUM v 
)

Definition at line 170 of file srp_lib.c.

BIGNUM* SRP_Calc_client_key ( BIGNUM N,
BIGNUM B,
BIGNUM g,
BIGNUM x,
BIGNUM a,
BIGNUM u 
)

Definition at line 255 of file srp_lib.c.

BIGNUM* SRP_Calc_server_key ( BIGNUM A,
BIGNUM v,
BIGNUM u,
BIGNUM b,
BIGNUM N 
)

Definition at line 143 of file srp_lib.c.

BIGNUM* SRP_Calc_u ( BIGNUM A,
BIGNUM B,
BIGNUM N 
)

Definition at line 108 of file srp_lib.c.

BIGNUM* SRP_Calc_x ( BIGNUM s,
const char *  user,
const char *  pass 
)

Definition at line 203 of file srp_lib.c.

char* SRP_check_known_gN_param ( BIGNUM g,
BIGNUM N 
)

Definition at line 327 of file srp_lib.c.

char* SRP_create_verifier ( const char *  user,
const char *  pass,
char **  salt,
char **  verifier,
const char *  N,
const char *  g 
)

Definition at line 524 of file srp_vfy.c.

int SRP_create_verifier_BN ( const char *  user,
const char *  pass,
BIGNUM **  salt,
BIGNUM **  verifier,
BIGNUM N,
BIGNUM g 
)

Definition at line 607 of file srp_vfy.c.

SRP_gN* SRP_get_default_gN ( const char *  id)

Definition at line 344 of file srp_lib.c.

int SRP_VBASE_free ( SRP_VBASE vb)

Definition at line 271 of file srp_vfy.c.

SRP_user_pwd* SRP_VBASE_get_by_user ( SRP_VBASE vb,
char *  username 
)

Definition at line 475 of file srp_vfy.c.

int SRP_VBASE_init ( SRP_VBASE vb,
char *  verifier_file 
)

Definition at line 360 of file srp_vfy.c.

SRP_VBASE* SRP_VBASE_new ( char *  seed_key)

Definition at line 244 of file srp_vfy.c.

int SRP_Verify_A_mod_N ( BIGNUM A,
BIGNUM N 
)

Definition at line 317 of file srp_lib.c.

int SRP_Verify_B_mod_N ( BIGNUM B,
BIGNUM N 
)

Definition at line 295 of file srp_lib.c.