Skip to Content
oxcrypto

FROST

Two-round threshold Schnorr signatures (RFC 9591).

from oxcrypto.threshold.frost import FROST

suite = FROST.ED25519
shares, public = suite.generate_with_dealer(min_signers=2, max_signers=3)
keys = {i: suite.load_secret_share(share) for i, share in shares.items()}

# Round 1: each signer commits to fresh nonces.
rounds = {i: keys[i].commit() for i in (1, 3)}
package = suite.signing_package({i: c for i, (_, c) in rounds.items()}, b"hello")

# Round 2: each signer signs the package; the coordinator aggregates.
signature_shares = {i: nonces.sign(package) for i, (nonces, _) in rounds.items()}
signature = public.aggregate(package, signature_shares)
assert suite.verify(public.verifying_key, signature, b"hello")

FROST (Flexible Round-Optimized Schnorr Threshold signatures) is specified in RFC 9591, an Informational RFC from the IRTF CFRG. Signatures verify as ordinary Schnorr signatures of the ciphersuite: Ed25519 and Ed448 signatures verify as RFC 8032 signatures.

SelectorCiphersuiteUpstream crate
FROST.ED25519FROST(Ed25519, SHA-512), RFC 9591frost-ed25519 3.0.0
FROST.ED448FROST(Ed448, SHAKE256), RFC 9591frost-ed448 3.0.0
FROST.RISTRETTO255FROST(ristretto255, SHA-512), RFC 9591frost-ristretto255 3.0.0

Key generation

generate_with_dealer is the trusted-dealer key generation of RFC 9591 Appendix C. It returns one serialized secret share per participant, keyed by identifier 1 to max_signers, and the public key package. Send each share to its participant over a confidential, authenticated channel. The participant calls load_secret_share, which checks the share against the dealer's commitment. Every participant must see the same commitment, which the caller has to ensure.

Distributed key generation needs no dealer. It follows the Pedersen DKG with proofs of knowledge used by the upstream crate:

round1 = {i: suite.dkg_part1(i, min_signers=2, max_signers=3) for i in (1, 2, 3)}
# Broadcast each round 1 package to the other participants.
state, round2_packages = round1[1][0].part2({j: p for j, (_, p) in round1.items() if j != 1})
# Send round2_packages[j] to participant j privately; collect theirs, then:
# key_package, public_package = state.part3(round1_packages, received_round2_packages)

dkg_part1 returns a FrostDkgRound1 state and the broadcast package. part2 consumes it and returns a FrostDkgRound2 state and one secret package per recipient. part3 consumes the round 2 state and returns the key package and the public key package. Round 1 packages must reach every participant unchanged (a broadcast channel); round 2 packages are secret.

Signing

Important

Signing nonces and DKG round states are single-use. sign and each DKG round consume their object, and a second call raises ValueError.

FrostKeyPackage.commit returns single-use FrostSigningNonces and the public commitments. The coordinator builds a signing package from at least min_signers commitments and the message. FrostSigningNonces.sign consumes the nonces and returns a signature share; reusing nonces would reveal the signing share, so a second call raises ValueError. The coordinator calls FrostPublicKeyPackage.aggregate, which verifies the shares and returns the signature. FROST.verify checks a signature against a verifying key.

Key packages and public key packages serialize with to_bytes and load with load_key_package and load_public_key_package, in the upstream crate's format. Identifiers are integers from 1 to 65535.

Status

  • Standard: RFC 9591 (Informational, June 2024).
  • Crates: frost-core, frost-ed25519, frost-ed448 and frost-ristretto255 3.0.0 from the Zcash Foundation, stable releases. Their MSRV is 1.81, and oxcrypto builds them with Rust 1.88.
  • Audit: NCC Group published a security assessment of release 0.6.0 of frost-core, frost-ed25519, frost-ed448, frost-p256, frost-secp256k1 and frost-ristretto255, including dealer and DKG key generation and signing. Version 3.0.0 has changed since and has no published audit.
  • Tests: the RFC 9591 Appendix E signatures for Ed25519, Ed448 and ristretto255, as shipped in the crates' tests/helpers/vectors.json.

Zeroization

KeyPackage, SecretShare, SigningNonces and both DKG SecretPackage types implement ZeroizeOnDrop upstream, which oxcrypto checks at compile time. Freeing a key package, nonces object or DKG state wipes the signing share, the nonces and the DKG coefficients it holds.

Note

Read from the frost-core 3.0.0 source; oxcrypto has not verified zeroization independently. Short-lived copies made during a call are not wiped, and Python bytes are not wiped.

Short-lived copies that are not wiped (none of them outlive the call):

  • Trusted-dealer key generation: the group signing key is wiped with a plain assignment in its Drop, and the polynomial coefficient vector, which includes the group secret, is freed without being wiped.
  • DKG part 1: inserting the secret into the coefficient vector can reallocate it, leaving the previous buffer unwiped.
  • Scalar temporaries on the stack while evaluating polynomials, computing the proof of knowledge and computing signature shares.

On this page