The DKG protocol used in Flow random beacon is a discrete-logarithm-based DKG, used to provide keys for a BLS-based threshold signature scheme. The specific instance used in Flow is Joint Feldman (Pedersen).

The purpose of such a DKG is to generate and share a secret BLS private key over all participants of the protocol.

The implementation is configured to use the elliptic curve BLS 12-381, over an extension field F(p^2). This means public keys are points in E(F(p^2)) while private keys are scalars in Zr, where r is the order of the E(F(p^2)) subgroup.

This document does not enter into the details of Joint Feldman, it only describes the high level steps of the protocol, and the API of the Flow DKG implementation.

Set up:

The protocol overview :

  1. The protocol starts at a specific block height before the end of $E_k$, let's call it $h_0$. All nodes $P_i$ start the first phase of the protocol "synchronously".

  2. In the first phase, every node $P_i$ uses a local secret seed to generate a bunch of data locally, and shares it with the other $P_j$ under two different forms:

  3. The first phase ends at a block height $h_1$. The duration between $h_0$ and $h_1$ must be large enough to allow the confidential channels and the broadcasting channels to relay all messages to the nodes.

  4. The second phase starts also at $h_0$. In the happy path (all nodes in phase 1 have behaved correctly/honestly), there are no messages sent during this phase. In the unhappy path (some nodes sent wrong data or no data at all in phase 1), there will be some messages broadcasted using the same broadcasting channel. There will be about $(n^2)/4$ broadcasted messages in the worst case. This phase ends at a block height $h_2$, that must be far enough from $h_1$.

  5. The third (last) phase starts at $h_2$. Same as phase 2, there are no messages sent in the happy path. In the unhappy paths, there will be as many broadcasted messages in this phase as in phase 2 ($(n^2)/4$ in the worst case). $h_3$ is the end of this phase and the end of the protocol.

  6. At $h_3$, every node $P_i$ can use all the received data through all the channels to get to a conclusion:

  7. In the case where DKG has succeeded, every honest node is able to compute locally two types of data:

    DKG Phases and deadlines

    DKG Phases and deadlines

The protocol from a node-perspective:

From a perspective of one particular honest node, the protocol should look simpler, here is what the node should do to participate in a instance of DKG: