Try it Live
Run Blob examples in the interactive playground
Overview
KZG commitments enable:- Binding - Cannot create two different blobs with same commitment
- Hiding - Commitment doesn’t reveal blob contents
- Succinct - 48-byte commitment for 131,072-byte blob
- Verifiable - Prove blob matches commitment without revealing data
Mathematical Foundation
Polynomial Commitment Scheme
-
Blob as Polynomial
- Blob contains 4,096 field elements
- Treat as polynomial coefficients:
f(x) = a₀ + a₁x + a₂x² + ... + a₄₀₉₅x⁴⁰⁹⁵
-
Trusted Setup
- Generate powers of secret:
[G₁, sG₁, s²G₁, ..., s⁴⁰⁹⁵G₁]whereG₁is BLS12-381 generator - Secret
sdestroyed after ceremony
- Generate powers of secret:
-
Commitment
- Evaluate polynomial at secret:
C = f(s)G₁ = Σ(aᵢ · sⁱG₁) - Result is 48-byte G₁ point (commitment)
- Evaluate polynomial at secret:
-
Proof
- Prove evaluation at challenge point
z:f(z) = y - Generate proof
πthat verifies:e(C - yG₁, G₂) = e(π, (s - z)G₂)
- Prove evaluation at challenge point
BLS12-381 Curve
KZG uses BLS12-381 pairing-friendly curve:Implementation
Computing Commitments
Internal Process
Generating Proofs
Trusted Setup
KZG Ceremony
EIP-4844 uses trusted setup from ceremony.ethereum.org:Powers of Tau
Loading Setup
Verification
Proof Verification
Pairing Equation
Verification uses BLS12-381 pairing:Batch Verification
More efficient for multiple blobs:Security Properties
Computational Binding
Cannot find two different blobs with same commitment:Hiding (Partial)
Commitment doesn’t directly reveal blob contents, but:- Not fully hiding (deterministic)
- Same data = same commitment
- Use versioned hash (SHA256) for additional hiding
Soundness
Valid proofs always verify:Field Element Validation
Modulus Check
Each 32-byte element must be < BLS12-381 modulus:Automatic Validation
Tevm’sfromData() ensures valid field elements:
Implementation Notes
c-kzg-4844 Library
Tevm uses c-kzg-4844:WASM Support
WASM builds stub KZG operations (not yet supported):Performance
Operation Costs
Approximate timing (single-threaded):| Operation | Time | Notes |
|---|---|---|
| Commitment | ~10ms | FFT + MSM |
| Proof | ~10ms | Similar to commitment |
| Verify | ~5ms | Pairing check |
| Batch Verify (6) | ~15ms | Single pairing |
Optimization
Resources
- KZG Paper - Original KZG10 paper
- c-kzg-4844 - Reference implementation
- KZG Ceremony - Trusted setup details
- BLS12-381 - Curve specification
- Dankrad’s Explanation - KZG for Ethereum
See Also
- EIP-4844 - EIP-4844 specification
- toCommitment - Generate commitment
- verify - Verify proof
- Fundamentals - Blob basics

