Using a Digest to Identify Artifact Bytes
A digest summarizes artifact bytes for equality checks under a stated algorithm. The expected digest needs an independent trustworthy source when authenticity matters.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace a download check
Two copies of one release file should produce the same expected digest. A changed archive member or metadata can produce a different digest. See archive file order for a reason two logically equivalent packages may differ in bytes.
Understand the claim
A plain locally computed digest gives a comparison of bytes. It does not establish who published the file. Release identities supply a different part of the provenance.[1]
Compare a digest of the bytes actually consumed
A build records the digest of its released archive. If a download differs by one byte, a suitable digest ordinarily changes. Compare the downloaded archive to trusted expected metadata using the same algorithm and exact byte representation. See release identities.
Source build publishes archive with digest H1
Consumer downloads candidate and computes H2
A mismatch triggers investigation
A match supports byte identity within the digest's guarantees
Separate integrity evidence from origin authentication
An attacker able to replace both bytes and an untrusted displayed digest defeats a plain comparison. Use trusted metadata or a signature when origin matters. Compute the test digest from the published archive.