Lune

S&P2020Top-tier venue

The Last Mile: High-Assurance and High-Speed Cryptographic Implementations

José Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Benjamin Grégoire, Adrien Koutsos, Vincent Laporte, Tiago Oliveira, Pierre-Yves Strub

Abstract

We develop a new approach for building cryptographic implementations. Our approach goes the last mile and delivers assembly code that is provably functionally correct, protected against side-channels, and as efficient as hand-written assembly. We illustrate our approach using ChaCha20-Poly1305, one of the two ciphersuites recommended in TLS 1.3, and deliver formally verified vectorized implementations which outperform the fastest non-verified code.We realize our approach by combining the Jasmin framework, which offers in a single language features of high-level and low-level programming, and the EasyCrypt proof assistant, which offers a versatile verification infrastructure that supports proofs of functional correctness and equivalence checking. Neither of these tools had been used for functional correctness before. Taken together, these infrastructures empower programmers to develop efficient and verified implementations by "game hopping", starting from reference implementations that are proved functionally correct against a specification, and gradually introducing program optimizations that are proved correct by equivalence checking.We also make several contributions of independent interest, including a new and extensible verified compiler for Jasmin, with a richer memory model and support for vectorized instructions, and a new embedding of Jasmin in EasyCrypt.

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.

24 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • "They're not that hard to mitigate": What Cryptographic Library Developers Think About Timing Attacks cites EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider
  • "They're not that hard to mitigate": What Cryptographic Library Developers Think About Timing Attacks cites SoK: Computer-Aided Cryptography
  • "They're not that hard to mitigate": What Cryptographic Library Developers Think About Timing Attacks cites HACL: A Verified Modern Cryptographic Library
  • "They're not that hard to mitigate": What Cryptographic Library Developers Think About Timing Attacks cites Jasmin: High-Assurance and High-Speed Cryptography
  • Vale: Verifying High-Performance Cryptographic Assembly Code cites Verifying Constant-Time Implementations
  • Formal verification of a constant-time preserving C compiler cites Verifying Constant-Time Implementations
  • Formal verification of a constant-time preserving C compiler cites HACL: A Verified Modern Cryptographic Library
  • 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 Vale: Verifying High-Performance Cryptographic Assembly Code
  • EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider cites Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises
  • EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider cites HACL: A Verified Modern Cryptographic Library
  • EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider cites Jasmin: High-Assurance and High-Speed Cryptography
  • SoK: Computer-Aided Cryptography cites Vale: Verifying High-Performance Cryptographic Assembly Code
  • 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 Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises
  • 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
  • Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises cites Vale: Verifying High-Performance Cryptographic Assembly Code
  • Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises cites HACL: A Verified Modern Cryptographic Library
  • Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises 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 Formal verification of a constant-time preserving C compiler
  • High-Assurance Cryptography in the Spectre Era cites EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider
  • High-Assurance Cryptography in the Spectre Era cites SoK: Computer-Aided Cryptography
  • High-Assurance Cryptography in the Spectre Era cites Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without Compromises
  • 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
  • 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
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers24

  1. SoK: Computer-Aided CryptographyManuel Barbosa, Gilles Barthe, Karthik Bhargavan, Bruno Blanchet et al.S&P 2021 · 169 citations
  2. EverCrypt: A Fast, Verified, Cross-Platform Cryptographic ProviderJonathan Protzenko, Bryan Parno, Aymeric Fromherz, Chris Hawblitzel et al.S&P 2020 · 114 citations
  3. Formal verification of a constant-time preserving C compilerGilles Barthe, Sandrine Blazy, Benjamin Grégoire, Rémi Hutin et al.POPL 2020 · 77 citations
  4. "They're not that hard to mitigate": What Cryptographic Library Developers Think About Timing AttacksJan Jancar, Marcel Fourné, Daniel De Almeida Braga, Mohamed Sabt et al.S&P 2022 · 61 citations
  5. High-Assurance Cryptography in the Spectre EraGilles Barthe, Sunjay Cauligi, Benjamin Grégoire, Adrien Koutsos et al.S&P 2021 · 42 citations

Builds on8

  1. Verifying Constant-Time ImplementationsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, François Dupressoir et al.USENIX Security 2016 · 274 citations
  2. HACL*: A Verified Modern Cryptographic LibraryJean Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin BeurdoucheCCS 2017 · 258 citations
  3. Jasmin: High-Assurance and High-Speed CryptographyJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Arthur Blot et al.CCS 2017 · 157 citations
  4. Vale: Verifying High-Performance Cryptographic Assembly CodeBarry Bond, Chris Hawblitzel, Manos Kapritsos, K. Rustan M. Leino et al.USENIX Security 2017 · 147 citations
  5. Simple High-Level Code for Cryptographic Arithmetic - With Proofs, Without CompromisesAndres Erbsen, Jade Philipoom, Jason Gross, Robert Sloan et al.S&P 2019 · 147 citations

Related papers

  1. Machine-Checked Proofs for Cryptographic Standards: Indifferentiability of Sponge and Secure High-Assurance Implementations of SHA-3José Bacelar Almeida, Cécile Baritel-Ruet, Manuel Barbosa, Gilles Barthe et al.CCS 2019 · 35 citations
  2. Jazzline: Composable CryptoLine Functional Correctness Proofs for Jasmin ProgramsJosé Bacelar Almeida, Manuel Barbosa, Gilles Barthe, Lionel Blatter et al.CCS 2025
  3. Faster Verification of Faster Implementations: Combining Deductive and Circuit-Based Reasoning in EasyCryptJosé Bacelar Almeida, Gustavo Xavier Delerue Marinho Alves, Manuel Barbosa, Gilles Barthe et al.S&P 2025
  4. HACLxN: Verified Generic SIMD Crypto (for all your favourite platforms)Marina Polubelova, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin Beurdouche et al.CCS 2020 · 17 citations
  5. CryptOpt: Verified Compilation with Randomized Program Search for Cryptographic PrimitivesJoel Kuepper, Andres Erbsen, Jason Gross, Owen Conoly et al.PLDI 2023 · 12 citations
Dusk over the sea between two cliffs drawn in fine vertical lines