Back to all stories
Blogs
Tech & Dev
Threshold Cryptography I: Distributed Key Generation
5/18/2025
Threshold Cryptography I: Distributed Key Generation

Traditional cryptographic systems rely on a single party for cryptographic operations, introducing a single point of failure that compromises the entire system if breached. Threshold cryptography mitigates this risk by distributing trust among multiple parties, requiring only a subset (threshold) to collaboratively perform cryptographic operations.

This series of posts focuses on widely adopted threshold signature schemes, their implementations, and security considerations relevant to blockchain. It aims to bridge the gap between developers, cryptography enthusiasts, and academic literature by presenting technically dense content in an accessible format.

This first post introduces Distributed Key Generation (DKG), which allows multiple participants to jointly generate a secret key without ever reconstructing the full secret key, enhancing security and fault tolerance. It is fundamental to decentralized consensus, secure multiparty computation, and threshold signatures.

We will begin with the well-known Shamir’s Secret Sharing.

Secret Sharing Scheme

Shamir’s Secret Sharing

Shamir’s Secret Sharing (SSS) [1] is a threshold key generation scheme for dividing a secret

KaTeX can only parse string typed expression
into
KaTeX can only parse string typed expression
shares to
KaTeX can only parse string typed expression
participants such that any
KaTeX can only parse string typed expression
of them or more can reconstruct the secret, but a group of
KaTeX can only parse string typed expression
participants reveal no information about the secret key. The scheme leverages the Lagrange polynomial interpolation over a large finite field
KaTeX can only parse string typed expression
.

To create the share

KaTeX can only parse string typed expression
, a dealer selects a random polynomial
KaTeX can only parse string typed expression
of degree
KaTeX can only parse string typed expression
over the finite field
KaTeX can only parse string typed expression
(i.e., all coefficients are in
KaTeX can only parse string typed expression
), then
KaTeX can only parse string typed expression
is the secret. Each share is computed as point
KaTeX can only parse string typed expression
for
KaTeX can only parse string typed expression
, and distributed to the
KaTeX can only parse string typed expression
participants.

When

KaTeX can only parse string typed expression
or more shares are collected from the n participants, Lagrange interpolation is used to reconstruct the polynomial
KaTeX can only parse string typed expression
(for simplicity, the formula is given for the first
KaTeX can only parse string typed expression
shares), thereby recovering the secret s at
KaTeX can only parse string typed expression
. The security of SSS relies on the mathematical fact that a degree-
KaTeX can only parse string typed expression
polynomial is fully determined only when
KaTeX can only parse string typed expression
or more distinct points on the graph of the polynomial are known.

For example, a 3 out of 5 configuration (an instance of

KaTeX can only parse string typed expression
out of
KaTeX can only parse string typed expression
) produces a degree-2 polynomial illustrated in the following diagram. The share coordinates are
KaTeX can only parse string typed expression
and its corresponding values
KaTeX can only parse string typed expression
are the secret shares, then any 3 points are sufficient to reconstruct the degree-2 polynomial passing through the points, while 2 points are insufficient. In the diagram, the 3 points are located at 1, 2, and 4, and the y-axis shows the secret at
KaTeX can only parse string typed expression
.

Note that the share coordinates are chosen as integers,

KaTeX can only parse string typed expression
for convenience, and any sequence from
KaTeX can only parse string typed expression
(except for 0) can be utilized. Successful execution of SSS requires all share coordinates mod
KaTeX can only parse string typed expression
to be unique and non-zero, as a zero coordinate would directly expose the secret.

Chart 1

A limitation of Shamir’s Secret Sharing is the lack of share verifiability, which means the participant cannot verify whether its received share is correct. Feldman’s Verifiable Secret Sharing (VSS) [2] addresses this by enabling public verification of shares to detect invalid shares.

Feldman’s Verifiable Secret Sharing

Feldman’s VSS scheme operates over a large finite field

KaTeX can only parse string typed expression
with a generator
KaTeX can only parse string typed expression
of prime order
KaTeX can only parse string typed expression
on an elliptic curve. The dealer constructs a random degree-
KaTeX can only parse string typed expression
polynomial
KaTeX can only parse string typed expression
, where the secret is
KaTeX can only parse string typed expression
. Each participant
KaTeX can only parse string typed expression
(
KaTeX can only parse string typed expression
) receives a share
KaTeX can only parse string typed expression
as in Shamir’s Secret Sharing.

To enable share verification, the dealer also publishes commitments to the polynomial coefficients

KaTeX can only parse string typed expression
with
KaTeX can only parse string typed expression
for
KaTeX can only parse string typed expression
, where
KaTeX can only parse string typed expression
denotes the scalar multiplication. In particular,
KaTeX can only parse string typed expression
is the public key corresponding to the secret key
KaTeX can only parse string typed expression
.

Participant

KaTeX can only parse string typed expression
can verify its share
KaTeX can only parse string typed expression
by checking whether
KaTeX can only parse string typed expression
, which is basically the scalar multiplication with generator
KaTeX can only parse string typed expression
on both sides of
KaTeX can only parse string typed expression
, thereby allowing any participant
KaTeX can only parse string typed expression
to detect if its received share
KaTeX can only parse string typed expression
is invalid without revealing the secret.

To prevent a dealer from sending inconsistent commitments, participants could broadcast their received commitments and verify that all views are identical.

Distributed Key Generation

Leveraging Shamir's Secret Sharing and Feldman's Verifiable Secret Sharing, we will now introduce key distribution with a trusted dealer and distributed key generation.

Key Distribution with A Trusted Dealer

Key distribution with a trusted dealer is a common setup in threshold cryptographic schemes where a dealer is responsible for generating and distributing secret key shares among

KaTeX can only parse string typed expression
participants. This is particularly useful to import a preexisting secret key and distribute it among
KaTeX can only parse string typed expression
participants.

Broadcast Shares and Commitments

The dealer begins with a secret key

KaTeX can only parse string typed expression
(preexisting or newly generated) and constructs a random degree-
KaTeX can only parse string typed expression
polynomial
KaTeX can only parse string typed expression
with
KaTeX can only parse string typed expression
. Using Shamir’s Secret Sharing, the dealer computes
KaTeX can only parse string typed expression
for
KaTeX can only parse string typed expression
and privately sends the
KaTeX can only parse string typed expression
-th share
KaTeX can only parse string typed expression
to participant
KaTeX can only parse string typed expression
.

To enable public key reconstruction, the dealer publishes the public key

KaTeX can only parse string typed expression
and optionally uses Feldman’s VSS to provide commitments
KaTeX can only parse string typed expression
with
KaTeX can only parse string typed expression
, for verifiability of the distributed shares. Similarly, to prevent a dealer from sending inconsistent commitments, participants broadcast their received commitments and verify that all views are identical.

Verify Shares with Commitments

Upon receiving the share

KaTeX can only parse string typed expression
, each participant
KaTeX can only parse string typed expression
verifies it by checking
KaTeX can only parse string typed expression
.

If the public key is available, then it can be verified with

KaTeX can only parse string typed expression
. This ensures that any subset of at least
KaTeX can only parse string typed expression
participants can jointly reconstruct the secret or perform threshold cryptographic operations, while fewer than
KaTeX can only parse string typed expression
participants gains no information about the secret
KaTeX can only parse string typed expression
except that its public key
KaTeX can only parse string typed expression
is revealed.

Pedersen’s Distributed Key Generation

Centralized key generation with a trusted dealer poses a security risk, even if the key is later deleted. For generation of fresh secrets, this is mitigated using Pedersen’s Distributed Key Generation (DKG) [3].

Pedersen’s DKG is effectively a parallel execution of Feldman’s VSS, where each participant independently acts as a dealer for a random secret. The final secret key is the sum of all shared secrets, ensuring no single party learns the full secret key.

The protocol executes in 2 rounds among

KaTeX can only parse string typed expression
participants, incorporating additional security measures.

Chart 2

Round 1

  • Each participant
    KaTeX can only parse string typed expression
    samples a random degree-
    KaTeX can only parse string typed expression
    polynomial
    KaTeX can only parse string typed expression
    over a large prime field
    KaTeX can only parse string typed expression
    , where
    KaTeX can only parse string typed expression
    is the order of a generator
    KaTeX can only parse string typed expression
    on the underlying elliptic curve.
  • KaTeX can only parse string typed expression
    computes the commitment
    KaTeX can only parse string typed expression
    where
    KaTeX can only parse string typed expression
    for
    KaTeX can only parse string typed expression
    .
  • To prove the knowledge of its secret
    KaTeX can only parse string typed expression
    ,
    KaTeX can only parse string typed expression
    creates a Schnorr proof
    KaTeX can only parse string typed expression
    where
    KaTeX can only parse string typed expression
    with
    KaTeX can only parse string typed expression
    uniformly generated from
    KaTeX can only parse string typed expression
    and
    KaTeX can only parse string typed expression
    , such that
    KaTeX can only parse string typed expression
    is the challenge, possibly including some contexts to prevent replay attacks.
  • Each participant
    KaTeX can only parse string typed expression
    then broadcasts the Schnorr proof
    KaTeX can only parse string typed expression
    and commitment
    KaTeX can only parse string typed expression
    to other participants
    KaTeX can only parse string typed expression
    .

Round 2

  • Upon receiving the Schnorr proof
    KaTeX can only parse string typed expression
    and commitment
    KaTeX can only parse string typed expression
    from another participant
    KaTeX can only parse string typed expression
    , each participant
    KaTeX can only parse string typed expression
    verifies the Schnorr proof with
    KaTeX can only parse string typed expression
    , where
    KaTeX can only parse string typed expression
    . If the verification fails, then
    KaTeX can only parse string typed expression
    aborts immediately.
  • Each
    KaTeX can only parse string typed expression
    sends the secret share
    KaTeX can only parse string typed expression
    to another participant
    KaTeX can only parse string typed expression
    via p2p, then deletes
    KaTeX can only parse string typed expression
    and all sent shares, retaining only
    KaTeX can only parse string typed expression
    .
  • Each
    KaTeX can only parse string typed expression
    verifies all the received shares from other
    KaTeX can only parse string typed expression
    via the check
    KaTeX can only parse string typed expression
    for
    KaTeX can only parse string typed expression
    ,
    KaTeX can only parse string typed expression
    .
  • Finally,
    KaTeX can only parse string typed expression
    aggregates all received secret shares
    KaTeX can only parse string typed expression
    to obtain its final share
    KaTeX can only parse string typed expression
    .

The protocol is fully symmetric across all

KaTeX can only parse string typed expression
participants; any participant aborts immediately upon verification failure.

Conclusion

This post reviewed common distributed key generation techniques, including Shamir’s Secret Sharing, Feldman’s Verifiable Secret Sharing, and Pedersen’s Distributed Key Generation.

The pros and cons of key distribution with a trusted dealer versus distributed key generation are summarized below, with respect to centralization, protocol complexity, and secret key usage.

MethodsCentralizationComplexitySecret Key Usage
Key distribution with a trusted dealerYes1-round communicationDistribute a preexisting secret key or generate a new one
Pedersen’s Distributed key generationNo2-round communicationGenerate a new secret key

The next post in the series of threshold cryptography will analyze the FROST protocol [4] and examine challenges in its decentralized implementation.

References

  1. Adi Shamir, 1979: How to share a secret.
  2. Paul Feldman, 1987: A practical scheme for non-interactive verifiable secret sharing.
  3. Torben Pedersen, 1991: A threshold cryptosystem without a trusted party.
  4. Chelsea Komlo, Ian Goldberg, 2020: FROST: Flexible Round-Optimized Schnorr Threshold Signatures
Largest Blockchain Security Auditor
Ready to take the next step? Connect with our sales team to request your free quote and secure your project today!
Client Testimonials