EIP-8052 Falcon Signature Verification Precompile (Precompile for Falcon support)

No call decision · Security & privacy · EIP status Draft · created 2025-10-17

Adds three precompiles (built-in contracts) that verify quantum-safe Falcon-512 signatures within the EVM. It provides both a version that matches the NIST standard exactly and a version computed cheaply in the EVM.

Why it is needed

Ethereum's signatures currently rely on the secp256k1 elliptic curve cryptography. This scheme rests on the assumption that the elliptic curve discrete logarithm problem (ECDLP) is hard, and once quantum computers become practical, this assumption breaks down, putting on-chain assets and core infrastructure at risk. The source says preparation must happen before quantum attacks become real, because existing apps take years to adopt a new signature scheme. Falcon, a lattice-based signature standardized by NIST, has a relatively small signature size of 666 bytes (Falcon-512) and fast verification, making it well suited to blockchains where gas cost matters. However, the SHAKE256 hash used by the NIST standard has no dedicated EVM opcode, making it expensive to compute. So this proposal splits verification into a hashing step and a core computation step, allowing the hashing step to be replaced with Keccak256, which the EVM already has.

What changes

Today

After EIP-8052

Who is affected

In depth

Why verification is split into two stages

Falcon verification splits into challenge computation (hashing the message and salt with an XOF) and the core algorithm (polynomial arithmetic and the norm check). This EIP uses this structure directly as the precompile boundary. Using SHAKE256 for challenge computation yields a signature fully compatible with the NIST standard, while using Keccak-PRNG yields efficient verification in the EVM. FALCON_CORE involves no hashing at all, so both versions share it. The source explains that this separation could also extend to defining hash functions for future SNARK/STARK circuits, and that an appropriate hash choice can significantly reduce ZK proof circuit size and proving time. The names ETH_HASH_TO_POINT / HASH_TO_POINT_ETH used during the draft stage have been cleaned up to FALCON_HASH_TO_POINT_SHAKE256, FALCON_HASH_TO_POINT_KECCAKPRNG, and FALCON_CORE.

Falcon-512 parameters

Falcon can be instantiated with polynomials of degree 512 or 1024, and this EIP chooses Falcon-512, which has a security level equivalent to RSA2048. The parameters are lattice dimension n = 512, modulus q = 12289, a padded signature size of 666 bytes, a public key of 896 bytes, and a private key of 1281 bytes. Security relies on the hardness of the Short Integer Solution (SIS) problem over NTRU lattices, which is believed to be hard for both classical and quantum computers.

Hash-to-Point and the two XOFs

Challenge computation separates the 40-byte salt r from the signature, then feeds r and the message into an XOF to derive a degree-512 polynomial c whose coefficients lie in [0, q). It uses rejection sampling, drawing 2 bytes at a time and filling via mod q if the value is below 61445. There are two XOFs. SHAKE256 is the method from the NIST submission but is expensive because the Keccak_f permutation has no EVM opcode. Keccak-PRNG hashes the input with Keccak256 to produce a 32-byte state, then repeatedly calls Keccak256(state || counter) with an incrementing counter, a counter-mode PRNG that reuses the EVM's Keccak256 directly. The output c must bit-pack the coefficients in index order as 14-bit big-endian integers each, coming out to exactly 896 bytes, and any encoding that is not 896 bytes must be rejected.

FALCON_CORE core algorithm

The inputs are a 666-byte signature, an 896-byte public key (the NTT-domain value h = ntt(pubkey) computed externally), and an 896-byte challenge. It decompresses s2 (rejecting invalid encodings), transforms it with NTT, performs an elementwise product with h (hadamard_product), then applies the inverse transform (INTT) to obtain s1 = c - h * s2. After normalizing the s1 coefficients to the range [-q/2, q/2], it checks whether the sum of squares of the elements of s1 and s2 is below the acceptance bound. For Falcon-512, the acceptance bound is the floor of beta-squared, 34034726. On success it returns 1 in 32-byte format; a case where the format is correct but the signature is wrong is not treated as an error but as invalid with no output.

Required checks and gas burning

The precompile must verify, from the raw input, a 32-byte message, an 896-byte public key, and a 666-byte signature. From the parsed data, it must verify that the public key and signature vector each consist of 512 elements in the range [0, q-1], and that the salt is 40 bytes. If any of these conditions is violated, all gas supplied to the CALL or STATICCALL is burned, and the same applies if an error occurs from invalid encoding during decompression. There are three error cases: invalid input length, a field element encoded as q or greater, and signature decompression failure.

Gas cost calculation

Each of the two Hash-to-Point precompiles costs 1000 gas, and FALCON_CORE costs 2000 gas, making signature verification as a whole 3000 gas. The Hash-to-Point cost is dominated by hash function calls, corresponding to an average of 35 hash calls. The FALCON_CORE cost is dominated by 2 NTT operations and 1 inverse NTT operation, but since the public-key-side NTT can be precomputed, only 1 NTT and 1 inverse NTT are actually performed. The costs are interpolated roughly from SUPERCOP signature benchmark results.

EIP-7932 transaction integration

Defines two algorithm types for use within EIP-7932's AlgorithmicTransaction container. ALG_TYPE = 0xFA is Falcon-512 using SHAKE256 Hash-to-Point, and 0xFB is the Keccak-PRNG version. The signature_info container is a 1-byte version tag plus a 666-byte signature, giving MAX_SIZE = 667 bytes, and does not include the public key hash. If the signature comes out shorter, it must be left-padded to 666 bytes. GAS_PENALTY recommends roughly 3000 gas pending benchmarking. The signer address is derived from the recovered public key; the body describes this as the last 20 bytes of keccak256(pubkey), while the description on EIP-7932's sig-recover precompile side states it as keccak(ALG_TYPE || pubkey)[12:].

Open questions and current status

The precompile address has been left blank, to be decided at the ACD (core developer call). It should be chosen within the range managed by EIP-1352, while avoiding the 0x0100 to 0x01FF range that EIP-7587 reserves for RIPs. The path for deriving a private key from a seed is also undecided. Hash-to-Point must follow the specified XOF exactly byte for byte, with domain separation and padding being normative. Reference implementations include the NIST implementation and ZKNOX's EVM-friendly version, ETHFALCON, and adding falcon-512 as a reference in geth remains a TODO. This EIP was created on October 17, 2025 and is in Draft status, so its contents may still change. There is no record of a call where fork inclusion was decided.

Original EIP · ← EIPs