Skip to content

Implement verified Triple DES ECB on AArch64 - #511

Closed
reaperhulk wants to merge 5 commits into
codex/3des-ecb-x86-64from
codex/3des-ecb-aarch64
Closed

reaperhulk wants to merge 5 commits into
codex/3des-ecb-x86-64from
codex/3des-ecb-aarch64

Conversation

@reaperhulk

@reaperhulk reaperhulk commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Adds complete AArch64 Triple DES ECB support for the existing public in-place API, with 16-byte and 24-byte keys and both encryption and decryption. Depends on #504; this PR contains only the AArch64 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 the Lean emitter. The scalar implementation uses Boolean S-box circuits with fixed scratch locations, public round-key traversal, register-resident Feistel halves, and one IP/FP pair for all three DES passes. It saves the link register around ECB block calls. No Spec or TCB changes.

Reviewed OpenSSL DES and AWS-LC DES. Both use secret-indexed S/P tables, so this implementation borrows their three-pass composition and half-register structure while using constant-time Boolean circuits. The existing end-to-end benchmark compares both key lengths and directions with OpenSSL at 64, 1024 and 16384 bytes; native AArch64 measurements will come from CI.

Validation: full Lean build (5,799 jobs), emitter generation and check including axiom/compiler audits; all repository import, proof-speed, vector, architecture-gate, variant and MCDT checks; root and benchmark formatting/clippy; AArch64 cross-clippy and the entire Rust suite under QEMU, including all 500 published NIST ECB cases in both directions, block-aligned splits, parity and limits. Native baseline-feature Rust tests also pass. Rust logic is shared with #504, whose combined CI coverage is 100%.

@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch from 65944b9 to b19b436 Compare October 1, 2026 21:41
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch 2 times, most recently from b03f19e to bb8c0fa Compare October 1, 2026 21:55
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch from bb8c0fa to 3b8e646 Compare October 1, 2026 21:57
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch from 3b8e646 to 6fb5568 Compare October 1, 2026 22:00
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch from 6fb5568 to 4a53291 Compare October 1, 2026 22:04
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch from 4a53291 to 9ed39b0 Compare October 1, 2026 22:07
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch from 9ed39b0 to 990ef2b Compare October 1, 2026 22:16
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch from 990ef2b to 9a5a485 Compare October 1, 2026 22:23
@reaperhulk
reaperhulk force-pushed the codex/3des-ecb-aarch64 branch from 9a5a485 to 1fcef83 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