|

Where a signed JPEG loses its C2PA manifest

One signed JPEG, nine copies A signed JPEG branches to three measured outcomes: exact copy and C2PA-aware resize validate with the test root, an image-data byte change and added comment fail the data hash, and ordinary exports, a screenshot and APP11 stripping leave no claim. C2PA TEST One signed JPEG, nine copies The same image took three different paths through validation. Signed JPEG signed.jpg Manifest kept, binding intact Exact copy: original manifest C2PA-aware resize: new manifest + ingredient Both Trusted with the test root Manifest kept, bytes changed One image-data byte / added comment segment assertion.dataHash.mismatch Manifest gone Re-encode / resize / PNG / screenshot C2PA APP11 segments stripped No claim found The aware resize is Invalid under default trust; the results table preserves both trust settings.
One signed JPEG, nine copies

We added the comment edited caption to a signed aeroplane JPEG. The compressed image data stayed untouched, and the signature on its C2PA provenance record still validated. Yet the file check failed. Exporting the same signed image as another JPEG produced a different result: c2patool found no record to check at all. These were two of the nine copies we read after signing the image.

TL;DR

  • The exact copy kept its manifest and passed validation; ordinary exports, a screenshot and stripping left no manifest.
  • Removing just the C2PA segments restored the unsigned original byte for byte.
  • A comment and a changed image-data byte each broke the file binding while the claim signature still validated.
  • A newly signed resize recorded its parent and was Trusted with our test root, but Invalid under default trust.
The signed aeroplane JPEG and seven derived copies, with default-trust results for exports, a screenshot, stripping, a byte edit, a comment segment and a C2PA-aware resize.

The record, its signature and its link to the file

In C2PA’s Technical Specification, a manifest is a provenance record containing statements about an asset, a claim that refers to those statements, and a signature. An asset here is simply the image file. The statements are called assertions; ours included the action that created the JPEG.

The specification’s claim signature is the cryptographic signature on the claim, which contains hashed references to its assertions. A hash is a value calculated from bytes for comparison. This signature check concerns the signed record; the connection from that record to the image file has its own check.

The specification calls that connection a hard binding: a cryptographic link to the asset’s bytes. Our JPEG used a data hash, calculated over the file except for explicitly excluded ranges. In this file, the excluded range held the embedded C2PA record itself. The file check compared the calculated value with the value recorded in the manifest.

Inside a signed asset An asset contains bytes and a JUMBF manifest store whose active manifest contains assertions, a claim and a claim signature with an X.509 chain and optional timestamp, while the hard-binding assertion hashes the content bytes and a soft binding supports repository lookup. C2PA MANIFEST Inside a signed asset The claim references assertions; the hard binding covers selected content bytes. SIGNED ASSET Manifest store Standard active manifest HARD HASH READ / DERIVE LOOKUP Asset bytes image / video / audio Soft binding (optional) watermark / fingerprint Assertions actions / ingredients / hard hash / soft binding Claim assertion hashes Claim signature X.509 chain optional RFC 3161 timestamp Manifest repository stored JUMBF copy Exclusions sit outside the hard hash. Baseline signed.jpg has no soft binding or trusted timestamp.
Inside a signed asset

The specification also distinguishes Valid from Trusted. Valid means the manifest passes integrity, signature and validity-period checks; Trusted additionally means its signing credential is trusted under the applicable policy. In our test, that policy was a private root certificate we supplied, the certificate we chose as the basis for trust. So Trusted here means trusted under our local test policy.

Signing the aeroplane JPEG

We converted USC-SIPI image 4.2.05, Airplane, from its digitised TIFF source into a 512 × 512 JPEG. We kept that unsigned file as original.jpg, then signed it as signed.jpg. The recorded c2pa.created action described this conversion and asserted neither the original capture method nor AI origin.

ItemSetup
Toolsc2patool 0.26.30, sips-316, OpenSSL 4.0.3
SignerLocal P-256 root and leaf; ES256
ReadsDefault trust, then our root supplied explicitly
NetworkRemote-manifest fetching and online certificate-status fetching disabled
TimeNo timestamp authority configured; no trusted timestamp

P-256 and ES256 name the cryptographic choices used for our test certificates and signature. Both reads used the same signed file. We changed the trust setting for the second read, supplying our own root certificate explicitly.

These are selected lines from the signing output, with omitted fields marked by ...:

          "code": "claimSignature.validated",
...
          "code": "assertion.dataHash.match",
...
          "code": "signingCredential.untrusted",
...
  "validation_state": "Valid"

The signature and file hash passed, while the signing credential was untrusted. On the second read, the state became Trusted and the output included signingCredential.trusted. The successful signature and binding checks remained.

Signing grew the file from 110,525 to 246,720 bytes. The embedded C2PA data occupied JPEG segments labelled APP11, regions we could identify separately from the compressed image data. Those segments added 136,195 bytes including their JPEG framing. c2patool reported a 136,143-byte manifest store, the packaged manifest data inside that framing.

Nine copies, including exports and a screenshot

We made ordinary exports with sips, the macOS image tool used in this test, and read each copy under both trust settings. We also displayed signed.jpg at 512 × 512 and captured it with Chromium’s screenshot function. Here is the quality-80 JPEG export and its read, with c2patool’s offline-settings arguments abbreviated to ..., as in the recorded command:

sips -s format jpeg -s formatOptions 80 signed.jpg --out reencode-q80.jpg
c2patool reencode-q80.jpg ...
Error: No claim found

The table includes all nine copies. not reported means the tool emitted no validation state because it found no manifest. Invalid is a different outcome: a manifest was present, but validation did not pass.

Copy / operationManifestDefaultTest rootKey code
Exact copy: byte-for-byte duplicateYesValidTrustedsigningCredential.untrusted
Re-encode q80: sips JPEG quality 80Nonot reportednot reportedNo claim found
Resize 256: sips to 256 × 256Nonot reportednot reportedNo claim found
PNG conversion: sips exportNonot reportednot reportedNo claim found
Screenshot: Chromium capture at 512 × 512Nonot reportednot reportedNo claim found
Segments stripped: remove C2PA APP11Nonot reportednot reportedNo claim found
One byte changed: JPEG image dataYesInvalidInvalidassertion.dataHash.mismatch
Comment added: insert COM segmentYesInvalidInvalidassertion.dataHash.mismatch
C2PA-aware resize: sign resize with parentYesInvalidTrustedingredient.manifest.validated; signingCredential.untrusted

The quality-80 export, ordinary resize, PNG conversion and screenshot all lost the embedded manifest. In this test, an ordinary export was enough to remove the record. Supplying our root on those reads did not produce a manifest or a validation state.

Those copies had no manifest left to validate. The comment and byte-edit copies, by contrast, still had manifests and failed one specific check.

For the stripping copy, we removed only the identified C2PA APP11 segments and preserved every other byte. The result was exactly original.jpg, with the same SHA-256 digest, the hash used for our byte comparison. The stripped file contained no manifest for c2patool to read.

C2PA’s Security Considerations says the cryptographic guarantee detects changes to the signed claim and its assertions but does not prevent removal of the whole manifest.

A comment breaks the file check

We inserted a JPEG comment segment, labelled COM, immediately after the embedded C2PA region. It contained edited caption. The segment added 18 bytes at offset 136215; all existing bytes were preserved, including the compressed image data and the C2PA APP11 bytes.

Reading the comment copy gave these selected lines:

          "code": "claimSignature.validated",
...
          "code": "assertion.dataHash.mismatch",
...
  "validation_state": "Invalid"

In a separate copy, we changed one byte in the compressed image data, at offset 191845, from 107 to 106. The JPEG still decoded. Comparing the decoded images found differences in 58 of 262,144 pixels; we did not measure whether a person could see those differences. That copy returned the same signature-success and data-hash-failure codes under both trust settings.

The exclusion range explains the comment result. Our recorded c2pa.hash.data exclusion began at byte 20 and covered 136,195 bytes, the embedded C2PA APP11 region. An exclusion range tells the data-hash calculation which positions to skip. The Technical Specification describes hashing the asset outside those declared exclusions.

Our comment sat just after that range, inside the hashed bytes. So did the changed image-data byte. The claim and its assertions were untouched, so the claim signature still validated. The hashed file bytes had changed, so the data hash didn’t match. Supplying our test root changed neither result.

A resize that records its parent

We resized another copy to 256 × 256, then signed it with the original signed image’s extracted record supplied as its parent. An ingredient is C2PA’s record of an input asset; here it represented that parent. The new active manifest, the record for this derivative, contained c2pa.opened and c2pa.resized actions and one ingredient.

CheckResult
Parent recordingredient.manifest.validated
Derivative fileassertion.dataHash.match
Claim signatureclaimSignature.validated
Default trustInvalid; signingCredential.untrusted
Test rootTrusted

The Technical Specification describes using a standard manifest with a new hard binding for content opened for editing. Our signed resize had that new binding and retained its parent as an ingredient. The ordinary resize in the nine-copy table had no manifest; this signed derivative had a record of the resize and its input.

Under default trust, the derivative’s failures concerned untrusted credentials in the active manifest and the recorded parent. The original signed JPEG had instead reported Valid with signingCredential.untrusted. Those are the states emitted by this tool; with our root supplied, both files reported Trusted.


References

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *