Sakshya Core Module: engine-fhe
This repository implements the Fully Homomorphic Encryption (FHE) computation engine for the Sakshya Protocol. It utilizes the CKKS scheme for privacy-preserving numerical computations, enabling secure verification of liveness proofs and continuous biometric authentication.
The engine-fhe component leverages CKKS to compute cosine similarities and perform verifiable machine learning inference (like liveness checks) directly on encrypted vectors.
- CKKS-Based Biometric Matching: Compute secure cosine similarity between encrypted embedded vectors (e.g., from MobileFaceNet).
- Liveness Proof Execution: Evaluate liveness model weights on user-provided hidden frames robustly.
- Verification Pipeline: Integrated verification process verifying liveness and identity without exposing the underlying data to the verifiers.
Ensure you have Rust installed and the nightly toolchain configured if utilizing specific FHE SIMD vectorization traits.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shcargo build --release
cargo testsrc/ckks/- Core routines for CKKS operations (keygen, encryption, arithmetic).src/pipeline.rs- The verification execution pipeline structure.src/error.rs- Centralized error definitions for engine computations.tests/- Integration tests, including encrypted cosine similarity tests.
This library is primarily instantiated by the tee (Trusted Execution Environment) and integrates directly with the Sakshya off-chain components to return verification results for zero-knowledge proofs (Circom circuits) or block-chain validations.