HACSpec: A Formal Cryptographic Specification Language for High-Assurance Engineering

An introduction to HACSpec, its type system, and its application in building transparent, verifiable post-quantum cryptographic standards.

Bridging Cryptographic Pseudocode and Executable Code

Cryptographic standards written in mathematical pseudocode often contain ambiguities that lead to incompatible or vulnerable software implementations. HACSpec provides a domain-specific language embedded in Rust that reads like algorithmic pseudocode but executes as formal, verifiable code.

Automated Transpilation to Coq, F*, and EasyCrypt

HACSpec specifications can be automatically compiled into verification languages such as Coq, F*, and EasyCrypt. This enables cryptographers to verify security proofs directly against the exact code that forms the basis of production libraries.

Case Study: Validating FIPS 203 ML-KEM in HACSpec

We review the formal HACSpec implementation of ML-KEM, highlighting how type constraints enforce polynomial degree limits, coefficient modulus ranges, and constant-time execution guarantees across the entire lifecycle.

Explore Technical Architecture & Portfolio