Zero-Knowledge Proofs
Groth16 SNARKs on BN254 with GPU-accelerated proving and hybrid ZK-in-TEE execution
Tenzro's ZK proof system enables verifiable computation without revealing inputs. Pre-built circuits for inference verification, settlement proofs, and identity attestation. GPU acceleration for batch proof generation and multi-level compression.
What are Zero-Knowledge Proofs?
Zero-knowledge proofs allow one party (the prover) to prove to another party (the verifier) that a statement is true without revealing any information beyond the validity of the statement itself.
Tenzro implements Groth16 SNARKs (Succinct Non-interactive Arguments of Knowledge) on the BN254 elliptic curve, providing ~128-bit security with compact proofs consisting of just 3 group elements. Verification is constant-time regardless of computation complexity.
The system includes pre-built circuits for common use cases: verifying AI inference results, proving settlement correctness, and attesting identity properties. GPU acceleration enables batch proving of up to 100 proofs with Merkle tree-based aggregation.
Hybrid ZK-in-TEE execution combines the privacy guarantees of zero-knowledge proofs with the integrity guarantees of Trusted Execution Environments. The TEE generates the witness in a confidential environment, then the ZK system proves the computation was performed correctly.
Key Features
Groth16 SNARKs
BN254 elliptic curve with ~128-bit security. Compact proofs (3 group elements) with constant-time verification
Pre-built Circuits
InferenceVerificationCircuit, SettlementProofCircuit, IdentityProofCircuit ready to use
GPU-Accelerated Proving
GpuProvingEngine with batch proof generation (up to 100 proofs). Merkle tree-based proof aggregation
Proof Compression
Multi-level compression: None, Light, Medium, Heavy. Reduce proof size for on-chain verification
Hybrid ZK-in-TEE
Combine ZK proofs with hardware attestations. TEE generates the witness, ZK proves the computation
Multiple Proof Systems
Groth16, PlonK, Halo2, STARK support. Choose based on trusted setup requirements and proof size
Architecture
┌─────────────────────────────────────────┐ │ ZK Proof Pipeline │ ├─────────────────────────────────────────┤ │ │ │ ┌──────────────┐ ┌────────────────┐ │ │ │ Circuit │ │ Trusted Setup │ │ │ │ Definition │ │ (per circuit) │ │ │ │ │ │ │ │ │ │ • Inference │ │ • Proving Key │ │ │ │ • Settlement │ │ • Verify Key │ │ │ │ • Identity │ │ │ │ │ └──────┬───────┘ └───────┬────────┘ │ │ │ │ │ │ ▼ ▼ │ │ ┌─────────────────────────────────┐ │ │ │ Proving Engine │ │ │ │ CPU (default) / GPU (batch) │ │ │ │ │ │ │ │ • Single proof generation │ │ │ │ • Batch proving (up to 100) │ │ │ │ • Proof aggregation (Merkle) │ │ │ │ • Compression (4 levels) │ │ │ └──────────────┬──────────────────┘ │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────┐ │ │ │ Verification │ │ │ │ • On-chain (precompile) │ │ │ │ • Off-chain (API) │ │ │ │ • Hybrid ZK+TEE attestation │ │ │ └─────────────────────────────────┘ │ └─────────────────────────────────────────┘
Getting Started
Generate and Verify a Proof
use tenzro_zk::{
circuits::InferenceVerificationCircuit,
prover::Prover,
verifier::Verifier,
};
// Define circuit
let circuit = InferenceVerificationCircuit::new(
model_hash,
input_hash,
output_hash,
);
// Trusted setup
let (proving_key, verifying_key) = Prover::setup(&circuit)?;
// Generate proof
let proof = Prover::prove(&proving_key, &circuit)?;
// Verify
let valid = Verifier::verify(&verifying_key, &proof)?;
assert!(valid);GPU Batch Proving
use tenzro_zk::gpu::GpuProvingEngine;
let engine = GpuProvingEngine::new(GpuConfig {
max_batch_size: 100,
max_constraints: 1_000_000,
compression: CompressionLevel::Medium,
});
// Submit batch of circuits
let proofs = engine.prove_batch(&proving_key, &circuits).await?;
// Aggregate proofs into single proof
let aggregated = engine.aggregate_proofs(&proofs)?;Start Building with ZK Proofs
Integrate verifiable computation into your applications with Tenzro's zero-knowledge proof system