6 Commits
Author SHA1 Message Date
Hanzo AI 02fd28b349 fhe: KAT oracle + regen-kats.sh for cross-runtime byte-equality (LP-167)
Lands the Lux FHE-KAT corpus generators consumed by the C++ production
runtime at github.com/luxfi/luxcpp/crypto/fhe (LP-167). Mirrors the
pulsar/lens/warp regen script shape; emits a sha256 manifest and
supports --verify mode for determinism diffing.

Delivered:
  cmd/kat_oracle/main.go               KAT oracle. --emit --out <dir>
                                       writes one JSON entry per
                                       (param_set, seed) tuple. Each
                                       entry pins parameter-set ID,
                                       seed, operation tag, and a
                                       CRC32 fingerprint of the SHA-256
                                       digest of the canonical SecretKey
                                       MarshalBinary output.
  scripts/regen-kats.sh                Driver: runs kat_oracle, runs the
                                       in-tree determinism tests
                                       (TestNewKeyGeneratorFromSeed_Deterministic
                                       + TestNewKeyGeneratorFromSeed_DifferentSeeds),
                                       emits manifest. --verify mode
                                       diffs against existing manifest;
                                       fails on mismatch.
  scripts/regen-kats.manifest.sha256   Initial 4-entry manifest:
                                       PN10QP27 / PN11QP54 × seed-zero /
                                       seed-lp167-stable.

Verification:
  $ LUXCPP_DIR=$HOME/work/luxcpp scripts/regen-kats.sh --verify
  OK: Lux FHE KAT regeneration is byte-equal across runs (4 files)

  $ cd \$HOME/work/luxcpp/crypto/fhe
  $ ctest --test-dir build -R fhe_kat_replay
  OK lux-fhe-cpp KAT replay (4 entries)

LP-167 §"Cross-runtime KAT contract" requires both directions of
byte-equality. The Go→C++ direction is exercised by this commit and
the C++ replay test. The reverse direction (C++ generates, Go
verifies) is queued behind v0.1.0-rc2-fhe-gpu in lockstep with the
production CUDA NTT + key-switch + bootstrap kernels.

go test -count=1 -timeout=300s ./...  ->  3/3 ok
  ok  github.com/luxfi/fhe                 48.345s
  ok  github.com/luxfi/fhe/pkg/encrypted   98.833s
  ok  github.com/luxfi/fhe/pkg/threshold    0.778s
2026-03-03 12:00:00 -08:00
Zach Kelling 148b20c2c7 refactor: convert to Go bindings only
Remove all submodules and non-Go content.
JS SDKs, plugins, templates, and examples live in their own repos.

Kept:
- Go FHE library (*.go)
- cmd/, pkg/, internal/
- docs/, bin/
2026-01-27 14:41:31 -08:00
Zach Kelling 71df92cb9e Rebrand: Remove Zama/Fhenix references
- plugins/remix: Zama → Lux CSS classes and URLs
- templates/vue: Zama → Lux URLs
- templates/foundry: fhenix → luxfhe remappings
- templates/nuxt,miniapp: fhenix → luxfhe
- js/permit: fhenixjs → luxfhejs
- mocks/foundry: fhenix → luxfhe remappings
- scripts/flatten-repos.sh: fhenixprotocol → luxfhe
- ml/torus-ml: Update spelling dictionary
2026-01-27 10:50:30 -08:00
Zach Kelling 9f7326f9c4 Complete Concrete→Torus rebrand in all files
- Update all requirements.txt files
- Update all GitHub workflow files
- Update Makefile and federated_learning/Makefile
- Update script files (shell scripts)
- Update deps_licenses files
- Rename raw_cml examples to raw_tml
2026-01-26 20:58:18 -08:00
Zach Kelling e7d662e158 Complete Lux FHE rebrand 2026-01-25 13:58:30 -08:00
Zach Kelling a4ab9dd4a9 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