EIP-8052 · Draft · Core · 2025-10-17
EIP-8052: Precompile for Falcon support
A draft proposal for precompiles that verify Falcon-512 post-quantum signatures cheaply in the EVM, in both a NIST-compliant (SHAKE256) mode and a cheaper EVM-friendly (Keccak) mode.
What problem does it solve?
Ethereum accounts and most contracts rely on elliptic-curve signatures (secp256k1, secp256r1). A sufficiently large quantum computer could break them. Migrating wallets and applications takes years, so the authors argue post-quantum tools should be available well before such machines exist.
Falcon is a lattice-based signature scheme selected by NIST. Falcon-512 has relatively small signatures (666 bytes) and fast verification, but implementing it in Solidity is costly. EIP-8052 proposes precompiles so smart accounts and rollups can verify Falcon signatures for a few thousand gas.
How it works
Verification is split into two steps, each its own precompile:
- Hash-to-point: turn the 32-byte message hash and the 40-byte salt from the signature into a challenge polynomial
c(512 coefficients modq = 12289, packed as 14-bit values into 896 bytes). Two variants:FALCON_HASH_TO_POINT_SHAKE256: uses SHAKE256, as in the NIST specification.FALCON_HASH_TO_POINT_KECCAKPRNG: uses a counter-mode PRNG built on Keccak-256, which is cheap to recompute in the EVM and friendlier for ZK circuits, but not NIST-standard.
FALCON_CORE: given the signature, the public key (in NTT form) andc, computes1 = c − h·s2and accept if the squared norm of(s1, s2)is below 34,034,726.
| Precompile | Input | Output | Gas |
|---|---|---|---|
| Hash-to-point (either) | 32-byte hash ‖ 666-byte signature | 896-byte challenge | 1,000 |
FALCON_CORE |
666-byte sig ‖ 896-byte pubkey ‖ 896-byte challenge | 1 as 32 bytes if valid, empty otherwise |
2,000 |
Malformed inputs (wrong lengths, coefficients ≥ q, bad compression) burn all gas supplied to the call. A well-formed but wrong signature simply returns no data.
The EIP also defines EIP-7932 algorithm types so Falcon could sign transactions: 0xFA (SHAKE256) and 0xFB (Keccak-PRNG).
Sample code
Calling the two steps from a contract. The precompile addresses are not yet assigned, so they are placeholders here:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
library Falcon512 {
// TBD by All Core Devs - placeholders only.
address constant HASH_TO_POINT_KECCAK = address(0);
address constant FALCON_CORE = address(0);
function verify(bytes32 msgHash, bytes memory sig /*666*/, bytes memory pkNtt /*896*/)
internal view returns (bool)
{
(bool ok1, bytes memory c) = HASH_TO_POINT_KECCAK.staticcall(abi.encodePacked(msgHash, sig));
if (!ok1 || c.length != 896) return false;
(bool ok2, bytes memory out) = FALCON_CORE.staticcall(abi.encodePacked(sig, pkNtt, c));
return ok2 && out.length == 32 && abi.decode(out, (uint256)) == 1;
}
}
Things to know
- Status: Draft. Precompile addresses, the exact Keccak-PRNG byte layout and test vectors are still to be defined; parts of the spec are marked TBD/TODO, and some EIP-7932 pseudocode is internally inconsistent (e.g. stated input lengths). Treat all details as provisional.
- Choose the hash-to-point variant deliberately: the SHAKE256 path interoperates with standard Falcon libraries; the Keccak path does not.
- The public key passed to
FALCON_COREmust already be in NTT form, computed off-chain or once at setup. - Related post-quantum and crypto precompile proposals include EIP-8051 (ML-DSA) and EIP-7885 (NTT). For today's passkeys, see EIP-7951 (secp256r1).
- Addresses are to be picked from the EIP-1352 range, avoiding
0x0100–0x01FF, which is reserved for rollup (RIP) precompiles.