Skip to main content
Torus compression is a technique for reducing proof size by compressing elliptic curve points in Dory polynomial commitments. This optimization can achieve an estimated 3x reduction in proof size with minimal computational overhead.
Torus compression is mentioned in Jolt’s profiling benchmarks but may not be fully implemented in the current version. This page describes the theoretical technique and expected performance impact.

Problem: Large Curve Points

Dory commitments use elliptic curve points from BN254:
A typical Jolt proof contains:
  • Polynomial commitments: 50-100 G1 points
  • Opening proofs: 20-40 G1 points (Dory tier-1/tier-2)
  • BlindFold (ZK mode): 100-200 G1 points (Pedersen commitments, Hyrax row commitments)
Total: ~10-20 KB of curve points

Solution: Torus-Based Compression

Torus compression exploits the algebraic structure of elliptic curves to represent points more compactly.

Mathematical Background

For an elliptic curve point P = (x, y) on a curve y² = x³ + ax + b: Standard compressed format:
  • Store x (32 bytes) + 1 bit for y sign
  • Total: 33 bytes
  • Decompression: Solve for y = ±√(x³ + ax + b)
Torus compression:
  • Represent point in projective coordinates: [X : Y : Z]
  • Exploit torus structure: T² ≅ E[r] × E[r] (for r-torsion points)
  • Compress to ~21 bytes (estimated)
  • Decompression: More complex but still efficient

Compression Ratio

Implementation Strategy

Compression During Serialization

Compression Levels

Different proof components may use different compression:
Trade-off: Torus decompression is slower than standard decompression, so use it selectively for components that dominate proof size.

Performance Impact

Proof Size Reduction

For a typical Jolt proof: Note: Actual compression ratio depends on the specific proof components. Estimated ~3x for curve points alone, ~2-2.5x for full proof (including scalars).

Computational Cost

Compression time (per G1 point):
  • Standard compression: ~5 μs
  • Torus compression: ~10 μs (estimated)
Decompression time (per G1 point):
  • Standard decompression: ~20 μs (requires square root)
  • Torus decompression: ~50 μs (estimated, more complex reconstruction)
Impact on prover:
  • Proof generation: Minimal overhead (~1-2% increase)
  • Proof serialization: Slight overhead from compression
Impact on verifier:
  • Proof deserialization: ~2-3x slower decompression
  • Verification: No change (works with decompressed points)
Net effect: Worthwhile trade-off for bandwidth-constrained applications (blockchain L1 submission, storage).

Use Cases

When to Use Torus Compression

Good for:
  • On-chain proof submission (minimize calldata costs)
  • Proof archival (long-term storage)
  • Network transmission over slow connections
  • Applications where verification is infrequent
Not ideal for:
  • High-throughput verification (latency-sensitive)
  • Local proof generation and verification
  • Applications that re-verify proofs frequently

Hybrid Approach

Use different compression for different stages:

Implementation Status

Torus compression is not yet fully implemented in the current Jolt codebase. The compression estimates are based on theoretical analysis and benchmarking projections.

Current State

These comments indicate planned compression support.

Roadmap

Phase 1: Standard Compression (likely implemented)
  • Use arkworks’ built-in point compression
  • Serialize G1 points as 33 bytes (x-coordinate + sign bit)
  • Serialize G2 points as 65 bytes
Phase 2: Torus Compression (planned)
  • Implement torus-based compression algorithm
  • Integrate with Dory commitment scheme
  • Benchmarking and optimization
Phase 3: Adaptive Compression (future)
  • Automatically choose compression level based on use case
  • Profile-guided compression (compress hot proof components less aggressively)

Other Proof Compression Methods

1. Recursive SNARKs:
  • Compress proof by proving its verification in another SNARK
  • Can achieve constant-size proofs (~1-2 KB)
  • Much higher prover cost (10-100x)
2. Batch Verification:
  • Amortize verification cost across multiple proofs
  • Doesn’t reduce individual proof size
  • Complementary to compression
3. Aggregation:
  • Combine multiple proofs into one
  • Useful for blockchain rollups
  • Can be combined with torus compression

Best Practices

Compression Configuration

Error Handling

Torus decompression can fail if the compressed data is invalid:

References