Skip to content

BLS12_MAP_FP2_TO_G2

Elliptic curve

Map an extension field element to a point in G2.

Address0x0000000000000000000000000000000000000011
NameBLS12_MAP_FP2_TO_G2
Minimum gas23,800
Input128 bytes
Output256 bytes
Available sincePrague

Input

OffsetLengthFieldDescription
0128fp2An Fp2 element, two 64-byte field elements.

Output

The resulting 256-byte G2 point.

Gas

23800

Failure behaviour

  • Reverts if the input is not exactly 128 bytes or a field element is non-canonical.

Calling it

Precompiles have no ABI and no function selector: the input is raw bytes at the exact offsets above. Call with staticcall.

// BLS12_MAP_FP2_TO_G2 at 0x11
(bool ok, bytes memory out) = address(0x11).staticcall(input);
require(ok, "BLS12_MAP_FP2_TO_G2 reverted");

Specification

  • EIP-2537: Precompile for BLS12-381 curve operations