Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cbsspeke
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Charles Wright
Cbsspeke
Commits
f57a491b
Commit
f57a491b
authored
3 years ago
by
Charles Wright
Browse files
Options
Downloads
Patches
Plain Diff
Make PHF minimum params specific to Argon2
parent
a390c05a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bsspeke.c
+4
-4
4 additions, 4 deletions
bsspeke.c
bsspeke.h
+2
-2
2 additions, 2 deletions
bsspeke.h
with
6 additions
and
6 deletions
bsspeke.c
+
4
−
4
View file @
f57a491b
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
bsspeke.h
+
2
−
2
View file @
f57a491b
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment