156 Commits
Author SHA1 Message Date
Zach Kelling 2cbd17d0d5 ci: simplify coverage condition 2025-12-28 20:47:04 -08:00
Zach Kelling 3de919a717 ci: use Go 1.25.5 only, drop support for older versions
Go 1.25.5 (released 2025-12-02) includes security fixes to crypto/x509
and bug fixes to mime and os packages. Older Go versions are no longer
tested to simplify maintenance.
2025-12-28 20:45:35 -08:00
Zach Kelling b2bd57a64d fix: gofmt formatting and WASM SDK build error
- Run gofmt -s on adversarial_test.go, bench_comparison_test.go, integers.go
- Fix WASM SDK: handle error return from EncryptUint64
2025-12-28 20:09:19 -08:00
Zach Kelling 84cc23158d feat(gpu): implement real GPU kernels for TFHE acceleration
Major implementation of GPU-accelerated TFHE operations:

GPU Kernels:
- NTT/INTT: Cooley-Tukey and Gentleman-Sande algorithms with 128-bit
  modular arithmetic using math/bits.Mul64
- External Product: Full RGSW × RLWE multiplication with decomposition
- Blind Rotation: Batch processing with parallel CMux gates
- CMux: Controlled multiplexer using external product
- Sample Extraction: LWE extraction from RLWE without decryption
- Key Switching: Dimension reduction for bootstrapping

Multi-GPU Support:
- BSK Cache: LRU cache with P2P/NVLink sharing between GPUs
- Scheduler: Work queue per GPU with batch aggregation by gate type
- Load Balancing: Work stealing when queue imbalance detected
- Future: Async result handling with Wait()/Ready()

Architecture:
- Structure-of-Arrays layout for coalesced GPU memory access
- Wrapper functions for MLX operations (CPU fallback when CGO disabled)
- Proper stub files for non-GPU platforms

Files added: blind_rotate.go, cmux.go, bsk_cache.go, scheduler.go,
memory.go, and corresponding _stub.go and _test.go files

Performance: NTT ~26µs single, ~24µs/poly batched (8-poly batch)
2025-12-28 20:04:57 -08:00
Zach Kelling b7da816395 feat: consolidate SDK, merge wasm bindings
- Merged tfhe-wasm into sdk/wasm/
- SDK now includes: c, python, rust, typescript, wasm
- Removed duplicate tfhe-wasm and tfhe-wasm-node repos
- Various optimizations and test improvements
v1.1.0
2025-12-28 19:30:21 -08:00
Zach Kelling c68dea0a9f 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