C2PA Binary Provenance Internals: Parsing PNG caBX, JPEG APP11 JUMBF & WebP RIFF in Browser RAM
Content Credentials defined by C2PA v2.1 wrap signed COSE provenance assertions inside ISO/IEC 19566-5 JUMBF superboxes embedded directly inside standard image containers. By walking raw Uint8Array buffers locally—reading PNG caBX chunks, JPEG 0xFFEB APP11 packets, and WebP RIFF headers—engineers inspect provenance claims without uploading confidential media.
How does ISO/IEC 19566-5 JUMBF encode a C2PA Manifest Store inside image files?
Direct answer: A C2PA Manifest Store is an ISO Base Media File Format (ISOBMFF) box hierarchy called a JUMBF superbox (box type jumb = 0x6A756D62). Its first child is always a JUMBF Description Box (jumd) carrying a 16-byte UUID identifying the store as c2pa, followed by CBOR-encoded assertion boxes and a COSE Sign1 cryptographic signature box.
Rather than inventing an incompatible new image file extension that breaks web browsers and print workflows, the Coalition for Content Provenance and Authenticity designed JUMBF transport bindings for existing container formats. Legacy image viewers skip unknown ancillary chunks or application markers, rendering pixels untouched, while provenance-aware parsers locate the JUMBF store, verify hard byte-range hashes (c2pa.hash.data), and validate the X.509 certificate chain inside the COSE signature. Under Article 50(2) of the European Union AI Act (Regulation 2024/1689), machine-readable provenance markings embedded at container level represent the primary technical compliance path for synthetic media workflows.
How are PNG caBX chunks framed and verified with IEEE CRC-32?
Direct answer: Following the fixed 8-byte PNG signature (89 50 4E 47 0D 0A 1A 0A), every chunk uses a uniform 12-byte envelope: a 4-byte big-endian unsigned payload length L, a 4-byte ASCII FourCC type, L payload bytes, and a 4-byte IEEE 802.3 CRC-32 digest covering Type + Data. C2PA stores JUMBF payloads inside the ancillary chunk caBX.
Notice the capitalization rules defined by W3C PNG Third Edition (ISO/IEC 15948): the lowercase first letter c marks caBX as ancillary (decoders may safely ignore it); lowercase second letter a marks it as a private registered extension; uppercase third letter B is reserved for PNG conformance; and uppercase fourth letter X marks it unsafe-to-copy—meaning any image editor modifying pixel data (IDAT) without understanding C2PA is obligated to drop caBX rather than leaving stale, falsified provenance attached to altered pixels!
| Byte Offset | Width | Field | Endianness & Verification Rule |
|---|---|---|---|
| 0x00 | 4 B | Chunk Length L | Big-endian uint32 (≤ 231 − 1) |
| 0x04 | 4 B | Chunk Type (e.g. caBX, iTXt) | 4 ASCII letters; bit 5 of each byte encodes PNG flags |
| 0x08 | L B | Payload Data | Raw JUMBF superbox bytes for caBX |
| 0x08 + L | 4 B | CRC-32 Checksum | Reflected polynomial 0xEDB88320 over bytes [0x04 .. 0x08+L) |
How do JPEG APP11 (0xFFEB) segments reassemble manifests larger than 64 KiB?
Direct answer: Classic JPEG marker segments cap payload length at 65,533 bytes because the segment length field is 16 bits. ISO/IEC 19566-5 solves this by prefixing every 0xFFEB (APP11) packet with the 2-byte ASCII tag JP (0x4A50), a 2-byte Box Instance Number En, and a 4-byte Packet Sequence Number Z so multi-packet JUMBF stores concatenate cleanly in RAM.
// Zero-copy JPEG APP11 (0xFFEB) JUMBF packet scanner over DataView
function scanJpegApp11(bytes) {
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
let pos = 2; // Skip SOI 0xFFD8
const packets = [];
while (pos + 4 <= bytes.length && bytes[pos] === 0xFF) {
const marker = bytes[pos + 1];
if (marker === 0xDA || marker === 0xD9) break; // SOS or EOI
const segLen = view.getUint16(pos + 2, false);
if (marker === 0xEB && segLen >= 10 && bytes[pos + 4] === 0x4A && bytes[pos + 5] === 0x50) {
const boxInstance = view.getUint16(pos + 6, false);
const packetSeq = view.getUint32(pos + 8, false);
packets.push({ boxInstance, packetSeq, payloadOffset: pos + 12, payloadLen: segLen - 10 });
}
pos += 2 + segLen;
}
return packets.sort((a, b) => a.packetSeq - b.packetSeq);
}WebP containers (RFC 9649) use little-endian RIFF FourCC framing (RIFF <size> WEBP) where chunks are padded to even byte boundaries. Extended WebP files include a VP8X header flag bitset followed by optional EXIF, XMP , and C2PA chunks. Inspecting all three formats purely through ArrayBuffer and DataView lets journalists and peer reviewers audit raw binary headers offline—exposing stripped provenance, anomalous software generators inside iTXt/tEXt/APP1, or corrupted CRC trailers before publishing.
How do invisible Unicode text watermarks hide payloads inside plain UTF-8 strings?
Direct answer: Zero-width steganography maps binary bits onto non-printing Unicode format controls—most commonly encoding 0 as U+200B (ZWSP) and 1 as U+200C (ZWNJ), or embedding ASCII bytes shifted by +0xE0000 into Unicode Plane-14 Tag codepoints (U+E0020–U+E007E)—which survive copy-paste while remaining visually invisible.
In addition to deliberate steganographic tags, bidirectional control overrides (especially U+202E Right-to-Left Override, documented in Unicode Technical Standard #39) can spoof file extensions or code comments in source reviews. Scanning codepoint-by-codepoint via JavaScript’s iterator (for (const ch of text) ch.codePointAt(0) rather than UTF-16 code units, so astral Plane-14 surrogate pairs are decoded accurately) reveals both intentional watermarks and accidental clipboard formatting artifacts in O(n) time.
What failure modes occur during real-world C2PA verification and social media transcoding?
Direct answer: Production C2PA verification encounters four primary failure modes: metadata stripping by CDN image resizers, hard-binding byte-range invalidation after unrecorded crops or color-profile conversions, truncated multi-packet JPEG APP11 sequences, and expired or untrusted X.509 signing certificates lacking an RFC 3161 trusted timestamp authority token.
Understanding hard bindings versus soft bindings clarifies why raw container inspection remains indispensable for newsrooms and scientific journals. A C2PA hard binding computes a SHA-256 or SHA-512 hash directly over the asset’s exact byte intervals, declaring an explicit exclusion range covering only the manifest box itself so the signature does not hash itself recursively. If an author opens a signed PNG in an older desktop editor, adds a scale bar, and saves without emitting an ingredient-linked C2PA action assertion, either the editor drops the unsafe-to-copy caBX chunk cleanly or leaves behind a broken hash mismatch. Conversely, soft bindings—such as perceptual image hashes or invisible frequency-domain watermarks—attempt to survive JPEG recompression so a client can look up the stripped manifest in an external remote repository.
When inspecting an uploaded PNG or JPEG figure locally inside an ArrayBuffer, check five sequential invariants before trusting visual claims: (1) confirm the container magic bytes match the declared MIME type rather than trusting filename extensions; (2) verify every PNG chunk’s computed IEEE CRC-32 matches its trailing 4-byte footer; (3) inspect iTXt, tEXt, and JPEG APP1 XMP packets for tool-generator software strings alongside any caBX or APP11 JUMBF superboxes; (4) verify multi-packet JPEG APP11 sequence numbers Z form a contiguous 1-indexed sequence without gaps; and (5) record the file’s full-buffer SHA-256 digest so editorial review logs tie directly to the exact unmutated binary bytes examined.
Primary Binary & Regulatory Specifications
- Coalition for Content Provenance and Authenticity — C2PA Technical Specification v2.1
- W3C Recommendation — Portable Network Graphics (PNG) Specification, Third Edition
- ISO/IEC 19566-5:2023 — JPEG Universal Metadata Box Format (JUMBF)
- IETF RFC 9649 — WebP Image Format & Extended RIFF Chunk Layout
- European Union Regulation (EU) 2024/1689 — EU AI Act Article 50 Transparency Rules
C2PA & Binary Provenance FAQ
- Where does C2PA store cryptographic provenance manifests inside PNG, JPEG, and WebP files?
- C2PA v2.1 embeds ISO/IEC 19566-5 JUMBF superboxes inside ancillary PNG caBX chunks, JPEG APP11 (0xFFEB) marker segments (reconstructed across 64 KiB packets via sequence numbers), and WebP RIFF C2PA chunks—allowing backward-compatible decoders to render pixels while provenance parsers inspect the manifest.
- Why does social media re-encoding usually destroy C2PA cryptographic signatures?
- Most web upload pipelines transcode images into stripped JPEG/WebP derivatives, dropping ancillary caBX and APP11 segments and rewriting pixel bitstreams. Because C2PA hard-binding hashes cover raw asset byte ranges excluding only the manifest box itself, any unrecorded transcode invalidates the cryptographic binding.
- How does IEEE CRC-32 validation catch corrupted or tampered PNG chunks?
- Every PNG chunk ends with a 32-bit cyclic redundancy check computed over the 4-byte ASCII chunk type concatenated with its payload bytes using polynomial 0xEDB88320 (reflected). Flipping even one bit inside caBX or iTXt without recomputing CRC-32 causes immediate verification failure.
- Can invisible Unicode steganography survive copy-paste across rich-text editors?
- Often yes. Zero-width codepoints (U+200B..U+200D), variation selectors (U+FE00..U+FE0F), and Plane-14 tag characters (U+E0000..U+E007F) render with zero horizontal advance in standard font shapers, persisting invisibly through clipboard transfers unless explicitly scanned and stripped.