Skip to content

SHA-256's and SHA-512's own lists of implementations, not Option fields of MdHash - #4696

Merged
alex merged 1 commit into
mainfrom
claude/vg-sha-compress-lists
Nov 8, 2026
Merged

alex merged 1 commit into
mainfrom
claude/vg-sha-compress-lists

Conversation

@alex

@alex alex commented Nov 8, 2026

Copy link
Copy Markdown
Member

Part of #4548. This is stacked on #4692. There are no trust changes.

Ed25519, scrypt and RSAES-PKCS1-v1_5 decryption each call only SHA-512's or SHA-256's compression function. Until now, though, they were applied to every Merkle–Damgård variant on x86-64 and AArch64: MD5, SHA-1 and so on, each with each CPU's code, 22 variants on x86-64. They then kept only the variants whose sha512 or sha256 field was some, an Option that is set only for those two hash functions.

What changes

  • New lists: the two compression functions now have a list of implementations of their own on each target:
    • Proof/Variants/Sha256Compress/{X86_64,AArch64}.lean
    • Proof/Variants/Sha512Compress/{X86_64,AArch64}.lean
  • Registrations: the eight registration files of those callers map over these lists. The match … | none => [] filtering is gone.
  • MdHash: the sha512 and sha256 fields are deleted from MdHash on both targets.

The generated crates are unchanged.

Checks

  • lake build passes.
  • Emit.lean passes, with no change to the crates.
  • Every step of the Static checks job passes.
  • check_lean_public_imports.py passes.

Generated by Claude Code

@alex
alex force-pushed the claude/vg-aes-gcm-tiers branch from 87d70dd to 2b47209 Compare November 8, 2026 20:43
@alex
alex force-pushed the claude/vg-sha-compress-lists branch from 7dfa4ee to c74fcdc Compare November 8, 2026 20:43
@alex
alex force-pushed the claude/vg-aes-gcm-tiers branch from 2b47209 to c3505d9 Compare November 8, 2026 21:22
@alex
alex force-pushed the claude/vg-sha-compress-lists branch from c74fcdc to bdbaba0 Compare November 8, 2026 21:22
Base automatically changed from claude/vg-aes-gcm-tiers to main November 8, 2026 21:46
…ds of MdHash

Ed25519, scrypt and RSAES-PKCS1-v1_5 decryption call SHA-512's or
SHA-256's compression function alone, yet were applied to every
Merkle–Damgård variant on x86-64 and AArch64 (MD5, SHA-1, … each with each
CPU's code) and kept those whose `sha512` or `sha256` field, an `Option`
set only for those hash functions, was `some`. Give each of the two hash
functions' compression functions its list of implementations on each
target (`Proof/Variants/Sha256Compress/<Target>.lean`,
`Proof/Variants/Sha512Compress/<Target>.lean`), map those callers over it,
and delete the two fields.

The generated crates are unchanged. Part of #4548.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKUFHFjAR7Byf513R4zuFy
@alex
alex force-pushed the claude/vg-sha-compress-lists branch from bdbaba0 to f54c962 Compare November 8, 2026 21:46
@alex
alex enabled auto-merge November 8, 2026 21:47
@alex
alex added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit 731fec7 Nov 8, 2026
25 checks passed
@alex
alex deleted the claude/vg-sha-compress-lists branch November 8, 2026 22:01
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.

2 participants