Skip to content

Commit a1285ed

Browse files
committed
Fix EIP-8052 markdown validation errors
- Remove document title (already in preamble) - Remove all section and subsection numbering - Remove external link to falcon-sign.info - Comply with EIP markdown requirements
1 parent 1e5adc6 commit a1285ed

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

EIPS/eip-8052.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,22 @@ status: Draft
88
type: Standards Track
99
category: Core
1010
created: 2025-10-17
11-
1211
---
1312

14-
# Falcon EIP
15-
16-
## 1. Abstract
13+
## Abstract
1714
This proposal creates a precompiled contract that performs signature verifications using the Falcon-512 signature scheme by given parameters of the message hash, signature, and public key. This allows any EVM chain -- principally Ethereum roll-ups -- to integrate this precompiled contract easily.
1815
The signature scheme can be instantiated in two version:
1916
* Falcon, the standard signature scheme, fully compliant with the algorithm recommended by the NIST,
2017
* An EVM-friendly version where the hash function is efficiently computed in the Ethereum Virtual Machine.
2118

2219
Three precompiled contracts are specified (formerly called `ETH_HASH_TO_POINT` / `HASH_TO_POINT_ETH` in drafts):
2320

24-
* `FALCON_HASH_TO_POINT_SHAKE256`that implements the NIST-compliant HashToPoint as described in [Algorithm 3](https://falcon-sign.info/falcon.pdf) of Falcon.
21+
* `FALCON_HASH_TO_POINT_SHAKE256` — NIST-compliant Hash-to-Point using SHAKE256.
2522
* `FALCON_HASH_TO_POINT_KECCAKPRNG` — EVM-friendly Hash-to-Point using a Keccak-based XOF/PRNG.
2623
* `FALCON_CORE` — the core algorithm of Falcon, that verifies the signature from the obtained (HashToPoint) challenge.
2724

2825

29-
## 2. Motivation
26+
## Motivation
3027

3128
Quantum computers pose a long-term risk to classical cryptographic algorithms. In particular, signature algorithms based on the hardness of the Elliptic Curve Discrete Logarithm Problem (ECDLP) such as secp256k1, are widely used in Ethereum and threaten by quantum algorithms. This exposes potentially on-chain assets and critical infrastructure to quantum adversaries.
3229

@@ -54,7 +51,7 @@ In the context of the Ethereum Virtual Machine, a precompile for Keccak256 hash
5451

5552
Using this separation, two important features are provided: one version being fully compliant with the NIST specification, the other deviating from the standard in order to reduce the gas cost, and opening up to possible computations of Falcon signature ZK proofs.
5653

57-
## 3. Specification
54+
## Specification
5855

5956
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
6057

@@ -120,7 +117,7 @@ def ethfalcon512_verify(message: bytes, signature: Tuple[bytes, bytes], pubkey:
120117
The functions `falcon512_verify` and `ethfalcon512_verify` call the precompiles specified in the next sections: `FALCON_HASH_TO_POINT_SHAKE256`, `FALCON_HASH_TO_POINT_KECCAKPRNG` and `FALCON_CORE`.
121118

122119

123-
### 3.1. Hash-to-Point challenge (normative)
120+
### Hash-to-Point challenge (normative)
124121

125122
1. **Parse Input Data:** Check the byte sizes and then extract the message and the signature. The parsed signature is a tuple of values $(r, s_2)$. $r$ is denoted as the salt and contains bytes, and $s_2$ is denoted as the signature vector, a vector of elements mod $q$.
126123
2. **Verify Well-formedness:** Verify that the signature contains a 40-byte salt $r$.
@@ -248,7 +245,7 @@ def FALCON_HASH_TO_POINT_KECCAKPRNG(message: bytes32, signature: Tuple[bytes, by
248245
* Order: coefficients are serialized in index order `c[0], c[1], …, c[511]`.
249246
* Bit-packing: each coefficient is a 14-bit **big-endian** unsigned integer. Concatenate all 512 encodings into a bitstring, then left-pad the final byte with zero bits to reach exactly **897 bytes**. Consumers MUST reject encodings that are not exactly 897 bytes.
250247

251-
### 3.2 Core algorithm
248+
### Core algorithm
252249

253250
1. **Parse Input Data:** Check the byte sizes and then extract the public key, the Hash To Point Challenge and the signature.
254251
- The parsed public key $h$, interpreted as a vector of elements mod $q$,
@@ -319,7 +316,7 @@ def FALCON_CORE(signature: Tuple[bytes, bytes], h: bytes, challenge: bytes) -> b
319316
return total_norm < ACCEPTANCE_BOUND # Falcon-512: β² = 34,034,726
320317
```
321318

322-
### 3.3. Required Checks in Falcon Verification
319+
### Required Checks in Falcon Verification
323320
The following requirements MUST be checked by the precompiled contract to verify signature components are valid:
324321

325322
**Raw Input data**
@@ -337,20 +334,20 @@ if one of the above condition is not met then all the gas supplied along with a
337334
it shall also be burned if an error happens during decompression (incorrect encodings).
338335

339336

340-
## 4. Precompiled Contract Specification
337+
## Precompiled Contract Specification
341338
The precompiled contracts are proposed with the following input and outputs, which are big-endian values:
342339

343-
### 4.1. `FALCON_HASH_TO_POINT_SHAKE256`
340+
### `FALCON_HASH_TO_POINT_SHAKE256`
344341
**Input**
345342
* 32 bytes: message hash `m`
346343
* 666 bytes: Falcon-512 compressed signature `(r || s2_compressed)`
347344
**Output**
348345
* 897 bytes: packed challenge polynomial `c` (see §3.1 encoding)
349346

350-
### 4.2. `FALCON_HASH_TO_POINT_KECCAKPRNG`
347+
### `FALCON_HASH_TO_POINT_KECCAKPRNG`
351348
Same I/O as §4.1, but the XOF is Keccak-PRNG. The construction is normative and MUST define: state initialization, domain-separation (if any), counter width and endianness, and block concatenation order.
352349

353-
### 4.3. `FALCON_CORE`
350+
### `FALCON_CORE`
354351

355352
- **Input data**
356353
- 666 bytes for Falcon-512 compressed signature
@@ -366,15 +363,15 @@ Same I/O as §4.1, but the XOF is Keccak-PRNG. The construction is normative and
366363
- Invalid norm bound
367364
- Signature verification failure
368365

369-
### 4.4. Precompiled Contract Gas Usage
366+
### Precompiled Contract Gas Usage
370367

371368
The cost of the **FALCON_HASH_TO_POINT_SHAKE256** and **FALCON_HASH_TO_POINT_KECCAKPRNG** is set to 1000 gas.
372369

373370
The cost of **FALCON_CORE** is set to 2000 gas.
374371

375372
Thus, the total cost of the signature is 3000 gas.
376373

377-
## 5. Rationale
374+
## Rationale
378375

379376
The Falcon signature scheme was selected as a NIST-standardized post-quantum cryptographic algorithm due to its strong security guarantees and efficiency.
380377

@@ -389,7 +386,7 @@ Falcon offers several advantages over traditional cryptographic signatures such
389386

390387
Given the increasing urgency of transitioning to quantum-resistant cryptographic primitives or even having them ready in the event that research into quantum computers speeds up.
391388

392-
### 5.1 Gas cost explanations
389+
### Gas cost explanations
393390

394391

395392
The cost of the **HASH_TO_POINT** and **HASH_TO_POINT_ETH** functions is dominated by the call to the underlying hash function. It represents in average 35 calls to the hash function. Taking linearly the cost of keccak256, and avoiding the context switching it represents 1000 gas.
@@ -398,7 +395,7 @@ The cost of **FALCON_CORE** function is dominated by performing 2 NTTs and 1 inv
398395

399396
The cost is interpolated using rule of thumb from SUPERCOPS signatures benchmark results.
400397

401-
## 6. Backwards Compatibility
398+
## Backwards Compatibility
402399

403400
In compliance with EIP-7932, the necessary parameters and structure for its integration are provided. `ALG_TYPE = 0xFA` uniquely identifies Falcon-512 transactions, set MAX_SIZE = 667 bytes to accommodate the fixed-length signature_info container (comprising a 1-byte version tag and a 666-byte Falcon signature), and recommend a `GAS_PENALTY` of approximately `3000` gas subject to benchmarking. The verification function follows the EIP-7932 model, parsing the signature_info, recovering the corresponding Falcon public key, verifying the signature against the transaction payload hash, and deriving the signer's Ethereum address as the last 20 bytes of keccak256(pubkey). This definition ensures that Falcon-512 can be cleanly adopted within the `AlgorithmicTransaction` container specified by EIP-7932.
404401

@@ -445,20 +442,20 @@ In the format of EIP-7932:
445442
### Addresses
446443
**TBD by ACD.** Final precompile addresses will be selected within the EIP-managed range of EIP-1352, explicitly **avoiding `0x01000x01FF` reserved for RIPs** by EIP-7587.
447444

448-
## 7. Test Cases
445+
## Test Cases
449446

450447
A set of test vectors for verifying implementations is located in a separate file (to be provided for each opcode). For the NIST compliant version, KATS are reproduced.
451448

452449

453-
## 8. Reference Implementation
450+
## Reference Implementation
454451

455452
An implementation is provided in `assets` (TODO). For the NIST-compliant version, KAT vectors of the NIST submission are valid.
456453

457454
**TODO: We can modify geth to include falcon-512 as a reference. (Similar to secp256r1 signature verification)**
458455

459-
## 9. Security Considerations
456+
## Security Considerations
460457

461458
The derivation path to obtain the private key from the seed is (tbd). Hash-to-Point functions MUST follow the specified XOFs byte-for-byte; domain separation and padding are normative.
462459

463-
## 10. Copyright
460+
## Copyright
464461
Copyright and related rights waived via [CC0](../LICENSE.md).

0 commit comments

Comments
 (0)