# F* with Low* (KaRaMeL to C)

> Write low-level code in Low*, a C-like subset of F*, prove it safe and correct with F* and Z3, then compile it to readable C with KaRaMeL.

- Kind: toolchain
- Verifies: F* (Low*) (Code written in the Low* subset of F*; it is then compiled to C by KaRaMeL.)
- Effort: Auto-active — You write specifications and hints; a solver does the proving.
- Stage: 2 (Production)
- Trust: Checker partial, Semantics partial, Frontend strong, Binary gap weak, Escape hatches partial
- Licence: open-source, Apache-2.0
- Latest release: F* v2026.03.24 (last F* release with Low*) (2026-03-24) https://github.com/FStarLang/FStar/releases/tag/v2026.03.24
- Links: [homepage](https://fstar-lang.org/), [repo](https://github.com/FStarLang/LowStar), [docs](https://fstarlang.github.io/lowstar/html/), [paper](https://doi.org/10.1145/3110261), [tutorial](https://fstarlang.github.io/lowstar/html/)

## Use it if
- You maintain or extend existing Low* code, such as HACL* cryptography or EverParse parsers.
- You need verified C that fits into an existing C code base, with memory safety, correctness and secret-independence proofs.
- You can work with an F* release from before April 2026, or the separate LowStar repository.

## Look elsewhere if
- You are starting new low-level F* work; Low* was removed from F* in April 2026, and F* now ships Pulse as its built-in language for imperative code.
- Your code needs closures, recursive data types in C or concurrency; Low* targets sequential, first-order C-like code.
- You need the proof checked by a small proof kernel; F* relies on its type checker and Z3.

## How it works (pipeline)

| Step | Component | Assurance | Note |
|---|---|---|---|
| frontend | F* parser and type checker | trusted | F* checks the same source it later extracts; there is no separate translator from another language. |
| semantics | Low* libraries (HyperStack memory model, LowStar.Buffer) | trusted | Moved out of F* into the FStarLang/LowStar repository in 2026. The Low* language and its compilation to C are formalized on paper in the ICFP 2017 paper. |
| translation | F* verification-condition generation (SMT encoding) | trusted |  |
| checker | Z3 (`z3`) | trusted |  |
| compiler | KaRaMeL (Low* to C), then a C compiler | trusted | KaRaMeL's translation has a paper proof relating Low* to CompCert's Clight; the tool itself is not verified. |

## Trust

| Axis | Level | Summary | Note |
|---|---|---|---|
| Checker | Partial (amber) | F*'s type checker and the Z3 SMT solver decide; no small kernel, no proof certificates. |  [source](https://fstar-lang.org/tutorial/) |
| Semantics | Partial (amber) | Low*'s memory model is a library inside F*; formalized on paper, not validated against C. |  [source](https://doi.org/10.1145/3110261) |
| Frontend | Strong (green) | F* checks the same source it compiles; no separate translator is involved. |  [source](https://fstarlang.github.io/lowstar/html/LowStar.html) |
| Binary gap | Weak (red) | KaRaMeL (paper proof only) and the C compiler that builds the binary are not verified. |  [source](https://github.com/FStarLang/karamel) |
| Escape hatches | Partial (amber) | assume, admit and assume val skip proofs; found by searching the source. |  [source](https://fstar-lang.org/tutorial/book/part1/part1_prop_assertions.html) |

## What it can prove

| Property | Support |
|---|---|
| No undefined behavior | Supported — Low* code is proved memory safe (buffer bounds and liveness); HACL*'s README describes its code as verified for memory safety, functional correctness and secret independence. ([source](https://github.com/hacl-star/hacl-star)) |
| Functional correctness | Supported — Full functional specifications in F*; HACL* proves its code correct against mathematical specifications. ([source](https://github.com/hacl-star/hacl-star)) |
| Equivalence | Partial — No dedicated equivalence mode; you prove Low* code equal to a pure F* specification function by hand, which is how HACL* is structured. |
| Information flow | Partial — HACL* proves secret independence (a defense against some timing side channels) by using abstract secret integer types in its libraries; this is a library discipline, not a built-in F* check. ([source](https://github.com/hacl-star/hacl-star)) |
| Concurrency | Not supported — Low* is for sequential, C-like code. F*'s Pulse language covers concurrency, but it is not part of Low*. ([source](https://github.com/FStarLang/LowStar)) |
| Termination and liveness | Supported — F* proves that total functions terminate, using a measure that must decrease on each recursive call. ([source](https://fstar-lang.org/tutorial/book/part1/part1_termination.html)) |

## Common features

| Feature | Support |
|---|---|
| Machine integers | Supported — Machine integers are Low*'s base types, with both wrapping and checked operations. ([source](https://fstarlang.github.io/lowstar/html/LowStar.html)) |
| Floating point | Unknown — Floating point is not mentioned in the Low* manual. |
| Heap and pointers | Supported — Stack and heap allocation through the HyperStack memory model, with modifies clauses. ([source](https://fstarlang.github.io/lowstar/html/LowStar.html)) |
| Arrays and buffers | Supported — Buffers with pointer arithmetic within bounds (LowStar.Buffer). ([source](https://fstarlang.github.io/lowstar/html/LowStar.html)) |
| Loops | Supported — Ordinary control flow is supported; loops can be written as tail-recursive functions, which C compilers turn into loops. ([source](https://fstarlang.github.io/lowstar/html/LowStar.html)) |
| Recursion | Supported — Recursive functions are allowed and compiled to C functions. ([source](https://fstarlang.github.io/lowstar/html/LowStar.html)) |
| Higher-order code | Partial — Function pointers work to some extent; local closures are not supported because they have no natural C equivalent. ([source](https://fstarlang.github.io/lowstar/html/LowStar.html)) |
| Threads and shared memory | Not supported — Low* covers sequential code only. ([source](https://github.com/FStarLang/LowStar)) |
| I/O and system calls | Partial — C library functions are reached through Low* system libraries and assumed declarations, whose specifications are trusted. ([source](https://fstarlang.github.io/lowstar/html/LowStar.html)) |
| Standard library | Partial — Low* libraries cover buffers, endianness, C strings and parts of the C standard library. ([source](https://github.com/FStarLang/LowStar)) |

## Stage

**Stage 2: Production.**

| Stage | Criterion | Met | Evidence / note |
|---|---|---|---|
| 0 | Publicly available | yes | [evidence](https://github.com/FStarLang/LowStar) |
| 0 | At least one published verification uses it | yes | [evidence](https://doi.org/10.1145/3110261) Verified low-level programming embedded in F* (ICFP 2017); HACL* and EverCrypt are built with it. |
| 1 | Released or updated in the last 12 months | yes | [evidence](https://github.com/FStarLang/FStar/releases/tag/v2026.03.24) Latest release: F* v2026.03.24 (last F* release with Low*), 2026-03-24. |
| 1 | Installs and runs on current platforms | yes | [evidence](https://github.com/FStarLang/FStar/releases/tag/v2026.03.24) F* v2026.03.24 (Linux, macOS, Windows binaries) is the last F* release that includes Low*. F* removed Low* in April 2026 (pull request 4161); the libraries now live in the FStarLang/LowStar repository, which pins an older F* branch, and HACL* builds with a frozen F* version. Whether Low* works with current F* releases is not documented. |
| 1 | User documentation or tutorial | yes | [evidence](https://fstarlang.github.io/lowstar/html/) |
| 1 | Used by a group other than its authors | yes | [evidence](https://research-development.nomadic-labs.com/improving-the-implementation-of-cryptography-in-tezos-octez.html) Nomadic Labs integrated HACL* (Low* code) into the Tezos Octez implementation. |
| 2 | Verified code in production at two or more independent organizations | yes | 2 recorded: Mozilla, Python (CPython). |
| 2 | Checker axis is not red | yes |  |
| 2 | Semantics axis is not red | yes |  |
| 2 | Public channel for soundness bugs | yes | [evidence](https://github.com/FStarLang/FStar/issues?q=label%3Akind%2Funsoundness) Public F* issues with a 'kind/unsoundness' label. |

## In production
- Mozilla: HACL* code (for example Curve25519, ChaCha20-Poly1305, SHA-3) in NSS, the cryptography library used by Firefox. ([source](https://github.com/mozilla/nss/tree/master/lib/freebl/verified))
- Python (CPython): HACL* code for the built-in SHA1, SHA2-384, SHA2-512, SHA3 and MD5 in hashlib since Python 3.12, used when OpenSSL does not provide them. ([source](https://docs.python.org/3/whatsnew/3.12.html))

## Projects
- [HACL* verified cryptographic library](https://github.com/hacl-star/hacl-star) — In maintenance mode; builds with a frozen F* version from before Low* was removed.
- [Curve25519 in the Linux kernel](https://github.com/torvalds/linux/blob/master/lib/crypto/curve25519-hacl64.c) — Generated from HACL* and then tweaked by hand for the kernel.
- [Tezos Octez cryptography](https://research-development.nomadic-labs.com/improving-the-implementation-of-cryptography-in-tezos-octez.html)

## Sources
- [Merge fstar2 into master (removes Low* and monotonic heap modules), April 2026](https://github.com/FStarLang/FStar/pull/4161)
- [LowStar repository (Low* libraries moved out of F*)](https://github.com/FStarLang/LowStar)
- [F* README (Custard extraction, Pulse)](https://github.com/FStarLang/FStar/blob/master/README.md)
- [KaRaMeL README](https://github.com/FStarLang/karamel)
- [The Low* subset of F*](https://fstarlang.github.io/lowstar/html/LowStar.html)
- [HACL* README (maintenance mode, frozen F*)](https://github.com/hacl-star/hacl-star)
- [F* homepage (F* in production)](https://fstar-lang.org/)

---
Last checked 2026-11-26. Data: [JSON](/toolchains/fstar-lowstar.json) · Page: [HTML](/toolchains/fstar-lowstar/) · Methodology v0.1: [/methodology/](/methodology/) · Corrections: [/contribute/](/contribute/)
