mirror of
https://github.com/luxfi/pulsar.git
synced 2026-09-24 00:25:52 +00:00
Corona = rank-1 Pulsar (R_q^k specialised at k=1). Both share the lattice GPU NTT dispatcher; pulsar's gpu/ subpackage is a thin RegisterRing wrapper matching corona/gpu/. Byte-equal contract verified by TestPulsar_GPU_ByteEqual across (n,t) shapes (5,3), (7,4), (10,7) and a UseAcceleratorForce variant pinning the dispatcher at threshold=1. Decomplecting note: pulsar's FIPS 204 NTT in mldsa_lattice.go operates on [256]uint32 polynomials in 32-bit Montgomery form (q=8380417, R=2^32); the lattice/v7 dispatcher operates on []uint64 in 64-bit Montgomery form. Pulsar's NTT does not route through ring.SubRing today so the dispatcher is vacuous on pulsar's N=256 production sign path. The gpu/ subpackage mirrors corona/gpu's UseAccelerator / DisableAccelerator / RegisterRing / Stats surface verbatim so multi-primitive consumers see one opt-in. The byte-equal test is the regression guard for the v0.4 lift that widens mldsa_lattice.go to 64-bit Montgomery and routes through ring.SubRing. NIST-clean import discipline preserved. The reference package github.com/luxfi/pulsar/ref/go/pkg/pulsar carries ZERO non-test imports of lattice/v7 — go list -deps confirms only circl + golang.org/x/crypto + stdlib transitively. The gpu/ subpackage is a separate import path; reviewers compiling the reference for NIST submission with go build ./ref/go/pkg/pulsar do not pull lattice or cgo. Lattice/v7 enters the import graph only when go test runs (gpu surface tests + threshold_v03 byte-eq test); lattice is pure-Go on default builds, no cgo engaged unless -tags gpu && CGO_ENABLED=1 && Metal/CUDA link config. Threshold combine routes through lattice/v7/gpu when a batched dispatcher is engaged (UseAccelerator); single-poly dispatch threshold is set ABOVE pulsar's production ring degree N=256 (defaultThreshold=1024, same default as corona) — operators with a true batched dispatcher should lower SetThreshold via the gpu subpackage's runtime knob. Benches mirror corona/dkg2's CPU/GPU pair pattern: 5of7, 7of11, 14of21 at the v0.3 algebraic-threshold sign path. The golang.org/x/crypto bump from v0.32.0 to v0.49.0 is a transitive constraint from lattice/[email protected]; the bump is SHA3-byte-stable (FIPS 202), verified by existing TestAlgebraic_ByteValid and KAT round-trip passing post-bump.
22 lines
649 B
AMPL
22 lines
649 B
AMPL
module github.com/luxfi/pulsar
|
|
|
|
go 1.26.3
|
|
|
|
require (
|
|
github.com/cloudflare/circl v1.6.3
|
|
github.com/luxfi/lattice/v7 v7.1.4
|
|
golang.org/x/crypto v0.49.0
|
|
)
|
|
|
|
require (
|
|
github.com/ALTree/bigfloat v0.2.0 // indirect
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/google/go-cmp v0.7.0 // indirect
|
|
github.com/luxfi/math v1.4.1 // indirect
|
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
github.com/stretchr/testify v1.11.1 // indirect
|
|
golang.org/x/exp v0.0.0-20260312153236-7ab1446f8b90 // indirect
|
|
golang.org/x/sys v0.42.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
)
|