Hacspec: succinct, executable, verifiable specifications for high-assurance cryptography embedded in Rust - Inria - Institut national de recherche en sciences et technologies du numérique
Rapport (Rapport Technique) Année : 2021

Hacspec: succinct, executable, verifiable specifications for high-assurance cryptography embedded in Rust

Denis Merigoux
Franziskus Kiefer
  • Fonction : Auteur
Karthikeyan Bhargavan

Résumé

Despite significant progress in the formal verification of security-critical components like cryptographic libraries and protocols, the secure integration of these components into larger unverified applications remains an open challenge. The first problem is that any memory safety bug or side-channel leak in the unverified code can nullify the security guarantees of the verified code. A second issue is that application developers may misunderstand the specification and assumptions of the verified code and so use it incorrectly. In this paper, we propose a novel verification framework that seeks to close these gaps for applications written in Rust. At the heart of this framework is hacspec, a new language for writing succinct, executable, formal specifications for cryptographic components. Syntactically, hacspec is a purely functional subset of Rust that aims to be readable by developers, cryptographers, and verification experts. An application developer can use hacspec to specify and prototype cryptographic components in Rust, and then replace this specification with a verified implementation before deployment. We present the hacspec language, its formal semantics and type system, and describe a translation from hacspec to F. We evaluate the language and its toolchain on a library of popular cryptographic algorithms. An earlier attempt in this direction by some of the same authors, was also called hacspec, and sought to embed a cryptographic specification language into Python. We now believe that the strong typing of Rust provides an essential improvement to the specification and programming workflow. This work subsumes and obsoletes that earlier attempt. Hereafter, we use hacspec-python to refer to this prior version.
Fichier principal
Vignette du fichier
main.pdf (466.78 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03176482 , version 1 (22-03-2021)

Identifiants

  • HAL Id : hal-03176482 , version 1

Citer

Denis Merigoux, Franziskus Kiefer, Karthikeyan Bhargavan. Hacspec: succinct, executable, verifiable specifications for high-assurance cryptography embedded in Rust. [Technical Report] Inria. 2021. ⟨hal-03176482⟩

Collections

INRIA INRIA2 LARA
2029 Consultations
2328 Téléchargements

Partager

More