Skip to content

Remove dead declarations and modules: second pass - #4392

Merged
alex merged 5 commits into
mainfrom
claude/unify-random-bytes-crypto-xqmg0z-deadcode-pass2
Nov 7, 2026
Merged

alex merged 5 commits into
mainfrom
claude/unify-random-bytes-crypto-xqmg0z-deadcode-pass2

Conversation

@reaperhulk

Copy link
Copy Markdown
Member

The second dead-code pass over lean/VerifiedGarbage/Proof/ and lean/VerifiedGarbage/Impl/: every directory except Selftest and Variants. The first pass (#4314, #4349, #4354, #4362, #4367) kept declarations that another group used; this pass removes those, the chains that became dead only after them, and what the first pass missed.

The method is the one in tools/deadcode (on claude/unify-random-bytes-crypto-xqmg0z-deadcode-tools; not committed here):

  • Graph: built from the .ilean files of a full build of 9ff6f96c.
  • Roots: Artifacts/, Generic/, Variants/, TCB/, VerifiedGarbageTest/, the lakefile's modules and the top-level files' imports.
  • Rounds: iterated to a fixed point, then rebuilt and the analysis rerun on the new build. That found 17 more declarations (Arm TwoExp) that the first round had left dead. A third run on the final build finds nothing.

1,051 declarations and 144 whole modules removed (446 files, about 22,000 lines). Modules that lost imports a deleted module passed on now import what they use directly. Registration files only lose imports of deleted modules.

Counts per algorithm

Group Declarations Modules deleted
Weierstrass 368 45
Bignum 291 62
MlDsa 218 21
Mont 51 9
Sha3 39 0
Rsa 30 3
RsaPkcs1Enc 19 0
Ecdsa 15 4
Ed25519 5 0
AesGcm 4 0
Gcm 3 0
Xdh 3 0
Framework (exists_map_le_of_eraseT, Arm.pub_arm, X86_64.pub_args) 3 0
MlKem 1 0
Ecdh 1 0

Top-level Verified proofs removed

Each one is dead for the same reason: no registration (Artifacts/, Generic/, Variants/) emits the function it proves, and nothing reachable from one refers to it.

  • Bignum:
    • AArch64.SquareHelper.verified, Arm.public_verified, X86.PublicRt.verified, PPC64LE.Crt.crt_verified, RISCV64.Crt.crt_verified: proofs of standalone entry points that no registration emits.
  • ECDSA: X86.signComb_verified: the x86 comb signer is not registered.
  • ML-DSA (AArch64): proofs of the cached, paired and selected sign and verify entry points, none of which a registration emits:
    • Message: signMessage_verified, signMessage_of_verified, signFn_of_verified (CachedVerified); signMessage_verified (PairedVerified)
    • Optimized.verifyMessage_verified (CachedVerifyVerified)
    • Sign: verified, message_verified (CachedSelected); sign_verified, sign_verified_of_loop (CachedVerified); pairedSign_verified (OptimizedPairedVerified)
    • Verify: verify_verified (Final); verify44_verifiedWith, verify65_verifiedWith, verify87_verifiedWith (Inst); selected_cached_message_verified, selected_verify_verified, verifyMessage_verified, verify_verified (OptimizedSelected)
  • SHA-3 sponge absorb/pad/squeeze on AArch64.Stream, Arm.Shared, PPC64LE.Stream, X86.Shared and X86_64.Stream:
    • No SHA-3 registration emits these sponge calls on their own.
    • Their Instances helpers went with them.

Kept on purpose

These look dead in the .ilean graph but are used in ways it does not record:

  • Literals found by name:
    • All *.lit and *.lit_eq (22), which keeps Ed448/X86_64/VariantForLit.
    • The 25 RsaKeyGen *Ranges_shape lemmas. hdr_disj (Proof/RsaKeyGen/Hdr.lean) builds the name <list>_shape and looks it up. The build caught this; RsaKeyGen therefore loses nothing.
  • Names used inside syntax:
    • About 490 declarations named only in tactic_template bodies, macro_rules, elab and quotations (e.g. crun, ffrun).
    • The sponge_taint_summaries syntax declaration, whose elab_rules stay.
    • 159 generated _aux_ declarations and about 29 meta declarations.
  • Auto-param defaults: Modes.Arm.tabsOk_nil is named only in (ht : … := by exact tabsOk_nil _ _), which the TripleDes, Blowfish, Camellia, IDEA and SEED Arm proofs use. The build caught this.
  • Modules with no declarations that live code imports for what they pass on or the attributes they set: NativeTaint, Arm.NativeTaint, InstancePriority and DSA's FrameCopy.
  • Documented framework API that Proof framework: remove dead declarations and modules #4362 kept:
    • RISC-V: callF, narrowF, inline, pushFrames, isPush, push_mem, Exec.frameSp, below_*.
    • x86 and x86-64: X86.RelCT.ite, X86_64.WP.lane0z.
    • Taint: constantTime_eraseImm(_of_eq).
    • Regions and offsets: Offset.add_congr, Region.disjoint_comm.
    • Verified.subst, Subst.lean's headline theorem.
  • Declarations the out-of-scope Proof/Variants/ uses: SHA-256 x86 compressWide*, compressContract and compressSig, used by Proof/Variants/Sha256/X86/ShaNi.
  • The inputs materialize commands evaluate: the Weierstrass PointLit inputs (Impl.Weierstrass.Point.*, X86.Point.fn/modP/fn0).

Checks

All run locally on this branch, based on 9ff6f96c:

  • lake build --log-level=warning (full): passes, 28,155 jobs.
  • lake env lean --run Emit.lean --check: passes. No generated crate changes; the axiom, compiled-code and VG.Spec audits pass.
  • Every Static checks step in ci.yml passes:
    • check_lean_imports, check_lean_modules, check_lean_single_importer --base origin/main
    • check_case_collisions, check_registrations, check_lean_speed, audit_base check
    • algorithms_table --check, check_arch_gates, check_variants, check_skills
    • the VG_CPU_FEATURES grep, cpu_tests lint, run_unit_tests (650 tests), check_mcdt, check_vectors
  • check_lean_public_imports.py --base origin/main -m <every modified module>: Imports OK.
  • cargo fmt --check and cargo clippy --all-targets -- -D warnings: pass.
  • Dead-code analysis rerun on the final build: nothing left in scope but the items above.
  • No sorry, native_decide, bv_decide or maxHeartbeats added.
  • main has moved to 8b31da42 since this branch's base. The branch merges cleanly: no file overlaps, and main changed nothing in TCB/, Spec/ or Proof/Framework/.

No Spec/ or TCB/ file changes, and no generated crate (crates/) changes. Nothing outside lean/ changes.

Spec/ definitions with no reference outside Spec/

No Spec/ declaration loses its last reference outside Spec/ because of this PR: the list below is the same before and after it. Each of these has no reference from any non-Spec/ declaration, for a separate session to handle.

143 definitions are dead. Nothing reachable from the roots uses them; mostly specs of APIs that no registration exports yet:

Dead (143)
  • Spec/Blowfish/CfbFinal.lean: Blowfish.cfbDecryptFinalApi, Blowfish.cfbDecryptFinalContract, Blowfish.cfbEncryptFinalApi, Blowfish.cfbEncryptFinalContract, Blowfish.cfbFinalSig
  • Spec/Blowfish/OfbFinal.lean: Blowfish.ofbFinalApi, Blowfish.ofbFinalContract, Blowfish.ofbFinalSig
  • Spec/Camellia/CfbFinal.lean: Camellia.cfbDecryptFinalApi, Camellia.cfbDecryptFinalContract, Camellia.cfbEncryptFinalApi, Camellia.cfbEncryptFinalContract, Camellia.cfbFinalPre, Camellia.cfbFinalSig
  • Spec/Camellia/CtrFinal.lean: Camellia.ctrFinalApi, Camellia.ctrFinalContract, Camellia.ctrFinalPre, Camellia.ctrFinalSig
  • Spec/Camellia/OfbFinal.lean: Camellia.ofbFinalApi, Camellia.ofbFinalContract, Camellia.ofbFinalPre, Camellia.ofbFinalSig
  • Spec/Cast5/CfbFinal.lean: Cast5.cfbDecryptFinalApi, Cast5.cfbDecryptFinalContract, Cast5.cfbEncryptFinalApi, Cast5.cfbEncryptFinalContract, Cast5.cfbFinalPre, Cast5.cfbFinalSig
  • Spec/Cast5/OfbFinal.lean: Cast5.ofbFinalApi, Cast5.ofbFinalContract, Cast5.ofbFinalPre, Cast5.ofbFinalSig
  • Spec/Ccm.lean: Ccm.aesCcmDecrypt, Ccm.aesCcmEncrypt
  • Spec/Cfb/Final.lean: Cfb.DecryptFinal, Cfb.EncryptFinal, Cfb.aesDecryptFinalApi, Cfb.aesDecryptFinalContract, Cfb.aesEncryptFinalApi, Cfb.aesEncryptFinalContract, Cfb.aesFinalSig, Cfb.decryptFinal, Cfb.decryptFinalNext, Cfb.encryptFinal, Cfb.encryptFinalNext, Cfb.segments, Cfb.tail
  • Spec/ChaCha20Poly1305/OutOfPlace.lean: ChaCha20Poly1305.openToApi, ChaCha20Poly1305.openToContract, ChaCha20Poly1305.openToLeak, ChaCha20Poly1305.openToPost, ChaCha20Poly1305.openToPre, ChaCha20Poly1305.openToSig
  • Spec/Ctr/Final.lean: Ctr.CryptFinal, Ctr.aesFinalApi, Ctr.aesFinalContract, Ctr.aesFinalSig, Ctr.blockCount, Ctr.cryptFinal
  • Spec/Entropy.lean: Entropy.Refill
  • Spec/Ffdh.lean: Ffdh.choose, Ffdh.generate, Ffdh.generateParameters
  • Spec/Ffdh/Generation.lean: Ffdh.ParameterSearchResult.available
  • Spec/Gcm.lean: Gcm.aesGcmDecrypt
  • Spec/Gcm/OutOfPlace.lean: Gcm.openToPrecomputedApi, Gcm.openToPrecomputedContract, Gcm.openToPrecomputedPre
  • Spec/Idea/CfbFinal.lean: Idea.cfbDecryptFinalApi, Idea.cfbDecryptFinalContract, Idea.cfbEncryptFinalApi, Idea.cfbEncryptFinalContract, Idea.cfbFinalSig
  • Spec/Idea/OfbFinal.lean: Idea.ofbFinalApi, Idea.ofbFinalContract, Idea.ofbFinalSig
  • Spec/MillerRabin.lean: MillerRabin.sqIter
  • Spec/Ofb/Final.lean: Ofb.CryptFinal, Ofb.aesFinalApi, Ofb.aesFinalContract, Ofb.aesFinalSig, Ofb.blockCount, Ofb.cryptFinal
  • Spec/RsaKeyGen/GenerationAgrees.lean: RsaKeyGen.SearchAgrees, RsaKeyGen.searchFrom, _private.VerifiedGarbage.Spec.RsaKeyGen.GenerationAgrees.0.RsaKeyGen.Reads
  • Spec/RsaKeyGen/KeySearch.lean: RsaKeyGen.KeyPhase, RsaKeyGen.KeyPhase.other, RsaKeyGen.KeyProgress, RsaKeyGen.KeySearchResult, RsaKeyGen.KeySearchResult.keyStatus, RsaKeyGen.KeySearchResult.progress, RsaKeyGen.keyBytes, RsaKeyGen.keyGenerations, RsaKeyGen.keyResultStatus, RsaKeyGen.keySearch, RsaKeyGen.keySearchInit
  • Spec/RsaKeyGen/KeySearchAgrees.lean: RsaKeyGen.BudgetHit, RsaKeyGen.KeySearchAgrees, RsaKeyGen.keyFrom, RsaKeyGen.onceFrom, RsaKeyGen.stepFrom, RsaKeyGen.stepQ
  • Spec/RsaKeyGen/KeySearchContract.lean: RsaKeyGen.keyInitApi, RsaKeyGen.keyInitContract, RsaKeyGen.keyInitSig, RsaKeyGen.keyProgressAt, RsaKeyGen.keySearchApi, RsaKeyGen.keySearchBytes, RsaKeyGen.keySearchContract, RsaKeyGen.keySearchSig
  • Spec/RsaPkcs1Sig/Contract.lean: RsaPkcs1Sig.recoverContract, RsaPkcs1Sig.recoverSig, RsaPkcs1Sig.verifyContract, RsaPkcs1Sig.verifySig
  • Spec/RsaPss.lean: RsaPss.verifyEncodingRfc
  • Spec/Seed/CfbFinal.lean: Seed.cfbDecryptFinalApi, Seed.cfbDecryptFinalContract, Seed.cfbEncryptFinalApi, Seed.cfbEncryptFinalContract, Seed.cfbFinalSig
  • Spec/Seed/OfbFinal.lean: Seed.ofbFinalApi, Seed.ofbFinalContract, Seed.ofbFinalSig
  • Spec/Sm4/CfbFinal.lean: Sm4.cfbDecryptFinalApi, Sm4.cfbDecryptFinalContract, Sm4.cfbEncryptFinalApi, Sm4.cfbEncryptFinalContract, Sm4.cfbFinalSig
  • Spec/Sm4/CtrFinal.lean: Sm4.ctrFinalApi, Sm4.ctrFinalContract, Sm4.ctrFinalSig
  • Spec/Sm4/OfbFinal.lean: Sm4.ofbFinalApi, Sm4.ofbFinalContract, Sm4.ofbFinalSig
  • Spec/TripleDes/CfbFinal.lean: TripleDes.cfbDecryptFinalApi, TripleDes.cfbDecryptFinalContract, TripleDes.cfbEncryptFinalApi, TripleDes.cfbEncryptFinalContract, TripleDes.cfbFinalSig
  • Spec/TripleDes/OfbFinal.lean: TripleDes.ofbFinalApi, TripleDes.ofbFinalContract, TripleDes.ofbFinalSig

137 definitions are reached only through other Spec/ declarations, such as the Apis that registrations use, never directly from outside Spec/:

Only through Spec (137)
  • Spec/Argon2.lean: Argon2.instDecidableValid
  • Spec/Blake2.lean: Blake2.blake2s, Blake2.paddedData, Blake2.sigma
  • Spec/Blowfish.lean: Blowfish.blocks, Blowfish.decryptWords, Blowfish.initS1, Blowfish.initS2, Blowfish.initS3, Blowfish.initS4, Blowfish.instDecidableValidKey
  • Spec/BrainpoolP256r1.lean: BrainpoolP256r1.instNeZeroNatN, BrainpoolP256r1.instNeZeroNatP
  • Spec/BrainpoolP384r1.lean: BrainpoolP384r1.instNeZeroNatN, BrainpoolP384r1.instNeZeroNatP
  • Spec/BrainpoolP512r1.lean: BrainpoolP512r1.instNeZeroNatN, BrainpoolP512r1.instNeZeroNatP
  • Spec/Cast5.lean: Cast5.KeySchedule, Cast5.instDecidableValidKey
  • Spec/Cast5/Contract.lean: Cast5.ecbContract, Cast5.ecbSafety
  • Spec/Cbc.lean: Cbc.aes, Cbc.aesInv
  • Spec/Cbc/Contract.lean: Cbc.aesSafety
  • Spec/Ccm.lean: Ccm.aesWith
  • Spec/Dsa.lean: Dsa.instDecidableParametersValid, Dsa.instDecidableSupportedSizes
  • Spec/Dsa/Generate.lean: Dsa.instDecidableGenerationLengthsValid
  • Spec/Dsa/ImportSizes.lean: Dsa.Import.instDecidableLengthsValid, Dsa.Import.instDecidableSizesValid
  • Spec/Dsa/SignVerify.lean: Dsa.instDecidableLengthsValid
  • Spec/EcKey/Compressed.lean: EcKey.instDecidableMatchesCompressedPublicKey
  • Spec/EcKey/Generic.lean: EcKey.Instance.publicKeyApi, EcKey.scratchSafety
  • Spec/Ecdh/Generic.lean: Ecdh.Instance.exchangeApi
  • Spec/Ecdsa/Rfc6979/Table.lean: Ecdsa.Rfc6979.TableInstance.signApi
  • Spec/Ecdsa/Verify/Generic.lean: Ecdsa.Instance.verifyHashApi
  • Spec/Ed25519/Contract.lean: Ed25519.scratchSafety
  • Spec/Ed448/Contract.lean: Ed448.scratchSafety, Ed448.seedSafety
  • Spec/Ffdh.lean: Ffdh.PrivateKey, Ffdh.PublicKey
  • Spec/Ffdh/CachedKeyGenerationContract.lean: Ffdh.generationContextSafety
  • Spec/Ffdh/Contract.lean: Ffdh.checkedSafety, Ffdh.domainSafety, Ffdh.scratchSafety
  • Spec/Ffdh/VettedKeyGenerationContract.lean: Ffdh.vettedGenerateKeyContract
  • Spec/Gcm.lean: Gcm.aesGcmEncrypt, Gcm.supported
  • Spec/Gcm/OutOfPlace.lean: Gcm.gatherSafety, Gcm.openToSafety
  • Spec/Gcm/Powers8.lean: Gcm.withPowersSafety, Gcm.withPowersSummary
  • Spec/Gcm/Precomputed.lean: Gcm.powersSafety
  • Spec/Gcm/Prepared.lean: Gcm.preparedSafety, Gcm.preparedSummary
  • Spec/Gcm/Prepared16.lean: Gcm.prepared16Safety, Gcm.prepared16Summary
  • Spec/Md5.lean: Md5.pad
  • Spec/Mgf1.lean: Mgf1.blake2b512, Mgf1.blake2s256, Mgf1.sha3_224, Mgf1.sha3_256, Mgf1.sha3_384, Mgf1.sha3_512
  • Spec/MlDsa.lean: MlDsa.ζ
  • Spec/MlDsa/Contract.lean: MlDsa.contextDoc, MlDsa.keyGenApi, MlDsa.keyScratchSafety, MlDsa.outcomeDoc
  • Spec/MlDsa/PkTr.lean: MlDsa.pkTrApi
  • Spec/MlKem.lean: MlKem.baseCaseMultiply
  • Spec/MlKem/Contract.lean: MlKem.Params.checkEkApi, MlKem.Params.decapsApi, MlKem.Params.encapsApi, MlKem.Params.keyGenApi, MlKem.Params.module, MlKem.Params.name, MlKem.outcomeDoc, MlKem.scratchSafetyDoc
  • Spec/MlKem/EncapsH.lean: MlKem.Params.encapsHApi
  • Spec/P192.lean: P192.instNeZeroNatN, P192.instNeZeroNatP
  • Spec/P224.lean: P224.instNeZeroNatN, P224.instNeZeroNatP
  • Spec/P256.lean: P256.instNeZeroNatN, P256.instNeZeroNatP
  • Spec/P384.lean: P384.instNeZeroNatN, P384.instNeZeroNatP
  • Spec/P521.lean: P521.instNeZeroNatN, P521.instNeZeroNatP
  • Spec/Rc2.lean: Rc2.Word, Rc2.instDecidableValidKey
  • Spec/Rc2/Contract.lean: Rc2.cbcUpdateSafety
  • Spec/Rsa/Contract.lean: Rsa.exponentDoc, Rsa.publicScratchSafety
  • Spec/RsaKeyGen.lean: RsaKeyGen.keyStep, RsaKeyGen.maxBits, RsaKeyGen.minBits, RsaKeyGen.params, RsaKeyGen.primeStep
  • Spec/RsaOaep/Contract.lean: RsaOaep.encryptSafety
  • Spec/RsaOaep/Tables.lean: RsaOaep.hashSafety, RsaOaep.mgf1Safety
  • Spec/RsaPkcs1Enc/Random.lean: RsaPkcs1Enc.PadResult
  • Spec/RsaPkcs1Sig/Contract.lean: RsaPkcs1Sig.hashIdsDoc, RsaPkcs1Sig.recoverSafety, RsaPkcs1Sig.recoverSummary, RsaPkcs1Sig.verifySafety, RsaPkcs1Sig.verifySummary
  • Spec/RsaPss/Contract.lean: RsaPss.publicScratchSafety, RsaPss.scratchSafety, RsaPss.verifySafety
  • Spec/RsaPss/Table.lean: RsaPss.digestLenSafety, RsaPss.hashSafety, RsaPss.mgf1Safety
  • Spec/Scrypt.lean: Scrypt.instDecidableValid, Scrypt.roMixAux
  • Spec/Secp256k1.lean: Secp256k1.instNeZeroNatN, Secp256k1.instNeZeroNatP
  • Spec/Sha1.lean: Sha1.pad
  • Spec/Sha256/Contract.lean: Sha256.digestApi
  • Spec/Sha3.lean: Sha3.rcStep
  • Spec/Sha3/Instances.lean: Sha3.finalizeApi, Sha3.updateApi, Sha3.xofFinalizeApi, Sha3.xofSqueezeApi
  • Spec/Sha512/Contract.lean: Sha512.digestApi, Sha512.finalizeDigestApi, Sha512.initApi
  • Spec/Siv.lean: Siv.one
  • Spec/TripleDes.lean: TripleDes.instDecidableValidKey, TripleDes.sBoxes
  • Spec/X25519.lean: X25519.instNeZeroNatP
  • Spec/X448.lean: X448.instNeZeroNatP
  • Spec/Xts/Contract.lean: Xts.aesUnitSafety
  • Spec/Xts/OutOfPlace.lean: Xts.aesUnitToSafety

81 theorems have no use outside Spec/:

Theorems (81)
  • Spec/Blake2/Contract.lean: Blake2.blake2_eq_finalHash, Blake2.blake2s_eq_finalHash, _private.VerifiedGarbage.Spec.Blake2.Contract.0.Blake2.getD_append_zeros, _private.VerifiedGarbage.Spec.Blake2.Contract.0.Blake2.keyBlock_length, _private.VerifiedGarbage.Spec.Blake2.Contract.0.Blake2.paddedData_blocks, _private.VerifiedGarbage.Spec.Blake2.Contract.0.Blake2.paddedData_eq, _private.VerifiedGarbage.Spec.Blake2.Contract.0.Blake2.paddedData_getD
  • Spec/ChaCha20.lean: ChaCha20.encrypt_eq_keystreamOf, ChaCha20.keystreamOf_eq, _private.VerifiedGarbage.Spec.ChaCha20.0.ChaCha20.length_chacha20Block, _private.VerifiedGarbage.Spec.ChaCha20.0.ChaCha20.length_flatMap_const, _private.VerifiedGarbage.Spec.ChaCha20.0.ChaCha20.zipWith_append_of_le
  • Spec/Ffdh/SievedAccepted.lean: Ffdh.sievedParameterCandidate_accepted, Ffdh.sievedParameterSearch_accepted, _private.VerifiedGarbage.Spec.Ffdh.SievedAccepted.0.Ffdh.candidate_suffix, _private.VerifiedGarbage.Spec.Ffdh.SievedAccepted.0.Ffdh.consume_accepted, _private.VerifiedGarbage.Spec.Ffdh.SievedAccepted.0.Ffdh.drawWitness_suffix, _private.VerifiedGarbage.Spec.Ffdh.SievedAccepted.0.Ffdh.drawWitnesses_suffix, _private.VerifiedGarbage.Spec.Ffdh.SievedAccepted.0.Ffdh.draw_suffix, _private.VerifiedGarbage.Spec.Ffdh.SievedAccepted.0.Ffdh.loop_suffix, _private.VerifiedGarbage.Spec.Ffdh.SievedAccepted.0.Ffdh.screened_suffix, _private.VerifiedGarbage.Spec.Ffdh.SievedAccepted.0.Ffdh.search_accepted
  • Spec/Gcm.lean: Gcm.decryptWith_ctx, Gcm.decrypt_eq, Gcm.encryptWith_ctx
  • Spec/Gcm/Powers8.lean: Gcm.PreparedPowersRepr.powers8
  • Spec/Gcm/Prepared16.lean: Gcm.PreparedPowersRepr.prepared16
  • Spec/GcmSiv.lean: GcmSiv.decryptWith_ctx, GcmSiv.encryptWith_ctx
  • Spec/HashTable.lean: HashTable.index_hashes
  • Spec/MillerRabin.lean: MillerRabin.mrIteration_eq_mrRound, MillerRabin.mrSquarings_iff, MillerRabin.mrSquarings_true, MillerRabin.obviouslyComposite_dvd, MillerRabin.powMod_double, MillerRabin.powMod_two_pow, MillerRabin.splitTwos_spec, MillerRabin.sqIter_one, MillerRabin.sqIter_succ', MillerRabin.witness_range
  • Spec/MlDsa/KeyGenTr.lean: MlDsa.keyGenInternal_tr
  • Spec/MlKem/KeyGenH.lean: MlKem.keyGenInternal_h
  • Spec/Ocb.lean: Ocb.decryptWith_ctx, Ocb.encryptWith_ctx
  • Spec/RsaKeyGen.lean: RsaKeyGen.generate.attempts
  • Spec/RsaKeyGen/GenerationAgrees.lean: RsaKeyGen.candidateStep_reads, RsaKeyGen.primeSearch_agrees, RsaKeyGen.primeSearch_used_le, RsaKeyGen.searchFrom_init, _private.VerifiedGarbage.Spec.RsaKeyGen.GenerationAgrees.0.RsaKeyGen.agrees_consume, _private.VerifiedGarbage.Spec.RsaKeyGen.GenerationAgrees.0.RsaKeyGen.draw_length, _private.VerifiedGarbage.Spec.RsaKeyGen.GenerationAgrees.0.RsaKeyGen.draw_reads, _private.VerifiedGarbage.Spec.RsaKeyGen.GenerationAgrees.0.RsaKeyGen.drop_of_suffix, _private.VerifiedGarbage.Spec.RsaKeyGen.GenerationAgrees.0.RsaKeyGen.loop_reads, _private.VerifiedGarbage.Spec.RsaKeyGen.GenerationAgrees.0.RsaKeyGen.mrStep_reads, _private.VerifiedGarbage.Spec.RsaKeyGen.GenerationAgrees.0.RsaKeyGen.primalityTest_reads
  • Spec/RsaKeyGen/KeySearchAgrees.lean: RsaKeyGen.keyFrom_init, RsaKeyGen.keySearch_agrees, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.budgetHit_drop, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.candidateStep_prime, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.candidate_lt, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.keyAgrees_consume, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.keyFromPrimes_ne, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.keyFrom_congr, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.keyFrom_start, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.loop_inl, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.onceFrom_start, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.os2ip_i2osp_mod, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.os2ip_i2osp_of_lt, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.otherPrime_i2osp, _private.VerifiedGarbage.Spec.RsaKeyGen.KeySearchAgrees.0.RsaKeyGen.searchFrom_ok
  • Spec/RsaPss.lean: RsaPss.dropWhile_db, RsaPss.eq_db, RsaPss.eq_db_of_take, RsaPss.verifyEncoding_some
  • Spec/Sha3/Length.lean: Sha3.flatMap_lanes_length, Sha3.sha3_256_length, Sha3.shake256_length, Sha3.squeezeBlocks_length, Sha3.squeeze_length, Sha3.toBytes_length

Four types are also not named anywhere outside Spec/, on main as on this branch: Blowfish.Error, Rc4.Error, TripleDes.Error and Ffdh.KeySearchOutcome.


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ajQWu4wLufJmG4YMhAHx3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ajQWu4wLufJmG4YMhAHx3
@alex
alex added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 53020f2 Nov 7, 2026
24 checks passed
@alex
alex deleted the claude/unify-random-bytes-crypto-xqmg0z-deadcode-pass2 branch November 7, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants