HackerPapers

arXiv:1703.00053cs.PL

Verified Low-Level Programming Embedded in F*

Jonathan Protzenko, Jean-Karim Zinzindohoué, Aseem Rastogi, Tahina Ramananandro, Peng Wang, Santiago Zanella-Béguelin, Antoine Delignat-Lavaud, Catalin Hritcu, Karthikeyan Bhargavan, Cédric Fournet, Nikhil Swamy

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.

arXiv comments
extended version of ICFP final camera ready version; only Acknowledgements differ from 30 Aug 2017 version
Journal reference
DOI
doi:10.1145/3110261
Subjects
cs.PLProgramming Languages cs.CRCryptography and Security

On Hacker News

Linked by 3 identifiable commenters in 3 comments across 2 threads, from Sep 2017 to Apr 2025. Found in 1 HN submission from Mar 2017 to Mar 2017. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • This paper [0] linked in the KaRaMeL repo claims to provide the proof you're looking for: > Verified Low-Level Programming Embedded in F∗ > We present Low∗, a language for low-level programming and verification, and its application to high-assurance optimized cryptographic…

      aw1621107View on HNParent context

    • > Here Mozilla is trying to verify it’s crypto. If you look at the paper describing this work <https://arxiv.org/abs/1703.00053>, you'll see that this is an academic effort and 7 of 12 authors are actually at Microsoft Research. But kudos to Mozilla for bringing all this…

      lowerView on HNParent context

    • Bad link. Should be: https://arxiv.org/abs/1703.00053

      lomnakkusView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.