mirror of
https://github.com/luxfi/dkg.git
synced 2026-10-30 16:58:45 +00:00
The one ring abstraction both consumers bind onto, adapting
luxfi/lattice/v7/ring. A *Profile is the single place a scheme's
parameters live (ring, module shape K×L, public Pedersen matrices A/B,
secret distribution chi, KeyFinalize). Everything above is generic.
- ring.go : Ring wrapper at fixed (n,q); Poly/Vector/Matrix aliases.
- ops.go : module algebra (MatVecMul NTT-Mont, CT compare, NUMS
matrix derivation, Gaussian + bounded-uniform samplers),
ported verbatim from corona/utils + dkg2 domain convention.
- fips204.go: FIPS-204 Power2Round/Decompose (verbatim, circl-identical).
- profiles : Ringtail() (corona K=8xL=7, q=48-bit, Gaussian, round-Xi)
and MLDSA65() (pulsar K=6xL=5, q=23-bit, uniform-eta, t1).
Ringtail matrices use corona's exact NUMS tags so Phase-3 wiring
reproduces corona group keys byte-for-byte. Tests: profiles construct,
matrices deterministic + domain-separated, samplers in-range,
Power2Round obeys the FIPS-204 reconstruction identity, CT compare.
5.2 KiB
5.2 KiB
luxfi/dkg — one dealerless DKG + malicious-secure MPC library
Decomplect law. The Pedersen-VSS DKG, the complaint/blame protocol, equivocation
detection, the authenticated transcript, the BGW MPC substrate, and the
malicious-secure secure-comparison are one concern, today duplicated and
divergent across corona/dkg2 (Ringtail/R-LWE) and pulsar (ML-DSA): Shamir in
2 corona files + 24 pulsar files, transcript in 5 + 24, identity/KEM in 3 + 16,
Pedersen in 7 + 10. That is the smell. github.com/luxfi/dkg holds it once,
ring-parameterized, and both schemes consume it. One way, DRY, composable,
orthogonal.
Hard invariants (every path)
- No-reconstruct. No party ever forms the master seed σ, the master secret
s, or the fullsk. The group public key is derived from the aggregated public Pedersen commitT = Σ_i C_{i,0} = A·s1 + B·u, never from reconstructing a secret. Structurally enforced + test-proven (noKeyFromSeed/seed in the output path; envelopes carry only Shamir shares, never the full contribution). - Dealerless. No trusted dealer anywhere. Every party contributes; the joint value is unbiased given ≥1 honest contributor.
- Bad behavior ⇒ abort or blame, NEVER leakage or forgery. Every deviation is
caught and attributed with publicly-verifiable signed evidence, OR is downstream-
rejected (wrong
w1⇒ FindHint + stock-FIPS release gate ⇒ liveness fault, retry), never a forged signature or a key leak. This is the library's headline theorem.
Package layout
luxfi/dkg/
ring/ Ring abstraction (R_q parameterized) — adapts luxfi/lattice/v7/ring;
corona binds Ringtail params, pulsar binds ML-DSA (FIPS-204) params.
transcript/ Canonical networked-MPC transcript — byte-stable record every honest
party recomputes identically; commits TranscriptHash for the chain.
channel/ Authenticated channels — ML-DSA-65 signed + ML-KEM-768 sealed messages
(the identity directory). Last-mover-bias control = commit-then-reveal
(adversary commits before seeing others; no adaptive contribution).
vss/ Pedersen-VSS DKG (no-reconstruct). Round1 commit+deal, Round2
equivocation gate, Round3 verify+aggregate. Generic over ring +
a KeyFinalize callback (Ringtail β vs ML-DSA t1). Malformed-share
rejection = the Pedersen identity check A·f(j)+B·g(j)=Σ jᵏ C_k.
blame/ Complaint + blame protocol — identifiable abort with signed,
publicly-verifiable evidence (equivocation, bad-delivery). Selective-
abort handling: committee excludes the named deviator and continues /
re-samples; the chain slashes from the evidence.
mpc/ BGW substrate (secure mult, shared random bits) — malicious-secure via
Feldman/Pedersen-committed re-shares with verified openings (every
re-share carries a commitment; receivers check degree-(T−1) before use).
cscp/ Malicious-secure CarryCompare secure-comparison (TALUS Phase B) over
the committed BGW substrate. Closes the three semi-honest deviations:
inconsistent re-share, non-{0,1} random bit, equivocated mask open.
nonce/ Robust nonce-ticket lifecycle — offline preprocessing inventory,
consume-once, expiry, replay-bound to (epoch,committee,policy,digest).
safety/ The abort-or-blame-not-leak theorem + property tests; the malicious
residual descriptor (AssessMalicious) as single source of truth.
Consumers (parameterize, never fork)
- corona (Ringtail):
vss+blame+mpcwith Ringtail ring + β KeyFinalize. Replacescorona/dkg2/*+corona/keyera/bootstrap_pedersen.gointernals. - pulsar (ML-DSA):
vss+blame+mpc+cscp+noncewith FIPS-204 ring +t1KeyFinalize. Replaces the v0.1 reconstructiondkg.go/large_dkg.go(the no-reconstruct v0.2 Pedersen-VSS) and liftstalus_cscp.gosemi-honest → Phase-B malicious. The TALUS signer (distributed_bcc.go) consumes thevssAlgSetup/ AlgShare output unchanged.
The 9 malicious-hardening components (owner-specified, all in this library)
- malicious-secure CSCP —
cscp/over committed BGW. - networked MPC transcript —
transcript/. - authenticated channels / signed messages —
channel/(ML-DSA + ML-KEM). - complaint and blame protocol —
blame/. - equivocation detection —
vss/Round2 commit-digest gate. - malformed-share rejection —
vss/Pedersen identity check. - selective-abort handling —
blame/exclude-and-continue. - last-mover bias controls —
channel/commit-then-reveal. - robust nonce-ticket lifecycle —
nonce/.
Proof obligations (match the existing pen-and-paper proofs, then mechanize)
- DKG-SOUND ⇒ MSIS (Pedersen binding) · DKG-PRIV ⇒ M-LWE + Shamir hiding
(
~/work/lux/proofs/pulsar/dkg-soundness.tex). - output-interchangeability:
s2=B·uM-LWE-indistinguishable from χ_η;T↔FIPS pk (~/work/lux/proofs/pulsar/output-interchangeability.tex). - CSCP malicious: each of the 3 deviations ⇒ detected+blamed (VSS opening) OR
downstream-rejected; never leak/forge (the
safety/theorem).