Closed danielweck closed 7 years ago
In LCP, the compression + encryption rules from the latest EPUB 3.1 specification are used, regardless of the actual version of the ingested EPUB (v3, v3.0.1, v3.1).
So, I would argue that the current implementation of LCP Content Module (decryption) correctly conforms to the EPUB3.1 specification, and implementations of LCP encryption are expected to follow that path too, such that the CompressionMethod
metadata in encryption.xml
is always generated (SHOULD
conformance requirement) when a resource is compressed / deflated before it is encrypted.
In LCP at least, the design is consistent.
Issue closed.
CC @jpbougie
In the LCP Content Filter implementation, the default fallback (if
CompressionMethod
metadata does not exist inencryption.xml
) is to consider that the resource was not deflated / compressed before it was encrypted:https://github.com/readium/readium-lcp-client/blob/develop/src/lcp-content-filter/LcpContentFilter.cpp#L68
https://github.com/readium/readium-lcp-client/blob/develop/src/lcp-content-filter/LcpContentFilter.cpp#L228
This seems like a valid assumption based on the EPUB 3.1 specification (where
CompressionMethod
was first standardised), see: http://www.idpf.org/epub/31/spec/epub-ocf.html#sec-container-metainf-encryption.xmlHowever, the default assumption in EPUB 3.0.1 was somewhat different: http://www.idpf.org/epub/301/spec/epub-ocf.html#sec-container-metainf-encryption.xml
Related ReadiumSDK issue: https://github.com/readium/readium-sdk/issues/162