Skip to content

Implement verified Triple DES ECB on ARMv7 - #525

Closed
reaperhulk wants to merge 1 commit into
codex/3des-ecb-aarch64from
codex/3des-ecb-armv7
Closed

reaperhulk wants to merge 1 commit into
codex/3des-ecb-aarch64from
codex/3des-ecb-armv7

Conversation

@reaperhulk

@reaperhulk reaperhulk commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Adds complete baseline ARMv7 Triple DES ECB support for the existing in-place Rust API, with 16-byte and 24-byte keys and both directions. Depends on #511; this PR contains only the ARMv7 implementation and its API/test/benchmark architecture gates.

All five entrypoints are verified against the merged shared spec: key expansion, block encryption/decryption, and ECB encryption/decryption. Assembly is generated by Lean. No Spec or TCB changes. The scalar implementation keeps the two 32-bit Feistel halves in registers, shares IP/FP across all three DES passes, and uses Boolean S-box circuits with fixed scratch locations. The public ECB counter stays in a register preserved by the verified block primitive; ECB saves its link register outside block scratch.

Reviewed OpenSSL DES and AWS-LC DES. Both use secret-indexed round/key tables. This implementation uses their three-pass composition and register halves with constant-time Boolean circuits and fixed key permutations. The shared benchmark covers both key lengths and directions alongside OpenSSL at 64, 1024 and 16384 bytes; native ARMv7 measurements come from CI.

Validation: full Lean build (5,861 jobs), emitter generation and check including standard-axiom/compiler audits; all six repository check scripts; root and benchmark formatting/clippy; ARMv7 cross-clippy; the entire Rust suite under QEMU with Wycheproof, including all 500 published NIST ECB cases in both directions, block-aligned splits, parity and invalid lengths; full native baseline-feature Rust tests. After rebasing onto current main, targeted artifact/dependency builds and the emitter check pass. The Rust API and tests are shared with #504, whose combined CI coverage passed at 100% before the rebase.

@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-armv7 branch from 9a242c9 to 1008de7 Compare October 1, 2026 21:50
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-armv7 branch from 1008de7 to 517d53e Compare October 1, 2026 21:56
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-armv7 branch from 517d53e to a134407 Compare October 1, 2026 21:57
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-armv7 branch from a134407 to 1c81a53 Compare October 1, 2026 22:01
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-armv7 branch from 1c81a53 to 143b10d Compare October 1, 2026 22:04
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-armv7 branch from 143b10d to 042fd25 Compare October 1, 2026 22:07
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-armv7 branch from 042fd25 to 31c0e2b Compare October 1, 2026 22:16
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-armv7 branch from 31c0e2b to 9383cb1 Compare October 2, 2026 00:52
@reaperhulk
reaperhulk added this pull request to stack #551 October 2, 2026 00:57
@reaperhulk reaperhulk closed this Oct 2, 2026
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.

1 participant