
Gas benchmark
What a post-quantum signature costs on Starknet
A Winternitz signature is 65 hash chain values plus a Merkle path. Verifying it means a few hundred Poseidon permutations, which Starknet runs as a built-in. These are the measured numbers.
- h = 416 keys, 70 felts
- Verify
- 971,569
- Vault withdraw
- 2,775,439
- Account validate (Dual)
- 1,207,872
- h = 8256 keys, 74 felts
- Verify
- 911,671
- Vault withdraw
- 2,811,326
- Account validate (Dual)
- 1,295,039
- h = 124,096 keys, 78 felts
- Verify
- 1,043,368
- Vault withdraw
- 2,904,233
- Account validate (Dual)
- 1,338,491
- h = 1665,536 keys, 82 felts
- Verify
- 1,057,295
- Vault withdraw
- 2,894,405
- Account validate (Dual)
- 1,423,048
Figures are L2 gas. Measured with snforge 0.65.0 and Scarb 2.22.0 on 6 December 2026. Each figure is one signature over a random message. The number of hash chain steps depends on the message, so the gas moves by a few percent from one signature to the next. For comparison, validating a plain Stark curve ECDSA signature measured 144,865 L2 gas in the same harness.
W = 16
Each chain carries a 4 bit digit, so a signature is 62 message chains and 3 checksum chains of at most 15 steps.
One permutation per step
A chain step is a single Hades permutation keyed by the public seed and the position of the step in the tree.
Counter on chain
The contract accepts a leaf only if its index is at or above the stored counter, then moves the counter past it.