-
Notifications
You must be signed in to change notification settings - Fork 2.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
Threshold Signature Implementation #2250
Conversation
0734fbe
to
ef44342
Compare
e1c5d9b
to
95858ea
Compare
Update ThresholdSignature.md
7ca6663
to
18cf899
Compare
|
||
### General Overview | ||
|
||
This document outlines the proposal for implementing [Olaf](https://eprint.iacr.org/2023/899), the first FROST based protocol proven secure without relying on the [Algebraic Group Model](https://eprint.iacr.org/2017/620.pdf) (AGM) or an idealized key generation protocol. It is composed of: |
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.
Olaf sounds reasonable. Any comment @elizabeth-crites ?
|
||
This document outlines the proposal for implementing [Olaf](https://eprint.iacr.org/2023/899), the first FROST based protocol proven secure without relying on the [Algebraic Group Model](https://eprint.iacr.org/2017/620.pdf) (AGM) or an idealized key generation protocol. It is composed of: | ||
- [FROST3](https://eprint.iacr.org/2022/550), the most efficient known variant of [FROST](https://eprint.iacr.org/2020/852), which is a threshold signature protocol based on the [Schnorr signature scheme](https://link.springer.com/article/10.1007/BF00196725) (for simplicity, we refer to FROST3 as FROST in this document, since the core functionality is the same). | ||
- [SimplPedPoP](https://eprint.iacr.org/2023/899), a Distributed Key Generation (DKG) protocol used to generate the group key to sign in FROST. It is a simplification of [PedPoP](https://eprint.iacr.org/2020/852), the DKG used in the original FROST paper, which is the [Pedersen's DKG](https://link.springer.com/content/pdf/10.1007/3-540-46766-1_9.pdf) with Proofs of Possession (PoP) of the generated secret. All of them have as the fundamental building block the [Shamir's secret sharing scheme](https://web.mit.edu/6.857/OldStuff/Fall03/ref/Shamir-HowToShareASecret.pdf). |
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.
SimplePedPop sounds fine. I never looked at PedPoP really, only the original Pedersen DKG. Again any comment @elizabeth-crites?
We'd simply output a hash for the equality check algorithm, so then the user must handle the final abort if that fails?
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.
Ahh SimplePedPoP does not encapsulate encrypting the key shares. Does PedPoP do so?
I'll think about if there is a way to abstract this, but maybe SimplePedPoP works well for single user use cases.
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.
PedPoP does not encapsulate encrypting key shares either. That is why they are implementing EncPedPop here, which is a wrapper around SimplPedPop. And they recommend it even for applications that support secure channels, due to its low overhead. Should we do the same?
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.
It adds an extra round because you must know to whom you encrypt. As EncPedPop is a wrapper around SimplePedPoP then I'd say do SimplePedPoP first, and we can think about the wrapper later. It'll maybe require cleaning up the aead module, so no reason to block anything: https://github.com/w3f/schnorrkel/blob/master/src/aead.rs
/// Generates the signing nonces and commitments to be used in the signing operation. | ||
/// | ||
/// Implements [`commit`] from the spec: https://www.ietf.org/archive/id/draft-irtf-cfrg-frost-15.html#name-round-one-commitment | ||
pub fn commit(secret: &SigningShare) -> (SigningNonces, SigningCommitments); |
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.
This could take a &impl Transcript
too, which'll add entropy. It's only immutable though, so no transcript modifications, and ignoring it is harmless.
/// Receives the message to be signed and a set of signing commitments and a set of randomizing commitments to be used in that signing operation, including that for this participant. | ||
/// | ||
/// Implements [`sign`] from the spec: https://www.ietf.org/archive/id/draft-irtf-cfrg-frost-15.html#name-round-two-signature-share-g | ||
pub fn sign(signing_package: &SigningPackage, signer_nonces: &SigningNonces, key_package: &KeyPackage) -> Result<SignatureShare, Error>; |
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.
This'll take signer_nonces: SigningNonces
, not the borrow.
SigningNonces
should be opaque, not be Clone
, and not support any form of serialization, but they could be #[repr(transparent)]
so that unsafe code can access the contents.
This makes SigningNonces
a "linear type" or "session type", in that it cannot be used twice.
pub fn generate_simplpedpop(identifier: Identifier, max_signers: u16, min_signers: u16) -> Result<(SecretPackage, Package), Error>; | ||
|
||
/// Verifies the messages received from all participants and returns the data for the equality check and DKG output. | ||
pub fn verify_simplpedpop(secret_package: &SecretPackage, packages: &BTreeMap<Identifier, Package) -> Result<(KeyPackage, PublicKeyPackage), Error>; |
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 suppose SecretPackage
could be a session type too, but maybe not so important.
```rust | ||
pub mod simplpedpop { | ||
/// Generates the SimplPedPop messages to be sent to the coordinator or directly to the other participants. | ||
pub fn generate_simplpedpop(identifier: Identifier, max_signers: u16, min_signers: u16) -> Result<(SecretPackage, Package), Error>; |
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.
It's fine.
I'm kinda tempted to have signers field indices be arbitrary: Imagine 5 senior key holders run the DKG with a threshold of 4, but create an additional 2 or 3 shares which they delegate to junior key holders. If done simply then junior key holders would know how many senior key holders exist, but this could be hidden from them in various ways. This permits creating a threshold key where juniors do not knows how many key holders exist, which maybe useful for operational security. This is probably way overkill.
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.
Yes, probably. Maybe leave it for a future iteration, if there is demand for it?
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.
Yeah I realized after that this brings in considerable complexity. In principlem, there are benefits to using random indices, again for opsec, but this again requires an extra rounds. Let's omit for now.
All looks good to me. We'll have @elizabeth-crites make some comment too. |
Amusingly @elizabeth-crites and I have not actually figured out if we like the delinearization in 1 or the delinearization in 2,3. There is some malleability in 2,3 but we've not found any mechanism for abuse yet. |
Just noticed that step 2 of the FROST signing protocol in this document is actually wrongly described, since in the FROST3 optimization the Coordinator does not broadcast all nonce commitments but the multiplication of the nonce commitments. Are you suggesting to implement Sparkle instead of FROST? |
Isn't Sparkle 3 round? No not some three round one. We'll stick with SimplePedPop because it's what serious folk like Tim picked, so other code exists for comparison. We'll stick with Olaf because really nobody knows exploits for the malleability during signing. All Approve this now. |
- **Full-Time Equivalent (FTE):** 1 FTE | ||
- **Total Costs:** 10,000 USD | ||
|
||
### Milestone 1 - Olaf Library Integration into [Schnorrkel repository](https://github.com/w3f/schnorrkel) |
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.
$5,000 is too little money for this. Increase it to $10,000. We'll add a third reviewer.
Add me on element: @jeff:web3.foundation and I'll help talk you through some of the schnorrkel code whenever you need help. In particular, there are already DLEQ proofs which work with more than two point pairs, which matye useful.
https://github.com/w3f/schnorrkel/blob/master/src/vrf.rs#L627
https://github.com/w3f/schnorrkel/blob/master/src/vrf.rs#L430
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.
Thank you! I am really excited to work on this project!
…he FROST3 optimization
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.
@Fiono11 thx for applying again with this improved proposal.
Pls adjust to lvl 2. Other than that, I think it's good to go. 👍
Co-authored-by: S E R A Y A <takahser@users.noreply.github.com>
Congratulations and welcome to the Web3 Foundation Grants Program! Please refer to our Milestone Delivery repository for instructions on how to submit milestones and invoices, our FAQ for frequently asked questions and the support section of our README for more ways to find answers to your questions. |
The work is basically done, and we should pay him. It'll be merged as w3f/schnorrkel#110 I've cleaned up a few minor things, primarily the clones and serializations that define the FRO part of FROST, and make sense for hardware signers, but looks really dangerous if used in pure software like Vault. I've some build stuff to clean up, but no reason not to go ahead and pay him. |
Thanks, @burdges! Please submit your milestone(s) as per https://github.com/w3f/Grant-Milestone-Delivery, @Fiono11, so we can finish the evaluation and initiate the payment. |
hi @Fiono11 we just settled the payment. Apologies for the delay! |
Project Abstract
This document outlines the proposal for implementing Olaf, a protocol that combines FROST, a threshold signature scheme based on the Schnorr signature, with SimplPedPoP, a Distributed Key Generation (DKG) scheme. It provides a more scalable, cheaper, more user-friendly and privacy-preserving alternative to current multisig solutions. This protocol is particularly designed for scenarios with a large number of signers, ensuring both efficiency and signer anonymity.
Grant level
Application Checklist
project_name.md
).@_______:matrix.org
(change the homeserver if you use a different one)