readium / SDKLauncher-iOS

A small iOS application to serve as a launcher/testbed for the Readium SDK.
BSD 3-Clause "New" or "Revised" License
71 stars 47 forks source link

Any Examples that Utilize Encryption? #56

Closed jimjeffers closed 9 years ago

jimjeffers commented 9 years ago

Hey guys,

I'm trying to find any examples with Readium that launch encrypted epub files. Is there a specific process for encrypting epubs to work with Readium? And are there any specific settings that need to be specified in the SDK to decrypt said epubs?

ghost commented 9 years ago

I don't think you'll be able to find any examples. Your typical encrypted EPUB uses Adobe's DRM, and there is no open implementation anyone could share with you. You'll likely have to secure your own trial version of RMSDK via a vendor such as Datalogics or Webqem to make any progress.

rkwright commented 9 years ago

To add a little background, Readium per se does not out of the box support any DRM and will not. DRM by its very nature is propietary and we are open source and deliberately DRM-agnostic. It is up to our SDK partners to implement whatever DRM support they want, whether it be "Adobe" (Classic or PassHash), Sony Marlin, SCP (née LCP) etc.

What might be interesting and useful would be to have some trivial, non-proprietary DRM implementation, e.g. something like Caesar's shift (where each character is shifted character, etc. A modern equivalent would be to roll all 8 bits one bit left, for example)

We would love to have someone implement this feature. Volunteers?

danielweck commented 9 years ago

Regarding Ric's "call for participation" above ;) I would suggest taking a look at this (slightly out of date) wiki page which describes how a 'content filter' can be added in the ReadiumSDK processing 'chain' in order to decrypt files on the fly (via the built-in HTTP server), and how support for streaming media assets can be implemented (HTTP byte range protocol): https://github.com/readium/readium-sdk/wiki/ContentFilterEncryptedMedia It's not an exacting blueprint, but a pretty decent starting point anyway.

jimjeffers commented 9 years ago

@rkwright @danielweck I'm not sure my client will fund that endeavor :)

Their reader supports PDF and epubs. We currently encrypt the PDF files with RNCryptor and PSPDFKit has a CryptoDataSource object that can decrypt parts of the PDF file on the fly. This works incredibly well. I don't know if we could build something similar. It sounds like the 'content filter' solution is similar to what we're doing with PSPDFKit. I'll check it out!

Thanks guys!