-
Notifications
You must be signed in to change notification settings - Fork 96
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
Distributed Key Generation #47
Comments
As discussed, we might not need the full DKG in the wild, if we plan to do the key generation on the transaction log/blockchain itself. We will probably use a smart contract for this, but I'll describe it just in terms of special transactions. This protocol will have to run once at the end of each instance, i.e. before the set of validators/nodes changes, to generate the new keys. Once they have been distributed, the new Honey Badger instance starts, using the new set of nodes. IdeaWe use a simplified version of the Verifiable Secret Sharing (VSS) algorithm in the paper: If I have a bivariate polynomial of degree fn f(x: Fr, y: Fr) -> Fr {
(0..=t).cartesian_product(0..=t).map(|(i, j)|
x.pow(i) * y.pow(j) * coeff[i][j]
).sum()
} in two variables f(0, 0) f(0, 1) f(0, 2) f(0, 3) …
f(1, 0) f(1, 1) f(1, 2) f(1, 3) …
f(2, 0) f(2, 1) f(2, 2) f(2, 3) …
f(3, 0) f(3, 1) f(3, 2) f(3, 3) …
… each row and each column are a univariate (i.e. in one variable, because the other is fixed) polynomial of degree In VSS, the proposer comes up with the polynomial and sends a commitment (see below for details) to everyone, so they can't lie about the values later. They send row For DKG, we don't want a single proposer. Instead, we want to add the polynomials from at least AlgorithmEach node f[k](x, y) * g1 ==
(0..=t).cartesian_product(0..=t).map(|(i, j)|
x.pow(i) * y.pow(j) * commit[k][i][j]
).sum() It also encrypts for each node Propose(commit[k], crypt_row_f[k]) Each node Accept(k, crypt_value_f[k][m]) Once there are In the first block in which Then the OptimizationThe paper uses a symmetric polynomial, i.e. |
How much to implement in
|
Let's actually wait for We should also add a timeout: If, say, 50 blocks/epochs after a ballot the DKG still hasn't succeeded, the validator set change should be aborted/reverted. |
We should also do some research on whether it is secure in this context to use the same key for the common coin (signing things like In our setting, you can't make a node sign some arbitrary text: it will only sign coin shares, and a <⅓ adversary alone can't even cause it to send any coin share. |
Implement polynomials for distributed key generation. (#47)
So enum Input<Tx, NodeUid> {
/// A user-defined transaction.
User(Tx),
/// A vote to add a node.
Add(NodeUid),
/// A vote to remove a node.
Remove(NodeUid),
} It would create a enum Transaction<Tx, NodeUid> {
/// A user-defined transaction.
User(Tx),
/// A vote by an existing node to add a new node.
Add(NodeUid, NodeUid, Signature),
/// A vote by an existing node to remove a node.
Remove(NodeUid, NodeUid, Signature),
/// A proposal of a bivariate polynomial for key generation.
Propose(NodeUid, BivarCommit, Vec<Ciphertext>, Signature),
/// A confirmation by a recipient of a row for key generation.
Accept(NodeUid, Vec<Ciphertext>, Signature),
} As soon as a majority of votes for adding or removing a particular node have been output, key generation would be performed. And once that is complete, the
When the user inputs e.g. Edit: This will need another guarantee from |
I'm trying to come up with the simplest rules that allow adding and removing nodes and that can't get stuck (e.g. because a new node fails to provide input). A timeout (in terms of number of epochs) could be problematic, if there are a lot of transactions in the buffer and it takes a long time to commit. Instead let's say you can change your vote by re-voting. Whenever the to-be-added/-removed node with the majority changes, a new DKG round starts. As above, As soon as the network changes, all further epochs in the old |
Implement distributed key generation for the threshold schemes (#38, #40).
See Distributed Key Generation in the Wild and A robust threshold elliptic curve digital signature providing a new verifiable secret sharing scheme.
The text was updated successfully, but these errors were encountered: