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

frost-client: add encryption and authentication #336

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

conradoplg
Copy link
Contributor

@conradoplg conradoplg commented Oct 10, 2024

Based on #328

Closes #179

With this, we finally have encryption/authentication!

My strategy was to change the ProcessedArgs struct to allow specifying some additional stuff that is only required for this. That way, the old tools keep working the same as they did before (we can decided later if we want them gone or not...). I refactored the participant and coordinator main functions so that they could be called as a library, being passed a ProcessedArgs as input.

I created a Noise struct (arbitrarily in the participant crate, which is then also imported by coordinator) to abstract an annoyance of the snow crate, which is that while it supports sending/receiving a message along with the handshake, it requires explicitly marking the handshake as finished.

This also updates the trusted-dealer command; when working on this I realized it made more sense to register the username information along with the group information and not with the contact information itself. Similarly, the server URL should be registered along with the group. (This means that you will need to create a new group with this PR in order to test it)

We should add a lot of tests to this. But let's leave that for a separate PR.

Example commands to test manually

RUST_LOG=debug cargo run --bin server
# Create a new group (necessary since this PR updates the trusted-dealer tool)
cargo run -p frost-client -- trusted-dealer --names Alice,Bob,Eve -c alice.toml -c bob.toml -c eve.toml -C redpallas -u alice,bob,eve -s localhost:2744
cargo run -p frost-client -- coordinator -c alice.toml --server-url localhost:2744 --group d107eb62cd393b19f661f58218bbcea48eca6bf15743e6cc7e9dfc1775599003 -S alice,bob -m msg.raw -r randomizer.raw
cargo run -p frost-client -- participant -c alice.toml --server-url localhost:2744 --group d107eb62cd393b19f661f58218bbcea48eca6bf15743e6cc7e9dfc1775599003
cargo run -p frost-client -- participant -c bob.toml --server-url localhost:2744 --group d107eb62cd393b19f661f58218bbcea48eca6bf15743e6cc7e9dfc1775599003

@mpguerra mpguerra linked an issue Oct 12, 2024 that may be closed by this pull request
Base automatically changed from frost-client-coordinator to main October 24, 2024 13:36
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.

Add encryption/authentication
1 participant