Verified Garbage: An experimental formally verified cryptography library verifie...
HN Best 200 @best
Verified Garbage: An experimental formally verified cryptography library verified-garbage.dev · 10 points · 0 comments · HN thread
TL;DR Verified Garbage is an experimental cryptography library from two long-time pyca/cryptography maintainers, in which all algorithms are written in assembly for six ISAs and formally proven in Lean to be equivalent to Lean specifications and constant-time. The authors say LLMs wrote the assembly and proofs and also drafted the specifications, which humans then reviewed. The post includes benchmarks against OpenSSL and AWS-LC and invites feedback from potential users.
- Every algorithm is written in assembly per architecture, then formally verified in Lean against a specification of the algorithm and of the CPU instruction set, including constant-time behavior.
- Claimed coverage is every algorithm used by pyca/cryptography, on x86, x86-64, ARMv7, ARM64, PPC64le and RISCV64.
- Benchmarks are reported as throughput relative to OpenSSL 4.1.0 (baseline 1.0) on an AMD Ryzen 9 9950X and an Apple M1 Max; TLS 1.3 comparisons use AWS-LC as baseline instead.
- The specifications are the trusted computing base; they were LLM-written and then human-reviewed, and the authors say they may replace them with community-maintained specifications.
- Distribution is as a Rust crate (verified-garbage) and a rustls provider (rustls-verified-garbage).
- The authors state it is an experiment, do not currently plan to replace OpenSSL in pyca/cryptography, and ask what would make it valuable to users.
Discussion No comments have been posted yet, so there is no discussion to summarize.
#cryptography #formalVerification #Lean #assembly #LLM #rust