Zirah: A Post-Quantum True Random Number Generator Hardware Signer With an Avalanche Noise
Builds Zirah, an STM32F407 hardware signer with avalanche-noise TRNG, masked ML-DSA-65 and ATECC608 ECDSA; shows PQ key sits unprotected in flash.
Schemes: ML-DSA-65, ECDSA P-256, SHAKE256, FIPS 204 hedged signing, SP 800-90B
Findings (quotes checked against the source text)
-
The ATECC608 cannot store or compute with the 4,032-byte ML-DSA-65 secret key, so that key must sit in ordinary microcontroller flash.
The ATECC608 can neither store the 4,032-byte ML-DSA-65 key nor compute with it, so that key sits in ordinary flash behind readout protection
-
On an earlier board with readout protection level 0, a debugger copied the ML-DSA-65 key and the copy produced a valid signature without the device.
and the copied key produced a valid ML-DSA-65 signature without the board, verifying under the device's public key.
-
Masking covers only the two secret-key products; the masking vector y and rejection checks remain unmasked, so the implementation is not first-order secure.
Masking the two products therefore does not make Zirah a first-order secure ML-DSA implementation.
-
Hybrid verification is an AND of ML-DSA-65 and ECDSA P-256 so the classical half cannot be stripped from a record.
once the trusted entry holds an ECDSA key a record without an ECDSA half is rejected, so the classical half cannot be stripped away.
-
The masked signer remained byte-identical to the pq-crystals reference across 1,976 checks natively and on an emulated Cortex-M4.
the signer matched the pq-crystals reference in 1,976 checks natively and on an emulated Cortex-M4.
Numbers (as extracted, not quote-checked)
- ML-DSA-65 public key size: 1,952 bytes
- ML-DSA-65 secret key size: 4,032 bytes
- ML-DSA-65 signature size: 3,309 bytes
- Masked signature median time at 168 MHz: 157 ms over 20 runs
- Min-entropy assessed on non-IID track: 6.898 bits per byte
- ATECC608 largest data slot: 416 bytes
For builders
Treat a secure element without lattice arithmetic as protecting only the classical half; the PQ key needs its own protection plan, such as readout protection plus masking, and should not be overstated as secure-element protected.
Limits
Single prototype, one board and one session; leakage results come from an emulator, not the chip; nothing certified or independently audited; no physical side-channel measurements.
Topics: sig-lattice hybrid-schemes implementation-sidechannel wallets-keys benchmarks