English
  • AfrikaansAfrikaans
  • عربيعربي
  • বাংলাবাংলা
  • CatalàCatalà
  • 简体中文简体中文
  • 中文(繁體)中文(繁體)
  • DanskDansk
  • NederlandsNederlands
  • EnglishEnglishcheck-icon
  • FilipinoFilipino
  • SuomalainenSuomalainen
  • FrançaisFrançais
  • DeutschDeutsch
  • ελληνικάελληνικά
  • हिंदीहिंदी
  • MagyarMagyar
  • IndonesiaIndonesia
  • ItalianaItaliana
  • 日本語日本語
  • 한국인한국인
  • LietuviųLietuvių
  • MelayuMelayu
  • PolskiPolski
  • PortuguêsPortuguês
  • РусскийРусский
  • CрпскиCрпски
  • SlovenskýSlovenský
  • EspañolEspañol
  • KiswahiliKiswahili
  • SvenskaSvenska
  • แบบไทยแบบไทย
  • TürkçeTürkçe
  • YкраїніYкраїні
  • اردواردو
  • Tiếng ViệtTiếng Việt

EIP-2537: Precompile for BLS12-381 Curve Operations

Arya .ETH
Published On Jun 25, 2025 | Updated On Jul 30, 2025 | 9 min read
A stylized Ethereum crystal symbol surrounded by floating digital scripts and a ribbon labeled EIP-2537, with binary code in the background.
EIP-2537 enables fast BLS12-381 cryptography, paving the way for scalable, secure Ethereum applications.

TL;DR

  • EIP-2537 adds support for BLS12-381 curve operations to Ethereum. This improves cryptographic security from ~80-bit (BN254) to 128-bit, meeting modern standards.
  • It introduces seven new precompiles for efficient execution of operations like point addition, multi-scalar multiplication (MSM), and pairing checks.
  • Motivation: The existing BN254 curve is insufficient for long-term security. BLS12-381 is crucial for BLS signatures (used in Ethereum for validator attestation aggregation) and zkSNARKs.
  • Benefits: Precompiles avoid expensive Solidity implementations, enhancing performance and enabling scalable consensus mechanisms by reducing verification time.
  • Gas Schedule: Pricing for operations like MSM and pairing is designed to reflect computational costs and encourage efficient batching.
  • Security: The EIP mandates subgroup membership validation for most operations to prevent cryptographic attacks.
  • Rationale: A dedicated MSM precompile optimizes aggregate signature verification, and a separate single multiplication precompile is not needed as MSM handles it.

Introduction

This Ethereum Improvement Proposal (EIP) adds support for operations over the BLS12-381 pairing-friendly curve through a dedicated precompile. The curve, designed for efficiency and security, is widely used in BLS signature schemes and zkSNARKs. Before Pectra Upgrade, Ethereum only supported BN254, a curve offering ~80-bit security, which is insufficient for long-term cryptographic robustness. This EIP, launched in the Ethereum Pectra Upgrade, provides a 128-bit security level, using BLS12-381 curve, aligning Ethereum with modern cryptographic standards and practices.

By exposing low-level cryptographic operations as precompiles, developers can avoid expensive and inefficient implementation of elliptic curve operations in Solidity or Yul. This enhances performance, encourages adoption of verifiable computation techniques, and lays a secure foundation for advanced consensus mechanisms.

Motivation

The Ethereum Virtual Machine (EVM) currently includes precompiles for elliptic curve operations on the BN254 curve, primarily used in Groth16 zkSNARK verifications. While BN254 has served its purpose in early zk-based applications, its 80-bit security level is now widely regarded as inadequate for medium to long-term cryptographic assurance.

Modern cryptographic systems require at least 128-bit security to meet regulatory standards and ensure resilience against advances in computing power, including those posed by quantum threats. BLS12-381 addresses this need by offering a pairing-friendly elliptic curve with 128-bit security, superior performance in pairing operations, and wide standardization across the blockchain ecosystem.

BLS signatures, in particular, benefit significantly from this precompile. They allow multiple signatures to be aggregated into a single compact proof, reducing bandwidth and storage requirements. Additionally, batch verification of BLS signatures drastically improves computational efficiency, especially in systems with a large number of participants, such as validators in Ethereum.

Use Case Example

Consider Ethereum's beacon chain, where each block must include attestations from potentially thousands of validators. Each attestation includes a BLS signature, and all signatures must be verified by the protocol to maintain consensus correctness. Without native support for BLS12-381 operations, verifying these signatures would require implementing complex cryptographic operations in Solidity, which is inefficient and prohibitively expensive in gas.

With EIP-2537, a smart contract can invoke the pairing precompile to efficiently validate an aggregated signature representing multiple validators. This reduces verification time from linear to constant in the number of signers (assuming proper aggregation), making real-time finality feasible and economical.

Cryptographic Specification

This section formalizes the cryptographic properties and definitions of BLS12-381 used in the precompile. It includes the base field, curve equation, extension field, group definitions, and pairing parameters.

Notation and Mathematical Definitions

Before presenting the curve parameters, we define relevant mathematical concepts:

  • Finite Field Fp: A field with a prime number of elements. All arithmetic is modulo a large prime p.
  • Elliptic Curve over Fp: A set of points (x, y) satisfying y2x3axb.png For BLS12-381, (a = 0) and (b = 4).
  • Subgroup Order (q): The number of points in the subgroup used for cryptographic operations. Ensuring points are in this subgroup avoids small subgroup attacks.
  • Extension Fields (Fp2, Fp6, Fp12): Larger fields built from Fp for supporting pairings.
  • Pairing Function: A bilinear map eg1g2gt.png with specific algebraic properties used in pairing-based cryptography.

Curve Parameters

  • Base Field Modulus (p): p = 0x1a0111ea397fe69a4b1ba7b6434bacd76477…aaab
  • Curve Equation: y2x34.png
  • Main Subgroup Order (q): q = 0x73eda753299d7d483339d80809a1d80553bd…0001
  • Extension Fields:
    • Fp2: Quadratic extension with non-residue nr2
    • Fp6, Fp12: Higher extensions for pairing
  • Pairing Parameters:
  • Miller loop scalar x = -0xd201000000010000
  • Efficient square roots possible due to pequiv3mod4.png
Graph of the BLS12-381 elliptic curve y² = x³ + 4, showing both branches y = √(x³ + 4) and y = -√(x³ + 4).
Elliptic curve y² = x³ + 4 with both branches y = ±√(x³ + 4).Check out this image on :https://shorturl.at/LCfVX

Precompile Overview

This EIP introduces seven new precompiles to the Ethereum Virtual Machine, each targeting a specific cryptographic operation over the BLS12-381 curve. These operations are designed to be accessible via low-level call instructions (CALL, STATICCALL) and have well-defined addresses within the precompile address space.

Each precompile facilitates a distinct type of operation:

  • Point addition in G1 and G2 allows for combining two points on the elliptic curve.
  • Multi-scalar multiplication (MSM) is a core operation in BLS signature aggregation and batch verification.
  • Pairing checks validate the bilinearity condition across multiple point pairs.
  • Field-to-curve mappings are required to hash messages to elliptic curve points in BLS signature schemes.

This modular approach allows for optimal gas pricing and avoids overhead from composing operations manually using lower-level primitives.

Encoding Formats

To ensure interoperability and alignment with EVM expectations, all precompiles use standardized input and output encoding formats. These are designed to match 32-byte word alignment and are compatible with Solidity types such as uint256 or bytes32 arrays.

  • Scalars are encoded as 32-byte big-endian unsigned integers, consistent with typical Ethereum ABI encoding.
  • Field elements (Fp and Fp2) are encoded using 64 or 128 bytes, respectively. The additional zero-padding ensures the encoded values are always less than the modulus.
  • Curve points are encoded as concatenated field elements: 128 bytes for G1 (x, y) and 256 bytes for G2 (x, y) using their Fp2 representation.
  • Points at infinity, or identity elements, are represented using all-zero byte strings, a convention that simplifies detection of special values during execution.

These encoding schemes are critical for validating input correctness and preventing malformed input from bypassing cryptographic constraints.

ABI Interface Behavior

Each precompile expects a well-defined binary input format and returns an equally structured output. Inputs are structured to reflect one or more operations (e.g., scalar multiplications or point pairs) and the total input length is used to infer how many operations are being performed.

Key behaviors:

  • If input data does not conform to the expected length (e.g., not divisible by the tuple size), the precompile will reject it.
  • Empty inputs to variable-length operations (e.g., MSM, pairing) are disallowed.
  • For MSMs, each input group contains a point (G1 or G2) and a scalar.
  • For pairing checks, each tuple contains a G1 and a G2 point, and the operation returns true or false as a 32-byte output.

This strict ABI design avoids ambiguous interpretations and ensures that clients can safely rely on precompile results.

Gas Schedule

Gas pricing is a critical design aspect of this EIP. The goal is to reflect actual computational costs while avoiding underpricing (which can lead to DoS vectors) or overpricing (which discourages usage).

Fixed-cost operations (e.g., G1ADD, G2ADD) are priced based on empirical benchmarking.

Multi-Scalar Multiplication (MSM) Discounts

MSMs benefit from Pippenger’s algorithm, which amortizes cost over multiple operations. To encourage batching, the precompile applies a decreasing discount factor (Dk) based on the number of point-scalar pairs (k).

The total gas cost is computed using:

gasbasecost.png

Each group (G1, G2) has its own discount table, and caps are applied for (k > 128). This pricing model encourages efficient usage while preserving determinism.

Pairing Operation

Pairing operations use a linear pricing model:

gas.png

where (k) is the number of (G1, G2) pairs. The base cost reflects the setup overhead for the pairing engine.

Subgroup Checks and Security

Correctness and cryptographic security depend on ensuring that inputs reside in the correct subgroup of the elliptic curve. Small subgroup attacks can compromise security if unchecked.

The EIP enforces that:

  • All MSM and pairing operations must validate subgroup membership.
  • Field-to-curve mappings must ensure output lies on the correct curve, but not necessarily in the correct subgroup.

Implementations may use optimized techniques such as cofactor clearing or endomorphism-based checks. Failing to validate subgroup membership is grounds for rejecting the input and burning all provided gas.

Security considerations also include gas-based denial-of-service protection, achieved through bounded gas formulas and avoidance of unbounded loops in implementation.

Rationale

The design decisions in this EIP balance performance, simplicity, and compatibility:

MSM as Separate Precompile

MSM is central to BLS verification. Without a dedicated precompile, verifying an aggregate signature would require calling the multiplication precompile (k) times and the addition precompile (k - 1) times. This incurs high gas due to repeated CALL overhead. A single MSM call reduces execution time and gas, while allowing use of optimized algorithms.

No Separate MUL Precompile

Single-scalar multiplication is equivalent to MSM with (k = 1). Reusing MSM infrastructure reduces implementation complexity and avoids redundant code paths. The precompile can detect (k = 1) and optimize accordingly.

Test Properties

To ensure mathematical correctness, the EIP defines a list of algebraic properties that implementations must satisfy. These properties serve as a test suite specification for both correctness and compliance.

Group Properties

  • Commutativity: PQQP.png
  • Identity: P0P.png
  • Inverse: PP0.png
  • Doubling: PP2P.png
  • Trivial multiplication: 1PP0P0.png
  • Correctness under overflow: qxPxP.png

Pairing Properties

  • Bilinearity: eaPbQePQab.png
  • Non-degeneracy: ePQ1.png
  • Zero behavior: eP0Qe0PQ1.png
  • Negation symmetry: ePQePQ.png

These properties are foundational for cryptographic soundness and must be reflected in all client implementations.

Conclusion

EIP-2537 provides Ethereum with essential cryptographic functionality for BLS12-381, enabling modern cryptographic systems to execute efficiently and securely on-chain. It paves the way for scalable and provable consensus mechanisms, BLS-based voting systems, zkSNARK verification, and efficient signature aggregation.

The proposal defines precise interfaces, gas pricing, and correctness constraints, ensuring safety and interoperability across clients. It is a critical step toward Ethereum’s cryptographic maturity in the post-merge, proof-of-stake world.

Further Readings

Frequently asked questions

Check out most commonly asked questions, addressed based on community needs. Can't find what you are looking for?
Contact us, our friendly support helps!

What is the difference between BLS12-381 and BN254?

BLS12-381 offers 128-bit security and faster pairings, while BN254 provides only ~80-bit security, which is no longer considered sufficient for long-term cryptographic assurance.

How does EIP-2537 affect zkSNARK performance in Ethereum?

It enables efficient, low-gas verification of zkSNARK proofs using the BLS12-381 curve, making zk-based applications more scalable and secure.

Is EIP-2537 live on Ethereum mainnet?

Yes, EIP-2537 was introduced as part of the Ethereum Pectra Upgrade and is now available for use via precompiles on mainnet.