Zirah: A Post-Quantum True Random Number Generator Hardware Signer With an Avalanche Noise
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "Zirah: A Post-Quantum True Random Number Generator Hardware Signer With an Avalanche Noise".
Elias: Here's the gist of the paper. Zirah is a hardware signer built around an STM32F407 microcontroller and its purpose is to find out where a post-quantum signing key is exposed and what actually protects it The device draws every random bit from a reverse-biased 2N3904 junction in avalanche breakdown, amplified by an LM358 and screened by SP 800-90B health tests, computes ML-DSA-65 on the STM32 with two-share arithmetic masking of the secret-key multiplications, and adds ECDSA P-256 from an ATECC608 secure element over the same digest.
Nadia: System Architecture and Components Zirah is a piece of hardware built to study that constraint It consists of one microcontroller board and two solderless prototyping boards, Board A with the noise source and Board B with the secure element and the display, which holds both signing keys, the post-quantum one in the STM32’s flash and the classical one inside the ATECC608.
Elias: The main board is a DevEBox STM32F4XX M core board with an STM32F407VE, a Cortex-M4F running at 168 MHz with 512 KB of flash, 128 KB of main SRAM and 64 KB of core-coupled memory (CCM).
Nadia: Board B holds the ATECC608 module and a 1.3-inch SH1106 OLED on a software I2C bus.
Paper summary: Nadia: So putting it all together, this paper with the title "Zirah: A Post-Quantum True Random Number Generator Hardware Signer With an Avalanche Noise" is basically showing us a prototype that tests where post-quantum signing keys might be exposed on low-cost hardware >
Elias: It demonstrates a setup where you get randomness from an avalanche noise source, process it through masking for the post-quantum part, and then combine it with a classical signature from a secure element >
Priya: The main implication I see is that even with these complex cryptographic steps running on this kind of hardware, the actual security against quantum threats comes down to basic things like memory readout protection >
Nadia: Exactly. It’s not about having the most advanced algorithm; it’s about how you physically secure the key material where it lives >
Elias: And they explicitly state their limitations: this is just a single prototype without formal certification, no independent audit, and no FIPS one hundred forty-three or SP eight hundred nine zero B validation >
Priya: So, for someone listening who just wants to know what this paper means practically, it's a demonstration of the design choices they made when trying to build something that combines post-quantum and classical cryptography on affordable chips >
Conclusion: Nadia: So, this paper is about Zirah, which is this hardware device they built to see if you can expose post-quantum signing keys on real chips and what actually protects them >
Elias: Yeah, it uses a lot of clever stuff like avalanche noise to get randomness and then masks the secret key multiplications for the post-quantum part >
Priya: And they combine that with a classical signature from a secure element, which is interesting because it's testing both sides of the crypto coin >
Nadia: It really boils down to whether you trust the hardware's internal protection against someone trying to read those keys out >
Elias: The authors are looking at how these different security layers interact when you put them all on one board, like with that STM32 and the secure element >
Priya: And they show us some performance numbers, like how fast it can do a signature, but they also lay out some real limits on what this prototype is actually doing right now >
Nadia: They admit there are no formal audits or certifications for this thing yet, which is a big caveat when we're talking about real-world security >
Elias: Exactly, and their next steps involve figuring out physical leakage from the microcontroller itself and improving the masking to make it even more secure >
Priya: It makes you wonder what kind of practical attacks they are actually trying to defend against with this setup >
Muhammad Shaheer Bin Junaid
cs.CR, cs.AR
Submitted: 2026-11-05
Updated: 2026-11-05
Comments: 28 pages, 13 figures, 10 tables. Hardware designs, firmware, host software and measurement data: https://doi.org/10.5281/zenodo.23982873
Code: https://github.com/mshaheerjunaid/Zirah
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 77/100
The gist: Zirah is a hardware signer built around an STM32F407 microcontroller and its purpose is to find out where a post-quantum signing key is exposed and what actually protects it The device draws every…
Key concepts
- Entropy Source Assessment
- This section evaluates the random number generator's quality by measuring its output. It uses a physical noise source, amplifies it, and then checks it against NIST SP 800-90B standards to determine how many truly unpredictable bits are available for cryptographic use.
- ML-DSA-65
- This is the specific post-quantum digital signature algorithm implemented on the STM32 microcontroller. The implementation uses two-share arithmetic masking during secret key multiplications to protect these sensitive operations from attacks that target this type of chip architecture.
- Two-Share Arithmetic Masking
- This is a technique used in cryptography where a secret value is split into multiple shares, and operations are performed on these shares separately. In Zirah, this masking protects the secret-key multiplications within the ML-DSA-65 computation.
- Hybrid Signature Design
- Zirah uses two different signing methods simultaneously: ML-DSA-65 (post-quantum) and ECDSA P-256 (classical). The goal is that if one algorithm is broken, the other can still provide security. However, the paper notes its quantum security relies heavily on the microcontroller's readout protection.
Terminology
Summary
Zirah is a hardware signer built around an STM32F407 microcontroller and its purpose is to find out where a post-quantum signing key is exposed and what actually protects it The device draws every random bit from a reverse-biased 2N3904 junction in avalanche breakdown, amplified by an LM358 and screened by SP 800-90B health tests, computes ML-DSA-65 on the STM32 with two-share arithmetic masking of the secret-key multiplications, and adds ECDSA P-256 from an ATECC608 secure element over the same digest. p. 0 com
ORCID: 0009-0002-4088-6232
Abstract- Zirah is a hardware signer built around an STM32F407 microcontroller, and its purpose is to find out, on
inexpensive hardware, where a post-quantum signing key is exposed and what actually protects it. The device draws
every random bit from a reverse-biased 2N3904 junction in avalanche breakdown, amplified by an LM358 and
screened by SP 800-90B health tests, computes ML-DSA-65 (FIPS 204, hedged) on the STM32 with two-share
arithmetic masking of the secret-key multiplications, and adds ECDSA P-256 from an ATECC608 secure element
over the same digest, once a person has matched an eight-digit digest prefix on its OLED with the PC and pressed a
button.Where the paper says it
System Architecture and Components
Zirah is a piece of hardware built to study that constraint It consists of one microcontroller board and two solderless prototyping boards, Board A with the noise source and Board B with the secure element and the display, which holds both signing keys, the post-quantum one in the STM32’s flash and the classical one inside the ATECC608. The main board is a DevEBox STM32F4XX M core board with an STM32F407VE, a Cortex-M4F running at 168 MHz with 512 KB of flash, 128 KB of main SRAM and 64 KB of core-coupled memory (CCM). p. 4 1 Hardware and wiring
Figure 1 shows the parts of Zirah and what passes between them, and Figure 2 shows the device as built. The main
board is a DevEBox STM32F4XX_M core board with an STM32F407VE, a Cortex-M4F running at 168 MHz with
512 KB of flash, 128 KB of main SRAM and 64 KB of core-coupled memory (CCM). The
board’s K1 button on PA0 confirms each signature. Board B holds the ATECC608 module and a 1. Board B holds the ATECC608 module and a 1. 3-inch SH1106
OLED on a software I2C bus, and Board A is the noise source whose output the firmware samples on PA4 while it
watches the bias supply on PB0 (Section 5).Where the paper says it
Where the paper says it
Where the paper says it
Entropy Source Assessment
The device draws every random bit from a reverse-biased 2N3904 junction in avalanche breakdown, amplified by an LM358 and screened by SP 800-90B health tests. NIST SP 800-90B describes how an entropy source is built from a noise source, health tests and an optional conditioning component. p. 1 Background
2. 1 Entropy sources and NIST SP 800-90B
NIST SP 800-90B describes how an entropy source is built from a noise source, health tests and an optional
conditioning component, and how its min-entropy is assessed from raw samples [7]. When the IID
assumption fails, ten non-IID estimators are run on the raw symbols and on their bits, and the lowest estimate,
bounded by the bit-string results, becomes the assessed min-entropy. NIST publishes an implementation of these
estimators [8], and an assessment made with it is the evidence that SP 800-90B asks for, although running the tool is
not the same as a validation. A desktop application and a command-line tool drive the board and verify its output, and because only a 32-
byte manifest digest reaches the device, it signs files of any type and size, returning signed copies for PDF, Office
Open XML, ZIP, PNG and JPEG files and detached records for every other format. NIST’s SP 800-90B tool
rejected the IID assumption for 1,000,000 raw samples and assessed 6. NIST’s SP 800-90B tool
rejected the IID assumption for 1,000,000 raw samples and assessed 6. 898 bits of min-entropy per byte on the nonIID track, against the 1 bit the firmware credits, while spectral lines near 116 Hz that hold about 5 % of the variance
remain unexplained. NIST’s SP 800-90B tool
rejected the IID assumption for 1,000,000 raw samples and assessed 6. 898 bits of min-entropy per byte on the nonIID track, against the 1 bit the firmware credits, while spectral lines near 116 Hz that hold about 5 % of the variance
remain unexplained.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Cryptographic Implementation Details
Zirah computes ML-DSA-65 on the STM32 with two-share arithmetic masking of the secret-key multiplications. The masked signer produces the same bytes as the reference in every case tested. p. 1 I describe the device itself, with its
wiring, its confirmation step and its trust model, and an avalanche-noise entropy source built from discrete parts,
with SP 800-90B health tests on the device, a SHAKE256 conditioner and the faults found while building it
(Sections 4 and 5). I give a masked ML-DSA-65 signer for the STM32F407, derived from the pq-crystals reference
code, whose secret vectors exist in RAM only as two arithmetic shares refreshed before every signature in two
separate passes over coefficients visited in random order, and whose signatures stay byte-identical to the reference
(Section 6). com
ORCID: 0009-0002-4088-6232
Abstract- Zirah is a hardware signer built around an STM32F407 microcontroller, and its purpose is to find out, on
inexpensive hardware, where a post-quantum signing key is exposed and what actually protects it. The device draws
every random bit from a reverse-biased 2N3904 junction in avalanche breakdown, amplified by an LM358 and
screened by SP 800-90B health tests, computes ML-DSA-65 (FIPS 204, hedged) on the STM32 with two-share
arithmetic masking of the secret-key multiplications, and adds ECDSA P-256 from an ATECC608 secure element
over the same digest, once a person has matched an eight-digit digest prefix on its OLED with the PC and pressed a
button.Where the paper says it
Where the paper says it
Security Constraints and Limitations
The ATECC608 holds up to 16 keys or data items in a data zone of 1,208 bytes and computes ECDSA and ECDH on P-256 internally, so a private key generated inside it never has to leave. The ML-DSA-65 key sits in ordinary flash behind readout protection. p. 0 8 s, and the signer matched the pq-crystals reference in 1,976 checks natively and on an
emulated Cortex-M4. 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, and on an earlier board, before that protection was enabled, a
debugger copied it out and the copy produced a valid ML-DSA-65 signature without the device, although the
leakage results come from an instruction-level emulator and nothing here is certified. It
has no lattice arithmetic, and the largest slot in its data zone holds 416 bytes [5], roughly a tenth of the 4,032 bytes
of an ML-DSA-65 secret key [2]. A device built around such a chip can keep its classical key inside the chip, but its
post-quantum key has to be stored and used by an ordinary microcontroller, so the half of the signature that is meant
to survive a quantum attacker ends up with the weaker protection.Where the paper says it
Where the paper says it
Validation and Performance Metrics
The measurements support a plain reading of what a secure element buys in a hybrid design. The masked signature (ms) for one run was 57. p. 3 md in the Zirah repository [23]. Attacker What Zirah does What remains
Malware on the PC Button press for every signature; the
OLED shows 32 bits of the manifest
digest; the PC cancels if the device’s
echoed prefix differs
A matching fake on screen; a 32-bit
prefix can be matched with about
2
32 attempts; trust and verification
run on the PC
Brief physical access with a
debugger
ECDSA key inside the ATECC608;
readout protection level 1
Published readout-protection
bypasses on other STM32 families;
the ML-DSA key is unmasked at
rest
Power or EM side channel c 𝐬 1
and c 𝐬 2
on two shares,
refreshed and shuffled
𝐲 , the recombined values, the
rejection checks and the boot-time
key load are unmasked; no physical
measurement
Fault injection Hedged signing; every signature
verified before release; faults wipe
secrets and halt
A fault that corrupts a signature and
its check consistently, or one in the
boot-time key load
Entropy manipulation Start-up and continuous health tests;
a window on the bias voltage
Subtle bias, injected signals below
the tests’ sensitivity, slow drift
Malicious USB host Bounded printable command lines,
strict parsing, no heap, MPU guard
region, stack canary
Firmware bugs that pass these
checks
Two rows deserve more than a table cell. md in the Zirah repository [23]. Attacker What Zirah does What remains
Malware on the PC Button press for every signature; the
OLED shows 32 bits of the manifest
digest; the PC cancels if the device’s
echoed prefix differs
A matching fake on screen; a 32-bit
prefix can be matched with about
2
32 attempts; trust and verification
run on the PC
Brief physical access with a
debugger
ECDSA key inside the ATECC608;
readout protection level 1
Published readout-protection
bypasses on other STM32 families;
the ML-DSA key is unmasked at
rest
Power or EM side channel c 𝐬 1
and c 𝐬 2
on two shares,
refreshed and shuffled
𝐲 , the recombined values, the
rejection checks and the boot-time
key load are unmasked; no physical
measurement
Fault injection Hedged signing; every signature
verified before release; faults wipe
secrets and halt
A fault that corrupts a signature and
its check consistently, or one in the
boot-time key load
Entropy manipulation Start-up and continuous health tests;
a window on the bias voltage
Subtle bias, injected signals below
the tests’ sensitivity, slow drift
Malicious USB host Bounded printable command lines,
strict parsing, no heap, MPU guard
region, stack canary
Firmware bugs that pass these
checks
Two rows deserve more than a table cell. 8 s, and the signer matched the pq-crystals reference in 1,976 checks natively and on an
emulated Cortex-M4. 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, and on an earlier board, before that protection was enabled, a
debugger copied it out and the copy produced a valid ML-DSA-65 signature without the device, although the
leakage results come from an instruction-level emulator and nothing here is certified. Only the
secret-key products are masked, the leakage evaluation ran in an instruction-level emulator rather than on the chip,
and the entropy results describe one board measured in one session. The device is a single prototype with no
certification or independent audit, and the places where it falls short are as much a part of the result as the places
where it works.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Future Work Directions
The next steps follow from those limits, and I list them roughly in the order I expect to reach them. The first is physical power and electromagnetic measurements on the STM32F407 itself, which would test the emulated leakage results where they matter. p. 0 8 s, and the signer matched the pq-crystals reference in 1,976 checks natively and on an
emulated Cortex-M4. 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, and on an earlier board, before that protection was enabled, a
debugger copied it out and the copy produced a valid ML-DSA-65 signature without the device, although the
leakage results come from an instruction-level emulator and nothing here is certified. Schemes of
that kind also protect the masking vector 𝐲 , its SHAKE-based generation and the rejection checks, which needs
masked Keccak and conversions between Boolean and arithmetic masking, so a complete masked ML-DSA is a far
larger engineering task than masking two products. Two further results shaped the details of Zirah’s signer. NIST’s SP 800-90B tool
rejected the IID assumption for 1,000,000 raw samples and assessed 6. 898 bits of min-entropy per byte on the nonIID track, against the 1 bit the firmware credits, while spectral lines near 116 Hz that hold about 5 % of the variance
remain unexplained.Where the paper says it
Where the paper says it
Where the paper says it
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Masking ML-DSA-65 with two passes and shuffling protects against first-order leakage observed in emulation, as
The two-pass refresh removed the first-order leakage that naive masking left in emulation.
This allows for amodest
engineering cost while maintaining security against known attack vectors. -
The system can enforce a hybrid signature verification policy where
every component signature verifies,
ensuring that even if one algorithm is broken, the other remains secure, as this relies on anAND combination.
-
The device can utilize a true random number generator built from discrete parts and conditioned by SHAKE256 to generate entropy, although the paper notes that
the assessment covers one board, one transistor, one session and one supply,
indicating limitations in real-world performance consistency. -
The hardware design incorporates a human confirmation step where
a person has to compare a digest prefix on the board’s OLED with the one on the PC and press a button before anything is signed,
acting as a check againstcareless misuse and naive malware.
-
The system can provide file signatures for any file type, including PDF, Office Open XML, ZIP, PNG, and JPEG files by returning
signed copies for PDF, Office Open XML, ZIP, PNG and JPEG files
ordetached records for every other format.
Abstract
Zirah is a hardware signer built around an STM32F407 microcontroller, and its purpose is to find out, on inexpensive hardware, where a post-quantum signing key is exposed and what actually protects it. The device draws every random bit from a reverse-biased 2N3904 junction in avalanche breakdown, amplified by an LM358 and screened by SP 800-90B health tests, computes ML-DSA-65 (FIPS 204, hedged) on the STM32 with two-share arithmetic masking of the secret-key multiplications, and adds ECDSA P-256 from an ATECC608 secure element over the same digest, once a person has matched an eight-digit digest prefix on its OLED with the PC and pressed a button. A desktop application and a command-line tool drive the board and verify its output, and because only a 32-byte manifest digest reaches the device, it signs files of any type and size, returning signed copies for PDF, Office Open XML, ZIP, PNG and JPEG files and detached records for every other format. NIST's SP 800-90B tool rejected the IID assumption for 1,000,000 raw samples and assessed 6.898 bits of min-entropy per byte on the non-IID track, against the 1 bit the firmware credits, while spectral lines near 116 Hz that hold about 5 % of the variance remain unexplained. At 168 MHz the masked signature took a median of 157 ms over 20 runs and a complete signing operation under 0.8 s, and the signer matched the pq-crystals reference in 1,976 checks natively and on an emulated Cortex-M4. 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, and on an earlier board, before that protection was enabled, a debugger copied it out and the copy produced a valid ML-DSA-65 signature without the device, although the leakage results come from an instruction-level emulator and nothing here is certified.
Related papers
- From Strategy Search to Policy Learning: MCTS-Guided Adversarial Co-Evolution for LLM Safety Alignment
- Privacy Leakage from Recurrent State in LLM Inference
- Incrementally Verifiable Oracle Aided Computation
- Privilege and confidentiality in generative AI workflows
- BadMoE: Backdooring Mixture-of-Experts LLMs via Routing-Aware Triggers and Task-Underutilized Experts
- CoVault: Secure, Scalable Analytics of Personal Data