Files
corona/wire
zeekay 49630bb398 LP-107 Phase 4: pulsar consumes luxfi/math/codec
wire/wire.go — pulsar's wire-format hardening boundary. Untrusted
lattice Vector[Poly] frames now flow through luxfi/math/codec.Reader
so the bounded-decode contract is centralized: no recursion, no
hidden growth, no unbounded allocation.

Replaces the test-only validateVectorPolyFrameInline walker that
lived at threshold/fuzz_round_test.go with a production-grade
equivalent on the canonical luxfi/math/codec substrate.

Tests:
* TestValidateVectorPolyFrame_RejectsHugeLength — regression for
  lattice issue #4 (70-trillion-element attack input). Same input
  the original fuzz finding produced, now rejected with
  codec.ErrLimitExceeded via the shared math substrate.
* TestValidateVectorPolyFrame_HappyPath — 3-element accept.
* TestValidateVectorPolyFrame_AtCap — exactly MaxLatticeUintSliceLen
  accepted.
* TestValidateVectorPolyFrame_OverCap — MaxLatticeUintSliceLen+1
  rejected.

go.mod bumps luxfi/math v1.2.4 -> v1.3.0 (the LP-107 substrate
release with codec/ + params/ + backend/ + modarith/ + ntt/ + poly/
+ rns/ + sample/).

This is the first downstream consumer of the math substrate. Lens,
FHE, and lattice consumers follow.
2026-05-04 09:47:05 -07:00
..