Formally Verified Cryptographic Web Applications in WebAssembly
Jonathan Protzenko, Benjamin Beurdouche, Denis Merigoux, Karthikeyan Bhargavan
Abstract
After suffering decades of high-profile attacks, the need for formal verification of security-critical software has never been clearer. Verification-oriented programming languages like F* are now being used to build high-assurance cryptographic libraries and implementations of standard protocols like TLS. In this paper, we seek to apply these verification techniques to modern Web applications, like WhatsApp, that embed sophisticated custom cryptographic components. The problem is that these components are often implemented in JavaScript, a language that is both hostile to cryptographic code and hard to reason about. So we instead target WebAssembly, a new instruction set that is supported by all major JavaScript runtimes. We present a new toolchain that compiles Low*, a low-level subset of the F* programming language, into WebAssembly. Unlike other WebAssembly compilers like Emscripten, our compilation pipeline is focused on compactness and auditability: we formalize the full translation rules in the paper and implement it in a few thousand lines of OCaml. Using this toolchain, we present two case studies. First, we build WHACL*, a WebAssembly version of the existing, verified HACL* cryptographic library. Then, we present LibSignal*, a brand new, verified implementation of the Signal protocol in WebAssembly, that can be readily used by messaging applications like WhatsApp, Skype, and Signal.
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
No credit card required.
Lineage
- Vale: Verifying High-Performance Cryptographic Assembly Code cites Verifying Constant-Time Implementations
- SoK: Computer-Aided Cryptography cites Vale: Verifying High-Performance Cryptographic Assembly Code
- SoK: Computer-Aided Cryptography cites Verified Models and Reference Implementations for the TLS 1.3 Standard Candidate
- SoK: Computer-Aided Cryptography cites Verifying Constant-Time Implementations
- SoK: Computer-Aided Cryptography cites HACL: A Verified Modern Cryptographic Library
- SoK: Computer-Aided Cryptography cites Jasmin: High-Assurance and High-Speed Cryptography
- High-Assurance Cryptography in the Spectre Era cites Vale: Verifying High-Performance Cryptographic Assembly Code
- High-Assurance Cryptography in the Spectre Era cites SoK: Computer-Aided Cryptography
- High-Assurance Cryptography in the Spectre Era cites Verifying Constant-Time Implementations
- High-Assurance Cryptography in the Spectre Era cites HACL: A Verified Modern Cryptographic Library
- High-Assurance Cryptography in the Spectre Era cites Jasmin: High-Assurance and High-Speed Cryptography
- Automatically eliminating speculative leaks from cryptographic code with blade cites Verifying Constant-Time Implementations
- Automatically eliminating speculative leaks from cryptographic code with blade cites HACL: A Verified Modern Cryptographic Library
- Automatically eliminating speculative leaks from cryptographic code with blade cites Jasmin: High-Assurance and High-Speed Cryptography
- HACL: A Verified Modern Cryptographic Library cites Vale: Verifying High-Performance Cryptographic Assembly Code
- HACL: A Verified Modern Cryptographic Library cites Verifying Constant-Time Implementations
- Jasmin: High-Assurance and High-Speed Cryptography cites Vale: Verifying High-Performance Cryptographic Assembly Code
- Jasmin: High-Assurance and High-Speed Cryptography cites Verifying Constant-Time Implementations
- Jasmin: High-Assurance and High-Speed Cryptography cites HACL: A Verified Modern Cryptographic Library
Cited by top-tier papersTop 5 of 15 by citations
- SoK: Computer-Aided CryptographyManuel Barbosa, Gilles Barthe, Karthik Bhargavan, Bruno Blanchet et al.S&P 2021 · 169 citations
- An Empirical Study of Real-World WebAssembly Binaries: Security, Languages, Use CasesAaron Hilbig, Daniel Lehmann, Michael PradelWWW 2021 · 114 citations
- Automatically eliminating speculative leaks from cryptographic code with bladeMarco Vassena, Craig Disselkoen, Klaus von Gleissenthall, Sunjay Cauligi et al.POPL 2021 · 53 citations
- WASAI: uncovering vulnerabilities in Wasm smart contractsWeimin Chen, Zihan Sun, Haoyu Wang, Xiapu Luo et al.ISSTA 2022 · 43 citations
- High-Assurance Cryptography in the Spectre EraGilles Barthe, Sunjay Cauligi, Benjamin Grégoire, Adrien Koutsos et al.S&P 2021 · 42 citations
Builds onTop 5 of 6 by citations
- Verifying Constant-Time ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, François Dupressoir et al.USENIX Security 2016 · 274 citations
- HACL*: A Verified Modern Cryptographic LibraryJean Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin BeurdoucheCCS 2017 · 258 citations
- Verified Models and Reference Implementations for the TLS 1.3 Standard CandidateKarthikeyan Bhargavan, Bruno Blanchet, Nadim KobeissiS&P 2017 · 233 citations
- Jasmin: High-Assurance and High-Speed CryptographyJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Arthur Blot et al.CCS 2017 · 157 citations
- Vale: Verifying High-Performance Cryptographic Assembly CodeBarry Bond, Chris Hawblitzel, Manos Kapritsos, K. Rustan M. Leino et al.USENIX Security 2017 · 147 citations
Related papers
- Noise*: A Library of Verified High-Performance Secure Channel Protocol ImplementationsSon Ho, Jonathan Protzenko, Abhishek Bichhawat, Karthikeyan BhargavanS&P 2022 · 22 citations
- HACLxN: Verified Generic SIMD Crypto (for all your favourite platforms)Marina Polubelova, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin Beurdouche et al.CCS 2020 · 17 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
- From Specs to Apps: Verifying and Monitoring Models of Signal and WhatsAppMoustafa Said, Aurora Naska, Kevin Morio, Robert KünnemannCCS 2026
- Two Mechanisations of WebAssembly 1.0Conrad Watt, Xiaojia Rao, Jean Pichon-Pharabod, Martin Bodin et al.FM 2021 · 32 citations
