advanced24 min studyLesson 436 in Engineering

Verify content identities through the image graph

Follow trusted OCI descriptors from an approved root to retrieved image bytes while separating content integrity, registry access, and release authorization.

On this page

What you’ll understand

  • Distinguish mutable tags, index digests, manifest digests, and blob identities.
  • Explain what descriptor size and digest checks establish.
  • Separate content verification from publisher and deployment approval.

An inference image named production changes while a deployment is waiting to start. Approving the name earlier did not identify which bytes the node will retrieve later. Content digests address that gap by identifying concrete data, while a registry tag remains a discovery label that may move. A trustworthy deployment path begins with an approved expected identity and follows verified references to the selected image's content. It still needs a separate answer about who approved that identity and for which environment.

Start from an approved content identity

OCI Image Specification 1.1.1 describes references using content descriptors with media type, digest, and byte size. A digest names the targeted bytes under its hash algorithm, while size supplies an expected length. A consumer should validate retrieved content against the expected descriptor before relying on its contents. The expected root must arrive through a trusted release or policy decision; downloading an image and its self-advertised digest from one untrusted source does not establish that the publisher or release is authorized. Integrity relative to an expectation and the origin of that expectation are separate links.

A tag can be updated to identify a different manifest or image index. Record the resolved digest when making an approval and preserve that identity through retrieval. If an image index covers multiple platforms, it identifies a structure containing child descriptors rather than one universal executable filesystem. The selected platform manifest, its configuration, and its layers have their own content identities. State whether policy approves the index and its relevant children or one specific platform artifact. An inventory or attestation associated with one child cannot silently stand in for every other architecture.

accept content⁡⇒(∣B∣=s)∧(H(B)=d)\operatorname{accept\ content}\Rightarrow\bigl(|B|=s\bigr)\land\bigl(H(B)=d\bigr)
B is retrieved raw content, s its trusted expected size in bytes, and d the expected digest under the selected algorithm. These are necessary checks in this simplified integrity rule, not a complete authorization policy.↔ Scroll wide equations horizontally.

Respect the representation actually hashed

Hash exactly the representation the descriptor identifies. An image layer's compressed blob digest and the uncompressed layer's content identifier describe different byte sequences; recompression can change one without changing the other. Do not compare a decompressed stream against a compressed-blob digest and call the mismatch an attack. Conversely, a semantic equivalence argument does not let a consumer ignore a failed digest check for the requested blob. Bound sizes and perform appropriate integrity checks before expensive parsing or extraction, while treating media type and parser behavior as part of the consuming contract.

Registry authentication and encrypted transport address access and communication, but neither makes a mutable tag immutable or proves the account published an approved release. Registry writers can be compromised, and an authorized account can upload the wrong artifact. A verified digest permits retrieving the same content from different locations under the hash assumptions; it does not guarantee any location remains available. Retain approved artifacts and their evidence with controlled writers, and plan restoration when a registry is unavailable. A mirror should preserve identities rather than silently rewrite release content under a familiar tag.

Tpipeline≥max⁡ ⁣(Bvn,Bvh)T_{\mathrm{pipeline}}\geq\max\!\left(\frac{B}{v_n},\frac{B}{v_h}\right)
For an illustrative streaming transfer and hash pass over B decimal MB, positive rates v_n and v_h in MB/s give a lower bound in seconds when work overlaps ideally. Metadata, startup, storage, and contention can make actual time longer; this is not a measured registry benchmark.↔ Scroll wide equations horizontally.

Carry verified identities into execution

Persist the selected digest in deployment configuration and ensure the node retrieves the same approved content rather than resolving the original tag again. Join signatures, provenance, and inventory by the appropriate artifact subject and platform. An attached document or registry referrer is discoverable evidence, not automatically a trusted assertion. Verify its own identity, signer, and semantic binding before using it. If a running service later downloads plugins or model files, the image digest does not identify those later bytes; extend the release contract to those inputs or state the boundary clearly.

The modular lab offers a deliberately limited analogy for label reuse. Reset, set both modulus m=4 and additive step a=1, predict the fourth step, then Play or Step. The displayed residue repeats after four additions, illustrating how one short label can describe different points in a history. This arithmetic is neither a cryptographic hash nor a registry. Real digest verification uses a specified collision-resistant algorithm and a trusted expected value; mutable tag reuse is a naming decision, not the small modular collision mechanism shown by the teaching instrument.

Budget transfer and verification without dropping integrity

A fictional artifact contains 4000 decimal MB. Assume a network transfer rate of 1000 MB/s and a streaming hash rate of 800 MB/s, with no other costs for this lower-bound exercise.

  1. Transfer alone requires 4000/1000=4 seconds. A full hash pass alone requires 4000/800=5 seconds.

  2. If those stages stream with ideal overlap, completion cannot be faster than the slower stage: at least 5 seconds. If they execute serially, the arithmetic total is 9 seconds.

  3. Real startup, storage, parsing, and contention add costs. A latency budget should provision verification rather than skip the check or substitute an untrusted expected digest.

The result

The ideal overlapping lower bound is 5 seconds and the ideal serial total is 9 seconds under the invented rates. Neither is a product benchmark or a security guarantee.

Explore the model

Interactive lab

Interactive lab · modular

Observe label reuse while keeping hash semantics separate

Reset, set both m=4 and additive step a=1, predict the fourth addition, then Play or Step. The residue returns to zero. This illustrates a reused label only; it is not an OCI registry, cryptographic digest, or collision-resistance experiment.

Observe label reuse while keeping hash semantics separateAddition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Current readings: Residue r0: 0; Orbit period · m/gcd(m,a): 12; Distinct residues visited: 1 of 12. All parameters are adjustable with the labeled controls below.Repeated addition modulo 12: the current residue is 0, and the orbit period is 12.01234567891011+ 5mod 12An additive orbitn = 0rₙ = 0Period = 12Cycle starts at 0:0 → 5 → 10 → 3 →8 → 1 → 6 → 11 →4 → 9 → 2 → 7 → 0Exact residues · two additions per second
Additive orbitCurrent residue / next edge
Residue r0
0
Orbit period · m/gcd(m,a)
12
Distinct residues visited
1 of 12
t = 0 s

Addition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forResolve mutable release labels to approved concrete content identities, then verify the actual descriptor-linked bytes. Small modular arithmetic supplies no cryptographic assurance.

Check your understanding

A registry serves bytes and a digest that match each other, but policy never approved that expected digest. What remains unresolved?

Try it yourself

A fictional 2000 MB artifact transfers at 500 MB/s and hashes at 1000 MB/s. With ideal streaming overlap, what is the lower bound? What if the stages are serial?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Compute each complete pass and distinguish a maximum from a sum.

Compare with the solution

Transfer takes 4 seconds and hashing 2 seconds. The ideal overlapping lower bound is 4 seconds; the ideal serial total is 6 seconds. Actual overhead can increase either value, and none of these rates changes the need to verify the trusted expected digest.

Take it with you

  • A trusted descriptor binds expected size and digest to concrete bytes.
  • Tags, indexes, platform manifests, and layers have different identity roles.
  • Registry access, content integrity, availability, and release authorization need separate evidence.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.