A high-performance, client-side cryptographic module for generating Zero-Knowledge Proofs (ZKP). This project allows users to authenticate via familiar flows (like Google Sign-In) to generate the proof locally in the browser, ensuring the raw credential never touches a server.
- Local Execution: Proof generation occurs entirely on the client-side via WebAssembly (WASM), keeping private witnesses (credentials) secure on the user's device.
- No Trusted Setup: Implements the Spartan SNARK framework (Setty, 2019), utilizing a transparent polynomial commitment scheme to eliminate CRS ceremony risks.
- Credential Compatibility: Full support for the secp256k1 elliptic curve, enabling ZKP for ECDSA signatures and common Web2 identity tokens.
- UI-Friendly: Designed to integrate with "Google Sign-On" style interfaces for a seamless user experience.
- Proof Algorithm: Spartan (Efficient, general-purpose SNARKs without trusted setup).
- Language: Rust, WASM, Circom, and TypeScript.
- Constraint System: Rank-1 Constraint System (R1CS).
The system bridges the gap between traditional Web2 identity and Web3 privacy:
- Identity Capture: User authenticates through a standard UI (OAuth).
- Witness Preparation: The module extracts the necessary signatures/claims as a private witness.
- Local Proving: The Spartan prover executes a SNARK over the credential constraints.
- Verification: A succinct proof is outputted, allowing any third party to verify the credential's validity without seeing the secret data.
Unlike Groth16, Spartan does not require a per-circuit trusted setup. Spartan proposes:
-
Prover Time: Linear to the number of constraints
$O(N)$ . -
Proof Size: Polylogarithmic
$\tilde{O}(\log^2 N)$ . - Verification: Extremely fast, suitable for on-chain or off-chain check.
By optimizing the secp256k1 scalar multiplication inside the Spartan R1CS, we achieve industry-leading performance for browser-based proving:
| Component | Operation | Latency (Browser) |
|---|---|---|
| WASM Init | Environment Setup | ~150ms |
| Witness Gen | Data Mapping | ~50ms |
| Spartan Proving | SNARK Generation | < 6s |
| Verification | Succinct Check | ~10ms |
Executed in Chrome (WASM) on a consumer-grade machine: CPU: AMD Ryzen 9 5900X (12-Core, 3.7GHz), RAM: 64GB
The early works of Personae Labs (specifically their research into efficient ECDSA verification in ZK) have heavily inspired this project and underpin the architecture of the proof-generation module.
- Setty, Srinath. "Spartan: Efficient and general-purpose zkSNARKs without trusted setup." (2019). IACR ePrint 2019/550.

