Skip to content

Compute and show the code signing cdhash#33

Merged
everettjf merged 2 commits into
masterfrom
claude/review-and-plan-g4p9o
May 23, 2026
Merged

Compute and show the code signing cdhash#33
everettjf merged 2 commits into
masterfrom
claude/review-and-plan-g4p9o

Conversation

@everettjf
Copy link
Copy Markdown
Owner

Summary

Adds a dependency-free SHA-1 / SHA-256 (libmoex/base/digest/Sha.h) — libmoex must stay Qt-free, so QCryptographicHash can't be used — and computes the cdhash in the code signature view: the digest of the whole Code Directory blob per its hash type, truncated to the canonical 20 bytes.

The cdhash is the identity used for notarization, provisioning profiles, and TCC, so surfacing it makes the code signature view substantially more useful for RE/forensics.

Verified

  • SHA-1/SHA-256 match standard test vectors (abc, empty string).
  • On sample/complex: cdhash 733aff188b1ab77177bebb264b4230b450536f49 (SHA-1, 20 bytes), one per slice.
  • moex-parse still builds (confirms libmoex stays Qt-free); full run_all.sh passes.

https://claude.ai/code/session_013kBiVXftgoEsyGVyrvfGok


Generated by Claude Code

claude added 2 commits May 23, 2026 14:55
Add a dependency-free SHA-1 / SHA-256 (libmoex must stay Qt-free) and use it to
compute the Code Directory cdhash — the digest of the whole Code Directory blob
per its hash type, truncated to the canonical 20 bytes. The cdhash is the
identity used for notarization, provisioning, and TCC, so surfacing it makes the
code signature view far more useful. SHA implementations are verified against
standard test vectors.

https://claude.ai/code/session_013kBiVXftgoEsyGVyrvfGok
@everettjf everettjf merged commit 6cf8425 into master May 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants