Update Python version requirements and fix compatibility issues
- Bump minimum Python version from 3.11 to 3.13 across all apps - Add Python 3.11-3.13 test matrix to CLI workflow - Document Python 3.11+ requirement in .env.example - Fix Starlette Broadcast removal with in-process fallback implementation - Add _InProcessBroadcast class for tests when Starlette Broadcast is unavailable - Refactor API key validators to read live settings instead of cached values - Update database models with explicit
This commit is contained in:
75
apps/zk-circuits/fhe_integration_plan.md
Normal file
75
apps/zk-circuits/fhe_integration_plan.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user