w3c / epub-specs

Shared workspace for EPUB 3 specifications.
Other
304 stars 60 forks source link

epub provides no authenticity or integrity checks #2265

Open npdoty opened 2 years ago

npdoty commented 2 years ago

In the short term, the threat model should note the possibility that epub files are altered between the author and the reader, or that a book is distributed claiming to be the authentic work of someone else but with no feasible way to verify it.

In the long term, epub should use package-wide signatures (or some other mechanism) to provide at least the option for authenticity and integrity via PKI.

iherman commented 2 years ago

The issue was discussed in a meeting on 2022-05-26

View the transcript #### 1.3. Authenticity and Integrity checks. _See github issue [epub-specs#2265](https://github.com/w3c/epub-specs/issues/2265)._ **Dave Cramer:** we did add a section about this in the previously approved PR 2297. … XML signatures does support signing of the epub. … so there is a mechanism for this, but i'm not aware of an epub RS that supports signing or that would alert end user/do something else if faced with signed epub where signature is invalid. **Brady Duga:** an attacker could just re-sign the epub with their own signature. RS can't know what signature should be. **Dave Cramer:** so should we just note that we have a signature capability, but given the nature of epub it is tough to ascertain a chain of trust even though it is possible on the web?. **Brady Duga:** the PR itself looks fine. … do we have to resolve all issues, right? And the raiser must be happy with resolution? This is part of CR transition?. **Wendy Reid:** yes. … we can close the issue, and then make sure that PR gets an okay from security and privacy reviewers.
npdoty commented 2 years ago

I think the PR correctly notes the threat in the threat model now, which was the short term need. πŸ™πŸ»

Is there a way to track issues for the longer term, even if they won't be resolved in this version? Integrity and authenticity are important security characteristics and it seems like existing XML signature functionality isn't providing much (since it doesn't describe who signed it, and it can be trivially downgraded).

npdoty commented 2 years ago

Is there a way to track issues for the longer term, even if they won't be resolved in this version? Integrity and authenticity are important security characteristics and it seems like existing XML signature functionality isn't providing much (since it doesn't describe who signed it, and it can be trivially downgraded).

iherman commented 2 years ago

We have a 'status-deferred' label and we do keep some issues open with this label:

https://github.com/w3c/epub-specs/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3AStatus-Deferred

We could use that if you prefer (@dauwhe @wareid @shiestyle ?)

iherman commented 2 years ago

The issue was discussed in a meeting on 2022-07-21

View the transcript ### 2. Content Signing and Theft. **Brady Duga:** not 100% clear what this topic meant. I don't think we really mean 'theft' here, its probably not accurate. Assuming that this is just about content signing, does anyone have comments?. **Shinya Takami (ι«˜θ¦‹ηœŸδΉŸ):** at the last Publishing group meeting, the issue was raised that with DRM being imperfect, we may want to think about digital signing to authenticate content. … the purpose is to generally share ideas before we take this up with other related WG. > *Shinya Takami (ι«˜θ¦‹ηœŸδΉŸ):* for example: [https://iscc.codes](https://iscc.codes). **Brady Duga:** i'm interested in content signing for purposes of verifying the publishers, so users can tell provenance of content. I'm wary about addressing the topic of piracy. … barring any other comments, i'm happy to take this up with the Business Group. **Shinya Takami (ι«˜θ¦‹ηœŸδΉŸ):** the link above is a summary of our discussion of this topic 2-3 weeks ago. … do we think some discussion about this sort of technology belongs in the epub spec?. **Matt Garrish:** I think this also came up through npd. #2265 was about an authenticity check. … probably something we can address longer term, but maybe not in epub 3.3. _See github issue [epub-specs#2265](https://github.com/w3c/epub-specs/issues/2265)._ **Brady Duga:** right, using signing to determine if the claimed author of epub is actually who they say they are. … but i don't think we can resolve anything on this issue at this meeting.