Hi 

– needed to shorten the e-mail - 

 

My reading of the C2PA specification is:

(https://spec.c2pa.org/specifications/specifications/2.3/specs/C2PA_Specification.html#_embedding_manifests_into_tiff_based_assets)

 

“As such, the C2PA Manifest Store shall be the only box present in the last IFD 
(the IFD whose next IFD offset is 0).”:

==> For me, this “last IFD” is the IFD of the last image in a multi-image or 
multi-page TIFF file. It is NOT an ADDITIONAL IFD.

==> In other words, the IFD of the last image in the file shall add an 
additional tag entry with ID 52545 (decimal) or 0xCD41 (hexadecimal), with a 
tag type of 7. The offset shall point to the binary data of the C2PA manifest.

==> For TIFF files with one image, there is only one IFD for that image, which 
has also the C2PA tag.

 

“To support update manifests, the C2PA Manifest Store should be located at the 
end of the file; this ensures that changes to the size of the C2PA Manifest 
Store do not impact any of the other tag offsets.”

==> For me, this means that the C2PA manifest data (not the tag with the offset 
to these data)  shall be put at the end of the file.

==> Then, a skilled application can update the C2PA data and it’s tag, without 
touching any other tags or offsets.

 

So, I agree with Even that the provided example file, with that additional 6th. 
IFD only having the C2PA tag, is a malformed TIFF file, even in sense of the 
C2PA specification.

 

Hopefully, this helps a little.

 

Su

 

 

Von: Tiff [mailto:[email protected]] Im Auftrag von Kemp Watson via 
Tiff
Gesendet: Donnerstag, 5. März 2026 13:21
An: Phillip Seaver <[email protected] <mailto:[email protected]> >
Cc: [email protected] <mailto:[email protected]> 
Betreff: Re: [Tiff] Libtiff failing on TIFFs with embedded C2PA Manifests?

 

To add a bit: the spec uses the word "box", which is more of a JPEG or PNG 
term. Is a "box" in TIFF context an IFD, or the data of a tag?
I think that may be the source of confusion.




W. Kemp Watson, Managing Director

Objective Pathology Services Limited

Toronto, Canada

 

 

On Thu, 5 Mar 2026 at 07:18, Kemp Watson <[email protected] 
<mailto:[email protected]> > wrote:

I just took a look at the CP2A spec, the JUMBF spec, and the actual bug report 
submitted by Leonard. It appears that the TIFF file is malformed as the JUMBF 
data is contained within a *new* IFD pointed to in the IFD chain; this is 
incorrect according to the specifications, so the file is malformed, and 
libtiff is quite reasonably attempting to parse the JUMBF metadata container as 
an IFD, and failing.

 

As far as I can tell, it's the c2patool signing the file incorrectly by 
creating an extra IFD rather than simply inserting the JUMBF packet into the 
"real" last IFD, which is valid image data.

 

The submitter says "The C2PA spec (§A.2.5) says the C2PA manifest must go in a 
dedicated last IFD in the TIFF file." It does not appear to say that. My read 
is that it goes into the already existing last IFD. Here's the spec text:

Although TIFF supports the concept of multiple pages or layers (via multiple 
IFD’s), there shall only be one C2PA Manifest Store for the entire asset - not 
one per IFD. As such, the C2PA Manifest Store shall be the only box present in 
the last IFD (the IFD whose next IFD offset is 0). To support update manifests, 
the C2PA Manifest Store should be located at the end of the file; this ensures 
that changes to the size of the C2PA Manifest Store do not impact any of the 
other tag offsets.

 

So, the cp2atool appwars to be incorrecty creating a new IFD, inserting it into 
the chain, and adding the JUMBF packet to that new (and otherwise empty) IFD, 
rather that inserting it into the last extant IFD, is how I read this. The 
spec's wording could be improved a bit, for example "C2PA Manifest Store shall 
be the only box present in the last IFD" is rather demanding as other JUMBF 
boxes, unrelated to C2PA, could also theoretically be present,

I can't say I like the idea of a tag in the first IFD pointing to data in the 
last IFD, but that's how I'm interpreting the specification. Leonard, have I 
got this right? This is just from reading, not experience.




W. Kemp Watson, Managing Director

Objective Pathology Services Limited

Toronto, Canada

_______________________________________________
Tiff mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/tiff

Reply via email to