Skip to Main content Skip to Navigation
Conference papers

hacspec: Towards Verifiable Crypto Standards

Abstract : We present hacspec, a collaborative effort to design a formal specification language for cryptographic primitives. Specifications (specs) written in hacspec are succinct, easy to read and implement, and lend themselves to formal verification using a variety of existing tools. The syntax of hacspec is similar to the pseudocode used in cryptographic standards but is equipped with a static type system and syntax checking tools that can find errors. Specs written in hacspec are executable and can hence be tested against test vectors taken from standards and specified in a common format. Finally, hacspec is designed to be compilable to other formal specification languages like F⋆, EasyCrypt, Coq, and cryptol, so that it can be used as the basis for formal proofs of functional correctness and cryptographic security using various verification frameworks. This paper presents the syntax, design, and tool architecture of hacspec. We demonstrate the use of the language to specify popular cryptographic algorithms, and describe preliminary compilers from hacspec to F⋆ and to EasyCrypt. Our goal is to invite authors of cryptographic standards to write their pseudocode in hacspec and to help the formal verification community develop the language and tools that are needed to promote high-assurance cryptographic software backed by mathematical proofs.
Complete list of metadata

Cited literature [27 references]  Display  Hide  Download
Contributor : Bhargavan Karthikeyan <>
Submitted on : Monday, February 4, 2019 - 2:24:32 PM
Last modification on : Thursday, March 5, 2020 - 6:37:50 PM
Long-term archiving on: : Sunday, May 5, 2019 - 3:04:46 PM


Files produced by the author(s)




Karthikeyan Bhargavan, Franziskus Kiefer, Pierre-Yves Strub. hacspec: Towards Verifiable Crypto Standards. Security Standardisation Research. SSR 2018, Nov 2018, Darmstadt, Germany. pp.1-20, ⟨10.1007/978-3-030-04762-7_1⟩. ⟨hal-01967342⟩



Record views


Files downloads