---
eip: 7619
label: EIP-7619
title: Precompile Falcon512 generic verifier
status: Draft
type: Standards Track
category: Core
created: 2023-07-03
official: https://eips.ethereum.org/EIPS/eip-7619
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7619.md
canonical: https://eips.huatuo.xyz/eip-7619/
lang: en
tldr: Proposes a precompile at 0x65 that verifies Falcon-512 post-quantum signatures cheaply, so smart contracts and smart accounts can authenticate users with quantum-resistant keys.
tags: [precompile, post-quantum, signatures, falcon, cryptography]
---

# EIP-7619: Precompile Falcon512 generic verifier

> Add precompiled contract that allows generic signature verifications using Falcon512 postquantum algorithm

**TL;DR:** Proposes a precompile at 0x65 that verifies Falcon-512 post-quantum signatures cheaply, so smart contracts and smart accounts can authenticate users with quantum-resistant keys.

## What problem does it solve?

Ethereum accounts are secured by ECDSA over secp256k1. A large enough quantum computer running Shor's algorithm could recover private keys from public keys, breaking ECDSA and similar schemes. Post-quantum signature algorithms exist, but verifying them in Solidity is very expensive: the authors report that their Solidity Falcon verifier did not scale because of gas cost, largely due to the SHAKE256 hashing Falcon relies on.

EIP-7619 proposes a native precompile for **Falcon-512**, a lattice-based scheme from the NIST post-quantum process with NIST security level I and relatively small keys and signatures. With cheap on-chain verification, a smart contract wallet (for example an [ERC-4337](/eip-4337/) account) could require a Falcon signature instead of, or in addition to, ECDSA.

## How it works

- **Address:** `0x65`.
- **Input:** concatenated bytes `[public key: 897][signature: 666][message: rest]`. The implementation is taken from the PQClean project.
- **Output:** a 32-byte word, `...01` if the signature is valid and `...00` otherwise.
- **Failure behaviour:** the call only fails on insufficient gas. Bad lengths, malformed data and invalid signatures all return `0`, not a revert.
- **Gas:** `1465 + 6 × (number of 32-byte words in the input)`, derived by benchmarking against `ecrecover`.

The precompile verifies only. Key generation and signing happen off-chain.

## Sample code

Solidity wrapper around the precompile, following the spec's example:

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

library Falcon512 {
    address constant PRECOMPILE = address(0x65);

    /// publicKey: 897 bytes, signature: 666 bytes (per EIP-7619 encoding)
    function verify(bytes memory publicKey, bytes memory signature, bytes memory message)
        internal view returns (bool)
    {
        (bool ok, bytes memory out) =
            PRECOMPILE.staticcall(abi.encodePacked(publicKey, signature, message));
        return ok && out.length == 32 && uint8(out[31]) == 1;
    }
}
```

Gas estimate for a 32-byte message:

```text
input = 897 + 666 + 32 = 1595 bytes -> ceil(1595 / 32) = 50 words
gas   = 1465 + 6 * 50 = 1765
```

## Things to know

- Status is **Draft**, and the precompile is not active on Ethereum mainnet. On chains without it, a call to `0x65` hits an empty account and returns no data, so always check the output length as above.
- Falcon signatures are variable in length up to the 666-byte maximum, while the input layout uses a fixed 666-byte slot. The spec does not say how shorter signatures are padded; clarify this against the reference implementation before relying on it.
- The address `0x65` is not final in any upgrade, and the spec notes it could be changed.
- A later proposal for Falcon support, [EIP-8052](/eip-8052/), and ML-DSA verification proposals such as [EIP-8051](/eip-8051/) cover overlapping ground. Compare them before choosing one to build on.
- A post-quantum signature only helps if the account cannot also be controlled by an ECDSA key, so this is mainly useful for smart contract accounts.


---

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