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

Demo for Distributed Key Generation (DKG) #252

Closed
mpguerra opened this issue Feb 23, 2023 · 4 comments · Fixed by ZcashFoundation/frost-zcash-demo#36 or ZcashFoundation/frost-zcash-demo#57
Assignees

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Feb 23, 2023

Motivation

We want to simulate a execution of FROST using DKG to show potential FROST implementers how to use the DKG.

Scope

Similar to #238, but using the DKG instead.

The DKG demo must be run for each signer, in parallel (e.g. one execution of the same binary in different terminals).

At the end of the execution, the program must print all the information required for signing and verifying (using #239 and ZcashFoundation/frost-zcash-demo#48)

Specification

On startup, it will prompt for:

  • The number of shares to generate (MAX_PARTICIPANTS)
  • The threshold number of participants for the secret sharing scheme (MIN_PARTICIPANTS)
  • The identifier of the current participant (an integer)

It will the run part1 of the DKG. Then:

  • Print the Round 1 Package (suggestion: in a single-line JSON to make it easy to copy&paste)
  • Store the Round 2 SecretPackage in memory

The program keeps running, then prompts for:

  • For every other participant:
    • The SecretPackage received from that participant. (Note that it could be easier to include the identifier inside the package itself. That would be a bad example, though, since the identifier must be deduced from the authenticated communication channel, which does not exist in the demo. We need to make it clearer to library users that the identifier should not be simply sent inside the channel since it could be spoofed.)

It will run part2 of the DKG. Then:

  • Print the Round 2 Package for each other participant
  • Store the Round 2 SecretPackage in memory

The program keeps running, then prompts for:

  • For every other participant:
    • The SecretPackage received from that participant.

Finally, the program runs part3 of the DKG using the Packages received in both round 1 and round 2 and the round 2 `SecretPackage. It then prints:

  • The participant secret share
  • The participant verifying share
  • The group public key
@ThantZin-develope
Copy link

Prompts for the SecretPackage received from that participant? is not it Package broadcast from other participants? and that Package struct is not Printable?

@mpguerra
Copy link
Contributor Author

This is just meant as a toy/demo implementation as an example and is not intended to be used in a production setting

@conradoplg conradoplg self-assigned this Jun 22, 2023
@mpguerra mpguerra linked a pull request Jul 3, 2023 that will close this issue
@mpguerra
Copy link
Contributor Author

mpguerra commented Jul 3, 2023

Do we want to close this with ZcashFoundation/frost-zcash-demo#36 or split it into implementation and test issues and just close the implementation part? I'm good with either option

@conradoplg
Copy link
Contributor

Do we want to close this with ZcashFoundation/frost-zcash-demo#36 or split it into implementation and test issues and just close the implementation part? I'm good with either option

I don't mind either way, I think it's simpler to keep this open, I will probably work on the tests soonish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants