Skip to main content

WAI Extension: Marking Layers

Mirrored from the canonical text at commit 498e6b88 ().

Status: Draft. Registers no capability and no record; defines one document kind, wai-marking-delivery. A party that marks media as made, or not made, by a model writes the marking from its origin claims into every layer a delivery carries, and this extension says what each layer carries for each claim and how a verifier holds every layer to the claim it rests on. The layers are the C2PA statement of a manifest (synthesis §6); the container’s own text metadata, in three fields WAI defines for the places FLAC, Ogg Opus and MP3 files have for them, with where C2PA embeds a manifest store in each of those containers and in WAV and MP4; the AI-disclosure values of a release message in the Electronic Release Notification standard, version 4.3.2, read from the message itself where a delivery gives it (release-message); a live track’s claims for each of its groups; and the watermark, read from the audio of each FLAC, WAV, Ogg Opus and MP3 file by the audio scheme synthesis registers (§3.7, §4.7), Ogg Opus through one pinned decoder whose samples are the same integers on every machine (§4.8) and MP3 through an exact decoder that is WAI’s own definition (§4.9). Each layer’s value is a function of the claim, and where the claims leave a value open (how much of a mix a model made, when an input’s own claim is not held) every value they leave open is admitted, so a verifier never refuses a value the claims cannot exclude. The marking verifier is given a delivery: the claims, the files, the statements, the release’s values and a recorded session’s groups. It refuses the first layer that disagrees with its claim, each defect with its own reason, and states for each claim and each layer agrees or absent, never agrees for a layer the delivery does not carry, and for the watermark not-checked where no file resting on the claim was read. No new transport and no new container. The reference implementation is the marking_layers module of wai-rs (feature marking_layers); the corpus is live-conformance/marking-layers/, and its second implementation is live-conformance/marking_layers_verify.py. Keywords MUST, MUST NOT, SHOULD, MAY are RFC 2119/8174.

Texts read for this revision, each pinned to the version named: the Code of Practice on Transparency of AI-Generated Content, final text of 10 June 2026, Section 1, Commitment 1, Measure 1.1 with Sub-measures 1.1.1 to 1.1.3, as the Commission’s document 129555, whose SHA-256 as fetched on 14 November 2026 was 7bd22c5a3c56eaefda27a5bf7a6118198ef2a9c9255241bd97abf7cdedf9bc28 (the bytes synthesis read); Regulation (EU) 2024/1689, Article 50(2), as that Code reproduces it (the Official Journal text, and the amending Regulation (EU) 2026/1744, could not be fetched for this revision: the publications office refused an unattended fetch on 14 November 2026, with a script challenge for the one and an empty answer for the other, and this text relies on no date or rule of either beyond the paragraph the Code reproduces); the IPTC Digital Source Type vocabulary, released 2024-10-23 (its JSON form’s SHA-256 as fetched, 1caaa5bb729d5b40fdfef599bc650bf1288e7cca4fe52b9bb4d65701da4fb1d6); the C2PA Technical Specification, version 2.5 (October 2026), §11.8, §16.3.3.3.7, §16.4.1.4.5, §16.8.2 and Appendix A §A.1, §A.3.5, §A.3.7, §A.3.9 and §A.5.1, and C2PA’s informative Applying Content Credentials to Music Assets (2.4), §2.1, §2.3, §4.1 and §4.3; the Electronic Release Notification standard’s schema for version 4.3.2, release-notification.xsd (SHA-256 36110e2149336d35e90ea4822daca72961c121dcc6b5cf5b794048b50f6c1e8a) and the allowed-value sets it imports, version 12 (SHA-256 03f290c5a6715e45dcdde5f4fa2b44821c3372331f5bec0b17c802d6fa0e8385), with the licence terms its schema names (§3.5, decisions D110, D115 and D117); RFC 9639 §8, §8.1, §8.2, §8.6, §9 with its subsections; RFC 6716 §3.1, §3.2, §3.4, §6 and Appendix A with A.1 and A.3 (its reference implementation, under the licence the RFC states for its code components); RFC 8251 §1, §3 to §11; RFC 7845 §3, §4 with its subsections, §5.1 with §5.1.1.1, and §5.2; RFC 3533 §6; and ID3 tag version 2.4.0, its Main structure §3.1, §3.3, §4 and §4.1 and its Native frames §4.2.6 and §4.15. A section number of one of those texts in this extension is that version’s. The MPEG audio standards, ISO/IEC 11172-3 and 13818-3, are sold and were not read; the exact MP3 decoder (§4.9) is written from a decoder dedicated to the public domain, its source read at the revision decision D137 names.

1. Scope

In scope: what each layer of a delivery carries for an origin claim (§3): the table (§3.1), the generative share a release states (§3.2), the C2PA statement (§3.3), the container fields and where a manifest store sits in each container (§3.4), the release message’s values (§3.5), a live track’s groups (§3.6), the watermark (§3.7) and a live track’s (§3.8); how each container is read (§4), the audio of FLAC, WAV, Ogg Opus and MP3 files (§4.7), the Opus decoder pinned to read Ogg Opus’s (§4.8) and the exact decoder that reads MP3’s (§4.9); the delivery a verifier is given (§5); and the verification (§6).

Out of scope: what an origin claim is and when one is true, which is synthesis’s; the integrity of each carrier: a manifest’s signature and its binding to the content (c2pa-binding §6, live-provenance), a claim’s signature (synthesis §2), a group receipt (jwp-receipts §3); a watermark’s scheme, its embedding and its detector, which are synthesis’s (§7.3 to §7.10): this extension decodes a file’s audio and runs the detector of the audio scheme synthesis registers (§3.7, §4.7); a label shown to a person (synthesis §10); and any rule of law. WAI says what a marking party can carry in each layer and how a verifier checks that the layers agree. It sets no legal or consent rule and states nothing about any regime: Regulation (EU) 2024/1689, Article 50(2), which has providers of systems that generate synthetic audio, image, video or text mark their outputs in a machine-readable format, and the Code of Practice’s Measure 1.1, which describes signed metadata and an imperceptible watermark as two layers, are reasons a party may need several layers. Whether a delivery meets either is for that party to confirm against their texts.

Relationship to synthesis: every value of every layer here is a function of an origin claim read and checked as synthesis §3 and §5 have it. Synthesis already gives a claim its IPTC digital source type (§5 there) and its C2PA statement (§6 there); this extension carries those into the formats outside WAI that a release and a stream travel in, and adds the check across them. Synthesis §7’s two layers, the claim and the watermark, are two of the layers here.

Relationship to ai-usage: a release message’s training permissions are mapped to ai-usage’s terms (§3.5) and not compared with them.

Relationship to music-rights and release-message: music-rights §6 maps a works document onto the release message’s identifier fields, and release-message writes and reads the message (decision D117); this extension holds the message’s AI-disclosure fields to the claims, read from the message where a delivery gives it.

2. Terms

3. The layers

3.1 The table

For a claim of each class, each layer carries:

classIPTC digital source type (synthesis §5)C2PA statement (synthesis §6)release ContainsAI (§3.2)container fields (§3.4)live (§3.6)
capturedthe capture’s own: digitalCapture, computationalCapture, screenCapture or digitalCreationc2pa.created with that typeNoneWAI_ORIGIN_CLASS=captured and that typea track or group claim of class captured
reconstructedits input’s; a composite of several, compositeCapture or compositec2pa.opened, c2pa.converted, with no type of its own; several inputs: c2pa.created with the composite’s typeNonereconstructed and that typeas for the class
assistivealgorithmicallyEnhancedc2pa.opened, c2pa.edited with algorithmicallyEnhanced; one c2pa.ai-disclosure for each trained modelNoneassistive and algorithmicallyEnhancedas for the class
synthesizedthe generated source: trainedAlgorithmicMedia, compositeWithTrainedAlgorithmicMedia or algorithmicMedia; a composite holding a synthesized input compositeSynthetic; a conversion or assist of a synthesized input, its input’sc2pa.created (or c2pa.opened, c2pa.edited) with that type; one c2pa.ai-disclosure for each trained model, with its humanOversightLevelAll, Partly or None, by the share (§3.2)synthesized and that typeas for the class

So a class alone does not decide every layer: a synthesized claim whose models are all algorithmic (a synthesizer playing a score, algorithmicMedia) states None in a release, because the release message’s ContainsAI is about content created using generative AI, which its allowed-value sets define (as a contributor type) as artificial intelligence that generates media with models learning the patterns of their training data, and C2PA attaches its AI disclosure only where a trained model was invoked (C2PA 2.5 §16.8.2.3). An assistive claim over a trained model (a denoise by a model) states None too: the edit did not alter the content substantially (synthesis §3.2), and created none.

3.2 The generative share

A release states how much of a resource generative AI made, as one of None, Partly and All (the allowed-value set ContainsAI of ERN 4.3.2: none of the content was created using generative AI, part of it was, all of it was). Of a claim c the share S(c) is the set of those values that agree with it, computed from the claim and the claims of its inputs a verifier holds:

S of an input is S of the claim its origin names, where the verifier holds that claim; otherwise it is read from the input’s restated class and source: {None} for a class other than synthesized; for synthesized, {All} with source trainedAlgorithmicMedia (a trained model generated all of it from synthesized inputs, or a conversion of such), {Partly, All} with compositeWithTrainedAlgorithmicMedia, and all three values with any other source (algorithmicMedia and compositeSynthetic can each hold, or not hold, the output of a trained model further back). A claim names an input only by a link hash that depends on the input’s claim, so the inputs of held claims never lead back to the claim itself; a verifier computes each claim’s share once.

J of a list of sets is the set of outcomes over every choice of one value from each set: None where every choice is None, All where every choice is All, and Partly otherwise. So J of one set is that set, a model’s whole generation is {All}, a model’s edit of a recording (generate over a captured input) is J({All}, {None}) = {Partly}, a mix of a recorded voice with a generated accompaniment is {Partly}, and a mix of two generated stems is {All}.

3.3 The C2PA layer

A manifest carries a claim’s C2PA statement, {"actions": A, "assertions": D} (synthesis §6), as the actions of its first actions assertion and its c2pa.ai-disclosure assertions. This revision reads the statement as a C2PA reader gives it after validating the manifest, a JSON object of exactly two members: actions, an array of objects each with a string member action and, optionally, a string member digitalSourceType; and assertions, an array of objects each with a string label and an object data. Other members of an action, other members of data (modelName, scientificDomain, metadata) and assertions whose label is not c2pa.ai-disclosure or c2pa.ai-disclosure__n are not read. A disclosure’s data has a string modelType, and, where present, a string modelIdentifier and an object contentProfile whose humanOversightLevel, where present, is a string. Otherwise the statement is c2pa_malformed.

Against the statement the claim gives, in this order:

  1. the actions’ names, in order (c2pa_action_mismatch);
  2. each action’s digitalSourceType, present or absent, and its value: the IPTC term of synthesis §5’s code, or none for a conversion (c2pa_source_mismatch);
  3. the disclosure assertions, taken in the order of their labels (c2pa.ai-disclosure, then __1, __2, …): their number, and each one’s modelType and modelIdentifier (c2pa_disclosure_mismatch), so a trained model with no disclosure, a disclosure with no trained model and a model named by another identifier are each refused;
  4. each disclosure’s humanOversightLevel, present or absent, and its value (c2pa_oversight_mismatch).

A statement that states digitalCapture for a synthesized claim is refused at step 2; one that omits a trained model’s disclosure, at step 3. A manifest is carried in a file (§3.4) or beside it as a sidecar (c2pa-binding §5). Where the delivery says it is carried in a file, the file holds a store at the place C2PA gives its container (c2pa_store_missing); the store’s own bytes, its signature and its binding are checked as C2PA and c2pa-binding have them, not here.

3.4 Container fields and the place of a store

Three fields carry a claim in a container’s own text metadata:

fieldvalue
WAI_ORIGINthe claim’s link hash (synthesis §2), 64 lowercase hexadecimal digits
WAI_ORIGIN_CLASSthe claim’s class: captured, reconstructed, assistive or synthesized
WAI_DIGITAL_SOURCE_TYPEthe IPTC term of the claim’s source: http://cv.iptc.org/newscodes/digitalsourcetype/ and the code (synthesis §5)

A file that carries one carries all three, each once (container_field_invalid). They are not signed: they restate the signed claim for a reader that reads only the container, and the claim they name is what signs it. The Code of Practice’s Sub-measure 1.1.1 describes recorded information that is digitally signed and time-stamped; these fields are not that, and the claim and the manifest are. A marking party that writes them writes them from the claim; a verifier holds them to it (§6.1 step 3).

Where each container holds them, and where C2PA 2.5 places a manifest store in it:

containerthe fieldsa manifest store (C2PA 2.5)
FLAC (RFC 9639)Vorbis comment fields of its Vorbis comment block (RFC 9639 §8.6), names compared without regard to casein an ID3v2 tag before the fLaC marker, as a GEOB frame (§A.3.5, which names FLAC beside MP3); RFC 9639 defines no such tag, and C2PA lists the native container as being considered (§A.1)
Ogg Opus (RFC 7845)user comments of the comment header (RFC 7845 §5.2), names compared without regard to caseits own logical bitstream, whose first packet begins with the five bytes \x00c2pa (§A.3.7, written for Ogg Vorbis; the stream sits beside the Opus stream in the same physical stream, RFC 3533, and C2PA’s box hash takes each logical bitstream as a box, §16.3.3.3.7)
MP3TXXX frames of an ID3v2 tag (ID3v2.4.0 frames §4.2.6), the field’s name as the frame’s descriptiona GEOB frame of that tag (§A.3.5)
WAV (RIFF)none in this revisiona chunk of identifier C2PA, the last sub-chunk of the RIFF chunk (§A.3.9)
MP4 (ISO base media)none in this revisiona top-level uuid box of extended type D8FEC3D6-1B0E-483C-9297-5828877EC481 whose purpose is manifest (§A.5.1)

A store’s GEOB frame has the MIME type application/c2pa, the media type C2PA 2.5 §11.8 gives a manifest store (the earlier application/x-c2pa-manifest-store is deprecated there and is not read). A WAV or an MP4 file carries no fields here: the container layer of such a file is no-place (§6.2), never agrees. Placing the IPTC property in a file’s XMP packet is left to a later revision.

3.5 The release message

ERN 4.3.2 carries AI disclosure in three places: ContainsAI on a Release and on each resource of type SoundRecording, Image, Video or Text; and, on a resource’s Contributor, AiContribution (None, Partly or All) and a SpecialContributor of GenerativeAI, whose AiContribution is All where it states none. For a resource resting on a claim c:

A release states no AI use over a generated track, ContainsAI None over a claim whose share is {All}, and it is refused. The message’s own rules (a resource of All names only generative contributors, and one of None none whose contribution is AI) are the message standard’s and not checked here.

Its training permissions, the deal use types UseForTrainingGenerativeAI and UseForTrainingNonGenerativeAI, map to ai-usage’s terms: both to train-ai of the aipref vocabulary, the first to cawg.ai_generative_training and the second to cawg.ai_training of the CAWG assertion (ai-usage §3.2, §3.4). A deal is a licence to its recipient, as a grant’s terms are (ai-usage §5.2), and so never disagrees with a published preference; the verifier does not compare them.

Where a delivery gives the release message itself (§5), the verifier reads these values from it by release-message §7, which holds the message to the ERN 4.3.2 schema within its profile: the release’s ContainsAI, and for each sound recording its ContainsAI and its contributors’ SpecialContributor and AiContribution. A delivery that carries no message restates the values, as the marking party gives them, and the same rules hold them (decisions D115, D117).

3.6 A live track’s groups

A track is claimed from a group on by a track claim, and a group by a group claim (synthesis §3.1; a live track is named by its digest, live-rooms §6.2, and a group by its group receipt’s link hash, jwp-receipts §3 step 3). In a recorded session, the track claim in force at group g of track t is the track claim for t with the greatest from_group at most g. Where a group has both a group claim and a track claim in force, they state the same class and the same source (live_group_mismatch): a track claimed as captured with a group claimed as synthesized, or the reverse, has one statement false about that group. A group with neither is a gap: its layer is absent. Each track an AI participant publishes is claimed synthesized (synthesis §8.2), which a synthesis verifier given the room checks; a group claim of a lower class in such a track is then refused here.

3.7 The watermark

The watermark is the second of synthesis §7.1’s layers: a payload that is a function of the claim (synthesis §7.2), embedded in the content. A file rests on a claim where its origin (§5) or its WAI_ORIGIN field names the claim; §6.1 step 3 holds the two to one claim where both are given. For each file the verifier decodes its audio (§4.7) and, where the samples are ones wai-mark:band64 admits (synthesis §7.10.1), runs that scheme’s detector on them (synthesis §7.10.5), which reads a payload or no mark; the file is then read. With the payload p read from a file resting on claim c, in this order:

  1. p is c’s payload: the file’s watermark agrees;
  2. p is the payload of a claim given that c reaches through inputs along steps convert and assist, each input’s claim given: it agrees by inheritance, inherited, as synthesis §7.3 step 4 has it, since a conversion that does not mark its output again carries its input’s mark;
  3. p’s first byte is not the code of c’s class (synthesis §7.2): watermark_class_mismatch, the content carrying the mark of a claim of another class than the claim its metadata names, a generated track’s mark in a file whose claim says captured among them;
  4. otherwise watermark_origin_mismatch: the mark of another claim of the same class, one c does not reach.

A read file in which the detector finds no mark is absent. A read file that rests on no claim and carries a mark is carried, its payload stated: the delivery states no claim for it to disagree with, and its payload’s seven bytes name the claim it points at (synthesis §7.2). A file whose audio this revision does not decode is not-decoded, and one decoded to samples the scheme does not admit (another rate, more than eight channels, less than a second) is not-admitted; neither is read.

A claim’s watermark layer agrees where a file resting on it agrees or is inherited; it is absent where at least one file resting on it was read and none agrees; and it is not-checked where no file resting on it was read. It never agrees for a claim from which nothing was read. A payload is a pointer of seven bytes to a claim, not a proof of one: a mark that agrees says that the content carries the claim’s mark, and the claim’s signature says the rest.

The scheme read is wai-mark:band64, the one audio scheme synthesis registers; its picture schemes (synthesis §7.5, §7.9) mark no container this extension reads. What a mark survives is synthesis §7.10.7’s and §7.10.8’s measurement: a file this revision reads is one whose audio arrives as FLAC, WAV, Ogg Opus or MP3 of MPEG-1 or MPEG-2 Layer III, after whatever codec it passed through on the way. A detection on a file is the same reading on every machine, since the samples are the same integers (§4.7; for Ogg Opus, those of the pinned decoder, §4.8; for MP3, the exact decoder’s, §4.9) and the detector is an integer function of them.

3.8 A live track’s watermark

A recorded session may give, for a track’s groups, the Opus packets of each group’s objects, in order, and the channels the track is decoded to, the same for every group of the track that gives them (§5). The verifier decodes each such track by the pinned decoder (§4.8) at 48 kHz in those channels: its groups in ascending group number, each group’s packets in order, one decoder for the whole track. A live track has no pre-skip and no end trimming: a group’s samples are the decoder’s output for its packets. A packet of no bytes, or whose framing breaks RFC 6716 §3.4’s rules R1 to R7, or that the decoder refuses, is audio_malformed, raised at its group. A track whose packets hold more than 2^26 samples, every channel counted, is not decoded.

A group’s claim for the watermark is the track claim in force at it (§3.6), or, where none is, its group claim, or none. A span is a run of a track’s groups that give audio, consecutive in group number, whose claim is one claim (or none throughout), as long as it runs; its samples are its groups’ samples in order. Each span is read as a file is (§3.7): where its samples are ones the scheme admits, the detector runs on them and the payload is held to the span’s claim in §3.7’s order, agrees, inherited, watermark_class_mismatch or watermark_origin_mismatch (raised at the span’s first group), a span with no mark being absent and a marked span resting on no claim carried; otherwise the span is not-admitted. A claim’s watermark layer counts the spans resting on it as it counts the files (§3.7). So the mark is read where it lives, across the groups that share a claim: a mark of one claim heard in groups that another claim is in force at is refused, as a file’s would be. A group of 20 ms reads no mark on its own; a span of the scheme’s period, about 5 s, does (synthesis §7.10.3).

4. Reading the containers

A file is read by its container’s rules below. One that breaks them is container_malformed. A reader reads the structure and the metadata named here; the audio is decoded for the watermark alone, by §4.7. Text is read as UTF-8 (RFC 3629) where this section says so; bytes that are not UTF-8 there are container_malformed.

4.1 ID3v2 tags

An ID3v2 tag at offset 0: the bytes ID3; a major version of 3 or 4 and a revision byte other than 0xFF; a flags byte of 0 (no unsynchronisation, no extended header, no footer: a tag with any flag set is not read by this revision and is container_malformed); and a size of four bytes each below 0x80, seven bits each, most significant first (ID3v2.4.0 structure §3.1). The tag is 10 bytes and that size, within the file. Frames follow from offset 10: a 10-byte header of four characters A–Z and 0–9, a size (for major version 4, four bytes each below 0x80, seven bits each; for 3, a 32-bit big-endian number), and two flag bytes of 0 (a frame with a flag set is container_malformed here); then a body of that size, at least 1 byte, within the tag. A header whose first byte is 0 begins the padding, which runs to the tag’s end with every byte 0. A tag of padding alone is read: ID3v2.4.0 structure §4 asks a tag for at least one frame, and muxers write such tags all the same.

A TXXX frame whose encoding byte is 0 (ISO-8859-1) or 3 (UTF-8) is read: its description runs to the first 0 byte, and its value is the rest, less one final 0 byte where present. Its description names a field of §3.4 exactly, or it is not a field here; a frame in another encoding is not read. A GEOB frame (frames §4.15): its encoding byte, 0 to 3; a MIME type to the first 0 byte; a filename and a description, each terminated by one 0 byte in encodings 0 and 3 and by two at an even offset from its start in 1 and 2; then the object. Its MIME type application/c2pa is a manifest store (§3.4). A TXXX frame of encoding 0 or 3, or a GEOB frame, that does not hold those parts is container_malformed.

4.2 FLAC

An ID3v2 tag at 0 (§4.1) may come first, as media-identify §5 reads FLAC; then fLaC; then metadata blocks (RFC 9639 §8.1): a byte whose high bit marks the last block and whose low seven bits are its type, not 127, and a 24-bit big-endian length; the block within the file. The first block is of type 0 and length 34; there is at most one of type 4 (RFC 9639 §8.6). After the last block, the bytes 0xFF and 0xF8 or 0xF9 begin the first frame.

A block of type 4 is read whole: a 32-bit little-endian length and that many bytes of vendor string, UTF-8; a 32-bit little-endian count; that many fields, each a 32-bit little-endian length and that many bytes, UTF-8, holding = after a name of characters U+0020 to U+007E other than =; and no byte after the last field. A field whose name is one of §3.4’s, compared without regard to case, is that field, its value what follows the first =.

4.3 Ogg Opus

Pages from offset 0 to the file’s end (RFC 3533 §6): a 27-byte header beginning OggS and the version 0; a header-type byte of no bit but 0x01 (continued), 0x02 (first page of a stream) and 0x04 (last page); the granule position; the stream serial number (32-bit little-endian, at 14); the page sequence number (at 18); the checksum (at 22); the segment count (at 26); its table; and a body of as many bytes as the table sums to. The checksum holds as media-identify §5 states it for Ogg (polynomial 0x04C11DB7 from zero over the page with its checksum bytes zero, not reflected). Each stream’s first page, and only that page, has the 0x02 bit, and each later page of a stream has the sequence number one above the stream’s page before it. Packets are its segments joined, a segment below 255 bytes ending one: a page that continues a packet has the 0x01 bit, and a page with it continues one; no packet is left unfinished at the file’s end.

The file holds exactly one stream whose first packet begins OpusHead, at least 19 bytes long, its version byte’s high four bits 0, and the only packet of its page (RFC 7845 §3); its second packet begins OpusTags, the comment header, ending its page. It holds at most one other stream, whose first packet begins \x00c2pa: a manifest store (§3.4). A file with any other stream is not read by this revision.

The comment header (RFC 7845 §5.2) after OpusTags: a vendor string and a count of user comments as in §4.2, each comment UTF-8 holding = after a name of characters U+0020 to U+007D other than = (the Vorbis comment rule RFC 7845 refers to); bytes after the last comment are kept, as RFC 7845 §5.2 allows, and not read. A comment named as a field of §3.4, compared without regard to case, is that field.

4.4 MP3

An ID3v2 tag at 0 (§4.1), where there is one; then an MPEG audio frame header, at 0 or after the tag, as media-identify §5 reads one for MPEG audio (its version, layer, bitrate index and rate index each a value that names a frame), and its frame within the file. The fields are the tag’s TXXX frames; a store is the tag’s GEOB frame (§4.1).

4.5 WAV

RIFF, a 32-bit little-endian size, and WAVE; the size plus 8 is the file’s length. Chunks follow to the end: four bytes of identifier, a 32-bit little-endian length, and that many bytes, padded to an even count. One chunk is fmt and one is data. A chunk C2PA that is the last is a manifest store (§3.4); one elsewhere is not at C2PA’s place and is not a store here.

4.6 MP4

Boxes from offset 0 to the end: a 32-bit big-endian size and four bytes of type, each 0x20 to 0x7E or 0xA9; size 1, a 64-bit size after the type, at least 16; size 0, to the file’s end; any other size at least 8; each box within the file, as media-identify §5 walks ISO base media. The first is ftyp. A top-level uuid box whose 16-byte extended type is C2PA’s, followed by a version and flags of 0, the purpose manifest ending in a 0 byte, and eight bytes of offset, is a manifest store (§3.4).

4.7 The audio

The verifier decodes a file’s audio for the watermark (§3.7), and only where the samples it decodes are the same integers on every machine:

A file is decoded to at most 2^26 samples, every channel counted: one whose STREAMINFO total, whose frames, whose data chunk, whose Opus packets or whose MP3 frames hold more is not decoded.

4.8 The pinned Opus decoder

RFC 6716 defines Opus through the reference implementation in its Appendix A, and holds a decoder to that implementation’s output within the thresholds of a comparison tool, not to its integers (§6). Appendix A states that the normative output is that of the code’s floating-point configuration, and that the code computes in fixed-point arithmetic alone where FIXED_POINT is defined. Two conforming decoders can give a detector different samples, so this extension reads Ogg Opus through one decoder, pinned:

A verifier MAY decode with any implementation that gives the pinned decoder’s samples for every stream. The reference implementation’s, wai-rs’s opus_exact module, is an integer reimplementation of that decoder in safe Rust, held to the 48 digests and to every packet’s final range on the vectors, and to the pinned build’s own decoding of the corpus’s streams (§8).

4.9 The exact MP3 decoder

ISO/IEC 11172-3 and 13818-3 define how Layer III is decoded and hold a decoder to a reference’s output within a tolerance, not to its integers; they are sold, were not read for this revision, and publish no code to pin (decision D129). So this extension defines MP3’s samples itself. The exact MP3 decoder is a decoder conforming in intent: it decodes Layer III by the structure the standards give it, and a measurement holds it close to a floating-point decoder (decision D137); but its output is WAI’s own definition, the integers its arithmetic below gives, and not any other decoder’s samples. It was written from a decoder whose authors dedicated it to the public domain (the basis, decision D137), whose stream syntax, Huffman code tables, scalefactor band tables and synthesis window it takes; the basis computes in floating point, and every operation here is on integers.

A verifier MAY decode with any implementation that gives the exact decoder’s samples for every stream.

5. The delivery

A delivery is a JSON object read as synthesis §2 reads a record (RFC 8259, no member named twice in one object, at most 32 levels of nesting, the integers and byte strings of jwp-receipts §2.4.3), with exactly these members and none other, at every level; otherwise delivery_malformed:

membervalue
kind"wai-marking-delivery"
claimsan array of at most 256 strings, each an origin claim’s text (synthesis §3.1)
filesan array of at most 64 objects: name (1 to 64 characters of a–z, 0–9, ., - and _, no two alike), container (flac, ogg-opus, mp3, wav or mp4), origin (the link hash of the claim the party says the file rests on, or null) and bytes (the file, hex, at most 2^24 bytes)
c2paan array of at most 64 objects: origin (a link hash), carriage ("sidecar", or {"file": name}, a file of files) and statement (§3.3, read by §3.3’s rules)
releasenull; or an object restating the release: message ("ern-4.3.2"), contains_ai (None, Partly, All or null) and resources, an array of 1 to 64 objects: reference (2 to 32 characters, A and then a–z, A–Z, 0–9, _ and -, no two alike), type (SoundRecording, Image, Video or Text), origin (a link hash or null), contains_ai (a value or null) and contributors, an array of at most 32 objects: special ("GenerativeAI" or null) and ai_contribution (a value or null); or an object giving the message: message ("ern-4.3.2"), xml (the message’s text, at most 16 MiB, release-message §5.1’s bound) and origins, an array of at most 64 objects: reference (a sound recording’s ResourceReference, of reference’s form, no two alike) and origin (a link hash or null)
sessionnull, or an object: groups, an array of at most 4096 objects: track (32 bytes, the track’s digest), group (an integer), receipt (32 bytes, the group receipt’s link hash) and audio (null, or an object: channels, 1 or 2, the same for every group of the track whose audio is not null, and packets, an array of at most 3000 byte strings of at most 2^16 bytes each, the Opus packets of the group’s objects in order, §3.8), no track and group twice and no receipt twice

The release’s members restate the message’s elements: contains_ai the Release’s ContainsAI; each resource its ResourceReference, its composite’s name, its ContainsAI and its contributors’ SpecialContributor and AiContribution. Its origin is the claim the party says the resource rests on. A release given as its message is read by release-message §7, and each entry of origins names the claim the party says a sound recording rests on; a sound recording no entry names rests on no claim.

6. Verification

6.1 Steps

The verifier runs these steps and stops at the first refusal, which it reports with the reason and where: ["delivery"]; a claim, a file or a statement by its list and index; ["release"], or a resource by ["release", "resources", i] and a contributor by ["release", "resources", i, "contributors", j]; for a release given as its message, ["release", "xml"], an entry of origins by ["release", "origins", i], and the message’s sound recordings, in its order, by ["release", "recordings", i] and their contributors by ["release", "recordings", i, "contributors", j]; or a group by ["session", "groups", i].

  1. Reading. The delivery reads (§5): delivery_malformed.
  2. Claims: each, in order, reads and its signature verifies (synthesis §2, §3.1, §3.2: record_malformed, bad_key, bad_signature); then each, in order: its subject is not one an earlier claim names (claim_conflict); its class is synthesis §3.2’s (class_mismatch) and its source synthesis §5’s (source_mismatch); and each input whose origin names a claim given restates that claim’s class and source, that claim being about the input’s object (synthesis §3.3, input_mismatch). A claim is named by its link hash.
  3. Files, in order: the file reads by its container’s rules (§4: container_malformed); its fields are each once and of their form, all three or none (§3.4: container_field_invalid); its origin, where not null, and its WAI_ORIGIN, where carried, each name a claim given (claim_unknown), and the same one (container_origin_mismatch); and the claim’s class is its WAI_ORIGIN_CLASS (container_class_mismatch) and the claim’s source its WAI_DIGITAL_SOURCE_TYPE (container_source_mismatch).
  4. Statements, in order: each names a claim given (claim_unknown); its statement reads (§3.3: c2pa_malformed); a carriage in a file names a file whose container holds a store (§3.4, §4: c2pa_store_missing); then §3.3’s steps 1 to 4 (c2pa_action_mismatch, c2pa_source_mismatch, c2pa_disclosure_mismatch, c2pa_oversight_mismatch).
  5. The release, where given. Given as its message: the message reads (release-message §7: release_message_invalid); then each entry of origins in order names a sound recording of the message (release_reference_unknown) and, where its origin is not null, a claim given (claim_unknown); the resources are then the message’s sound recordings, in its order, and the release’s ContainsAI its Release’s. Then each resource in order: a restated one’s origin, where not null, naming a claim given (claim_unknown), then §3.5’s first two rules (release_resource_mismatch, and for each contributor in order release_contributor_mismatch); then the release’s ContainsAI (release_mismatch).
  6. The session, where given: each group in order, §3.6 (live_group_mismatch).
  7. The watermark: each file in order, its audio decoded (§4.7: audio_malformed), then, where it is read and rests on a claim, its payload held to the claim (§3.7: watermark_class_mismatch, watermark_origin_mismatch); then each track of the session that gives audio, in the order of its first such group in the list: its groups’ packets read and decoded (§3.8: audio_malformed at the group), then each of its spans in group order, held to its claim (§3.8, §3.7: watermark_class_mismatch, watermark_origin_mismatch at the span’s first group).

6.2 What an accepted delivery states

7. Reasons

The codes the marking verifier gives, each with where it is raised:

reasonraised at
delivery_malformed§5, §6.1 step 1
record_malformed§6.1 step 2 (synthesis §2)
bad_key§6.1 step 2 (synthesis §2)
bad_signature§6.1 step 2 (synthesis §2)
claim_conflict§6.1 step 2 (synthesis §3.1)
class_mismatch§6.1 step 2 (synthesis §3.2)
source_mismatch§6.1 step 2 (synthesis §5)
input_mismatch§6.1 step 2 (synthesis §3.3)
claim_unknown§6.1 steps 3, 4 and 5
container_malformed§4
container_field_invalid§3.4
container_origin_mismatch§6.1 step 3
container_class_mismatch§6.1 step 3
container_source_mismatch§6.1 step 3
c2pa_malformed§3.3
c2pa_store_missing§3.3, §3.4
c2pa_action_mismatch§3.3 step 1
c2pa_source_mismatch§3.3 step 2
c2pa_disclosure_mismatch§3.3 step 3
c2pa_oversight_mismatch§3.3 step 4
release_resource_mismatch§3.5
release_contributor_mismatch§3.5
release_mismatch§3.5
release_message_invalid§6.1 step 5 (release-message §7)
release_reference_unknown§6.1 step 5
live_group_mismatch§3.6
audio_malformed§4.7, §6.1 step 7
watermark_class_mismatch§3.7, §6.1 step 7
watermark_origin_mismatch§3.7, §6.1 step 7

A verifier that implements pq-signatures also gives that text’s codes for a hybrid claim, as synthesis §2 has it.

8. Conformance

live-conformance/marking-layers/ holds the corpus, in one file, vectors.json, written from fixed seeds by wai_marking_layers_vectors gen: every key, every sample and every file is derived from a label by SHA-256, and every container file is written by the generator itself, so the file is the same bytes on every machine. Each delivery states the outcome it was written to have: accepted deliveries with every layer agreeing, deliveries with gaps (layers absent, files with no fields, WAV and MP4 files with no place, groups no claim covers), deliveries whose FLAC and WAV files carry marks (a claim’s own, one it inherits, one resting on no claim, none, and files this revision does not decode), and refused deliveries, each a control of one defect, so every reason of §7 refuses at least one. The marked files are a tune generated from a fixed seed, marked by synthesis’s audio scheme under the claim’s payload and written by the reference’s FLAC encoder (fixed predictors, Rice-coded residuals) or as 16-bit WAV; a short stereo FLAC holds a frame in each of the three decorrelations; and the corpus states the samples the reference decodes from the real muxers’ FLAC (linear prediction) and WAV files of identify-conformance/ext/. Deliveries that give the release as its message carry messages release-message’s writer wrote; among them a message stating no AI use over a generated track, refused through the message as the restated form is. tests/marking_layers.rs holds that the file regenerates byte for byte, that wai-rs gives each delivery its outcome, that §7 lists exactly the reference’s codes, and that the container readers read the files real muxers wrote in identify-conformance/ext/.

The corpus’s Ogg Opus files hold the packets the pinned decoder’s own encoder (the archive’s, in the same configuration) wrote at 96 kbit/s in two channels and at 48 kbit/s in one, in its audio application, from tunes generated from fixed seeds at 48 kHz, the two-channel one marked under a claim’s payload: opus/marked.bit and opus/plain.bit, in the framing of RFC 6716 §6.1’s tool. The generator wraps them in Ogg pages itself, so the files are the same bytes on every machine; a short stream of ten packets is the control the refused streams each change in one place (a packet framed against RFC 6716 §3.4, a packet of no bytes, a granule position counted wrong on a first page and on a later one, a stream ended inside its pre-skip, three channels in family 0, a header page’s granule position). The corpus publishes, as opus_decodes, the samples the pinned decoder gives each stream the verifier decodes: the stream’s audio (the SHA-256 of its audio packets, each a 4-byte big-endian length and its bytes; its channels, pre-skip and end), the samples’ SHA-256, and the samples as FLAC; and, for each live track the verifier decodes (§3.8), the samples of all its packets in group order, its pre-skip and end null. A recorded session’s groups carry the packets of a third input, opus/live.bit (a tune of 6 s at 48 kHz in one channel, marked under the AI participant’s track claim and coded at 64 kbit/s), fifty packets a group: its spans read their claim’s mark and a performer’s unmarked track reads none; a captured track carrying the AI participant’s mark, a packet of no bytes and a track whose groups state different channels are refused. tests/opus_exact.rs holds the reference implementation’s decoder to opus/reference.json on RFC 8251’s vectors, which opus/fetch.sh fetches and checks by digest, and opus/check.py builds nothing of wai-rs: it runs the pinned build, which fetch.sh makes, on the vectors, on the encoder’s inputs (requiring opus/*.bit byte for byte), and on every stream of the corpus (requiring the samples the corpus states and publishes).

live-conformance/marking_layers_verify.py is the second implementation, written from this text and sharing no code with wai-rs. It reads claims with synthesis’s second implementation (synthesis_verify.py), reads every container itself, decodes FLAC and WAV audio itself (§4.7) and runs the audio scheme’s detector from synthesis’s second implementation of it (_wai_audio_mark.py), gives each delivery its stated outcome, decodes the real muxers’ files to the samples the corpus states, requires every mutated copy of the corpus to fail, drops each of its named checks in turn and requires the corpus to catch each weakened verifier, and reads the same files of identify-conformance/ext/. It does not decode Opus: it reads each Ogg Opus stream’s header, framing and granule positions itself (§4.7), refusing what they refuse, and holds the stream’s audio to the samples the corpus publishes for it, which it decodes from their FLAC and holds to their SHA-256 before it runs the detector on them. That those samples are the pinned decoder’s is the pinned build’s to show (opus/check.py), not the second implementation’s.

The corpus’s MP3 files hold the frames an open-source encoder wrote from tunes generated from fixed seeds (the commands are mp3/encode.sh’s): a tune of 6 s marked under the generated instrumental’s payload, one channel at 16 kHz and 32 kbit/s (MPEG-2), after the encoder’s header frame, mp3/marked.mp3; an unmarked tune of 1.5 s, mp3/plain.mp3; and ten frames of MPEG-1 at 48 kHz in one channel with no header frame, mp3/short.mp3, and the same protected by CRCs, mp3/crc.mp3. The generator writes their ID3v2 tags itself. The short stream is the control the refused streams each change in one place (a CRC that does not hold, main data before the stream, a granule longer than its frame’s main data, big values past 288, window switching with block type 0, a later frame of another rate and one of another channel count, a broken sync, a frame past the end), and the streams not decoded are an MPEG-2.5 stream, a Layer II stream and a stream whose fifth frame is of free-format bitrate. The corpus publishes, as mp3_decodes, the samples the exact decoder gives each stream the verifier decodes and the real muxer’s: the SHA-256 of the file’s bytes after its ID3v2 tag, the samples’ rate, channels and length, their SHA-256, and the samples as FLAC. tests/mp3_exact.rs holds the reference implementation’s decoder to mp3/reference.json on the corpus’s streams, and on the mode set’s and the streaming deliveries’ where they are given (they are not in the repository).

The second implementation does not decode MP3 either: it walks each stream’s frames, reads each frame’s header, CRC and side information itself, and refuses or does not decode what §4.9’s rules for the stream and for each frame’s side information say; the rules inside a granule’s Huffman data are the exact decoder’s alone. It holds each stream it reads as decodable to the samples the corpus publishes for it, decoded from their FLAC and held to their SHA-256, and runs the detector on them. That those samples are the exact decoder’s is shown by the reference implementation, on x86-64 and AArch64, not by the second implementation.

9. Security and privacy considerations