Repository navigation
Conversation
Hand-written Lean 4 models of security-relevant pure logic, with machine-checked proofs and a CI job that builds them and rejects sorry, axioms and native_decide. Cryptographic idealizations are explicit theorem hypotheses. Signed-off-by: Kevin Wang <wy721@qq.com>
kvinwang
force-pushed
the
feat/lean-proofs
branch
from
November 18, 2026 03:03
e9bed35 to
c348d02
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
formal/, a Lean 4 project (core Lean, no Mathlib) with hand-written models of security-relevant logic and machine-checked proofs, plus a CI job (lean.yml) that builds it and rejectssorry,axiomandnative_decide. Seeformal/README.mdfor the module list and trust base; each module header names the Rust/Solidity functions it mirrors and its modeling gaps.servable_epoch/handover binding, KDF domain separation, RA-TLS encoding injectivity, and the key-release check set.Hashes and KDFs are parameters; injectivity is an explicit hypothesis, never an axiom.
Observations from the proofs, for follow-up (not changed here):
extract_sniignores the declared record/extension/server-name lengths.CertStore::exact_certsis never populated, so the exact-match branch ofresolve_certis dead.instance_id_seedlength is unchecked, so the instance id alone is not globally unique across app ids (it is for a fixed app id).