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

Philipp G. Haselwarter, Benjamin Salling Hvass, Lasse Letager Hansen, Théo Winterhalter, Cǎtǎlin Hriţcu, Bas Spitters

Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

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.

Original languageEnglish
Title of host publicationCPP 2024 : Proceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs
EditorsAmin Timany, Dmitriy Traytel, Brigitte Pientka, Sandrine Blazy
Number of pages15
PublisherAssociation for Computing Machinery
Publication dateJan 2024
Pages30-44
ISBN (Electronic)979-8-4007-0488-8
DOIs
Publication statusPublished - Jan 2024
Event13th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2024, in affiliation with the annual Symposium on Principles of Programming, Languages, ,POPL 2024 - London, United Kingdom
Duration: 15 Jan 202416 Jan 2024

Conference

Conference13th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2024, in affiliation with the annual Symposium on Principles of Programming, Languages, ,POPL 2024
Country/TerritoryUnited Kingdom
CityLondon
Period15/01/202416/01/2024

Keywords

  • AES
  • computer-aided cryptography
  • Coq
  • formal verification
  • high-assurance cryptography

Fingerprint

Dive into the research topics of 'The Last Yard: Foundational End-to-End Verification of High-Speed Cryptography'. Together they form a unique fingerprint.

Cite this