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

Add parameter to supply fixed ephemeral key for testing #10

Open
wants to merge 2 commits into
base: standard-dh
Choose a base branch
from

Conversation

Frando
Copy link

@Frando Frando commented Jan 29, 2020

snow, a Rust lang implementation of NOISE, has a method to supply a fixed ephemeral keypair, for test-only purposes. This patch adds a state key fixedE that can only be manually set after initialitation and is intended for test-only usage. It allows to achieve the exact same results when all parameters are the same.

@Frando Frando force-pushed the fixed-e-for-testing branch 2 times, most recently from f1cfbcf to b29f7f5 Compare January 29, 2020 22:34
@Frando
Copy link
Author

Frando commented Jan 29, 2020

Just leaving this here for the moment for reference:
I built the same test as added here in Rust with snow and, as expected after my tests in rust-node-noise-handshake: Messages 1 (<- e) and 2 (-> e, ee, s, es) are the same, but the last message (-> s, e) differs:

c29fb236b6ec95b4d3d1d1020bb0bf8beb24577bf291d9ec1469a9a79ad04dd12bb6ca5cccd6f65ec3933222fe51d68bb395d58fb8fadfb1399bd998af642382

To run the Rust test and see this result:

git clone git@github.com:Frando/snow.git
git checkout -t origin/xchachapoly-xxtest
cargo test xx_xchachapoly_blake2b -- --nocapture

@Frando Frando changed the base branch from master to standard-dh January 29, 2020 22:52
@emilbayes
Copy link
Owner

Nice, I was actually going to implement this as it's a part of the fallback handshake, but in a slightly different way :) Perhaps I will base it off this code

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

Successfully merging this pull request may close these issues.

None yet

2 participants