Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix key derivation #3

Open
david415 opened this issue Mar 15, 2017 · 2 comments
Open

fix key derivation #3

david415 opened this issue Mar 15, 2017 · 2 comments

Comments

@david415
Copy link

according to @dominictarr 's secret-handshake paper the shared secret resulting from the secret handshake is:

K|a · b|a · B|A · b

where in your code you use a · b and concatenate it with a public key before hashing to derive the shared secret for each unidirectional stream.

@dominictarr
Copy link

Ah, this is about setting up box-stream (encryption for the rest of the session) which isn't described in the paper (because it's just about the handshake). The paper is good at describing the reasoning behind the protocol, but we need something more exact (algorithms, and byte lengths, etc) for implementers.

@david415
Copy link
Author

i suppose it makes sense to start with the shared secret negotiated by the handshake and then concatenating that with ephemeral public keys to split the shared secret into two shared secrets one for each direction of stream flow.

"Alice and Bob can now use their shared secret, K|a · b|a · B|A · b, with a
bulk encryption protocol to secure a two-way communication channel."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants