Skip to main content
This page is a placeholder. All examples on this page are currently AI-generated and are not correct. This documentation will be completed in the future with accurate, tested examples.

Overview

Address: 0x000000000000000000000000000000000000000b Introduced: Prague (EIP-2537) EIP: EIP-2537 The BLS12-381 G1 Add precompile performs elliptic curve point addition on the BLS12-381 curve’s G1 group. It takes two G1 points and returns their sum. This is essential for BLS signature verification, consensus protocols, and advanced cryptographic applications. EIP-2537 introduces BLS12-381 curve operations to Ethereum, enabling efficient BLS signatures used in Ethereum 2.0 consensus and other cryptographic protocols requiring pairing-friendly curves. The BLS12-381 curve is a pairing-friendly elliptic curve designed for zkSNARKs and signature aggregation, offering 128-bit security with efficient pairing operations.

Gas Cost

Fixed: 500 gas

Input Format

Total input length: 256 bytes (exactly) Points must satisfy the curve equation: y^2 = x^3 + 4 over the BLS12-381 base field (Fp). Point at infinity is represented as all zeros (128 bytes of zeros for each point).

Output Format

Total output length: 128 bytes

TypeScript Example

Zig Example

Error Conditions

  • Out of gas: gasLimit < 500
  • Invalid input length: input.len != 256
  • Invalid point: Point coordinates don’t satisfy curve equation y² = x³ + 4
  • Point not in subgroup: Point not in correct subgroup (fails validation)
  • Coordinate out of range: x or y >= field modulus
Invalid inputs cause precompile to return error.InvalidPoint.

Use Cases

  • BLS signature verification: Aggregating and verifying BLS signatures
  • Ethereum 2.0 consensus: Validator signature aggregation
  • zkSNARKs on BLS12-381: Proof systems using BLS12-381 curve
  • Distributed key generation: Threshold cryptography protocols
  • Verifiable delay functions: VDFs using pairings
  • Privacy protocols: zk-Rollups and privacy-preserving systems

Implementation Details

  • Zig: Uses blst library (C) via crypto module for G1 operations
  • TypeScript: Uses @noble/curves bls12-381 implementation
  • Curve: BLS12-381 with embedding degree 12
  • Field modulus (p): 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab
  • Group order (r): 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001

BLS12-381 G1 Parameters

  • Curve equation: y² = x³ + 4
  • Base field: Fp (381-bit prime)
  • Coordinate size: 48 bytes (padded to 64 bytes in precompile encoding)
  • Generator G1 x: 0x17f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb
  • Generator G1 y: 0x08b3f481e3aaa0f1a09e30ed741d8ae4fcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e1
  • Point at infinity: All zeros (128 bytes)

Point Addition Rules

  • P + O = P (identity element)
  • O + P = P (identity is commutative)
  • P + P = 2P (point doubling)
  • P + (-P) = O (inverse gives infinity)
  • General addition uses elliptic curve group law

Security Considerations

  • All coordinates must be validated to be in field and on curve
  • Points must be checked for subgroup membership
  • Implementation uses constant-time operations where possible
  • Uses battle-tested blst library for security-critical operations

Performance Notes

  • Fixed gas cost makes G1 addition predictable
  • More efficient than generic elliptic curve operations
  • Hardware acceleration available on some platforms via blst
  • Point validation adds overhead but is necessary for security