You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: EIPS/eip-8052.md
+39-42Lines changed: 39 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,14 @@ Quantum computers pose a long-term risk to classical cryptographic algorithms. I
32
32
33
33
Integrating post-quantum signature schemes is crucial to future-proof Ethereum and other EVM-based environments. It shall be noted that infrastructure for post-quantum signatures should be deployed *before* quantum adversaries are known to be practical because it takes on the order of years for existing applications to integrate.
34
34
35
-
Falcon, a lattice-based scheme standardized by NIST, offers high security against both classical and quantum adversaries. Its compact signature size (~666 bytes for Falcon-512) and its efficient verification algorithm make it well-suited for blockchain applications, where gas usage and transaction throughput are critical considerations.
36
-
<!-- When the public key is also stored together with the signature, it leads to 666 + 897 = 1563 bytes.
35
+
Falcon, a lattice-based scheme standardized by NIST, offers high security against both classical and quantum adversaries. Its compact signature size (666 bytes for Falcon-512) and its efficient verification algorithm make it well-suited for blockchain applications, where gas usage and transaction throughput are critical considerations.
36
+
<!-- When the public key is also stored together with the signature, it leads to 666 + 896 = 1562 bytes.
37
37
Using the recovery mode, it can be reduced to 1292 + 32 = 1324 bytes. -->
38
38
<!--
39
39
For Falcon,
40
40
σ=666 (40 bytes of salt, ~626 bytes for s2)
41
-
pk = 897,
42
-
TOTAL=1563
41
+
pk = 896,
42
+
TOTAL=1562
43
43
For FalconRec,
44
44
σ=1292 (40 bytes of salt, ~626 bytes for s1, ~626 bytes for s2),
45
45
pk = 32,
@@ -67,7 +67,7 @@ This setting leads to the following size for signatures and keys:
67
67
|**n** (lattice dimension) |`512`|
68
68
|**q** (modulus) |`12289`|
69
69
| Padded signature size |`666` bytes |
70
-
| Public Key size |`897` bytes |
70
+
| Public Key size |`896` bytes |
71
71
| Private key size |`1281` bytes |
72
72
73
73
@@ -79,14 +79,12 @@ From a high level, a signature verification can be decomposed in two steps:
79
79
The following pseudo-code highlights how these two algorithms are involved in a Falcon verification, and how the modularity of the challenge computation opens up to two version of Falcon:
@@ -251,11 +247,11 @@ def FALCON_HASH_TO_POINT_KECCAKPRNG(message: bytes32, signature: Tuple[bytes, by
251
247
return c
252
248
```
253
249
254
-
#### Encoding of the challenge polynomial `c` (897 bytes, normative)
250
+
#### Encoding of the challenge polynomial `c` (896 bytes, normative)
255
251
256
252
* Domain: degree-512 polynomial with coefficients in `[0, q)`, `q = 12289`.
257
253
* Order: coefficients are serialized in index order `c[0], c[1], …, c[511]`.
258
-
* 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.
254
+
* Bit-packing: each coefficient is a 14-bit **big-endian** unsigned integer. Concatenate all 512 encodings into a bitstring of exactly **896 bytes**. Consumers MUST reject encodings that are not exactly 896 bytes.
259
255
260
256
### Core algorithm
261
257
@@ -278,15 +274,15 @@ def FALCON_HASH_TO_POINT_KECCAKPRNG(message: bytes32, signature: Tuple[bytes, by
278
274
The following code illustrates Falcon core algorithm:
*897 bytes: packed challenge polynomial `c` (see §3.1 encoding)
362
+
*896 bytes: packed challenge polynomial `c` (see §3.1 encoding)
367
363
368
364
#### `FALCON_HASH_TO_POINT_KECCAKPRNG`
369
365
@@ -372,9 +368,9 @@ Same I/O as §4.1, but the XOF is Keccak-PRNG. The construction is normative and
372
368
#### `FALCON_CORE`
373
369
374
370
***Input data**
375
-
* 666 bytes for Falcon-512 compressed signature
376
-
*897 bytes for Falcon-512 public key
377
-
*897 bytes for the Hash To Point Challenge
371
+
* 666 bytes for Falcon-512 signature
372
+
*896 bytes for Falcon-512 public key
373
+
*896 bytes for the Hash To Point Challenge
378
374
***Output data**:
379
375
* If the core algorithm process succeeds, it returns 1 in 32 bytes format.
380
376
* If the core algorithm process fails, it does not return any output data.
@@ -383,8 +379,9 @@ Same I/O as §4.1, but the XOF is Keccak-PRNG. The construction is normative and
383
379
384
380
* Invalid input length (not compliant to described input)
385
381
* Invalid field element encoding (≥ q)
386
-
* Invalid norm bound
387
-
* Signature verification failure
382
+
* Invalid signature decompression
383
+
384
+
Note that a well-formed but invalid signature does not produce an error, but `FALCON_CORE` invalidates the signature (and it does not return any output data).
388
385
389
386
#### Precompiled Contract Gas Usage
390
387
@@ -475,7 +472,7 @@ In the format of [EIP-7932](./eip-7932.md):
475
472
476
473
## Test Cases
477
474
478
-
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.
475
+
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 reproducedfor HashToPoint (with a provided salt `r`) as well asfor the compressed signature vector s2 (with a provided `HashToPoint`input). Note that `s2`isnot padded with zeroes, leading to a maximum size of 626bytes.
0 commit comments