---
eip: 1895
label: EIP-1895
title: Support for an Elliptic Curve Cycle
status: Stagnant
type: Standards Track
category: Core
created: 2018-03-31
official: https://eips.ethereum.org/EIPS/eip-1895
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1895.md
canonical: https://eips.huatuo.xyz/eip-1895/
lang: en
tldr: Proposed EVM precompiles for addition, multiplication and pairings on the MNT4 curve, part of a pairing-friendly curve cycle that would let SNARKs verify other SNARKs recursively.
tags: [precompile, cryptography, zk-snark, elliptic-curves, core]
---

# EIP-1895: Support for an Elliptic Curve Cycle

> The EVM currently supports elliptic curves operations for curve alt-bn128 thanks to precompiles ecadd and ecmul and ecpairing. The classes MNT4 and 6 contain cycles of curves. Those cycles enable doing operations on one curve inside a SNARK on the other curve (and reversely).

**TL;DR:** Proposed EVM precompiles for addition, multiplication and pairings on the MNT4 curve, part of a pairing-friendly curve cycle that would let SNARKs verify other SNARKs recursively.

## What problem does it solve?

The EVM's elliptic-curve precompiles ([EIP-196](/eip-196/) add/mul and [EIP-197](/eip-197/) pairing) only support the alt_bn128 (BN254) curve. That is enough to verify a single zk-SNARK, but verifying thousands of proofs on-chain would be far too expensive.

**Recursive SNARKs** solve this by proving "I verified these proofs" inside another proof, so many proofs collapse into one. Doing that efficiently needs a *cycle* of pairing-friendly curves, where each curve's group order matches the other's field size. BN254 has no such partner. The MNT4 and MNT6 families are the known pairing-friendly curves that form cycles, so EIP-1895 proposes adding MNT4 support to the EVM.

## How it works

- Three new precompiles: `ecadd`, `ecmul` and `ecpairing` on **MNT4**, mirroring the existing BN254 set.
- The spec lists the curve parameters: prime field `p` and group order `q` of about 298 bits, the curve `Y^2 = X^3 + aX + b` with `a = 2`, generator points for G1 and G2 (G2 over a quadratic extension field).
- Points would use a compressed encoding: the X coordinate plus a byte `s` marking the point at infinity (`0x00`) or whether Y is even (`0x02`) or odd (`0x03`).
- Gas costs were left as "to be estimated" pending benchmarks.

## Sample code

How a contract would call such a precompile. The address and input layout below are placeholders, because the spec never assigned them:

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract Mnt4Caller {
    // Placeholder only: EIP-1895 did not assign a precompile address.
    address constant MNT4_ADD = address(0);

    function add(bytes calldata p1, bytes calldata p2) external view returns (bytes memory out) {
        (bool ok, bytes memory ret) = MNT4_ADD.staticcall(abi.encodePacked(p1, p2));
        require(ok, "precompile failed");
        return ret;
    }
}
```

## Things to know

- Status: **Stagnant**. The precompiles were never added to Ethereum.
- The spec is incomplete: precompile addresses, input encoding details and gas prices are missing, and part of the G2 field definition is marked "to be completed".
- The author notes the proposed MNT4 curve offers only about 80 bits of security, and that field elements exceed 256 bits.
- A generic approach covering many curves was proposed in [EIP-1962](/eip-1962/). The curve precompiles Ethereum did eventually adopt were for BLS12-381 via [EIP-2537](/eip-2537/).


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-1895
