-
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 a readme file #3
Changes from 2 commits
bb4a6f8
0e504de
f907081
5c7d9be
e6088f6
65345d4
42f648a
cb85aca
e01817b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# SSV Distributed Key Generation Spec | ||
|
||
## Introduction | ||
This repository contains spec of distributed key generation (DKG) used in SSV. Based on verifiable secret sharing, DKG allows a set of *n* operators to generate a **BLS** key share for each operator, such that a BLS private key can only be used when threshold *t* out of *n* operators agree. | ||
|
||
--- | ||
|
||
## Functionalities | ||
Operations are initiated by an initiator, and executed by operators. An initiator can initiate: | ||
|
||
### Init | ||
When a init message is sent to the operators, all operators participate and run a DKG ceremony to create key shares. Each operator generates a result with a **proof** (see below) to show the correctness of execution. Proofs are referred to when an initiator asks for re-sign or reshare. | ||
|
||
### Re-sign | ||
In the case where the nonces of a DKG ceremony is not correct, to prevent replay attack, the initiator sends re-sign messages for operators to create new signatures with correct nonces without generating new key shares. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is creating new key-shares, though. The procedure only changes the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, the signature part is |
||
|
||
### Reshare | ||
When the set of operators changed (including change of size and change of operators), a reshare is initiated to generate new key shares among the new operators. This process requires participation from *t* old operators and all new operators. | ||
|
||
--- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add the following here (or wherever you see fit) Security AssumptionsAll messages are authenticated using the initiator's and operators' public key. InitThe initiator is fully trusted. Meaning it won't deviate from protocol. But it can have faults (go, up and down). Re-signThe initiator is not trusted. It may try to fool the operators into resigning with the wrong secret shares, owner and nonce. Also since in the resign operation the ReshareThe initiator is not trusted. It may try to fool the operators into resharing with the wrong secret shares. Or resharing without permission. |
||
|
||
## Result and Proof struct | ||
After execution of init, re-sign and reshare, a **result** is returned by the operators for validation and verification. | ||
```go | ||
type Result struct { | ||
// Operator ID | ||
OperatorID uint64 | ||
// RequestID for the DKG instance (not used for signing) | ||
RequestID [24]byte `ssz-size:"24"` | ||
// Partial Operator Signature of Deposit data | ||
DepositPartialSignature []byte `ssz-size:"96"` | ||
// SSV owner + nonce signature | ||
OwnerNoncePartialSignature []byte `ssz-size:"96"` | ||
// Signed proof for the ceremony | ||
SignedProof SignedProof | ||
} | ||
``` | ||
|
||
In a **result**, the **SignedProof** is a **Proof** with a signature. A **Proof** contains: | ||
```go | ||
type Proof struct { | ||
// the resulting public key corresponding to the shared private key | ||
ValidatorPubKey []byte `ssz-size:"48"` | ||
// standard SSV encrypted share | ||
EncryptedShare []byte `ssz-max:"512"` | ||
// the share's BLS pubkey | ||
SharePubKey []byte `ssz-size:"48"` | ||
// owner address | ||
Owner [20]byte `ssz-size:"20"` | ||
} | ||
``` | ||
*ValidatorPubKey*, *EncryptedShare*, and *Owner* are to identify information of the validator and the operator in SSV netwwork, the *SharePubKey* is computed by the operator after the DKG ceremony using the obtained secret share as the private key. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo on netwwork There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More information about proof and validation criteria is added. However, how proof helps to protect against attack is I think subject to more discussion and we may update the proof struct as well. |
||
|
||
--- | ||
|
||
## Testing | ||
The tests are located in the `testing/` folder. To run tests, use: | ||
```shell | ||
go generate ./... | ||
``` | ||
then: | ||
```shell | ||
go test testing | ||
``` |
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.
provide a formula for "t out of n"?