Skip to content

3DES PPC64LE: drop the bitsliced S-boxes' redundant #guard and its allocator - #4723

Merged
alex merged 1 commit into
mainfrom
claude/ppc64le-3des-guard-cleanup
Nov 8, 2026
Merged

alex merged 1 commit into
mainfrom
claude/ppc64le-3des-guard-cleanup

Conversation

@alex

@alex alex commented Nov 8, 2026

Copy link
Copy Markdown
Member

This removes a check that duplicates what the proofs already establish. It cleans up my merged PRs (#4666 and #4693), under the new rule that a #guard stays only if it pins down something nothing else does.

What changes

The #guard in Impl/TripleDes/PPC64LE/Bitsliced.lean, added in #4666, checked one thing: that the written-out S-box code is what the register allocator (compile) produces. The proofs check that same code directly against the S-boxes, so the #guard was redundant:

  • sbox_check and sboxLiteral_eq in Proof/TripleDes/PPC64LE/Bitsliced/Sbox.lean;
  • taint_decide for constant time.

It isn't a TCB check either.

Removed:

  • the #guard;
  • Impl/TripleDes/PPC64LE/BitsliceAlloc.lean, the allocator, which only that #guard used;
  • freeRegs, which likewise had no other use.

Two doc comments no longer mention them.

The generated code is unchanged: EmitOne.lean --check TripleDes.PPC64LE emits identical assembly.

The rest of the audit

None of my PRs added Rust tests:

All four are covered by the existing Wycheproof and published vectors. #4693 and #4711 added no #guard. #4694 carries #4666's commits, so it drops the #guard when it is restacked onto main.

Testing

  • The 3DES PPC64LE registration builds.
  • EmitOne --check shows the same code.
  • The static checks pass.

No Rust or TCB change.


Generated by Claude Code

…locator

The `#guard` in `Impl/TripleDes/PPC64LE/Bitsliced.lean` checked that the
written-out S-box code is what the register allocator produces. The proofs
check that code against the S-boxes directly
(`Proof/TripleDes/PPC64LE/Bitsliced/Sbox.lean`), so the check pinned down
nothing they don't, and the allocator (`BitsliceAlloc.lean`) and
`freeRegs` were used by it alone. The generated code is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKUFHFbSpgWBYWAsEnfUks
@alex
alex added this pull request to the merge queue Nov 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 8, 2026

alex commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

The merge queue's run (42522838991) failed only in Rust (macOS, AArch64, stable), at actions/checkout: git exited with 128 before any build or test ran, so all-green failed. No job reached this PR's code, and its own CI passed. It looks like infrastructure, maybe the queue's temporary branch going away while the queue reshuffled. The PR can go back in the queue as is.


Generated by Claude Code

@alex
alex added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit b355169 Nov 8, 2026
20 checks passed
@alex
alex deleted the claude/ppc64le-3des-guard-cleanup branch November 8, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants