The document describes both Joint-Feldman and Gennaro et al. DKG protocols, but the protocol implemented in Flow is Joint-Feldman.

Context:

Flow requires a source of randomness for several sub protocols. For each Epoch, the generation process outputs a sequence of pseudo-randoms that are deterministic, unpredictable till the random is revealed, agreed upon by all nodes, and verifiable by anyone against the commitment.

Protocol overview:

Since the protocol is heavy to be run by all security nodes, a relatively smaller group runs the protocol. The members of the group are self-assigned before the Epoch starts and are in charge of generating the randoms until the next Epoch. The protocol starts by running a Distributed Key Generation (DKG) to generate a common secret key for the group S. A threshold signature (TS) is run every time a random is needed afterwards. The signature output using the generated secret key is the new random R_n for block view n : Initially R_n was proposed to be

R_n = hash(sign(S, R_n-1)) , it was later updated to R_n = hash(sign(S, B_n-1)) where B_n is the block hash of view n .

Both (DKG) and (TS) are run using a BLS signature setup (cyclic groups G1 and G2 with hard CDH and easy DDH, generators g1 and g2..). we’ll use the multiplicative notation for G1 and G2.

In both protocols, the threshold t is fixed to floor((n-1)/2) to maximize the number of malicious nodes the group can handle. Malicious nodes of a number up to the threshold t are not able to uncover the value of the secret key S nor prevent the generation of S. Below is a (very) brief description of (DKG) and (TS).

Distributed Key Generation:

Threshold Signature:

Let’s assume we’re given n participants, each has a private key S_i and a public key y_i = g^S_i . A group private key S has been generated but only t+1 participants can reconstruct its value. A public key y = g^S is known to all participants. Note that this setup can be done through a DKG (the ones described above), or any other key generation process.

Performance: