Lune

S&P2017Top-tier venue

Implementing and Proving the TLS 1.3 Record Layer

Antoine Delignat-Lavaud, Cédric Fournet, Markulf Kohlweiss, Jonathan Protzenko, Aseem Rastogi, Nikhil Swamy, Santiago Zanella-Béguelin, Karthikeyan Bhargavan, Jianyang Pan, Jean Karim Zinzindohoue

Abstract

The record layer is the main bridge between TLS applications and internal sub-protocols. Its core functionality is an elaborate authenticated encryption: streams of messages for each sub-protocol (handshake, alert, and application data) are fragmented, multiplexed, and encrypted with optional padding to hide their lengths. Conversely, the sub-protocols may provide fresh keys or signal stream termination to the record layer. Compared to prior versions, TLS 1.3 discards obsolete schemes in favor of a common construction for Authenticated Encryption with Associated Data (AEAD), instantiated with algorithms such as AES-GCM and ChaCha20-Poly1305. It differs from TLS 1.2 in its use of padding, associated data and nonces. It encrypts the content-type used to multiplex between sub-protocols. New protocol features such as early application data (0-RTT and 0.5-RTT) and late handshake messages require additional keys and a more general model of stateful encryption. We build and verify a reference implementation of the TLS record layer and its cryptographic algorithms in F , a dependently typed language where security and functional guarantees can be specified as pre-and post-conditions. We reduce the high-level security of the record layer to cryptographic assumptions on its ciphers. Each step in the reduction is verified by typing an F module; when the step incurs a security loss, this module precisely captures the corresponding game-based security assumption. We first verify the functional correctness and injectivity properties of our implementations of onetime MAC algorithms (Poly1305 and GHASH) and provide a generic proof of their security given these properties. We show the security of AEAD given any secure one-time MAC and PRF. We extend AEAD, first to stream encryption, then to length-hiding, multiplexed encryption. Finally, we build a security model of the record layer against an adversary that controls the TLS sub-protocols. We compute concrete security bounds for the AES-GCM and ChaCha20-Poly1305 ciphersuites, and derive recommended limits on sent data before re-keying. Combining our functional correctness and security results, we obtain the first verified implementations of the main TLS 1.3 record ciphers. We plug our implementation of the record layer into an existing TLS library and confirm that the combination interoperates with Chrome and Firefox, and thus that experimentally the new TLS record layer (as described in RFCs and cryptographic standards) is provably secure.

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.

31 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

  • EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider cites HACL: A Verified Modern Cryptographic Library
  • SoK: Computer-Aided Cryptography cites EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider
  • SoK: Computer-Aided Cryptography cites Automated Analysis and Verification of TLS 1.3: 0-RTT, Resumption and Delayed Authentication
  • SoK: Computer-Aided Cryptography cites A Comprehensive Symbolic Analysis of TLS 1.3
  • SoK: Computer-Aided Cryptography cites HACL: A Verified Modern Cryptographic Library
  • A Comprehensive Symbolic Analysis of TLS 1.3 cites Automated Analysis and Verification of TLS 1.3: 0-RTT, Resumption and Delayed Authentication
  • A Comprehensive Symbolic Analysis of TLS 1.3 cites On the Practical (In-)Security of 64-bit Block Ciphers: Collision Attacks on HTTP over TLS and OpenVPN
  • A Comprehensive Symbolic Analysis of TLS 1.3 cites Key Confirmation in Key Exchange: A Formal Treatment and Implications for TLS 1.3
  • Seems Legit: Automated Analysis of Subtle Attacks on Protocols that Use Signatures cites Automated Analysis and Verification of TLS 1.3: 0-RTT, Resumption and Delayed Authentication
  • Seems Legit: Automated Analysis of Subtle Attacks on Protocols that Use Signatures cites A Comprehensive Symbolic Analysis of TLS 1.3
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers31

  1. HACL*: A Verified Modern Cryptographic LibraryJean Karim Zinzindohoué, Karthikeyan Bhargavan, Jonathan Protzenko, Benjamin BeurdoucheCCS 2017 · 258 citations
  2. A Comprehensive Symbolic Analysis of TLS 1.3Cas Cremers, Marko Horvat, Jonathan Hoyland, Sam Scott et al.CCS 2017 · 247 citations
  3. SoK: Computer-Aided CryptographyManuel Barbosa, Gilles Barthe, Karthik Bhargavan, Bruno Blanchet et al.S&P 2021 · 169 citations
  4. EverCrypt: A Fast, Verified, Cross-Platform Cryptographic ProviderJonathan Protzenko, Bryan Parno, Aymeric Fromherz, Chris Hawblitzel et al.S&P 2020 · 114 citations
  5. Seems Legit: Automated Analysis of Subtle Attacks on Protocols that Use SignaturesDennis Jackson, Cas Cremers, Katriel Cohn-Gordon, Ralf SasseCCS 2019 · 53 citations

Builds on5

  1. On the Practical (In-)Security of 64-bit Block Ciphers: Collision Attacks on HTTP over TLS and OpenVPNKarthikeyan Bhargavan, Gaëtan LeurentCCS 2016 · 180 citations
  2. Systematic Fuzzing and Testing of TLS LibrariesJuraj SomorovskyCCS 2016 · 136 citations
  3. Automated Analysis and Verification of TLS 1.3: 0-RTT, Resumption and Delayed AuthenticationCas Cremers, Marko Horvat, Sam Scott, Thyla van der MerweS&P 2016 · 128 citations
  4. A Unilateral-to-Mutual Authentication Compiler for Key Exchange (with Applications to Client Authentication in TLS 1.3)Hugo KrawczykCCS 2016 · 24 citations
  5. Key Confirmation in Key Exchange: A Formal Treatment and Implications for TLS 1.3Marc Fischlin, Felix Günther, Benedikt Schmidt, Bogdan WarinschiS&P 2016 · 1 citation

Related papers

  1. The Security of ChaCha20-Poly1305 in the Multi-User SettingJean Paul Degabriele, Jérôme Govinden, Felix Günther, Kenneth G. PatersonCCS 2021 · 23 citations
  2. Multi-User Security of CCM Authenticated Encryption ModeXiangyang Zhang, Yaobin Shen, Lei WangCCS 2024 · 2 citations
  3. The Multi-user Security of GCM, Revisited: Tight Bounds for Nonce RandomizationViet Tung Hoang, Stefano Tessaro, Aishwarya ThiruvengadamCCS 2018 · 39 citations
  4. 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
  5. A Security Model and Fully Verified Implementation for the IETF QUIC Record LayerAntoine Delignat-Lavaud, Cédric Fournet, Bryan Parno, Jonathan Protzenko et al.S&P 2021 · 30 citations
Dusk over the sea between two cliffs drawn in fine vertical lines