Verified Correctness and Security of mbedTLS HMAC-DRBG
Katherine Q. Ye, Matthew Green, Naphat Sanguansin, Lennart Beringer, Adam Petcher, Andrew W. Appel
Abstract
We have formalized the functional specification of HMAC-DRBG (NIST 800-90A), and we have proved its cryptographic securitythat its output is pseudorandom-using a hybrid game-based proof. We have also proved that the mbedTLS implementation (C program) correctly implements this functional specification. at proof composes with an existing C compiler correctness proof to guarantee, end-to-end, that the machine language program gives strong pseudorandomness. All proofs (hybrid games, C program verification, compiler, and their composition) are machine-checked in the Coq proof assistant. Our proofs are modular: the hybrid game proof holds on any implementation of HMAC-DRBG that satisfies our functional specification. erefore, our functional specification can serve as a high-assurance reference. 1 A note on terminology: we use "entropy" loosely to denote randomness that is not predictable by an adversary. We use "sampled uniformly at random" and "ideally random" interchangeably. We use PRG, the acronym for "pseudo-random generator," to refer to the abstract cryptographic concept, whereas we use DRBG, the acronym for "deterministic random bit generator," to denote the specifications and implementations of PRGs. Instead of DRBG, some papers use "PRNG," the acronym for "pseudorandom number generator." e terms are synonymous.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
15 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Formal verification of a constant-time preserving C compiler cites The Last Mile: High-Assurance and High-Speed Cryptographic Implementations
- Formal verification of a constant-time preserving C compiler cites Jasmin: High-Assurance and High-Speed Cryptography
- EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider cites The Last Mile: High-Assurance and High-Speed Cryptographic Implementations
- EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider cites Jasmin: High-Assurance and High-Speed Cryptography
- SoK: Computer-Aided Cryptography cites Formal verification of a constant-time preserving C compiler
- SoK: Computer-Aided Cryptography cites EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider
- SoK: Computer-Aided Cryptography cites The Last Mile: High-Assurance and High-Speed Cryptographic Implementations
- SoK: Computer-Aided Cryptography cites A Systematic Analysis of the Juniper Dual EC Incident
- SoK: Computer-Aided Cryptography cites Jasmin: High-Assurance and High-Speed Cryptography
- The Last Mile: High-Assurance and High-Speed Cryptographic Implementations cites Jasmin: High-Assurance and High-Speed Cryptography
Cited by top-tier papers15
- SoK: Computer-Aided CryptographyManuel Barbosa, Gilles Barthe, Karthik Bhargavan, Bruno Blanchet et al.S&P 2021 · 169 citations
- Jasmin: High-Assurance and High-Speed CryptographyJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Arthur Blot et al.CCS 2017 · 157 citations
- EverCrypt: A Fast, Verified, Cross-Platform Cryptographic ProviderJonathan Protzenko, Bryan Parno, Aymeric Fromherz, Chris Hawblitzel et al.S&P 2020 · 114 citations
- Formal verification of a constant-time preserving C compilerGilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin et al.POPL 2020 · 77 citations
- The Last Mile: High-Assurance and High-Speed Cryptographic ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Benjamin Grégoire et al.S&P 2020 · 67 citations
Builds on2
Related papers
- Security Analysis of NIST CTR-DRBGViet Tung Hoang, Yaobin ShenCRYPTO 2020 · 14 citations
- KEM-IND-CCA-Preserving Compilation of Jasmin's ML-KEMSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Gregoire et al.CCS 2026 · 1 citation
- Quantifying the Security Cost of Migrating Protocols to PracticeChristopher Patton, Thomas ShrimptonCRYPTO 2020 · 2 citations
- When Messages Are Keys: Is HMAC a Dual-PRF?Matilda Backendal, Mihir Bellare, Felix Günther, Matteo ScarlataCRYPTO 2023 · 14 citations
- Verified Cryptographic Code for EverybodyBrett Boston, Samuel Breese, Joey Dodds, Mike Dodds et al.CAV 2021 · 7 citations
