-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Schnorr API BREAK] Improve Schnorr multisigning API + fix vulnerability #322
Conversation
bbcf45c
to
8f25d51
Compare
Rebased, and added several guarantee-zeroed-output cases. Ping @gmaxwell |
* by calling the function again (they are commutative and associative). | ||
* All cosigners must use the same msg32, and the same as in stage1. You must | ||
* also use the same noncefp/ndata for your own stage1 and stage2. Other | ||
* participants may use different nonce generation, though. |
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.
I think you should be more explicit: "Different participants may use different nonce generating functions and data, as long as they are each consistent between stage 1 and stage 2."
Up to you.
Edit Oh, you say this in the first sentence. So I think replace "You" with "Each participant" and "Other" with "Different" then.
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.
Fixed. Used your language.
Addressed nits. |
Hi, sorry for the delays, this fell off my radar. Will review today while in flight. |
@apoelstra Subtle ping |
@sipa can you explain
How
|
@fanatid I think you're confusing additive notation with multiplicative notation. We call the EC group operation |
@sipa thank you! I really forgot that EC multiplication is repeated addition. |
* Check whether all `R_all(j).x` values in each of the stage 2 signature are | ||
identical. If not, fail. | ||
* Compute the sum `s_all` of all `s(j)` values. | ||
* The full combined signature is `(R_all.x, s(i))`. |
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.
(R_all.x, s_all)
?
Going to do this differently. |
Is there a source where I can learn how this is being done today? Also not sure if helpful, but I found a working two-stage cosigning implementation for ed25519 in Go: |
@prusnak In review we discovered the AH(A) + BH(B) + ... scheme was vulnerable to a generalized birthday attack. We have a new scheme, but no strong proof for security yet. I didn't know about CoSi - I'll have a look at it. |
What about collision period of the H function? |
This reworks the Schnorr multisigning API to 4 self-contained functions:
This changes the combined public key to be
A*H(A) + B*H(B) + C*H(C) + ...
, in an attempt to prevent a pubkey cancellation vulnerability.The documentation is also moved out to a separate schnorr.md document.