title: BLS12-381 description: Consensus-layer-only pairing-friendly elliptic curve for Beacon Chain validator signatures (NOT for application development)
BLS12-381
BLS12-381 is a pairing-friendly elliptic curve at the 128-bit security level, designed for BLS (Boneh-Lynn-Shacham) signature aggregation in proof-of-stake consensus systems.Overview
Consensus layer only - Used exclusively in Ethereum’s Beacon Chain for validator signatures. NOT available in execution layer (no EVM precompiles on mainnet, only L2s). Signature aggregation reduces bandwidth from ~100MB to ~1MB per epoch. BLS12-381 is a Barreto-Lynn-Scott pairing-friendly curve specifically designed for blockchain use cases requiring signature aggregation and zero-knowledge proofs. Named after its designers and 381-bit prime field, it has become the standard for Ethereum’s proof-of-stake consensus.Who Should Use This?
Consensus Client Developers: Building Ethereum consensus clients (Prysm, Lighthouse, Teku, Nimbus) NOT for:- Smart contract developers (use BN254 for zkSNARKs)
- DApp developers (use execution layer primitives: secp256k1, keccak256)
- Most application developers (consensus layer is abstracted away)
Why BLS12-381?
Security: 128-bit security level (comparable to 3072-bit RSA or 256-bit ECDSA) Efficiency: Fastest pairing computation among comparable security curves Adoption: Standard across major blockchains (Ethereum 2.0, Zcash, Filecoin, Chia) Signature Aggregation: Unique property enabling compact validator signaturesEthereum Use Cases
- Validator Signatures: Aggregate thousands of validator signatures into 96 bytes (Beacon Chain only)
- Sync Committees: Light client proofs with compact signature aggregation (consensus layer)
- Attestation Aggregation: Reduce consensus message bandwidth by 99%
- NOT for Smart Contracts: Use BN254 instead for application-layer zkSNARKs and DeFi
- NOT for DApp Development: Consensus client development only
Mathematical Foundation
Curve Equation
G1 (base field Fp):Field Parameters
Base Field Modulus (p): 381-bit primePairing Function
Optimal Ate Pairing:e: G1 × G2 → GT
Properties:
- Bilinearity:
e(aP, bQ) = e(P, Q)^(ab) - Non-degeneracy:
e(G1, G2) ≠ 1(identity in GT) - Efficiency: ~1-2ms computation on modern CPUs
Implementation Details
Access & Availability
Native C ONLY: Via libblst library (production-grade, audited by Trail of Bits and NCC Group) NO JavaScript/TypeScript interface: Consensus layer operations, not exposed to application tier NO WASM: Not needed for application development - used exclusively by consensus client implementations Accessible via: Native Zig bindings only, for consensus client development (Prysm, Lighthouse, etc.)Key Operations
When building consensus clients:- G1 point operations: Validator public keys (48 bytes compressed)
- G2 point operations: BLS signatures (96 bytes compressed)
- Pairing check: Signature verification using bilinear pairing
- Multi-signature aggregation: Combine thousands of signatures into one
Documentation
Core Concepts
- Signatures - BLS signature scheme, aggregation, batch verification
- Pairing - Bilinear pairing operation, optimal ate pairing algorithm
- G1 Operations - Point addition, scalar multiplication, MSM
- G2 Operations - Extension field operations, public key handling
Advanced Topics
- Aggregation - Signature and key aggregation strategies
- Test Vectors - Official test vectors, edge cases, validation
- Precompiles - EIP-2537 precompiled contracts
- Performance - Benchmarks, optimizations, comparison
Implementation
- Usage Patterns - Ethereum validators, sync committees, zkSNARKs
- Security - Side-channel resistance, rogue key attacks, best practices
Point Formats
G1 Points (48 bytes compressed, 96 bytes uncompressed)
Uncompressed Format (128 bytes padded for precompiles):- MSB indicates compression + sign of y-coordinate
- Remaining 381 bits encode x-coordinate
G2 Points (96 bytes compressed, 192 bytes uncompressed)
Uncompressed Format (256 bytes padded for precompiles):- First 48 bytes: x.c1 (with compression flags)
- Second 48 bytes: x.c0
Implementation Status
Native (Production - Consensus Clients Only)
Library: BLST (Supranational)- Audited by Trail of Bits, NCC Group
- Assembly-optimized for x86_64, ARM64
- Constant-time, side-channel resistant
- Used in all major Ethereum consensus clients (Prysm, Lighthouse, Teku, Nimbus)
lib/blst/
Access: Native Zig bindings only - NO JavaScript/TypeScript API
WASM
Status: Not available (not needed for application development) Rationale: BLS12-381 is consensus-layer infrastructure. Application developers use execution layer primitives (secp256k1, keccak256) or BN254 for zkSNARKs.Security Level
Target Security: 128 bits (classical), 64 bits (quantum) Attack Complexity:- Discrete log on G1/G2: ~2^128 operations
- Pairing inversion: Computationally infeasible
- MOV attack: Prevented by embedding degree 12
EIP-2537 Precompiles
NOT on Mainnet - Proposed BLS12-381 precompiles for EVM, but NOT activated on mainnet yet. Some L2s may implement them for zkRollup verification.
- G1 operations: ADD, MUL, MSM
- G2 operations: ADD, MUL, MSM
- Pairing check
- Hash-to-curve mappings
- G1 addition: 500 gas
- Pairing base: 115,000 gas
- Pairing per pair: 23,000 gas
Performance
Native (BLST on x86_64):- G1 addition: ~15 μs
- G1 multiplication: ~80 μs
- G2 multiplication: ~200 μs
- Pairing (single): ~1.2 ms
- Pairing check (2 pairs): ~2 ms
- MSM (100 G1 points): ~8 ms
- Pairing: ~2x slower
- Security: 128-bit vs 100-bit
- Future-proof: Better long-term security
Related
- KZG Commitments - Polynomial commitments using BLS12-381 (consensus layer, EIP-4844)
- BN254 - USE THIS for execution layer zkSNARKs and smart contracts
- secp256k1 - Execution layer transaction signatures
- Precompiles: BLS12-381 - EIP-2537 implementation (NOT on mainnet)

