Repository navigation
AArch64 GCM: remove vg_ghash_store_powers_aes and what only it used - #4364
Merged
Merged
Conversation
Rust has not called vg_ghash_store_powers_aes since AesGcm::new takes the powers from vg_aes_gcm_store_powers_aes (#4338), and no verified function calls it: the *_store_powers seal and open it served were removed in #4345. Remove its registration, its code (ghashS, prologueS, storePw, storesS), its proofs, its AArch64 contract (Proof.Gcm.ghashStoreAArch64), GhashStoreImpl and GhashImpl's storePowers field, which nothing read. Part of #4139 (finding 5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFkei8WwGgosqeREs4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFkei8WwGgosqeREs4
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.
Part of #4139 (finding 5: AES-GCM on AArch64: the powers of H)
After #4338,
vg_ghash_store_powers_aeshas no caller:AesGcm::newtook the powers fromvg_aes_gcm_store_powers_aes.*_store_powersseal and open whose proofs used it were never registered, and AEADs: remove dead declarations and modules #4345 removed those proofs.This PR removes it and what only it used. There are no
Spec/, TCB or Rust changes. The Spec definitions it leaves unused go in a Spec-only PR after this one (see Next).Removed
vg_ghash_store_powers_aesentry ofArtifacts/Gcm/AArch64.lean.crates/verified-garbage-asm-aarch64/{src,assembly}/gcm.*. The emitter's only change is these 607 deleted lines.Impl/Gcm/AArch64/Pmull.lean:ghashS,prologueS,storePwandstoresS.Proof/Gcm/AArch64/Pmull/Ghash.lean: its proofs:ghashS_{correct,ct,verified,written},ghashS_implies,correctS,epiS_ok,storeI_ok,SW,ScratchKept,prologueS_ok,pm_of_store,Pm.congr,Inv.congr,tReg_pp,write_byte_sepandsatStateS.pwOff_sepandpwOff_lestay, becausevg_aes_gcm_store_powers_aes's proof uses them.Proof/Gcm/AArch64/Ghash.lean: its AArch64 contract,Proof.Gcm.ghashStoreAArch64.Proof/AesGcm/AArch64/Callee.leanandGhashImpls.lean:GhashStoreImplandGhashStoreImpl.aes, andGhashImpl'sstorePowersfield. Nothing read that field, and it was the only thing that still reachedghashS.How the set was found
By reachability over the AArch64 emitter's environment (every AArch64 registration file, as
Emit.lean's driver imports them), with the deleted pieces cut off: the declarations onlyghashS, its registration orGhashStoreImplreach, and every declaration that uses them. That gives exactly the list above. None of the open dead-code PRs (#4349, #4354, #4362) touches these files.Checks
lake buildofArtifacts.Gcm.AArch64and every module that imports the edited ones (theGenericAES-GCM, AES-GCM-SIV and SM4-GCM AArch64 files), frommain's cache; no warnings.Emit.leanand its audits.check_lean_public_imports.pyon the edited modules.cargo fmt --check.cargo clippy --target aarch64-unknown-linux-gnu --all-targets -D warnings.VG_CPU_FEATURESunset,none,aesandaes,sha3.No benchmark: only uncalled code is removed, so nothing that runs changes.
Next
A Spec-only PR retiring the definitions this leaves unused in
Spec/Gcm/Powers8.lean:ghashStorePowersApiand its sig and contract; thevg_aes_gcm_{seal,open}_store_powersApis, sigs, posts and contracts;storePowersOkand its documentation strings.Generated by Claude Code