mirror of
https://github.com/luxfi/pulsar.git
synced 2026-09-24 00:25:52 +00:00
Port the small-committee (GF(257)) identity stage to the large-
committee (GF(q)) path so the entire library is uniform. After this
work, legacyDeriveMACKeyLarge is gone and the wire-format / sealing
primitives are shared across both paths.
- identity.go: sealEnvelope / sealOpenEnvelope are now width-agnostic
over the inner shareWire slice (64 bytes GF(257), 128 bytes GF(q)).
The envelope key derivation, KEM ciphertext, KMAC256 auth tag and
cSHAKE256 stream cipher are reused as-is.
- large_types.go: drop LargeDKGShareEnvelope (use canonical
DKGShareEnvelope); drop the vestigial Commits field on
LargeDKGRound1Msg (CR-6 path A; binding comes from Round-2 digest).
- large_dkg.go: NewLargeDKGSession takes (myIdentity, directory);
Round1 KEM-wraps envelopes via sealEnvelope; Round3 opens them and
derives the master seed from per-envelope contributions over GF(q)
(no longer needs Lagrange interpolation of other recipients'
envelopes).
- large_threshold.go: NewLargeThresholdSigner takes sessionKeys;
MAC keys are built from per-pair ephemeral session keys (CR-7).
legacyDeriveMACKeyLarge deleted.
- large_reshare.go: NewLargeReshareSession takes
(myIdentity, newDirectory); Round1 KEM-wraps envelopes; Round3
opens them; SetPriorGroupPubkey ported for new-committee joiners.
Tests updated to use the identityFixture pattern; large + small +
identity test suites all green, no race warnings, no KAT drift on
the small path (KAT vectors only fixate FIPS 204 sign/verify; the
wire envelope shape was already KEM-wrapped on the small path post-
merge).