Zero-Knowledge Proofs & GPU-Accelerated Proving
Version: 0.1.0
Date: March 2026
Category: Cryptography
Abstract
Tenzro Network implements a comprehensive zero-knowledge proof system based on Groth16 SNARKs over the BN254 elliptic curve, providing approximately 128 bits of security. The system includes three pre-built domain-specific circuits (inference verification, settlement proofs, and identity proofs), GPU-accelerated proving with batch proof generation, Merkle tree-based proof aggregation, multi-level compression (None/Light/Medium/Heavy), and a hybrid ZK-in-TEE execution model that combines mathematical zero-knowledge proofs with hardware attestations from Trusted Execution Environments.
This architecture enables privacy-preserving verification of AI inference results, confidential payment settlements, and anonymous identity attestations while maintaining high throughput through GPU acceleration and reducing on-chain verification costs through proof aggregation.
1. Introduction
Zero-knowledge proofs (ZKPs) are cryptographic protocols that allow one party (the prover) to convince another party (the verifier) that a statement is true without revealing any information beyond the validity of the statement itself. Tenzro Network leverages ZKPs to enable:
- Verifiable AI inference without revealing model weights, inputs, or outputs
- Private payment settlements that prove correctness without exposing transaction details
- Anonymous identity attestations demonstrating capabilities without revealing credentials
- Scalable batch verification through proof aggregation
2. Proof System Architecture
2.1 Groth16 SNARKs on BN254
Tenzro uses Groth16, a pairing-based SNARK (Succinct Non-interactive ARgument of Knowledge) construction that provides:
- Constant proof size: Proofs are 192 bytes regardless of circuit complexity
- Efficient verification: O(1) verification time with ~1ms on modern hardware
- Strong security: ~128-bit security level from the BN254 curve
- Mature implementation: Built on arkworks, a production-grade ZK library
The BN254 curve (also known as alt_bn128) provides a 254-bit prime field and efficient pairing operations, making it ideal for blockchain applications where verification must be fast and gas-efficient.
Security Note: Groth16 requires a trusted setup ceremony where toxic waste (randomness used during setup) must be securely destroyed. Tenzro supports both single-party setups (for development) and multi-party ceremony setups (for production) where multiple participants contribute randomness, ensuring security as long as at least one participant is honest.
2.2 Supported Proof Types
While Groth16 is the primary proof system, Tenzro's architecture supports multiple proof types:
| Proof System | Setup | Proof Size | Status |
|---|---|---|---|
| Groth16 | Trusted (circuit-specific) | 192 bytes | Production |
| PlonK | Universal (one-time) | ~384 bytes | Supported |
| Halo2 | Transparent (none) | ~1 KB | Supported |
| STARK | Transparent (none) | ~100 KB | Supported |
3. Pre-Built Circuits
Tenzro provides three domain-specific circuits optimized for common blockchain operations. All circuits use the MiMC hash function for ZK-friendly hashing within the circuit.
3.1 Inference Verification Circuit
This circuit proves that AI model inference was computed correctly without revealing the model weights, input data, or output results. It is essential for verifiable AI in privacy-sensitive applications.
Public Inputs:
model_hash: Hash of the AI model weightsinput_hash: Hash of the inference inputoutput_hash: Hash of the inference output
Private Witnesses:
model_checksum: Actual model parameter checksum (private)input_checksum: Actual input data checksum (private)computed_output_checksum: Computed output checksum (private)computation_witness: Optional computation trace (private)
Constraints:
1. model_hash = MiMC(model_checksum) 2. input_hash = MiMC(input_checksum) 3. computed_output = model_checksum * input_checksum // Simplified computation 4. output_hash = MiMC(computed_output_checksum) 5. computed_output = computed_output_checksum
3.2 Settlement Proof Circuit
This circuit proves that a payment settlement is valid: the payer has sufficient balance, the payment amount is correct, the service was provided, and no double-spending occurred.
Public Inputs:
settlement_hash: Hash of settlement detailsservice_hash: Hash of the service providedamount: Payment amount
Private Witnesses:
payer_balance: Payer's balance (private)service_proof: Proof that service was delivered (private)nonce: Transaction nonce (private)prev_nonce: Previous transaction nonce (private)
Constraints:
1. payer_balance >= amount // Sufficient balance 2. service_hash = MiMC(service_proof) // Service was provided 3. settlement_hash = MiMC(service_hash + amount) // Settlement integrity 4. nonce = prev_nonce + 1 // Prevent replay
3.3 Identity Proof Circuit
This circuit allows an AI agent or human to prove properties about their identity without revealing private credentials: possession of a valid private key, certain capabilities, and meeting reputation thresholds.
Public Inputs:
public_key_hash: Hash of the agent's public keycapability_commitment: Commitment to agent capabilitiesminimum_reputation: Required reputation threshold
Private Witnesses:
private_key: Agent's private key (private)public_key: Derived public key (private)capabilities: Capability bitmask (private)capability_blinding: Random blinding factor (private)actual_reputation: Agent's actual reputation (private)
Constraints:
1. public_key = MiMC(private_key) // Key pair validity 2. public_key_hash = MiMC(public_key) // Public key hash 3. capability_commitment = MiMC(capabilities + blinding) // Commitment 4. actual_reputation >= minimum_reputation // Reputation check
4. MiMC Hash Function
MiMC (Minimal Multiplicative Complexity) is a ZK-friendly hash function designed for efficient representation in arithmetic circuits. Unlike SHA-256 or Keccak which require thousands of constraints, MiMC requires only 2 constraints per round.
4.1 MiMC Parameters
| Parameter | Value | Description |
|---|---|---|
| Rounds | 110 | Provides 128-bit security on BN254 |
| Exponent | 3 (cube) | t^3 operation per round |
| Field | BN254 scalar field | ~254-bit prime |
| Round constants | Deterministic | SHA-256("tenzro_mimc_round_i") |
| Key | 0 | Key-less variant for hashing |
4.2 MiMC Algorithm
The MiMC hash function operates as follows:
function MiMC(x, k):
state = x + k
for i = 0 to 109:
c_i = round_constant(i)
t = state + c_i + k
state = t^3
return state + k
// For hashing (k=0):
hash(x) = MiMC(x, 0)Round constants are derived deterministically to eliminate backdoor concerns:
round_constant(i) = SHA-256("tenzro_mimc_round_{i}") mod p4.3 Native and In-Circuit Implementations
Tenzro implements two versions of MiMC:
- Native Rust implementation: Fast computation outside the circuit for hash generation
- R1CS gadget: Constraint-system representation for in-circuit verification
Both implementations are tested to produce identical outputs, ensuring correctness across the proof system.
5. Proof Lifecycle
Zero-knowledge proofs in Tenzro follow a three-phase lifecycle:
5.1 Setup Phase
The trusted setup generates circuit-specific proving and verification keys:
circuit_template → Groth16.setup(rng) → (proving_key, verifying_key)
Setup configurations:
- Production: Uses OS randomness (OsRng) for maximum security
- Testing: Deterministic setup with fixed seed (NEVER use in production)
- Ceremony: Multi-party ceremony with multiple contributors
Each setup configuration generates an integrity hash that can be used to verify the setup was performed correctly.
5.2 Proving Phase
The prover generates a proof given a circuit instance with witness data:
circuit + witness → Groth16.prove(proving_key, rng) → Proof
Proof structure:
proof_bytes: Serialized Groth16 proof (~192 bytes)public_inputs: BN254 field elements (canonical compressed form)proof_type: ProofType::Groth16circuit_id: Circuit identifier stringcreated_at: Timestamp of proof generationmetadata: Optional prover ID, proving time, custom fields
5.3 Verification Phase
The verifier checks the proof against public inputs:
Proof + public_inputs → Groth16.verify(verifying_key) → bool
Verification is extremely fast (~1ms) and constant-time regardless of circuit complexity, making it ideal for on-chain verification.
6. GPU-Accelerated Proving
Modern GPUs contain thousands of parallel compute cores, making them ideal for the highly parallel operations in ZK proof generation such as multi-scalar multiplication (MSM), fast Fourier transforms (FFT), and field arithmetic. GPU acceleration can provide 100-1000x speedup compared to CPU-only implementations.
6.1 GPU Proving Engine
The GpuProvingEngine provides comprehensive GPU-accelerated proving capabilities:
| Capability | Value | Description |
|---|---|---|
| Max batch size | 100 | Maximum proofs in a batch |
| Max constraints | 1,000,000 | Maximum circuit size |
| GPU detection | Automatic | CUDA, Metal, OpenCL support |
| CPU fallback | Optional | Graceful degradation |
6.2 Batch Proof Generation
Batch generation is more efficient than generating proofs individually, as it can better utilize GPU parallelism and reduce overhead:
witnesses = [witness_1, witness_2, ..., witness_N] proofs = engine.generate_proof_batch(witnesses, circuit_data, Groth16) // Typical performance: // Single proof: ~100ms on GPU // Batch of 100: ~2 seconds (20ms per proof)
6.3 Merkle Tree-Based Proof Aggregation
Proof aggregation reduces on-chain verification costs from O(N) to O(1) by building a Merkle tree over proof hashes:
1. Hash each proof: leaf_i = SHA-256(proof_i) 2. Build Merkle tree by recursively hashing pairs 3. Root hash represents all proofs 4. Verification reconstructs tree and checks root aggregated = engine.aggregate_proofs(&proofs) // aggregated.root_proof contains the Merkle root // aggregated.aggregation_tree contains intermediate nodes
This enables efficient batch verification on-chain, dramatically lowering gas costs when verifying multiple proofs.
6.4 Multi-Level Proof Compression
Tenzro supports four compression levels to balance proof size against compression time:
| Level | Compression Ratio | Speed | Use Case |
|---|---|---|---|
| None | 1.0x (no compression) | Instant | Low-latency verification |
| Light | 1.25x (~20% reduction) | Fast | Balanced latency/size |
| Medium | 1.67x (~40% reduction) | Moderate | Default for most use cases |
| Heavy | 2.5x (~60% reduction) | Slow | On-chain storage optimization |
Compressed proofs include a checksum to detect corruption and can be decompressed on-demand for verification.
6.5 GPU Device Detection
The proving engine automatically detects available GPU hardware:
- Linux: NVIDIA GPUs via CUDA (checks /proc/driver/nvidia)
- macOS: Apple Silicon via Metal (unified memory architecture)
- Windows: NVIDIA/AMD GPUs via CUDA/OpenCL
If no GPU is detected, the engine can optionally fall back to CPU-based proving, ensuring compatibility across all platforms.
6.6 Proving Statistics
The engine tracks comprehensive statistics for monitoring and optimization:
total_proofs_generated: Total individual proofs createdtotal_proofs_aggregated: Total aggregated proofs createdavg_proof_time_ms: Exponential moving average of proof timegpu_utilization: GPU utilization as fraction (0.0 to 1.0)total_constraints_proved: Total constraints across all proofs
7. Hybrid ZK-in-TEE Execution
Tenzro's hybrid ZK-in-TEE model combines the strengths of zero-knowledge proofs (mathematical guarantees) with Trusted Execution Environments (hardware guarantees), providing defense-in-depth security.
7.1 Architecture
The hybrid execution model operates as follows:
1. Proof generation inside TEE enclave → ZK proof generated using prover → Private witnesses never leave the enclave 2. TEE attestation obtained → Fresh attestation from TEE hardware → Binds proof to specific enclave measurement 3. Combined TeeZkProof created → Contains both ZK proof and TEE attestation → Signed by TEE's signing key 4. Dual verification → Verifier checks mathematical proof validity → Verifier checks TEE attestation against root of trust → Both must pass for acceptance
7.2 TeeZkProof Structure
A TeeZkProof combines both proof types:
zk_proof: The zero-knowledge proof (Groth16)tee_attestation: TEE attestation report (vendor-specific format)created_at: Timestamp of proof creationsignature: TEE signature over (proof + attestation)
7.3 Supported TEE Vendors
| TEE Vendor | Platform | Attestation Format |
|---|---|---|
| Intel SGX | Intel CPUs | EPID/DCAP quote |
| AMD SEV-SNP | AMD CPUs | SEV attestation report |
| AWS Nitro | AWS EC2 | Nitro attestation document |
| NVIDIA GPU | Hopper/Blackwell/Ada | NRAS attestation (max 24h age) |
7.4 Defense-in-Depth Benefits
The hybrid model provides multiple layers of security:
| Trust Assumption | ZK Proof | TEE Attestation | Hybrid |
|---|---|---|---|
| Cryptographic security | Yes | No | Yes |
| Hardware attestation | No | Yes | Yes |
| Resistant to side-channels | Yes | Partial | Yes |
| Code integrity verification | No | Yes | Yes |
| Verifiable by anyone | Yes | Yes (with vendor root) | Yes |
If either trust assumption fails, the other provides fallback protection. For example, if a TEE vulnerability is discovered, the ZK proof still guarantees correctness. If the ZK trusted setup is compromised, the TEE attestation still proves the code was executed in a secure environment.
7.5 Attestation Verification
TEE attestation verification follows vendor-specific protocols:
- Intel SGX: Verify quote with Intel Attestation Service (IAS) or DCAP
- AMD SEV: Verify with AMD's certificate chain and firmware signature
- AWS Nitro: Verify attestation document with AWS certificate chain
- NVIDIA GPU: Verify NRAS attestation report (max age: 24 hours)
All attestations are checked for:
- Non-empty quote, measurement, and signature fields
- Freshness (attestation age less than threshold, typically 1 hour)
- Code measurement matches expected hash for the circuit
- Signature verifies against vendor root of trust
For detailed information on TEE security, see the TEE-Based Security & Confidential Computing whitepaper.
8. ZK Precompile
Tenzro's multi-VM runtime includes a ZK verification precompile that allows smart contracts to verify zero-knowledge proofs on-chain. This enables privacy-preserving applications built entirely in smart contracts.
8.1 Precompile Interface
The ZK precompile is accessible at a dedicated address and provides three operations:
// Verify a Groth16 proof
function verifyGroth16(
bytes proof,
bytes[] publicInputs,
bytes verifyingKey
) returns (bool)
// Submit a verification request (async)
function submitVerification(
bytes proof,
bytes[] publicInputs,
string circuitId
) returns (bytes32 requestId)
// Query proof metadata
function getProofMetadata(
bytes32 proofHash
) returns (ProofMetadata)8.2 Gas Costs
| Operation | Gas Cost | Description |
|---|---|---|
| verifyGroth16 | ~80,000 gas | Single proof verification |
| submitVerification | ~20,000 gas | Submit for async verification |
| getProofMetadata | ~5,000 gas | Metadata query |
9. Verification API
Tenzro provides multiple interfaces for zero-knowledge proof verification:
9.1 Web Verification Endpoint
POST https://api.tenzro.network/api/verify/zk-proof
Request:
{
"proof_bytes": "base64_encoded_proof",
"public_inputs": ["input1", "input2", ...],
"proof_type": "groth16",
"circuit_id": "inference_verification"
}
Response:
{
"valid": true,
"verification_time_ms": 1.2,
"circuit_id": "inference_verification",
"proof_type": "groth16"
}9.2 MCP Tool
The MCP server at https://mcp.tenzro.network/mcp exposes a verify_zk_proof tool:
{
"name": "verify_zk_proof",
"description": "Verify a zero-knowledge proof",
"inputSchema": {
"proof_data": "base64 encoded proof",
"circuit_id": "circuit identifier"
}
}9.3 On-Chain Verification
Smart contracts can verify proofs directly via the ZK precompile, enabling fully on-chain privacy-preserving applications.
10. Performance Benchmarks
| Operation | CPU | GPU | Speedup |
|---|---|---|---|
| Single proof (inference circuit) | ~2000ms | ~100ms | 20x |
| Batch of 100 proofs | ~200s | ~2s | 100x |
| Proof verification | ~1ms | N/A | - |
| Proof aggregation (100 proofs) | ~5ms | N/A | - |
11. Security Considerations
11.1 Trusted Setup
Groth16 requires a trusted setup where randomness (toxic waste) must be securely destroyed:
- Production: Multi-party ceremony with multiple contributors
- Security: Safe as long as at least one participant is honest
- Transparency: All ceremony contributions are logged and verifiable
- Circuit-specific: Each circuit requires its own setup
11.2 Proof Freshness
For time-sensitive applications, always verify proof timestamps and TEE attestation age. Tenzro enforces:
- TEE attestations older than 1 hour are rejected by default
- NVIDIA NRAS attestations have a maximum age of 24 hours
- Proof metadata includes creation timestamp for application-level checks
11.3 Circuit Constraints
All circuits are validated before proving to ensure:
- Public inputs are non-empty and correctly formatted
- Constraint count is within maximum bounds (1M constraints)
- MiMC hash computations use correct round constants
- No arithmetic overflows in field operations
12. Future Work
- PlonK support: Universal trusted setup for easier deployment
- STARK integration: Transparent proofs with no trusted setup
- Recursive proofs: Proof-of-proofs for infinite scalability
- Custom circuit builder: Domain-specific language for circuit creation
- Multi-GPU proving: Distribute proof generation across GPU cluster
- ZK rollups: Layer 2 scaling via zero-knowledge proof batching
13. Conclusion
Tenzro Network's zero-knowledge proof system provides a comprehensive solution for privacy-preserving verification on the blockchain. By combining Groth16 SNARKs with GPU acceleration, Merkle-based proof aggregation, and hybrid ZK-in-TEE execution, Tenzro enables verifiable AI inference, confidential settlements, and anonymous identity proofs at scale.
The pre-built circuits for inference verification, settlement proofs, and identity attestations cover the most common use cases in decentralized AI and payments, while the flexible architecture supports custom circuits for domain-specific applications.
References
- Groth, J. (2016). "On the Size of Pairing-Based Non-interactive Arguments." EUROCRYPT 2016.
- Albrecht, M., et al. (2016). "MiMC: Efficient Encryption and Cryptographic Hashing with Minimal Multiplicative Complexity."
- arkworks. "A Rust ecosystem for zkSNARK programming." https://arkworks.rs
- Tenzro Network. "TEE-Based Security & Confidential Computing." Whitepaper
- Barreto, P. S. L. M., & Naehrig, M. (2006). "Pairing-Friendly Elliptic Curves of Prime Order." SAC 2005.
Authors: Tenzro Network Research Team
Contact: team@tenzro.com
License: This whitepaper is licensed under CC BY 4.0