38 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 8ecaffc985 Build on Go 1.27
Build and vet clean on 1.27.1.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-17 14:32:11 -07:00
zeekayandHanzo Dev ae4d4b538b go 1.26.8
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]>
2026-09-08 23:59:11 -07:00
zeekay 0af9764f41 Pin past the versions the proxy can no longer serve
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.
2026-09-01 15:54:11 -07:00
zooqueen e32a980a6b zero minio: database v1.21.5
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.
2026-08-10 21:57:42 -07:00
zeekay e1a5c46623 fix(deps): repair the module graph + patch the AWS EventStream DoS
`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.
2026-07-26 06:48:00 -07:00
zeekay 9e396a634b chore(deps): bump geth v1.20.1 + luxfi deps — stack unification 2026-07-26 02:47:39 -07:00
zeekayandHanzo Dev 0917b804bd fix(deps): repair vanished pins / go.sum drift ( age@latest gosum-refresh) + build green
Co-authored-by: Hanzo Dev <[email protected]>
2026-06-30 13:56:20 -07:00
zeekayandGitHub 7bd19686b5 chore: bump luxfi/database v1.19.3 (#8)
Co-authored-by: zeekay <[email protected]>
2026-06-25 15:24:32 -07:00
zeekay d4388a95ff go: 1.26.3 → 1.26.4 (security: crypto/x509, mime, net/textproto) 2026-06-06 22:05:26 -07:00
zeekay 3cf8505cbf WIP: session checkpoint 2026-06-05 (codec rip in flight) 2026-06-05 15:36:01 -07:00
zeekay 4d83091e43 fix(go.mod): drop ../math relative replace — workspace provides it 2026-05-21 16:37:47 -07:00
zeekay 4f2b23f90f fix(go.mod): replace absolute path with relative (../math) — no machine-specific paths 2026-05-21 16:26:56 -07:00
zeekay 311cb5a1bf deps: bump accel v1.0.7 → v1.1.2, crypto v1.19.0 → v1.19.10 2026-05-21 14:59:07 -07:00
zeekay a48150d7e5 deps: luxfi/crypto v1.19.0 2026-05-13 11:59:12 -07:00
zeekay 6fe27d1c4a fhe: decomplect onto luxfi/pq.Mode gate
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.
2026-05-12 19:45:14 -07:00
zeekay d18a56c138 deps: database v1.18.3 (drops zapdb/v4 transitive); ntt_simd updates; bench/ 2026-05-05 17:11:33 -07:00
zeekay fce3df2ea2 LP-107 Phase 5: fhe consumes luxfi/math/codec
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.
2026-05-04 09:50:34 -07:00
zeekay dc2434225a feat(keygen): real deterministic NewKeyGeneratorFromSeed (v1.8.0)
Replace the stub implementation with a real HKDF-SHA256 derivation that
seeds blake2b KeyedPRNG streams driving ring.NewSampler over the secret
distribution Xs. Same seed -> byte-identical secret keys, the consensus
invariant validators rely on.

Pipeline:
  prk    = HKDF-Extract(SHA-256, salt="LUX_FHE_KEYGEN_v1", ikm=seed)
  keyLWE = HKDF-Expand(prk, "LUX_FHE_KEYGEN_v1:LWE", 32)
  keyBR  = HKDF-Expand(prk, "LUX_FHE_KEYGEN_v1:BR",  32)

Tests:
  - Deterministic (same seed -> same SK bytes)
  - DifferentSeeds (distinct seeds -> distinct SKs)
  - GoldenVector (sha256(SKBR) pinned for PN10QP27)
  - EmptySeed (rejected)

Unblocks luxfi/precompile fhe/fhe_ops.go:49 which calls this symbol.
2026-04-28 02:26:15 -07:00
zeekay 02090bfe04 feat: add cli package for lux CLI integration
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.
2026-04-12 21:41:49 -07:00
zeekay 6e9bacc7f3 deps: luxfi/zapdb v4 → v1.0.0 (module path reset) 2026-04-11 00:05:17 -07:00
zeekay c96e2d903f feat: all 7 FHE demos now Base apps — single binary, admin UI, REST API
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.
2026-04-07 19:00:09 -07:00
zeekay c2b406e44e feat: fhed uses encrypted ZapDB for key material storage
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.
2026-04-01 16:49:44 -07:00
zeekay 6514276d6c chore: bump Go 1.26.0 → 1.26.1
Fixes 5 stdlib CVEs (html/template, os, net/url, crypto/x509 x2).
2026-03-12 01:08:22 -07:00
zeekay 201c03306e chore: update Go module dependencies 2026-03-03 11:31:01 -08:00
zeekay e6f4da9fcf fix: use published mdns v0.1.0 and remove local replace directive 2026-02-20 21:15:54 -08:00
zeekay d7b4098418 feat: add FHE example applications for sealing, voting, media auth, provenance, CRDTs, and statistics
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.
2026-02-13 12:44:18 -08:00
zeekay ba3bedcb51 Rebrand: Zama → Lux in TestTorusMLX
- Update copyright headers
- Update bundle identifiers
- Update API URLs
2026-01-27 10:34:48 -08:00
zeekay 6d3960fb11 Rebrand: ConcreteML → TorusML
- Rename TestConcretMLX/ to TestTorusMLX/
- Update rust/src/lib_python.rs module name
- Update WASM test imports
- Update CI workflow references
- Update Makefile targets
2026-01-26 20:50:15 -08:00
zeekay c9eda2492b chore: update go version to 1.25.5 2026-01-10 04:31:19 -08:00
zeekay c6cc0c5ea2 fix: Go version 1.25.5 → 1.22, add decryption oracle 2026-01-10 00:06:37 -08:00
zeekay 618a1a0f29 refactor: update imports to github.com/luxfi/constants 2026-01-08 19:36:50 -08:00
zeekay c4541990f1 fix: restore go.mod deleted in cleanup commit 2026-01-03 19:00:15 -08:00
zeekay d9e6e9f32f Clean up: Move Go FHE implementation to lux/fhe
- 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
2026-01-02 10:53:28 -08:00
zeekay 816721d090 Remove gpu replace directive
The gpu module is now published at github.com/luxfi/gpu.
go mod tidy removed the gpu dependency as it was orphaned (not actually used).
2025-12-30 16:27:50 -08:00
zeekay ce85c420b4 chore: remove lattice replace directive, keep gpu for CGO
- 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
2025-12-30 16:12:35 -08:00
zeekay 4635f7f849 test: add comprehensive FHE test suite with EVM types
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.
2025-12-29 13:57:18 -08:00
zeekay 4e9da97c4c refactor: rename module from tfhe to fhe
- Rename module path github.com/luxfi/tfhe => github.com/luxfi/fhe
- Rename tfhe.go => fhe.go, tfhe_test.go => fhe_test.go
- Update all internal references from tfhe to fhe
- Update SDK bindings and documentation
2025-12-29 10:59:13 -08:00
zeekay 8e035b8129 Initial commit
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.
2025-12-28 18:04:25 -08:00