Compute and show the code signing cdhash#33
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a dependency-free SHA-1 / SHA-256 (
libmoex/base/digest/Sha.h) —libmoexmust stay Qt-free, soQCryptographicHashcan'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
abc, empty string).sample/complex: cdhash733aff188b1ab77177bebb264b4230b450536f49(SHA-1, 20 bytes), one per slice.moex-parsestill builds (confirmslibmoexstays Qt-free); fullrun_all.shpasses.https://claude.ai/code/session_013kBiVXftgoEsyGVyrvfGok
Generated by Claude Code