{"eip":7619,"title":"Precompile Falcon512 generic verifier","description":"Add precompiled contract that allows generic signature verifications using Falcon512 postquantum algorithm","authors":["Erick Pacheco Pedraza (@eum602)","Marcos Allende \u003cmallende@lacnet.com\u003e","Diego Lopez León \u003cdieguitoll@gmail.com\u003e"],"status":"Draft","type":"Standards Track","category":"Core","created":"2023-07-03","discussionsTo":"https://ethereum-magicians.org/t/falcon-512-precompiled-generic-signature-verifier/18569","repo":"EIPs","label":"EIP-7619","officialUrl":"https://eips.ethereum.org/EIPS/eip-7619","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7619.md","url":"https://eips.huatuo.xyz/eip-7619/","tldr":{"en":"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.","ja":"Falcon-512 のポスト量子署名を低コストで検証するプリコンパイルを 0x65 に追加する提案。スマートコントラクトやスマートアカウントが、量子耐性のある鍵でユーザーを認証できるようにする。","ko":"Falcon-512 양자 내성 서명을 저렴하게 검증하는 프리컴파일을 0x65에 추가하자는 제안. 스마트 컨트랙트와 스마트 계정이 양자 내성 키로 사용자를 인증할 수 있게 한다.","zh":"提议在 0x65 处添加预编译，以低成本验证 Falcon-512 后量子签名，使智能合约和智能账户能够使用抗量子密钥对用户进行认证。"},"tags":["precompile","post-quantum","signatures","falcon","cryptography"],"explainers":{"en":{"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"],"related":[8052,8051,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7619/","markdown":"## What problem does it solve?\n\nEthereum 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.\n\nEIP-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.\n\n## How it works\n\n- **Address:** `0x65`.\n- **Input:** concatenated bytes `[public key: 897][signature: 666][message: rest]`. The implementation is taken from the PQClean project.\n- **Output:** a 32-byte word, `...01` if the signature is valid and `...00` otherwise.\n- **Failure behaviour:** the call only fails on insufficient gas. Bad lengths, malformed data and invalid signatures all return `0`, not a revert.\n- **Gas:** `1465 + 6 × (number of 32-byte words in the input)`, derived by benchmarking against `ecrecover`.\n\nThe precompile verifies only. Key generation and signing happen off-chain.\n\n## Sample code\n\nSolidity wrapper around the precompile, following the spec's example:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nlibrary Falcon512 {\n    address constant PRECOMPILE = address(0x65);\n\n    /// publicKey: 897 bytes, signature: 666 bytes (per EIP-7619 encoding)\n    function verify(bytes memory publicKey, bytes memory signature, bytes memory message)\n        internal view returns (bool)\n    {\n        (bool ok, bytes memory out) =\n            PRECOMPILE.staticcall(abi.encodePacked(publicKey, signature, message));\n        return ok \u0026\u0026 out.length == 32 \u0026\u0026 uint8(out[31]) == 1;\n    }\n}\n```\n\nGas estimate for a 32-byte message:\n\n```text\ninput = 897 + 666 + 32 = 1595 bytes -\u003e ceil(1595 / 32) = 50 words\ngas   = 1465 + 6 * 50 = 1765\n```\n\n## Things to know\n\n- 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.\n- 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.\n- The address `0x65` is not final in any upgrade, and the spec notes it could be changed.\n- 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.\n- 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.\n"},"ja":{"lang":"ja","tldr":"Falcon-512 のポスト量子署名を低コストで検証するプリコンパイルを 0x65 に追加する提案。スマートコントラクトやスマートアカウントが、量子耐性のある鍵でユーザーを認証できるようにする。","tags":["precompile","post-quantum","signatures","falcon","cryptography"],"related":[8052,8051,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7619/","markdown":"## 何を解決するのか\n\nEthereum のアカウントは secp256k1 上の ECDSA で保護されています。十分に大きな量子コンピューターが Shor のアルゴリズムを実行すれば、公開鍵から秘密鍵を復元でき、ECDSA や同様の方式が破られる可能性があります。ポスト量子署名アルゴリズムは存在しますが、Solidity での検証は非常に高コストです。著者らは、自分たちの Solidity による Falcon 検証器は、主に Falcon が依存する SHAKE256 ハッシュのせいでガスコストがかさみ、スケールしなかったと報告しています。\n\nEIP-7619 は、**Falcon-512** のネイティブプリコンパイルを提案します。Falcon-512 は NIST のポスト量子プロセスに由来する格子ベースの方式で、NIST セキュリティレベル I を満たし、鍵と署名が比較的小さいのが特徴です。オンチェーン検証が安価になれば、スマートコントラクトウォレット（たとえば [ERC-4337](/eip-4337/) アカウント）は、ECDSA の代わりに、または ECDSA に加えて、Falcon 署名を要求できるようになります。\n\n## 仕組み\n\n- **アドレス：** `0x65`\n- **入力：** 連結したバイト列 `[public key: 897][signature: 666][message: rest]`。実装は PQClean プロジェクトのものを採用しています。\n- **出力：** 32 バイトのワード。署名が有効なら `...01`、そうでなければ `...00`。\n- **失敗時の挙動：** 呼び出しが失敗するのはガス不足のときだけです。長さの不正、不正な形式のデータ、無効な署名はいずれも revert ではなく `0` を返します。\n- **ガス：** `1465 + 6 × (入力に含まれる 32 バイトワードの数)`。`ecrecover` とのベンチマークから導出されています。\n\nこのプリコンパイルは検証のみを行います。鍵の生成と署名はオフチェーンで行います。\n\n## サンプルコード\n\n仕様の例に沿った、プリコンパイルを包む Solidity ラッパー:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nlibrary Falcon512 {\n    address constant PRECOMPILE = address(0x65);\n\n    /// publicKey: 897 bytes, signature: 666 bytes (per EIP-7619 encoding)\n    function verify(bytes memory publicKey, bytes memory signature, bytes memory message)\n        internal view returns (bool)\n    {\n        (bool ok, bytes memory out) =\n            PRECOMPILE.staticcall(abi.encodePacked(publicKey, signature, message));\n        return ok \u0026\u0026 out.length == 32 \u0026\u0026 uint8(out[31]) == 1;\n    }\n}\n```\n\n32 バイトのメッセージに対するガスの見積もり:\n\n```text\ninput = 897 + 666 + 32 = 1595 bytes -\u003e ceil(1595 / 32) = 50 words\ngas   = 1465 + 6 * 50 = 1765\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** で、このプリコンパイルは Ethereum メインネットでは有効ではありません。これを持たないチェーンでは、`0x65` への呼び出しは空のアカウントに当たり、データを返さないため、上記のように必ず出力の長さを確認してください。\n- Falcon 署名は最大 666 バイトまでの可変長ですが、入力のレイアウトは固定の 666 バイトのスロットを使います。仕様は、短い署名をどうパディングするかを述べていません。頼る前に、リファレンス実装で確認してください。\n- アドレス `0x65` はどのアップグレードでも確定しておらず、仕様は変更される可能性があると述べています。\n- Falcon サポートの後続の提案である [EIP-8052](/eip-8052/) や、[EIP-8051](/eip-8051/) のような ML-DSA 検証の提案は、重なる領域を扱っています。どれを基盤にするか選ぶ前に比較してください。\n- ポスト量子署名が役立つのは、アカウントが ECDSA 鍵でも制御できてしまわない場合だけなので、主にスマートコントラクトアカウントで有用です。\n"},"ko":{"lang":"ko","tldr":"Falcon-512 양자 내성 서명을 저렴하게 검증하는 프리컴파일을 0x65에 추가하자는 제안. 스마트 컨트랙트와 스마트 계정이 양자 내성 키로 사용자를 인증할 수 있게 한다.","tags":["precompile","post-quantum","signatures","falcon","cryptography"],"related":[8052,8051,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7619/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움 계정은 secp256k1 위의 ECDSA로 보호됩니다. 충분히 큰 양자 컴퓨터가 Shor 알고리즘을 실행하면 공개키에서 개인키를 복구해 ECDSA와 유사한 방식을 깰 수 있습니다. 양자 내성 서명 알고리즘은 존재하지만 Solidity에서 검증하기에는 매우 비쌉니다. 저자들은 자신들의 Solidity Falcon 검증기가 주로 Falcon이 의존하는 SHAKE256 해싱 때문에 가스 비용이 커서 확장되지 않았다고 보고합니다.\n\nEIP-7619는 **Falcon-512** 의 네이티브 프리컴파일을 제안합니다. Falcon-512는 NIST 양자 내성 암호 표준화 과정의 격자 기반 방식으로, NIST 보안 수준 I에 해당하며 키와 서명이 비교적 작습니다. 온체인 검증이 저렴해지면 스마트 컨트랙트 지갑(예: [ERC-4337](/eip-4337/) 계정)이 ECDSA 대신 또는 ECDSA와 함께 Falcon 서명을 요구할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n- **주소:** `0x65`.\n- **입력:** 이어 붙인 바이트 `[public key: 897][signature: 666][message: rest]`. 구현은 PQClean 프로젝트에서 가져왔습니다.\n- **출력:** 32바이트 워드. 서명이 유효하면 `...01`, 아니면 `...00`.\n- **실패 동작:** 호출은 가스가 부족할 때만 실패합니다. 잘못된 길이, 형식이 잘못된 데이터, 유효하지 않은 서명은 모두 revert가 아니라 `0`을 반환합니다.\n- **가스:** `1465 + 6 × (입력의 32바이트 워드 수)`. `ecrecover`와의 벤치마킹으로 도출했습니다.\n\n이 프리컴파일은 검증만 합니다. 키 생성과 서명은 오프체인에서 이루어집니다.\n\n## 샘플 코드\n\n사양의 예제를 따라 프리컴파일을 감싼 Solidity 래퍼:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nlibrary Falcon512 {\n    address constant PRECOMPILE = address(0x65);\n\n    /// publicKey: 897 bytes, signature: 666 bytes (per EIP-7619 encoding)\n    function verify(bytes memory publicKey, bytes memory signature, bytes memory message)\n        internal view returns (bool)\n    {\n        (bool ok, bytes memory out) =\n            PRECOMPILE.staticcall(abi.encodePacked(publicKey, signature, message));\n        return ok \u0026\u0026 out.length == 32 \u0026\u0026 uint8(out[31]) == 1;\n    }\n}\n```\n\n32바이트 메시지의 가스 추정:\n\n```text\ninput = 897 + 666 + 32 = 1595 bytes -\u003e ceil(1595 / 32) = 50 words\ngas   = 1465 + 6 * 50 = 1765\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**이며, 이 프리컴파일은 이더리움 메인넷에서 활성화되어 있지 않습니다. 이것이 없는 체인에서는 `0x65`를 호출하면 빈 계정에 닿아 데이터가 반환되지 않으므로, 위와 같이 항상 출력 길이를 확인하세요.\n- Falcon 서명은 최대 666바이트까지 길이가 가변인데 입력 레이아웃은 고정된 666바이트 슬롯을 사용합니다. 사양은 더 짧은 서명을 어떻게 패딩하는지 말하지 않습니다. 의존하기 전에 레퍼런스 구현으로 확인하세요.\n- 주소 `0x65`는 어떤 업그레이드에서도 확정되지 않았으며, 사양은 변경될 수 있다고 밝힙니다.\n- Falcon 지원에 대한 이후 제안인 [EIP-8052](/eip-8052/)와 [EIP-8051](/eip-8051/) 같은 ML-DSA 검증 제안은 겹치는 영역을 다룹니다. 무엇을 기반으로 만들지 고르기 전에 비교해 보세요.\n- 양자 내성 서명은 계정이 ECDSA 키로도 제어될 수 없을 때에만 도움이 되므로, 주로 스마트 컨트랙트 계정에 유용합니다.\n"},"zh":{"lang":"zh","tldr":"提议在 0x65 处添加预编译，以低成本验证 Falcon-512 后量子签名，使智能合约和智能账户能够使用抗量子密钥对用户进行认证。","tags":["precompile","post-quantum","signatures","falcon","cryptography"],"related":[8052,8051,4337],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7619/","markdown":"## 它解决什么问题？\n\n以太坊账户由 secp256k1 上的 ECDSA 保护。运行 Shor 算法的足够大的量子计算机可以从公钥恢复私钥，从而破解 ECDSA 及类似方案。后量子签名算法已经存在，但在 Solidity 中验证它们非常昂贵：作者报告称，他们用 Solidity 实现的 Falcon 验证器因 gas 成本而无法扩展，主要原因在于 Falcon 所依赖的 SHAKE256 哈希。\n\nEIP-7619 提议为 **Falcon-512** 提供原生预编译。Falcon-512 是 NIST 后量子标准化流程中的一种基于格的方案，达到 NIST 安全等级 I，密钥和签名相对较小。有了低成本的链上验证，智能合约钱包（例如 [ERC-4337](/eip-4337/) 账户）就可以要求 Falcon 签名，以取代 ECDSA 或与 ECDSA 并用。\n\n## 它如何运作\n\n- **地址：** `0x65`。\n- **输入：** 拼接的字节 `[public key: 897][signature: 666][message: rest]`。实现取自 PQClean 项目。\n- **输出：** 一个 32 字节的字，签名有效时为 `...01`，否则为 `...00`。\n- **失败行为：** 调用只会因 gas 不足而失败。长度错误、数据格式错误和无效签名都返回 `0`，而不是 revert。\n- **Gas：** `1465 + 6 × (输入中 32 字节字的数量)`，通过与 `ecrecover` 对比基准测试得出。\n\n该预编译只做验证。密钥生成和签名在链下进行。\n\n## 示例代码\n\n按规范示例编写的、包装该预编译的 Solidity 封装：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nlibrary Falcon512 {\n    address constant PRECOMPILE = address(0x65);\n\n    /// publicKey: 897 bytes, signature: 666 bytes (per EIP-7619 encoding)\n    function verify(bytes memory publicKey, bytes memory signature, bytes memory message)\n        internal view returns (bool)\n    {\n        (bool ok, bytes memory out) =\n            PRECOMPILE.staticcall(abi.encodePacked(publicKey, signature, message));\n        return ok \u0026\u0026 out.length == 32 \u0026\u0026 uint8(out[31]) == 1;\n    }\n}\n```\n\n32 字节消息的 gas 估算：\n\n```text\ninput = 897 + 666 + 32 = 1595 bytes -\u003e ceil(1595 / 32) = 50 words\ngas   = 1465 + 6 * 50 = 1765\n```\n\n## 需要注意\n\n- 状态为 **Draft**，该预编译尚未在以太坊主网激活。在没有它的链上，对 `0x65` 的调用会碰到空账户并且不返回数据，因此务必像上面那样检查输出长度。\n- Falcon 签名长度可变，最长 666 字节，而输入布局使用固定的 666 字节槽位。规范没有说明较短的签名如何填充；依赖之前请对照参考实现澄清这一点。\n- 地址 `0x65` 在任何升级中都尚未最终确定，规范指出它可能会被更改。\n- 后续的 Falcon 支持提案 [EIP-8052](/eip-8052/)，以及 [EIP-8051](/eip-8051/) 等 ML-DSA 验证提案，涉及重叠的领域。选择基于哪一个构建之前请先比较。\n- 后量子签名只有在账户不能同时被 ECDSA 密钥控制时才有帮助，所以它主要对智能合约账户有用。\n"}}}
