forked from novifinancial/tss-ecdsa
-
Notifications
You must be signed in to change notification settings - Fork 5
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 signing #464
Merged
Merged
Add signing #464
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- converts message digest to be rust crypto's Digest - adds verification of the signature - fixes a message-ordering bug - discovers an invalid-siganture bug
marsella
commented
Aug 10, 2023
hridambasu
approved these changes
Aug 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
gatoWololo
reviewed
Aug 14, 2023
gatoWololo
reviewed
Aug 14, 2023
gatoWololo
approved these changes
Aug 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Couple of minor questions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #425.
This adds the non-interactive signing protocol and a happy test for it.
It's quite large so I think it would benefit from review from both @gatoWololo and @hridambasu , just to have more eyes on it.
I tried to avoid adding too much miscellaneous clean-up, but I did make the following 2 changes:
ProtocolParticipant
s takesid
as a parameter, but each protocol participant also holds a session ID. We're at risk for bugs if they're different, so I reduced a bit of the usage of parameter-SIDs. This could be done more thoroughly across the library; I mainly fixed an actual bug in keygen tests where the messages had different SID from the participant, and simplified the implementation so it couldn't happen again.test_utils
module that I found more confusing than helpful, so I consolidated into the two functions we actually use. No functional changes here.From Aug 9:
I'm trying to add the complete signing protocol to the repo, but I'm getting some errors where signing generates an invalid signature. Here's what I've figured out:
k
and build the signature as if it were non-distributed signing, I get the same signature as the distributed algorithm (but it also fails).This kind of reads to me like the signing algorithm is correct, but I'm generating presign records wrong, although I'm not sure how wrong they can be because even a "failing" record will work for some messages. I'm feeling pretty stuck on this.
This is a huge PR (as promised) and there's a lot to wade through. I hardcoded a seed that causes the tests to fail for reference.