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
853a205e
Commit
853a205e
authored
3 years ago
by
Charles Wright
Browse files
Options
Downloads
Patches
Plain Diff
Removed old junk code in main
parent
d9f95fac
No related branches found
Branches containing commit
Tags
v0.1.3
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bsspeke.c
+0
-66
0 additions, 66 deletions
bsspeke.c
with
0 additions
and
66 deletions
bsspeke.c
+
0
−
66
View file @
853a205e
...
...
@@ -309,72 +309,6 @@ bsspeke_client_verify_message4(const bsspeke_msg4_t *msg4,
int
main
(
int
argc
,
char
*
argv
[])
{
// Before execution of the protocol
// Both have:
// idS = server identity
char
*
server_id
;
// Client has:
// idC = client identity
char
*
client_id
;
char
*
password
;
// Server has these for "idC":
// salt
// settings
// P = hashToPoint(p)
// V = v * P
uint8_t
salt
[
32
];
uint8_t
P
[
32
];
// curve point
uint8_t
V
[
32
];
// curve point
// Step 1: Client hashes password, maps to a point on the curve, blinds with a random value
// C: r = random()
// C: R = r * hashToPoint(H(password, idC, idS))
// C->S: idC, R
uint8_t
r
[
32
];
// scalar
uint8_t
R
[
32
];
// curve point
// Step 2: Server generates response with blind salt
// S: b = random()
// S: B = b * P
// S: R' = H(salt) * R
// C<-S: B, R', settings
uint8_t
b
[
32
];
// scalar
uint8_t
B
[
32
];
// curve point
uint8_t
R_prime
[
32
];
// curve point
// Step 3:
// C: BlindSalt = (1/r) * R'
// C: p || v = pwKdf(password, BlindSalt, idC, idS, settings)
// C: P = hashToPoint(p)
// C: a = random()
// C: A = a * P
// C: K_c = H(idC, idS, A, B, a * B, v * B)
// C: verifierC = H(K_c, verifyCModifier)
// C->S: A, verifierC[, encryptedDataC]
uint8_t
blind_salt
[
32
];
// curve point
uint8_t
password_hash
[
64
];
// hash
uint8_t
client_P
[
32
];
// curve point
uint8_t
a
[
32
];
// scalar
uint8_t
A
[
32
];
// curve point
uint8_t
K_c
[
32
];
// hash
uint8_t
verifierC
[
32
];
// hash
// Step 4:
// S: K_s = H(idC, idS, A, B, b * A, b * V)
// S: Checks verifierC == H(K_s, verifyCModifier)
// S: verifierS = H(K_s, verifySModifier)
// C<-S: verifierS[, encryptedDataS]
uint8_t
K_s
[
32
];
// hash
uint8_t
server_hash
[
32
];
// hash -- should match verifierC
// Step 5:
// C: Checks verifierS == H(K_c, verifySModifier)
uint8_t
client_hash
[
32
];
// hash -- should match verifierS
return
0
;
}
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