Skip to content
Snippets Groups Projects
Commit f57a491b authored by Charles Wright's avatar Charles Wright
Browse files

Make PHF minimum params specific to Argon2

parent a390c05a
No related branches found
No related tags found
No related merge requests found
...@@ -196,10 +196,10 @@ bsspeke_client_setup_generate_message3 ...@@ -196,10 +196,10 @@ bsspeke_client_setup_generate_message3
) )
{ {
// Sanity checks first, before we do any work // Sanity checks first, before we do any work
if( phf_blocks < BSSPEKE_MIN_PHF_BLOCKS ) { if( phf_blocks < BSSPEKE_ARGON2_MIN_PHF_BLOCKS ) {
return -1; return -1;
} }
if( phf_iterations < BSSPEKE_MIN_PHF_ITERATIONS ) { if( phf_iterations < BSSPEKE_ARGON2_MIN_PHF_ITERATIONS ) {
return -1; return -1;
} }
...@@ -355,11 +355,11 @@ bsspeke_client_login_generate_message3(bsspeke_login_msg3_t *msg3, ...@@ -355,11 +355,11 @@ bsspeke_client_login_generate_message3(bsspeke_login_msg3_t *msg3,
bsspeke_client_ctx *client bsspeke_client_ctx *client
) { ) {
// Sanity checks first, before we do any work // Sanity checks first, before we do any work
if( msg2->phf_blocks < BSSPEKE_MIN_PHF_BLOCKS ) { if( msg2->phf_blocks < BSSPEKE_ARGON2_MIN_PHF_BLOCKS ) {
debug(ERROR, "phf_blocks is too low. Aborting."); debug(ERROR, "phf_blocks is too low. Aborting.");
return -1; return -1;
} }
if( msg2->phf_iterations < BSSPEKE_MIN_PHF_ITERATIONS ) { if( msg2->phf_iterations < BSSPEKE_ARGON2_MIN_PHF_ITERATIONS ) {
debug(ERROR, "phf_iterations is too low. Aborting."); debug(ERROR, "phf_iterations is too low. Aborting.");
return -1; return -1;
} }
......
...@@ -31,8 +31,8 @@ extern "C" { ...@@ -31,8 +31,8 @@ extern "C" {
#define BSSPEKE_VERIFY_SERVER_MODIFIER "server" #define BSSPEKE_VERIFY_SERVER_MODIFIER "server"
#define BSSPEKE_VERIFY_SERVER_MODIFIER_LEN 6 #define BSSPEKE_VERIFY_SERVER_MODIFIER_LEN 6
#define BSSPEKE_MIN_PHF_BLOCKS 100000 #define BSSPEKE_ARGON2_MIN_PHF_BLOCKS 100000
#define BSSPEKE_MIN_PHF_ITERATIONS 3 #define BSSPEKE_ARGON2_MIN_PHF_ITERATIONS 3
typedef struct { typedef struct {
// Login credentials // Login credentials
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment