Verified Low-Level Programming Embedded in F*
arXiv:1703.00053 · doi:10.1145/3110261
Abstract
We present Low*, a language for low-level programming and verification, and its application to high-assurance optimized cryptographic libraries. Low* is a shallow embedding of a small, sequential, well-behaved subset of C in F*, a dependently-typed variant of ML aimed at program verification. Departing from ML, Low* does not involve any garbage collection or implicit heap allocation; instead, it has a structured memory model à la CompCert, and it provides the control required for writing efficient low-level security-critical code. By virtue of typing, any Low* program is memory safe. In addition, the programmer can make full use of the verification power of F* to write high-level specifications and verify the functional correctness of Low* code using a combination of SMT automation and sophisticated manual proofs. At extraction time, specifications and proofs are erased, and the remaining code enjoys a predictable translation to C. We prove that this translation preserves semantics and side-channel resistance. We provide a new compiler back-end from Low* to C and, to evaluate our approach, we implement and verify various cryptographic algorithms, constructions, and tools for a total of about 28,000 lines of code, specification and proof. We show that our Low* code delivers performance competitive with existing (unverified) C cryptographic libraries, suggesting our approach may be applicable to larger-scale low-level software.
extended version of ICFP final camera ready version; only Acknowledgements differ from 30 Aug 2017 version
References in corpus (1)
Cited by in corpus (15)
- Journey Beyond Full Abstraction: Exploring Robust Property Preservation for Secure Compilation
- Aeneas: Rust Verification by Functional Translation
- Igloo: Soundly Linking Compositional Refinement and Separation Logic for Distributed System Verification
- Computer-aided proofs for multiparty computation with active security
- ConSORT: Context- and Flow-Sensitive Ownership Refinement Types for Imperative Programs
- Meta-F*: Proof Automation with SMT, Tactics, and Metaprograms
- Toward Programming Languages for Reasoning: Humans, Symbolic Systems, and AI Agents
- Formally Verified Hardware/Software Co-Design for Remote Attestation
- Securing Verified IO Programs Against Unverified Code in F*
- Verification of a Merkle Patricia Tree Library Using F*
- Narcissus: Deriving Correct-By-Construction Decoders and Encoders from Binary Formats
- From Dragondoom to Dragonstar: Side-channel Attacks and Formally Verified Implementation of WPA3 Dragonfly Handshake
- Extending Isabelle/HOL's Code Generator with support for the Go programming language
- LIO*: Low Level Information Flow Control in F*
- Generically Automating Separation Logic by Functors, Homomorphisms and Modules