Verified Garbage is a new experimental cryptography library. It is written entirely by LLMs. All primitives are formally verified using Lean. The library writes assembly for each algorithm and each CPU architecture. It then proves the assembly matches the algorithm and runs in constant time. It supports every cryptographic algorithm used by pyca/cryptography. It runs on x86, x86-64, ARMv7, ARM64, PPC64le and RISC-V64. Benchmarks show strong performance against OpenSSL and AWS-LC. The approach relies on a trusted computing base of hand-reviewed specifications. The library is available as a Rust crate. A rustls provider lets it plug into TLS stacks. The project is an experiment in LLM-driven, formally verified crypto. The team plans to keep optimizing and seeks user feedback.
What changed
Cryptography libraries were either hand-written with trade-offs or not formally verified at scale.
What it unlocks
Using LLMs to generate and formally verify high-performance assembly cryptography across multiple ISAs.
- 6 ISAs supported
- all pyca/cryptography algorithms covered
- throughput relative to OpenSSL 4.1.0
What you need to act on it
- trust in hand-reviewed specifications for algorithms and ISAs
- Rust environment for library use
Sources