Threshold signatures
A signature without the whole key
In the Shamir station a secret is split into n shares so that any k of them rebuild it and fewer do not. To use the secret, though, it first has to be put together in one place, and there it can be stolen. A threshold signature skips that moment: n participants hold shares of the private key s, any t of them (the threshold — k in the Shamir station) compute a signature together, and nobody rebuilds s. The result is an ordinary signature, checked with a single public key PK = s · G — as in the Digital signatures station.
This works because the Schnorr signature (the Schnorr protocol station) is linear: z = r + c · s. The shares skᵢ = f(i) lie on a polynomial f of degree t − 1 with f(0) = s, so for any t participants s = Σ λᵢ · skᵢ, where λᵢ are the Lagrange coefficients of that set. Each one contributes its part zᵢ = rᵢ + c · λᵢ · skᵢ, and the sum gives z = r + c · s, although nobody knows r or s. That is why the polynomial lives here in arithmetic modulo the order of the P-256 group, not in GF(256) as in the Shamir station: a share has to be multiplied by the challenge c in the same arithmetic the signature is computed in.
The toy computes FROST — the protocol of Komlo and Goldberg (SAC 2020) written up in RFC 9591 in June 2024. A signature takes two rounds. In the first, each signer draws two single-use nonces dᵢ and eᵢ and publishes only the commitments Dᵢ = dᵢ · G and Eᵢ = eᵢ · G. In the second, the Coordinator sends out the message and the list of commitments, and each signer computes its binding factor ρᵢ — a hash of the group key, the message, all the commitments and its own number (§4.4) — the common R = Σ (Dᵢ + ρᵢ · Eᵢ), the challenge c and its share zᵢ = dᵢ + ρᵢ · eᵢ + λᵢ · skᵢ · c. The Coordinator can check each share with the participant’s public key PKᵢ (verify_signature_share, §5.3), so it knows who sent a bad one. It cannot force anyone to cooperate, though: FROST is not robust against a participant who refuses or spoils its shares — then there simply is no signature (§5.4).
The RFC recommends the ristretto255 suite with SHA-512 (Section 6), while the toy computes FROST(P-256, SHA-256) from §6.4: the arithmetic of the Elliptic curves station runs on that curve, and the Schnorr signature of the Schnorr station is exactly the one the RFC verifies. The same code reproduces byte for byte every intermediate value of the RFC 9591 test vector in Appendix E.4 — shares, nonces, commitments, binding factors, signature shares and the signature. The key is handed out by the trusted dealer of Appendix C: for a moment it knows s and has to delete it. Whoever wants no such moment generates the shares with a distributed protocol (DKG) — then s exists nowhere, not even at the start. Pick n and t, mark who signs, and step through the five steps.
Toy implementation — not for productionFROST(P-256, SHA-256) from RFC 9591 on toy curve arithmetic (BigInt, not constant-time) — unsafe outside learning. Real threshold signatures: an audited library such as ZF FROST.
FROST: a t-of-n signature on P-256
-979 B too long — the limit is 1 KB.
The participants are signing…
This is a plain Schnorr signature: anyone with PK and the message can check it, knowing nothing about the participants or the threshold. The next signature needs a new round 1 — nonces must never be used twice.
t − 1 is not enough
The RFC assumes the attacker may take over the Coordinator and at most t − 1 participants (Section 7). The toy checks what the accomplices get out of it. They compute on the real P-256 curve, not on the 12-bit group of the Schnorr station: there s could be found from PK alone by search, with or without shares, and that would say nothing about the threshold. The accomplices run both rounds honestly and each of their shares passes its check — yet the sum is not a signature under PK, because λᵢ computed for t − 1 points rebuild a different polynomial than f. Then the candidates for s: through t − 1 shares and any point (0, s′) passes exactly one polynomial of degree at most t − 1, so the shares fit every candidate. The only test left is s′ · G = PK, which is a discrete logarithm on P-256.
Toy implementation — not for productionFROST(P-256, SHA-256) from RFC 9591 on toy curve arithmetic (BigInt, not constant-time) — unsafe outside learning. Real threshold signatures: an audited library such as ZF FROST.
Too few signers
The dealer splits the key and the accomplices sign…
The threshold comes from the mathematics, not from the Coordinator’s goodwill: fewer than t shares do not determine the polynomial, so neither s nor a signature under PK. The protection ends at t − 1, though — whoever collects t shares (or bribes t participants) has full control of the key.
The threshold does not protect against a mistake of the signer itself. The share zᵢ = dᵢ + ρᵢ · eᵢ + λᵢ · skᵢ · c is linear in three unknowns dᵢ, eᵢ and skᵢ, and the Coordinator and the other participants see ρᵢ, λᵢ, c and zᵢ. Every session with the same pair of nonces is one more equation, and three sessions with different messages or different commitments from the others give skᵢ — a test of this station checks it. Together with the shares of t − 1 accomplices that makes t shares, which is the whole key. That is why the RFC forbids using nonces in more than one signature and requires deleting them after round 2 (§5.1, §5.2), and why nonce_generate takes 32 fresh random bytes for every nonce (§4.1). In §7.3 the RFC requires that randomness to be sampled uniformly at random, because otherwise the other participants can mount replay attacks that end in a complete key recovery. For the same reason FROST signatures — unlike Ed25519 — are not deterministic (Section 1): a nonce derived from the key and the message would come out the same when the Coordinator repeats the message and the accomplices send new commitments — ρᵢ and c change, the nonces do not.
Why two nonces and a binding factor at all? Drijvers et al. showed an attack on some two-round Schnorr signatures by several parties: the attacker opens many sessions at once, picks its own commitments after seeing the others’ or chooses the messages, until Wagner’s algorithm finds challenges that add up to the challenge of a new message — and assembles its signature from the victim’s responses (the FROST paper, §2.5). FROST binds each participant’s response to the message, the set of signers and their commitments — through ρᵢ, which multiplies the second nonce eᵢ — so shares from different sessions cannot be combined into a valid signature (ibid., §5.2). Benhamouda et al. gave a polynomial-time algorithm for the ROS problem that breaks, among others, two-round MuSig, and concluded themselves that FROST is not affected by it (ibid., §2.5). The second attack on the map is simpler: FROST, like plain Schnorr, rests on the discrete logarithm, and the RFC explicitly does not promise quantum resistance (Section 7) — Shor’s algorithm recovers s from PK alone.
Where threshold signing happens
- RFC 9591 (IRTF CFRG)The FROST specification from June 2024, an informational document of the CFRG research group — which says of itself that it is not an IETF standard. Five suites: Ed25519 and Ed448 (the signatures pass ordinary RFC 8032 verification), ristretto255 (recommended), P-256 and secp256k1; key generation by a trusted dealer is only described in an appendix.Source (RFC 9591 (IRTF CFRG))
- ZF FROST (Zcash Foundation)An RFC 9591 implementation in Rust, with a separate library for each suite (frost-p256 among them) and a secp256k1 variant for Taproot. Besides signing: keys from a dealer and from DKG, recovering a lost share with the help of other participants, and refreshing shares. NCC Group audited version 0.6.0 of the main libraries; the Taproot variant and re-randomized FROST were not in scope.Source (ZF FROST (Zcash Foundation))
- Zcash — ZIP 312 (draft)A proposal for threshold signatures that authorize spending from the Sapling and Orchard shielded pools, e.g. 2 of 3 for a wallet shared with a service or for a group’s funds. Zcash requires that one owner’s transactions cannot be linked, so the ZIP uses the Re-Randomized FROST variant; the Coordinator can break privacy but cannot sign without a threshold of participants.Source (Zcash — ZIP 312 (draft))
- ROASTFROST does not guarantee that a signature comes out if a participant refuses or sends a bad share. RFC 9591 points to ROAST (Ruffing et al., 2022) as a protocol that wraps FROST and gets to a signature despite such participants.Source (ROAST)
Nonces for one signature
Do not implement FROST yourself: use a library that passes the RFC 9591 test vectors, such as ZF FROST. Generate keys with a distributed protocol (DKG), and if you use a dealer, have it delete s and have the participants check their shares against the VSS commitment of Appendix C.2. Draw the nonces of every session afresh, keep them under a single-use identifier and remove them from storage before computing the share. A participant signs only messages it has checked itself (§7.7), and the Coordinator verifies every share and the finished signature before publishing it.
// round 1: fresh nonces under a single-use session identifier
const pending = new Map();
function round1(sessionId) {
const nonces = { d: nonceGenerate(sk), e: nonceGenerate(sk) }; // 32 bytes from the CSPRNG each
pending.set(sessionId, nonces);
return { D: mul(G, nonces.d), E: mul(G, nonces.e) };
}
// round 2: the nonces are gone before the share exists
function round2(sessionId, message, commitments) {
const nonces = pending.get(sessionId);
pending.delete(sessionId);
if (!nonces) throw new Error('no nonces, or they were already used');
if (!allowed(message)) throw new Error('not signing this');
return sign(myId, sk, groupKey, nonces, message, commitments);
}Do not derive nonces from the key and the message as Ed25519 does, and do not store them to retry round 2 after an error — the Coordinator will repeat the message with other commitments. Do not put the group key together in one place “for convenience”, because then the threshold is gone. Do not add up shares without checking them, and do not cache λᵢ under the participant’s number alone. The RFC allows storing it “for the same signing group” (§5.2), and erratum 9209 (status: Reported) clarifies that λᵢ depends on the list of signers of the session — with another set the signature comes out invalid.
// ✕ nonce from the key and the message: same message, new commitments from the rest
const d = hashToScalar(sk, message);
// ✕ the group key rebuilt on one server: stealing one machine is enough
const s = secretShareCombine(shares, t);
// ✕ λ cached under the participant’s number alone, although different sets sign
const lambda = (cache[myId] ??= deriveInterpolatingValue(signers, myId));