openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

Add detection of secured codestreams #94

Open bitsgalore opened 7 years ago

bitsgalore commented 7 years ago

Dev Effort

1D - investigate getting samples

Description

JPEG 2000 Part 8 defines several methods for secured codestreams, including encryption. See:

https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-T.807-200605-I!!PDF-E&type=items

Annex C (interoperability) states:

A number of protection methods can be applied to a JPEG 2000 codestream to create JPSEC codestreams that are still strictly compliant with JPEG 2000 part 1.

It would be useful if jpylyzer were able to report on the presence of secured codestreams. This could be implemented by checking the presence of one or more SEC markers in the codestream header:

The parameters for these tools are signalled in one or more SEC marker segments located in the main header of the codestream after the SIZ marker segment. When multiple SEC marker segments are used, they are concatenated and must appear consecutively in the main header. In most cases, all the JPSEC parameters can be signalled in one SEC marker segment. However, in some cases the length of the signalling may exceed the maximum marker segment size. When this occurs, additional SEC marker segments can be used for signalling.

(section 5.5)

boxerab commented 7 years ago

Interesting. Do such files exist out in the wild, and if so, who is using this feature? Just curious.

bitsgalore commented 7 years ago

I've no idea, a colleague alerted me to the existence of this feature. I've never come across any files that are using this BTW.

boxerab commented 7 years ago

Thanks. For testing, I suppose you would need at least one.