Alon Muroch
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Zero Coordination DKG *Thank you Guanglei Deng from RockX and Nicolas Gailly from Protocol labs* One of the great benefits of SSV is the ability to adopt advance key management schemes like Distribuited-Key-Generation(DKG). DKG tranditionally requires some sort of manual coordination efforts to sync between the different participants, identify them and then use the results. Recently SSV adopted an SSV-Improvement proposal ([SIP](https://github.com/bloxapp/SIPs/blob/main/sips/dkg.md)) for a generalized DKG protocol that lives within the SSV network, allowing anyone to chose any SSV node for a DKG committee. Other DVT implementations like Obol went the manual route which presents significant limitations as it's heavily dependent on social coordination. This also opens up issues in key resharing/ voluntary exits. The full SSV-DKG integration is lead by SSV and RockX following a [grant proposal](https://snapshot.org/#/mainnet.ssvnetwork.eth/proposal/0x6a21f05dad33c1bb872112c4a28226ad68ffe1b1a9e2fa881a7b288ce2fa122f) to implement the GG20 protocol. ## How Ditribuited-Key-Generation works? Although [SIP-1](https://github.com/bloxapp/SIPs/blob/main/sips/dkg.md) treats the key generation protocol as a black box (meaning a variety of protocols can be adopted), most work by: 1. exchanging a series of messages between the participants in which each participant creates a local secret 2. The local secret from #1 is used to generate and share intermediary secrets to the others participans 3. Step 2 finishes when each participan has it's own locally generated secret and a set of intermediary secrets received by others 4. Each participan can now reconstruct its final share + the global public key associated with the distribuited private key 5. Most modern DKG algorithms add some verification which makes sure non of the participants cheated and all have valid signatures at the end or the whole protocol is aborted. `The full private key is never constructed or combined in any of the participants` ![](https://i.imgur.com/bOt6SbQ.png) ## The coordination problem The above requires some coordination, namely: * how do the participants talk with eachother * what encryption do they use to communicate and hide the secret shares * how does the final result is received and used by the user With SIP-1 we tried to solve all of those issues using the existing SSV infrastructure. ## Design goals * Zero manual coordination * Permissionless * Contract friendly (for verification and validation) With the above in mind we used the existing SSV registry contracts to establish for each operator an ethereum address for signing and a RSA2048 public encryption key (all already used within the existing SSV network). With those 2 elements in place + an existing P2P network we could now solve the coordination problem ## SIP-1 Generalized DKG support in SSV Each node in the SSV network will run a DKG service in it, listening to a sepcific pubsub topic, for DKG messages aimed to it. **A new DKG session** starts off by an Init DKG message signed by anyone wanting to initiate that session. Abuses can be prevented by aggressive peer scoring and rate limits. In the future SSV payment/ staking might increase those limits. Private SSV nodes could configure specific whitelisted addresses than can generate DKG with high rate limits. ```go // Init is the first message in a DKG which initiates a DKG type Init struct { // OperatorIDs are the operators selected for the DKG OperatorIDs []uint64 // Threshold DKG threshold for signature reconstruction Threshold uint16 // WithdrawalCredentials used when signing the deposit data WithdrawalCredentials []byte // Fork is eth2 fork version Fork [4]byte } ``` **Distribuited key ceremony** starts right after the init message is sent, for the purposes of SIP-1 we treat it as a black box. It can vary in message structure, number of rounds and other technical elements. All distribuited key ceremonies end the same, every operator managed to calculate and populate the following struct: ```go type KeyGenOutput struct { Share [*bls.SecretKey] OperatorPubKeys map[types.OperatorID]*bls.PublicKey ValidatorPK [48]byte } ``` SIP-1 enables identifiable blame for missbehaving parties which is crucial to reflect the initiator of the DKG what went wrong. **Deposit data signature** follows right after the ceremony ends, in this phase each operator partially signs the calculated deposit data (using the withdrawal credentials from the init message). Once a threshold of partial signatures are received, each operator can reconstruct a valid deposit data signature. **DKG output is signed** using the operator's ethereum address (found in the operator registry contract) ```go // Output is the last message in every DKG which marks a specific node's end of process type Output struct { // RequestID for the DKG instance (not used for signing) RequestID [24]byte // EncryptedShare standard SSV encrypted shares EncryptedShare []byte // SharePubKey is the share's BLS pubkey SharePubKey []byte // ValidatorPubKey the resulting public key corresponding to the shared private key ValidatorPubKey [48]byte // DepositDataSignature reconstructed signature of DepositMessage according to eth2 spec DepositDataSignature [96]byte } type SignedOutput struct { Data *Output Signer uint64 Signature [65]byte } ``` **Broadcasting (of each node) its SignedOutput to the network** ## Verifcation There are 2 types of verifications taking place during the entire DKG process: 1. Key generation verfication (VSS) - done internally by the DKG implementation 2. Output verification done by the user/ smart contract If a party of 4 operators participated, 4 different signatures over the Output struct will be streamed to the entire SSV network. A user will receive all of them, using his SSV node RPC, and will be able to verify: 1. The corret participants participated - Since each operator has a public encryption key there needs to be at least 1 non malicious operator to singal that out and the DKG won't happen/ there will be a missing SignedOutput message signed by the non malicuos party 2. The output paylod is valid and not changed - we can think of various trustless protocols that will want to verify that the result of the DKG is not tempered with. Since all output objects are signed it can easily be verified 3. The signed deposit data matches the validator public key 4. The correct withdrawal credentials were used *The 1 thing which can't be verified is a malicious operator put an invalid encrypted share (his own share) in the output. As long as 2/3 of the operators are honest (as the min requirement for SSV in general) that will not compromise the validator* ## Contract friendly verification A contract can self verify the signed output object for each operator for: 1) Selected operators are valid 2) Withdrawal credentials 3) Shares are not tempered 4) validator public key 5) DKG was successful This smart contract friendlyness is important to enable various DKG use cases without limits.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully