Synthesizes formally verified, correct-by-construction C, Rust, Go, and other language code for cryptographic field arithmetic primitives.
Fiat-Crypto is a Coq-based tool that synthesizes formally verified, correct-by-construction code for cryptographic field arithmetic primitives. It generates high-assurance implementations of operations like modular multiplication and addition for elliptic curves (e.g., Curve25519, NIST P-256), solving the problem of error-prone manual crypto implementation.
Cryptography engineers, security researchers, and developers building verified cryptographic libraries who need mathematically correct and efficient field arithmetic code.
Developers choose Fiat-Crypto because it provides formally verified code that eliminates subtle bugs, supports multiple output languages and optimization strategies, and integrates into existing cryptographic libraries with high assurance.
Cryptographic Primitive Code Generation by Fiat
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All generated code is proven correct in Coq against mathematical specifications, eliminating subtle implementation bugs common in manual crypto code, as highlighted in the project's papers and thesis links.
Synthesizes code for C, Rust, Go, Java, Zig, and Bedrock2/C, allowing integration into diverse projects, with some backends like C and Rust tested against external test suites.
Supports multiple strategies like unsaturated Solinas and word-by-word Montgomery, enabling performance tuning for specific hardware, as demonstrated in the command-line examples for curves like Curve25519.
Includes a web interface powered by js_of_ocaml for trying synthesis without local setup, making it easier to experiment with parameters and strategies.
Requires Coq 8.20+, OCaml, and specific dependencies; the README notes builds can take over an hour, and setup involves managing submodules and package installations across different OSes.
Some backends like Java are marked as buggy and unmaintained in the status table, while others like JSON are experimental, reducing trust for production use in those languages.
Users must understand Coq and formal methods to modify or extend the synthesis, as the pipeline relies on verified transformations and proofs, limiting accessibility for non-experts.