Setup Phase
In the drand setup phase, you create a collective private and public key pair shared among ๐ participants. This is done through a ๐ก-of-๐
Distributed Key Generation (DKG) process and results in each participant receiving a copy of the collective public key plus a private key share of the collective private key โ no individual node knows the collective private key. Each private key share can then be used to perform cryptographic threshold computations, such as generating threshold signatures, where at least ๐ก
contributions produced using the individual private key shares are required to successfully finish the collective operation.
A DKG is performed in a fully distributed manner, avoiding any single points of failure. This is an overview of the different sub-components of the drand DKG implementation.
โ Secret Sharing
Secret sharing is an important technique many advanced threshold cryptography mechanisms rely on.
Secret sharing allows you to split a secret value ๐
into ๐
shares ๐ 1,โฆ,๐ ๐
so that ๐
can only be reconstructed if a threshold of ๐ก
shares is available.
โ Shamirโs Secret Sharing (SSS)
The SSS scheme is one of the most well-known and widely used secret sharing approaches, and a core component of drand. SSS works over an arbitrary finite field, but a simplistic approach uses the integers modulo ๐
, denoted by โค๐
. Let ๐ โโค๐
denote the secret to share.
โ Share Distribution
To share ๐
, a dealer first creates a polynomial, ๐(๐ฅ)=๐0+๐1๐ฅ+โฏ+๐๐กโ1๐ฅ๐กโ1
with ๐0=๐
and (random) ๐๐โโค๐
for ๐=1,โฆ,๐กโ1
and then creates one share ๐ ๐ for each participant ๐ by evaluating ๐(๐ฅ) at the integer ๐ and setting ๐ ๐=(๐,๐(๐)).
โ Secret Reconstruction
To recover the secret ๐
, collect at least ๐ก
shares, then uniquely reconstruct ๐(๐ฅ)
using Lagrange interpolation and obtain ๐
as ๐ =๐0=๐(0)
.
Note that you can use any subset of ๐ก-of-๐
shares to perform Lagrange interpolation and uniquely determine ๐
; however, having a subset of less than ๐ก
shares does not allow to learn anything about ๐
.
โ Verifiable Secret Sharing
SSS scheme assumes that the dealer is honest, but this may not always hold in practice. A Verifiable Secret Sharing (VSS) scheme protects against malicious dealers by enabling participants to verify that their shares are consistent with those dealt to other nodes, ensuring that the shared secret can be correctly reconstructed later.
drand uses Feldmanโs VSS scheme, an extension of SSS. Let ๐พ
denote a cyclic group of prime order ๐
in which computing discrete logarithms is intractable. A cyclic group means there exists a generator, ๐
, so that any element ๐ฅโ๐พ
can be written as ๐ฅ=๐๐
for some ๐โ{0,โฆ,๐โ1}
.
โ Share Distribution
In addition to distributing shares of the secret to participants, the dealer also broadcasts commitments to the coefficients of the polynomial ๐(๐ฅ)
of the form (๐ด0,๐ด1,โฆ,๐ด๐กโ1)=(๐๐ ,๐๐1,โฆ,๐๐๐กโ1)
. These commitments enable individual participants, ๐
, to verify that their share ๐ ๐=(๐,๐(๐))
is consistent with respect to the polynomial ๐(๐ฅ)
by checking that ๐๐(๐)=โ๐กโ1๐=0(๐ด๐)๐๐
holds.
โ Secret Reconstruction
The recovery of secret ๐
works the same as regular SSS, except that verified to be valid shares are used.
โ Distributed Key Generation (DKG)
Although VSS schemes protect against a malicious dealer, the dealer still knows the secret. To create a collectively shared secret ๐
so no individual node gets any information about it, participants can use a DKG protocol. drand uses Pedersenโs DKG scheme, which runs ๐
instances of Feldmanโs VSS in parallel and on top of additional verification steps.
โ Share Distribution
Individual participants, ๐
, create a (random) secret, ๐ ๐โโค๐
, and share it all participants using VSS, sending a share, ๐ ๐,๐
to each ๐
and broadcasts the list of commitments (๐ด๐,0,๐ด๐,1,โฆ,๐ด๐,๐กโ1)
to everyone.
โ Share Verification
๐
verifies the shares received as prescribed by Feldmanโs VSS scheme. If ๐
receives an invalid share, ๐ ๐,๐
, from ๐
, then ๐
broadcasts a complaint. ๐
must reveal the correct share ๐ ๐,๐
or they are considered an invalid dealer.
โ Share Finalization
At the end of the protocol, the final share of ๐
is ๐ ๐=โ๐๐ ๐,๐
for all valid participants ๐
, that is, for all ๐
s not excluded during the verification phase.
The collective public key associated with the valid shares can be computed as ๐=โ๐๐ด๐,0
for all valid ๐
s.
Note: Even though the secret created using Pedersenโs DKG can be biased, it is safe to use for threshold signing as shown by Rabin et al.