open access publication

Conference Paper, 2024

The Last Yard: Foundational End-to-End Verification of High-Speed Cryptography

Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs, ISBN 9798400704888, Pages 30-44, 10.1145/3636501.3636961

Contributors

Haselwarter, Philipp G 0000-0003-0198-7751 [1] Hvass, Benjamin Salling [1] Hansen, Lasse Letager 0000-0003-3271-3593 [1] Winterhalter, Théo 0000-0002-9881-3696 [2] Hriţcu, Cătălin (Corresponding author) [3] Spitters, B A W 0000-0002-2802-0973 [1]

Affiliations

  1. [1] Aarhus University
  2. [NORA names: AU Aarhus University; University; Denmark; Europe, EU; Nordic; OECD];
  3. [2] Inria Saclay - Île-de-France Research Centre
  4. [NORA names: France; Europe, EU; OECD];
  5. [3] Max Planck Institute for Security and Privacy
  6. [NORA names: Germany; Europe, EU; OECD]

Abstract

The field of high-assurance cryptography is quickly maturing, yet a unified foundational framework for end-to-end formal verification of efficient cryptographic implementations is still missing. To address this gap, we use the Coq proof assistant to formally connect three existing tools: (1) the Hacspec emergent cryptographic specification language; (2) the Jasmin language for efficient, high-assurance cryptographic implementations; and (3) the SSProve foundational verification framework for modular cryptographic proofs. We first connect Hacspec with SSProve by devising a new translation from Hacspec specifications to imperative SSProve code. We validate this translation by considering a second, more standard translation from Hacspec to purely functional Coq code and generate a proof of the equivalence between the code produced by the two translations. We further define a translation from Jasmin to SSProve, which allows us to formally reason in SSProve about efficient cryptographic implementations in Jasmin. We prove this translation correct in Coq with respect to Jasmin's operational semantics. Finally, we demonstrate the usefulness of our approach by giving a foundational end-to-end Coq proof of an efficient AES implementation. For this case study, we start from an existing Jasmin implementation of AES that makes use of hardware acceleration and prove that it conforms to a specification of the AES standard written in Hacspec. We use SSProve to formalize the security of the encryption scheme based on the Jasmin implementation of AES.

Keywords

AES, AES implementation, AES standard, CoQ, Coq code, Coq proof assistant, acceleration, assistance, case study, cases, code, cryptographic implementations, cryptographic proofs, cryptography, encryption, encryption scheme, end-to-end verification, equivalence, foundational framework, framework, gap, hardware, hardware accelerators, high-speed, implementation, implementation of AES, jasmine, language, operational semantics, proof, proof assistant, scheme, security, semantics, specification language, specificity, standard translation, standards, study, tools, translation, use, verification, verification framework

Funders

  • Deutsche Forschungsgemeinschaft
  • Federal Ministry of Education and Research
  • The Velux Foundations

Data Provider: Digital Science