frost-client: add encryption and authentication #336
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theparticipant
crate, which is then also imported bycoordinator
) to abstract an annoyance of thesnow
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