One toolchain across the estate. The tree carried 1.26.0, .1, .3, .4 and .5
at once, so which compiler built a binary depended on which repo it came
from.
Co-authored-by: Hanzo Dev <[email protected]>
The 2026-07-15 retag moved these tags, so proxy.golang.org answers not-found, Go
falls through to direct, and the bytes GitHub serves now disagree with
sum.golang.org. The build stopped at a checksum before reaching a compiler.
Those versions can never verify again; moving past them is the repair.
No file here imports minio; it arrived through luxfi/[email protected].1, which
required hanzos3/go-sdk, whose `replace` redirect to our checksum forks Go
ignores outside a main module. database v1.21.5 requires hanzos3/go by name.
go directive held at 1.26.4. build passes.
`go build ./...` failed with "missing go.sum entry for module providing
package" (ntt_simd.go) — the go.mod was out of sync with the imports, so
individual `go get`s just walk further down the chain; tidy is the fix.
Also patches the panic-driven denial of service in the AWS SDK for Go v2
EventStream decoder: eventstream v1.7.8, service/s3 v1.97.3 (minimum patched,
so the change carries the fix and nothing else).
Verified: go build ./... goes from exit 1 to exit 0.
go test ./... is 4 ok / 2 FAILING. Those 2 are not a regression here — the
packages could not compile before, so their tests never ran; repairing the
build makes pre-existing failures reachable. Stated explicitly rather than
reporting only the build fix, since a green build with red tests reads as
"done" when it is not.
Drop local SecurityProfile, ProfileClassical128, ProfileStrictPQ,
ProfileStrictPQHighValue, IsPostQuantum, String,
ProfileFromPQFlag. The strict-PQ Mode vocabulary lives in
github.com/luxfi/pq as the single source of truth across warp,
dex, evm, fhe, zap.
DefaultParamsForProfile (local enum) → DefaultParamsForMode
(pq.Mode): strict-PQ ⇒ PN9QP27_STD128Q (NIST FIPS 203 / 204
LMKCDEY); classical / hybrid ⇒ PN10QP27 (~128-bit classical,
dev-only). The FHE gate is parameter SELECTION, not refusal — no
classical ciphertext to refuse at the parameter layer, so the
ValidateMode call doesn't apply here.
ProfileStrictPQHighValue dropped: it was a no-op tier returning
the same PQ literal as the base strict-PQ profile. Once
STD192Q_LMKCDEY-aligned ParametersLiterals land, callers pick
them explicitly — the mode vocabulary stays single-purpose.
wire/wire.go — fhe's wire-format hardening boundary. FHE wire formats
nest deeper than pulsar's (CKKS ciphertext = Vec<Poly> over RNS chain
of Vec<u64>) so MaxDepth = 5 + larger MaxFrameBytes (32 MiB) reflect
the deeper polynomial structure.
Tests:
* TestValidateCiphertextFrame_RejectsHugeLength — regression for
lattice issue #4 attack input class. Same substrate, same
rejection.
* TestValidateCiphertextFrame_OverCap — MaxFHESliceLen+1 rejected.
go.mod adds luxfi/math v1.3.0 dependency.
This completes Phase 5 of LP-107: every Lux Go protocol repo
(pulsar, lens, fhe, lattice) now consumes the math substrate for
bounded wire decoding. The same lattice issue #4 attack input is
rejected identically across all four consumers.
Exports NewCmd() returning a cobra.Command with keygen, encrypt,
decrypt, and eval subcommands. Wires directly to fhe.KeyGenerator,
fhe.Encryptor, and fhe.Decryptor -- no stubs.
Each demo is a sovereign app: go run ./cmd/demos/<name> serve
darkpool: /v1/orders, /v1/match, /v1/reveal — encrypted order matching
compliance: /v1/portfolio, /v1/check — SEC diversification on encrypted holdings
marketmaker: /v1/quotes, /v1/best — private market making
auction: /v1/bids, /v1/determine-winner, /v1/reveal — sealed-bid auction
voting: /v1/votes, /v1/tally, /v1/result — encrypted shareholder voting
nav: /v1/holdings, /v1/compute — confidential fund valuation
proof: /v1/positions, /v1/prove — compliance proofs without revealing data
All use Base embedded SQLite + admin UI at /_/. FHE key material
stored in Base's encrypted collections. Original FHE logic preserved.
Replace flat-file key storage (secret.key, public.key, bootstrap.key)
with encrypted ZapDB (ChaCha20-Poly1305). All FHE key material is now
stored in a single encrypted database at <dataDir>/zapdb/.
New pkg/store package wraps luxfi/database/encdb for:
- Secret/public/bootstrap key storage (encrypted at rest)
- Ciphertext cache by content hash
- Metadata storage
New --password flag (or FHED_PASSWORD env) for ZapDB encryption.
Both standard and threshold modes use ZapDB.
Six production-ready example applications demonstrating the FHE library:
- cmd/seal: document integrity sealing with encrypted verification
- cmd/vote: encrypted voting system with threshold tallying
- cmd/mediaseal: media content authentication with FHE
- cmd/provenance: AI model provenance tracking with encrypted attestation
- cmd/crdt: encrypted LWW-Register for fheCRDT architectures (LP-6500)
- cmd/stats: secure multiparty statistics over encrypted data
Also pins luxfi/mdns to v0.1.0 and excludes compiled binaries from git.
- Remove old Go FHE code (now in lux/fhe)
- Remove old Zama compatibility layers
- Update CI for TypeScript/JS SDK only
- This repo is now purely the @luxfhe npm package ecosystem
- Remove replace directive for lattice/v7 (now using published v7.0.0)
- Keep gpu replace as it requires local C++ compilation and the git repo
path (luxfi/mlx) doesn't match module path (luxfi/gpu)
- TODO: Rename github.com/luxfi/mlx to github.com/luxfi/gpu to fix module path
Add complete test coverage for FHE package:
- evm_types_test.go: All EVM types (ebool → euint256) with big.Int
- testutil_test.go: Shared test utilities (testContext struct)
- pure_go_test.go: CGO_ENABLED=0 mode verification
- gpu_test.go: CGO_ENABLED=1 mode with serialization tests
- CHANGELOG.md: Track changes in semver format
Test coverage includes:
- Arithmetic: Add, Sub, Mul for all integer widths
- Comparison: Eq, Lt, Le, Gt, Ge
- Bitwise: And, Or, Xor, Not, Shl, Shr
- Operations: Min, Max, Select, Neg
- Memory management and benchmarks
Two serialization tests skipped with TODO(fhe#2) for pre-existing bugs.
BSD-3-Clause-Research License: Pure Go TFHE implementation with
patent-pending innovations including deterministic FHE for blockchain
consensus, transaction-batch amortized bootstrapping, and parallel
bootstrapping with work-stealing scheduler.