Module bn128

Source
Expand description

BN128 precompiles added in EIP-1962

Modules§

add
Bn128 add precompile
mul
Bn128 mul precompile
pair
Bn128 pair precompile

Constants§

ADD_INPUT_LEN
Input length for the add operation. ADD takes two uncompressed G1 points (64 bytes each).
MUL_INPUT_LEN
Input length for the multiplication operation. MUL takes an uncompressed G1 point (64 bytes) and scalar (32 bytes).
PAIR_ELEMENT_LEN
Pair element length. PAIR elements are composed of an uncompressed G1 point (64 bytes) and an uncompressed G2 point (128 bytes).

Functions§

run_add
Run the Bn128 add precompile
run_mul
Run the Bn128 mul precompile
run_pair
Run the Bn128 pair precompile