Files
aitbc/apps/zk-circuits/fhe_integration_plan.md
oib 15427c96c0 chore: update file permissions to executable across repository
- Change file mode from 644 to 755 for all project files
- Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet"
- Rename Miner.extra_meta_data to extra_metadata for consistency
2026-03-06 22:17:54 +01:00

76 lines
1.8 KiB
Markdown
Executable File

# FHE Integration Plan for AITBC
## Candidate Libraries
### 1. Microsoft SEAL (C++ with Python bindings)
**Pros:**
- Mature and well-maintained
- Supports both BFV and CKKS schemes
- Good performance for ML operations
- Python bindings available
- Extensive documentation
**Cons:**
- C++ dependency complexity
- Larger binary size
- Steeper learning curve
**Use Case:** Heavy computational ML workloads
### 2. TenSEAL (Python wrapper for SEAL)
**Pros:**
- Pure Python interface
- Built on top of SEAL
- Easy integration with existing Python codebase
- Good for prototyping
**Cons:**
- Performance overhead
- Limited to SEAL capabilities
- Less control over low-level operations
**Use Case:** Rapid prototyping and development
### 3. Concrete ML (Python)
**Pros:**
- Designed specifically for ML
- Supports neural networks
- Easy model conversion
- Good performance for inference
**Cons:**
- Limited to specific model types
- Newer project, less mature
- Smaller community
**Use Case:** Neural network inference on encrypted data
## Recommended Approach: Hybrid ZK + FHE
### Phase 1: Proof of Concept with TenSEAL
- Start with TenSEAL for rapid prototyping
- Implement basic encrypted inference
- Benchmark performance
### Phase 2: Production with SEAL
- Migrate to SEAL for better performance
- Implement custom optimizations
- Integrate with existing ZK circuits
### Phase 3: Specialized Solutions
- Evaluate Concrete ML for neural networks
- Consider custom FHE schemes for specific use cases
## Integration Architecture
```
Client Request → ZK Proof Generation → FHE Computation → ZK Result Verification → Response
```
### Workflow:
1. Client submits encrypted ML request
2. ZK circuit proves request validity
3. FHE computation on encrypted data
4. ZK circuit proves computation correctness
5. Return encrypted result with proof