mirror of
https://github.com/luxfi/pulsar.git
synced 2026-07-27 06:55:04 +00:00
pulsar: consume dkg v0.3.2 (per-(N,T) bound) + prove dealerless RSS signs under stock circl at n=8,t=8 + n=16,t=16 (T==N, N>6)
The per-(N,T) norm bound admits the owner's high-t families. T==N committees (n=8,t=8; n=16,t=16) sign under stock circl now (algorithmic base-case partition). T<N at N>6 (n=8,t=7 default) needs the general Algorithm-6 balanced partition (canonicalSharing is table-limited to N≤6) — tracked as the next gap.
This commit is contained in:
@@ -4,7 +4,7 @@ go 1.26.4
|
||||
|
||||
require (
|
||||
github.com/cloudflare/circl v1.6.3
|
||||
github.com/luxfi/dkg v0.3.0
|
||||
github.com/luxfi/dkg v0.3.2
|
||||
github.com/luxfi/lattice/v7 v7.1.4
|
||||
golang.org/x/crypto v0.52.0
|
||||
)
|
||||
@@ -22,4 +22,3 @@ require (
|
||||
golang.org/x/sys v0.45.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@ github.com/luxfi/dkg v0.2.0 h1:uy1ZrFKcG9CfplIXUdJxDUL7k5JmnLyiBOUEBDR1dvE=
|
||||
github.com/luxfi/dkg v0.2.0/go.mod h1:M+WH7GFRN+YUD851Rlnumdp0Md98kplNN8pVx65U8I8=
|
||||
github.com/luxfi/dkg v0.3.0 h1:6CZS9GW/zPPSDVY6IrcYYhFBeZfjXI7cmLBI12a9ifM=
|
||||
github.com/luxfi/dkg v0.3.0/go.mod h1:M+WH7GFRN+YUD851Rlnumdp0Md98kplNN8pVx65U8I8=
|
||||
github.com/luxfi/dkg v0.3.1 h1:gex/ClC9NlPWQ37dX1UradxRmAszkEbfMJIlTsnY+1w=
|
||||
github.com/luxfi/dkg v0.3.1/go.mod h1:M+WH7GFRN+YUD851Rlnumdp0Md98kplNN8pVx65U8I8=
|
||||
github.com/luxfi/dkg v0.3.2 h1:UsazKDADLuhfIaLlXWPov9H6xQNS4/HCdUFmbjYbQvg=
|
||||
github.com/luxfi/dkg v0.3.2/go.mod h1:M+WH7GFRN+YUD851Rlnumdp0Md98kplNN8pVx65U8I8=
|
||||
github.com/luxfi/lattice/v7 v7.1.4 h1:hQR02M6cHTAV5+joOPi9gb9Gm+z/hKJnhJF4IlciIJs=
|
||||
github.com/luxfi/lattice/v7 v7.1.4/go.mod h1:DmIQFi3mJiehVsR235l1NKYEU0JhU649OX5p7gMEW2c=
|
||||
github.com/luxfi/math v1.4.1 h1:1t9bCCsEqnl9yIKrShlbs80DBKyYTWdnzkVfBqEeO7Q=
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package pulsar
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"testing"
|
||||
|
||||
mldsa65 "github.com/cloudflare/circl/sign/mldsa/mldsa65"
|
||||
)
|
||||
|
||||
// TestMithrilRSS_LargeN_StockCircl proves the dealerless RSS key signs under stock
|
||||
// circl mldsa65.Verify at committee sizes ADMITTED by dkg v0.3.2's per-(N,T) bound
|
||||
// beyond the old N≤6 cap. The T==N cases (n=8,t=8; n=16,t=16) use the algorithmic
|
||||
// base-case partition and work now; T<N at N>6 (n=8,t=7) needs the general
|
||||
// Algorithm-6 partition (canonicalSharing currently table-limited to N≤6) — that
|
||||
// gap is tracked separately.
|
||||
func TestMithrilRSS_LargeN_StockCircl(t *testing.T) {
|
||||
for _, c := range []struct{ tt, n int }{{8, 8}, {16, 16}} {
|
||||
seeds := make([][]byte, c.n)
|
||||
for i := range seeds {
|
||||
seeds[i] = make([]byte, 32)
|
||||
rand.Read(seeds[i])
|
||||
}
|
||||
mk, err := MithrilRSSKeygen(ModeP65, c.tt, c.n, seeds)
|
||||
if err != nil {
|
||||
t.Fatalf("(t=%d,n=%d) keygen: %v", c.tt, c.n, err)
|
||||
}
|
||||
active := make([]int, c.tt)
|
||||
for i := range active {
|
||||
active[i] = i
|
||||
}
|
||||
msg := []byte("owner-large-committee")
|
||||
sig, err := mk.Sign(active, msg, nil, rand.Reader, 8000)
|
||||
if err != nil {
|
||||
t.Fatalf("(t=%d,n=%d) sign: %v", c.tt, c.n, err)
|
||||
}
|
||||
var pk mldsa65.PublicKey
|
||||
if err := pk.UnmarshalBinary(mk.Pub()); err != nil {
|
||||
t.Fatalf("pk unmarshal: %v", err)
|
||||
}
|
||||
if !mldsa65.Verify(&pk, msg, nil, sig.Bytes) {
|
||||
t.Fatalf("(t=%d,n=%d) stock circl REJECTED the dealerless RSS signature", c.tt, c.n)
|
||||
}
|
||||
t.Logf("(t=%d,n=%d) dealerless RSS key (N>6, T==N) → stock circl mldsa65.Verify PASS", c.tt, c.n)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user