66 #define SRP_GROUP_LEN 128 67 #define SRP_HASH_LEN 32 76 int srp_create_salted_verification_key(
const char * username,
77 const unsigned char * password,
int len_password,
78 const unsigned char ** bytes_s,
int * len_s,
79 const unsigned char ** bytes_v,
int * len_v );
86 struct SRPVerifier * srp_verifier_new(
const char * username,
87 const unsigned char * bytes_s,
int len_s,
88 const unsigned char * bytes_v,
int len_v,
89 const unsigned char * bytes_A,
int len_A,
90 const unsigned char ** bytes_B,
int * len_B );
93 void srp_verifier_delete(
struct SRPVerifier * ver );
96 int srp_verifier_is_authenticated(
struct SRPVerifier * ver );
99 const char * srp_verifier_get_username(
struct SRPVerifier * ver );
102 const unsigned char * srp_verifier_get_session_key(
struct SRPVerifier * ver,
int * key_length );
105 int srp_verifier_get_session_key_length(
struct SRPVerifier * ver );
109 void srp_verifier_verify_session(
struct SRPVerifier * ver,
110 const unsigned char * user_M,
111 const unsigned char ** bytes_HAMK );
115 struct SRPUser * srp_user_new(
const char * username,
116 const unsigned char * bytes_password,
int len_password );
118 void srp_user_delete(
struct SRPUser * usr );
120 int srp_user_is_authenticated(
struct SRPUser * usr);
123 const char * srp_user_get_username(
struct SRPUser * usr );
126 const unsigned char * srp_user_get_session_key(
struct SRPUser * usr,
int * key_length );
128 int srp_user_get_session_key_length(
struct SRPUser * usr );
131 int srp_user_start_authentication(
struct SRPUser * usr,
const char ** username,
132 const unsigned char ** bytes_A,
int * len_A );
136 int srp_user_process_challenge(
struct SRPUser * usr,
137 const unsigned char * bytes_s,
int len_s,
138 const unsigned char * bytes_B,
int len_B,
139 const unsigned char ** bytes_M,
int * len_M );
142 void srp_user_verify_session(
struct SRPUser * usr,
const unsigned char * bytes_HAMK );