Go to the source code of this file.
Enumerations | |
enum | SRP_NGType { SRP_NG_1024 , SRP_NG_2048 , SRP_NG_4096 , SRP_NG_8192 , SRP_NG_CUSTOM } |
enum | SRP_HashAlgorithm { SRP_SHA256 } |
enum | SRP_Result { SRP_ERR , SRP_OK } |
Functions | |
SRP_Result | srp_create_salted_verification_key (SRP_HashAlgorithm alg, SRP_NGType ng_type, const char *username_for_verifier, const unsigned char *password, size_t len_password, unsigned char **bytes_s, size_t *len_s, unsigned char **bytes_v, size_t *len_v, const char *n_hex, const char *g_hex) |
struct SRPVerifier * | srp_verifier_new (SRP_HashAlgorithm alg, SRP_NGType ng_type, const char *username, const unsigned char *bytes_s, size_t len_s, const unsigned char *bytes_v, size_t len_v, const unsigned char *bytes_A, size_t len_A, const unsigned char *bytes_b, size_t len_b, unsigned char **bytes_B, size_t *len_B, const char *n_hex, const char *g_hex) |
void | srp_verifier_delete (struct SRPVerifier *ver) |
int | srp_verifier_is_authenticated (struct SRPVerifier *ver) |
const char * | srp_verifier_get_username (struct SRPVerifier *ver) |
const unsigned char * | srp_verifier_get_session_key (struct SRPVerifier *ver, size_t *key_length) |
size_t | srp_verifier_get_session_key_length (struct SRPVerifier *ver) |
void | srp_verifier_verify_session (struct SRPVerifier *ver, const unsigned char *user_M, unsigned char **bytes_HAMK) |
struct SRPUser * | srp_user_new (SRP_HashAlgorithm alg, SRP_NGType ng_type, const char *username, const char *username_for_verifier, const unsigned char *bytes_password, size_t len_password, const char *n_hex, const char *g_hex) |
void | srp_user_delete (struct SRPUser *usr) |
int | srp_user_is_authenticated (struct SRPUser *usr) |
const char * | srp_user_get_username (struct SRPUser *usr) |
const unsigned char * | srp_user_get_session_key (struct SRPUser *usr, size_t *key_length) |
size_t | srp_user_get_session_key_length (struct SRPUser *usr) |
SRP_Result | srp_user_start_authentication (struct SRPUser *usr, char **username, const unsigned char *bytes_a, size_t len_a, unsigned char **bytes_A, size_t *len_A) |
void | srp_user_process_challenge (struct SRPUser *usr, const unsigned char *bytes_s, size_t len_s, const unsigned char *bytes_B, size_t len_B, unsigned char **bytes_M, size_t *len_M) |
void | srp_user_verify_session (struct SRPUser *usr, const unsigned char *bytes_HAMK) |
enum SRP_HashAlgorithm |
enum SRP_NGType |
enum SRP_Result |
SRP_Result srp_create_salted_verification_key | ( | SRP_HashAlgorithm | alg, |
SRP_NGType | ng_type, | ||
const char * | username_for_verifier, | ||
const unsigned char * | password, | ||
size_t | len_password, | ||
unsigned char ** | bytes_s, | ||
size_t * | len_s, | ||
unsigned char ** | bytes_v, | ||
size_t * | len_v, | ||
const char * | n_hex, | ||
const char * | g_hex ) |
References calculate_x(), delete_ng(), NGConstant::g, mpz_num_bytes(), mpz_to_bin(), NGConstant::N, new_ng(), porting::secure_rand_fill_buf(), srp_dbg_num, SRP_ERR, and SRP_OK.
Referenced by gen_srp_v().
void srp_user_delete | ( | struct SRPUser * | usr | ) |
References SRPUser::A, SRPUser::a, SRPUser::bytes_A, delete_ng(), SRPUser::ng, SRPUser::password, SRPUser::password_len, SRPUser::S, SRPUser::username, and SRPUser::username_verifier.
Referenced by Client::deleteAuthData(), and Client::handleCommand_Hello().
const unsigned char * srp_user_get_session_key | ( | struct SRPUser * | usr, |
size_t * | key_length ) |
References SRPUser::hash_alg, hash_length(), and SRPUser::session_key.
size_t srp_user_get_session_key_length | ( | struct SRPUser * | usr | ) |
const char * srp_user_get_username | ( | struct SRPUser * | usr | ) |
References SRPUser::username.
int srp_user_is_authenticated | ( | struct SRPUser * | usr | ) |
References SRPUser::authenticated.
struct SRPUser * srp_user_new | ( | SRP_HashAlgorithm | alg, |
SRP_NGType | ng_type, | ||
const char * | username, | ||
const char * | username_for_verifier, | ||
const unsigned char * | bytes_password, | ||
size_t | len_password, | ||
const char * | n_hex, | ||
const char * | g_hex ) |
References SRPUser::A, SRPUser::a, SRPUser::authenticated, SRPUser::bytes_A, delete_ng(), SRPUser::hash_alg, new_ng(), SRPUser::ng, SRPUser::password, SRPUser::password_len, SRPUser::S, SRPUser::username, and SRPUser::username_verifier.
Referenced by Client::startAuth().
void srp_user_process_challenge | ( | struct SRPUser * | usr, |
const unsigned char * | bytes_s, | ||
size_t | len_s, | ||
const unsigned char * | bytes_B, | ||
size_t | len_B, | ||
unsigned char ** | bytes_M, | ||
size_t * | len_M ) |
References SRPUser::A, SRPUser::a, calculate_H_AMK(), calculate_M(), calculate_x(), NGConstant::g, SRPUser::H_AMK, H_nn(), SRPUser::hash_alg, hash_length(), hash_num(), SRPUser::M, mpz_from_bin(), mpz_mulm(), mpz_subm(), NGConstant::N, SRPUser::ng, SRPUser::password, SRPUser::password_len, SRPUser::S, SRPUser::session_key, srp_dbg_num, SRPUser::username, and SRPUser::username_verifier.
Referenced by Client::handleCommand_SrpBytesSandB().
SRP_Result srp_user_start_authentication | ( | struct SRPUser * | usr, |
char ** | username, | ||
const unsigned char * | bytes_a, | ||
size_t | len_a, | ||
unsigned char ** | bytes_A, | ||
size_t * | len_A ) |
References SRPUser::A, SRPUser::a, SRPUser::bytes_A, NGConstant::g, mpz_fill_random(), mpz_from_bin(), mpz_num_bytes(), mpz_to_bin(), NGConstant::N, SRPUser::ng, SRP_ERR, SRP_OK, and SRPUser::username.
Referenced by Client::startAuth().
void srp_user_verify_session | ( | struct SRPUser * | usr, |
const unsigned char * | bytes_HAMK ) |
References SRPUser::authenticated, SRPUser::H_AMK, SRPUser::hash_alg, and hash_length().
void srp_verifier_delete | ( | struct SRPVerifier * | ver | ) |
References SRPVerifier::bytes_B, delete_ng(), SRPVerifier::ng, and SRPVerifier::username.
Referenced by RemoteClient::resetChosenMech().
const unsigned char * srp_verifier_get_session_key | ( | struct SRPVerifier * | ver, |
size_t * | key_length ) |
References SRPVerifier::hash_alg, hash_length(), and SRPVerifier::session_key.
size_t srp_verifier_get_session_key_length | ( | struct SRPVerifier * | ver | ) |
References SRPVerifier::hash_alg, and hash_length().
Referenced by Server::handleCommand_SrpBytesM().
const char * srp_verifier_get_username | ( | struct SRPVerifier * | ver | ) |
References SRPVerifier::username.
int srp_verifier_is_authenticated | ( | struct SRPVerifier * | ver | ) |
References SRPVerifier::authenticated.
struct SRPVerifier * srp_verifier_new | ( | SRP_HashAlgorithm | alg, |
SRP_NGType | ng_type, | ||
const char * | username, | ||
const unsigned char * | bytes_s, | ||
size_t | len_s, | ||
const unsigned char * | bytes_v, | ||
size_t | len_v, | ||
const unsigned char * | bytes_A, | ||
size_t | len_A, | ||
const unsigned char * | bytes_b, | ||
size_t | len_b, | ||
unsigned char ** | bytes_B, | ||
size_t * | len_B, | ||
const char * | n_hex, | ||
const char * | g_hex ) |
References SRPVerifier::authenticated, SRPVerifier::bytes_B, calculate_H_AMK(), calculate_M(), NGConstant::g, SRPVerifier::H_AMK, H_nn(), SRPVerifier::hash_alg, hash_num(), SRPVerifier::M, mpz_addm(), mpz_fill_random(), mpz_from_bin(), mpz_mulm(), mpz_num_bytes(), mpz_to_bin(), NGConstant::N, new_ng(), SRPVerifier::ng, SRPVerifier::session_key, srp_dbg_num, and SRPVerifier::username.
Referenced by Server::handleCommand_SrpBytesA().
void srp_verifier_verify_session | ( | struct SRPVerifier * | ver, |
const unsigned char * | user_M, | ||
unsigned char ** | bytes_HAMK ) |
References SRPVerifier::authenticated, SRPVerifier::H_AMK, SRPVerifier::hash_alg, hash_length(), and SRPVerifier::M.
Referenced by Server::handleCommand_SrpBytesM().