Winternitz

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.

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.