Skip to content
NOUMENResearch
Network
Engineering
, home page

IntelligenceAlgorithmspairing-bn254

Pairings on BN254 (alt_bn128)

Bilinear pairings on the Barreto-Naehrig curve BN254, which Ethereum exposes as the alt_bn128 precompiles from EIP-196 and EIP-197. Most on-chain Groth16 and PLONK verifiers on Ethereum use it.

In short

What a quantum computer changes.

Quantum effect
Broken by Shor's algorithm
Family
Classical public keyRests on discrete logarithm in pairing groups.
What it means
Shor's algorithm, run on a large, fault-tolerant quantum computer, factors large numbers and solves discrete logarithms, including those on elliptic curves, far faster than any known classical method. The security of this algorithm rests on discrete logarithm in pairing groups, which is one of those problems. Anyone with such a machine could work out a private key from the matching public key. Signatures could then be forged, and data protected by a key exchange built on this algorithm could be decrypted, including traffic recorded now and kept for later. Longer keys do not fix this. The usual answer is to plan a move to a post-quantum or hybrid scheme.

This describes the family, not any project that uses it.

12 in the catalogue

Packages that provide it

Packages that provide Pairings on BN254 (alt_bn128)
PackageProvides
@noble/curvesnpmPure TypeScript elliptic-curve library: ECDSA on secp256k1 and the NIST P curves, BIP340 Schnorr, Ed25519 and Ed448, X25519 and X448, ECDH, BLS signatures and pairings on BLS12-381 and BN254, FROST threshold signatures and the Poseidon hash.
ethereum-cryptographynpmCollection of the primitives Ethereum uses: secp256k1, BN254 and BLS12-381 curves, Keccak, SHA-2, RIPEMD-160, BLAKE2b, PBKDF2, scrypt, AES, BIP-32, BIP-39 and random bytes.
snarkjsnpmzkSNARK toolkit for Groth16, PLONK and FFLONK proving and verification over BN254 or BLS12-381, including powers of tau trusted setup ceremonies.
ffjavascriptnpmFinite field and elliptic curve library used by snarkjs, with BN254 and BLS12-381 curve and pairing builders.
@aztec/bb.jsnpmWebAssembly and native build of the Barretenberg prover with UltraHonk proving over BN254, Pedersen, Poseidon2 and BLAKE2s hashing, ECDSA on secp256k1 and P-256, Grumpkin Schnorr signatures and AES.
mcl-wasmnpmWebAssembly build of the mcl pairing library, with BN254, BLS12-381 and other pairing curves and Ethereum consensus serialization.
@aptos-labs/ts-sdknpmAptos TypeScript SDK with Ed25519, secp256k1 and secp256r1 WebAuthn accounts, keyless accounts verified with Groth16 proofs over BN254 and Poseidon, and AES-GCM payload encryption.
ark-bn254crates.ioThe BN254 pairing-friendly curve (fields, G1, G2 and pairing) for the arkworks ecosystem.
substrate-bncrates.ioPure Rust pairing arithmetic on the BN254 (alt_bn128) Barreto-Naehrig curve, a Parity fork of the Zcash bn crate.
halo2curvescrates.ioCurves for halo2 provers: BN256 (BN254) with pairing, Grumpkin, Pasta, secp256k1, secp256r1 and others, implementing the zkcrypto ff, group and pairing traits.
revm-precompilecrates.ioEVM precompiled contracts for revm: ecrecover (secp256k1), P-256 verification (RIP-7212), SHA-256, RIPEMD-160, the BLAKE2 compression function, modexp, BN254 operations and pairing, BLS12-381 operations (EIP-2537) and KZG point evaluation (EIP-4844).
lambdaworks-mathcrates.ioLambdaworks math for proof systems: finite fields, elliptic curves including BLS12-381 and BN254 with pairings, polynomials, FFT and multi-scalar multiplication.

2 listed

Sources

Full record

Identifier
pairing-bn254
Kind
pairing
Family
Classical public key
Rests on
discrete logarithm in pairing groups
Quantum effect
Broken by Shor's algorithm

Standards

No standard is listed for this algorithm.