Closed llemeurfr closed 5 years ago
Sorry, the first commit of v1.0 rev 4 was made with the update of definitions and normative references to EPUB 3.2 both embedded, so the diff has to be made with the rev 3, which was moved to the "history" folder. Next time I'll process step by step.
Note: the .rfc css is now defined in the CSS template, we can therefore remove it from each spec.
The lack of diff from previous-to-next version of the Mardown file makes it hard to review. So I created a diff via the command line:
diff -u <(curl https://raw.githubusercontent.com/readium/lcp-specs/50a983fcc58a378f69ee2bf864d57eea9182c77b/history/lcp-1-0-3.md) <(curl https://raw.githubusercontent.com/readium/lcp-specs/50a983fcc58a378f69ee2bf864d57eea9182c77b/_pages/lcp-1-0-4.md)
Diff visualisation: https://diffy.org/diff/a28jh80tustimlp2z8b54gqfr
Raw diff source: https://gist.github.com/danielweck/b20c4ee29b3647187cf0eaa83f223b16
--- BEFORE
+++ AFTER
@@ -1,7 +1,7 @@
---
layout: default
-permalink: /readium-lcp-specification-1-0-3
-title: "Readium LCP specification 1.0.3"
+permalink: /readium-lcp-specification
+title: "Readium LCP specification"
---
# Readium Licensed Content Protection 1.0
@@ -14,9 +14,9 @@
**Previous version:**
-* [https://readium.org/lcp-specs/history/readium-lcp-specification-1-0-2]({{site.section}}history/readium-lcp-specification-1-0-2)
+* [https://readium.org/lcp-specs/history/readium-lcp-specification-1-0-3]({{site.section}}history/readium-lcp-specification-1-0-3)
-**Document revision:** 3
+**Document revision:** 4
## 1. Overview
@@ -25,34 +25,37 @@
In order to deliver a Publication to a User with specific rights and restrictions, a Content Provider may want to encrypt the Publicationās Resources and associate them with a specific license.
-This specification, Licensed Content Protection (LCP), defines a standard License Document and an Encryption Profile for encrypting resources in EPUB 3 Publications, expressing rights and restrictions, and for securely delivering decryption keys to Reading Systems via licenses for specific Users.
-
-LCP also defines a simple passphrase-based authentication method for Reading Systems to access encrypted resources and verify a license.
+This specification, Licensed Content Protection (LCP), defines a standard License Document and an Encryption Profile for encrypting resources in different publication formats (especially EPUB), and for securely delivering decryption keys to Reading Systems via licenses tailored to specific Users. It also defines a simple passphrase-based authentication method for Reading Systems to access encrypted resources and verify a license.
## 1.2. Terminology
### EPUB terms
-This specification adopts [terms defined in the EPUB 3 family of specifications](https://www.idpf.org/epub/30/spec/#sec-gloss). Important terms used include:
+This specification adopts [terms defined in the EPUB 3 family of specifications](https://www.w3.org/publishing/epub3/epub-spec.html#sec-terminology). Important terms used include:
<dl>
<dt>Publication</dt>
- <dd>A logical document entity consisting of a set of interrelated resources and packaged in an EPUB Container, as defined by the EPUB 3 specifications.</dd>
+ <dd>A logical document entity consisting of a set of interrelated resources, packaged in an EPUB Container.</dd>
<dt>Publication Resource (or Resource)</dt>
<dd>A resource that contains content or instructions that contribute to the logic and rendering of the EPUB Publication. </dd>
<dt>Package Document</dt>
- <dd>A Publication Resource carrying bibliographical and structural metadata about the EPUB Publication.</dd>
+ <dd>A Publication Resource carrying meta information about the EPUB Publication, provides a manifest of resources and defines the default reading order.</dd>
<dt>EPUB Container (or Container)</dt>
- <dd>The ZIP-based packaging and distribution format for EPUB Publications defined in [<a href="#normative-references">OCF</a>]. </dd>
-
- <dt>User</dt>
- <dd>An individual that consumes an EPUB Publication using an EPUB Reading System.</dd>
+ <dd>The ZIP-based packaging and distribution format for EPUB Publications defined in [<a href="#normative-references">OCF ZIP Container</a>]. </dd>
<dt>EPUB Reading System (or Reading System)</dt>
- <dd>A system that processes EPUB Publications for presentation to a User in a manner conformant with the EPUB 3 specifications.</dd>
+ <dd>A system that processes EPUB Publications for presentation to a user in a manner conformant with the EPUB 3 specification.</dd>
+
+ <dt>Codec</dt>
+ <dd>Codec refers to content types that has intrinsic binary format qualities, such as video and audio media types which are
+ already designed for optimum compression, or which provide optimized streaming capabilities.</dd>
+
+ <dt>Non-Codec</dt>
+ <dd>Non-Codec refers to content types that benefit from compression due to the nature of their internal data structure,
+ such as file formats based on character strings (for example, HTML, CSS, etc.).</dd>
</dl>
@@ -73,6 +76,9 @@
<dt>Content Key</dt>
<dd>Symmetric key used to encrypt the resources of the Protected Publication. In the License Document, this Content Key will be encrypted using the User Key.</dd>
+ <dt>User</dt>
+ <dd>An individual that consumes a Publication using a Reading System.</dd>
+
<dt>User Passphrase</dt>
<dd>A string of text entered by the user that is used to generate the User Key.</dd>
@@ -223,17 +229,25 @@
* `META-INF/license.lcpl`
-* Navigation Documents referenced in any Package Document from the Publication (all Publication Resources listed in the Publication manifest with the ["nav" property](https://www.idpf.org/epub/30/spec/epub30-publications.html#sec-item-property-values))
+* Navigation Documents referenced in any Package Document from the Publication (all Publication Resources listed in the Publication manifest with the ["nav" property](https://www.w3.org/publishing/epub32/epub-packages.html#sec-item-property-values))
* NCX documents referenced in any Package Document from the Publication (all Publication Resources listed in the Publication manifest with the media type "application/x-dtbncx+xml")
-* Cover images (all Publication Resources listed in the Publication manifest with the ["cover-image" property](https://www.idpf.org/epub/30/spec/epub30-publications.html#sec-item-property-values))
+* Cover images (all Publication Resources listed in the Publication manifest with the ["cover-image" property](https://www.w3.org/publishing/epub32/epub-packages.html#sec-item-property-values))
## 2.2. Using `META-INF/encryption.xml` for LCP
As defined in the [[OCF](#normative-references)] specification, all encrypted Publication Resources <b class="rfc">must</b> be identified in the well-known file `META-INF/encryption.xml` using [[XML-ENC](#normative-references)].
-In Publications protected using LCP, there are additional requirements for identifying the key used to encrypt these Resources (the LCP Content Key):
+Publication Resources with Non-Codec content types <b class="rfc">should</b> be compressed and the Deflate compression algorithm <b class="rfc">must</b> be used. This practice ensures that file entries stored in the Package have a smaller size.
+
+Resources with Codec content types <b class="rfc">should</b> be stored without compression. In such case, compression would introduce unnecessary processing overhead at production time (especially with large resource files) and would impact audio/video playback performance at consumption time.
+
+In Publications protected using LCP, there are additional requirements for determining the length of the full resource ahead of media playback, especially when using partial content requests:
+
+Streams of data that are compressed before they are encrypted <b class="rfc">should</b> provide additional `EncryptionProperties` metadata to specify the size of the initial resource (i.e., before compression and encryption), as per the Compression XML element defined in [OCF, Compression and Encryption](https://www.w3.org/publishing/epub32/epub-ocf.html#sec-enc-compression). Streams of data that are not compressed before they are encrypted <b class="rfc">may</b> provide such additional `EncryptionProperties` metadata.
+
+In Publications protected using LCP, there are also additional requirements for identifying the key used to encrypt these Resources (the LCP Content Key):
1. The `ds:KeyInfo` element <b class="rfc">must</b> point to the Content Key using the `ds:RetrievalMethod` element.
@@ -258,6 +272,11 @@
<enc:CipherData>
<enc:CipherReference URI="image.jpeg"/>
</enc:CipherData>
+ <enc:EncryptionProperties>
+ <enc:EncryptionProperty xmlns:ns="http://www.idpf.org/2016/encryption#compression">
+ <ns:Compression Method="8" OriginalLength="35000"/>
+ </enc:EncryptionProperty>
+ </enc:EncryptionProperties>
</enc:EncryptedData>
</encryption>
@@ -463,7 +482,7 @@
-2. The page as defined by the page-list nav element of the EPUB Navigation Document, if this exists OR +2. The page as defined by the page-list nav element of the EPUB Navigation Document, if this exists OR
@@ -968,10 +987,10 @@
+* [EPUB] EPUB 3.2.
- -
Alternatively:
diff -u <(curl https://raw.githubusercontent.com/readium/lcp-specs/50a983fcc58a378f69ee2bf864d57eea9182c77b/history/lcp-1-0-3.md) <(curl https://raw.githubusercontent.com/readium/lcp-specs/50a983fcc58a378f69ee2bf864d57eea9182c77b/_pages/lcp-1-0-4.md) | npx diff2html -i stdin
PS: "Note: This diff will self destruct in: 6 hour(s), 51 minute(s) and 55 second(s) " https://diffy.org/diff/a28jh80tustimlp2z8b54gqfr
Ah, I think every Pull Request should have a ticking time-bomb, that would put some pressure on reviewers :D
@danielweck @HadrienGardeur please check before merge.