|
|
Log in / Subscribe / Register

DRM in HTML5 published in draft form

By Nathan Willis
May 15, 2013

Despite the protests of multiple critics, the World Wide Web Consortium's (W3C) HTML working group has published the first working draft of the Encrypted Media Extensions (EME) proposal. The EME proposal is commonly referred to as "DRM for HTML" or words to that effect, although that is not a strictly accurate description. Reading through the proposal, however, may only cloud the real issues at stake. EME merely defines an API for browsers to pass messages back and forth between a content server and DRM module. But those DRM modules are little different from the closed plugins used to deliver DRM today—except that the EME proposal would bear the W3C seal of approval. Of course, the proposal must first make it all the way through the W3C's labyrinthine standardization process, and whether W3C endorsement makes any real difference for users depends on who you ask.

The EME proposal was released on May 10. Its exact status it a bit complicated; it is labeled a "public working draft," which designates the lowest level of maturity in the W3C development process. Officially, a working draft is "a signal to the community to begin reviewing the document;" hypothetically, after several working drafts, a "last call announcement" is published, followed by "candidate recommendation," "proposed recommendation," and (finally) "recommendation"—with reviews, revisions, and red tape separating each stage. Still, the publication of this initial draft does signal that EME is moving forward, in spite of objections to the core concept from advocates of software freedom, privacy, and related matters.

The EME draft has three editors: Google's David Dorwin, Microsoft's Adrian Bateman, and Netflix's Mark Watson. Also noteworthy is that although the proposal is officially a product of the HTML working group, that means only that it impacts HTML elements; the EME authors operate as an effort distinct from the HTML working group's larger activities.

An uncomfortably close look

The EME proposal defines two abstract components: the Content Decryption Module (CDM) and the Key System. A CDM is a browser component (either built-in or installed as an extension) responsible for authenticating a user session with a remote content server and for decrypting the media served up by the server. A Key System is a complete implementation of an access-control framework in all of its constituent parts: the remote media streaming server, its standards for session and key management, and whatever else the provider chooses to implement.

Both are essentially black boxes as far as the browser is concerned; the CDM can decrypt encrypted media frames and hand them right back to the browser's playback stack, or it can render them directly to hardware—the EME proposal does not address this functionality. Similarly, a Key System is identified by a reverse domain name (e.g., com.example.payperviewservice), and EME outlines several interfaces for session management messages, but the key format and encryption method are left up to each implementer, as are session IDs and other initialization data.

In practice, a playback scenario would involve a JavaScript application that provides the local user interface and connects to the Key System to fetch content for an HTML mediaElement (that is, a <video> or <audio> element on the page; EME does not currently affect any other HTML elements), then passes that content to the CDM, which both authenticates the user and decrypts the content. It is the hooks for these JavaScript applications that make up the meat of the EME proposal. There is a new keys attribute for mediaElements, setMediaKeys and createSession methods which the application uses to get key and session information from the CDM, and a message event which the application uses to relay messages from the CDM to the Key System.

For instance, see the proposal's "other CDM" example, which depicts a mediaElement:

    <video src="foo.webm" autoplay onneedkey="handleKeyNeeded(event)">
    </video>
and the JavaScript needed to process it.

In the example, the video element triggers the EME script with the new onneedkey event. The script first initializes the video.keys attribute with the hard-coded "com.example.somesystem.1_0" Key System, then initializes the keySession, which tells the CDM to generate a key request message. The script then fires the request message off via XMLHttpRequest(); if the Key System responds with a key, the keySession is updated, and playback is started or resumed. The encrypted audio or video frames from the server are handed to the CDM, which decrypts them with the key and renders them as needed. There are several scenarios not addressed in this example, such as the availability of multiple CDMs in the browser (where the application might need to do some work to select the correct CDM).

From outside, this initialization and handshake process is pretty simple. One will note that the keySession is initialized with initData, the contents of which is not specified by the EME proposal—the CDM and the Key System determine what this data is (and how it authenticates the session). Likewise, the format of the key and the decryption of the media frames is pushed entirely out to the CDM and the remote Key System server.

What is left to the browser is a generic session initialization system and messaging framework, tied into <video> or <audio> elements with some new attributes and methods. As such, it does not directly mandate a DRM implementation. Actual DRM schemes would be implemented in CDMs, which are assumed to be resistant to key extraction, modification, and other methods that could be used to access mediaElement content outside of the parameters the CDM enforces. Similarly, the API between a CDM and the browser is not defined.

Feedback

So far, of course, there are no CDMs in the wild. On the other hand, there are "non-normative" (i.e., informational) sections in the proposal that discuss DRM details with more specificity. Section 7.1 defines an initialization data format and the encryption scheme for WebM content, and section 7.2 does the same for the ISO Base media File Format (ISOBMFF, the generic underpinnings of .MP4). Both use AES-128 in "counter" mode (CTR) for encryption; the WebM initialization data is a key ID, while the ISOBMFF initialization data is a more complicated structure that can hold separate keys for separate tracks. Section 6 also defines a trivial Key System named org.w3.clearkey (the only Key System defined in the document) which is mandatory for conforming browsers to implement. However, this clear key scheme has little practical value: it sends a decryption key in the clear as a JSON element.

But if the EME proposal does not actually enshrine a DRM scheme into the HTML specification, one might reasonably ask what all the fuss is about. After all, the Free Software Foundation denounced the publication, as did the Electronic Frontier Foundation.

The answer is two-fold. First, at a technical level, it is true that EME does not itself include a (non-trivial) DRM scheme. But EME's functionality hinges entirely on the presence of CDMs in the browser, which users by definition will have no control over. To software freedom advocates, that means handing control of a user's machine to proprietary code—which could very well contain anything from unintentional security flaws to secret user tracking frameworks. Whether built in to the browser or provided as separate downloads, only binary CDMs will be trusted: if users can compile their own CDM, they can alter it to include workarounds (e.g., to save content or encryption keys).

The same is true today, of course, which is why content services deploy protected content via proprietary plugins like Flash and Silverlight—in that sense, reliance on binary CDMs instead of binary plugins is at best a lateral move. Google and Microsoft very well could include binary CDMs in their browsers, but open source browsers like Firefox cannot, so they would be relying on third-party CDMs. And as Mozilla's Henri Sivonen observed (forwarded by Gervase Markham), support for binary plugins for Linux and other minority desktop operating systems is not good, and binary CDMs are certainly unlikely to be better. In fact, Sivonen doubts open source browsers will be well-served even on other OSes:

However, EME has the potential of becoming worse than status quo for Free Software browsers on proprietary operating systems if the licensing and availability of Content Decryption Modules turns out to be worse than the licensing and availability for Silverlight and Flash Player.

The other objection to the EME proposal is that it fundamentally goes against the stated mission of the W3C, both by advocating the distribution of proprietary CDMs in browsers and by endorsing restricted content itself. The EFF criticism of EME hits on this point, noting that the EME scheme is a mechanism for sites to require proprietary software or hardware in order to render web content:

Perversely, this is exactly the reverse of the reason that the World Wide Web Consortium exists in the first place. W3C is there to create comprehensible, publicly-implementable standards that will guarantee interoperability, not to facilitate an explosion of new mutually-incompatible software and of sites and services that can only be accessed by particular devices or applications.

The Free Culture Foundation argued that the proposal goes against the W3C mission statement, which is to make the benefits of the Web "available to all people, whatever their hardware, software, network infrastructure, native language, culture, geographical location, or physical or mental ability."

In addition, HTML working group member Manu Sporny argues that the proposal runs afoul of other W3C ideals, because it is advertised as a solution to prevent the piracy of copyrighted content, which he claims it simply does not do. Sporny also contends that in order for EME to be effective, sites will need to undertake expensive measures like re-encrypting each title for every user, which is a poor value proposition.

The EME proposal does have a few supporters outside of the drafters of the document itself, though. Ars Technica's Peter Bright declared it a "victory" for the open web, on the grounds that it keeps HTML relevant to the critical big-media producers, who would otherwise switch to non-Web delivery mechanisms—such as the DRM-capable media services already provided by iOS and Android. It is certainly true that content services looking to make money from audio and video—particularly through rental and subscription services—are not likely to embrace unencrypted mediaElements in the browser, but by shuttling it directly from the server to a binary-only CDM, there is not a whole lot of "open web" involved in the transaction; a fact Bright seems to gloss over.

Naturally, any company interested in deploying DRM-restricted multimedia as a product is going to do so whether it gets a W3C stamp of approval or not. If affecting that outcome is the goal of a protest against the EME proposal it will likely have no impact. But there is still an argument to be made that the W3C should not play a part in the process. It might seem like an uphill battle; W3C Director Tim Berners-Lee approved the EME proposal publication and has stated his position in favor of allowing DRM.

In addition, HTML working group co-chair Paul Cotton has been very vocal about shutting down criticism of EME on the mailing list, telling everyone with a complaint to take it to the Restricted Media Community Group (in which Netflix's Watson is the only EME editor who participates). But vocal opposition to W3C behavior has been effective in the past. Sivonen noted that the W3C patent policy was revised due to opposition from free software advocates. The draft policy endorsed "reasonable and non-discriminatory" (RAND) patent licenses, but feedback from Mozilla and others eventually shifted the policy to a fully royalty-free model. Whether history repeats itself, only time will tell.


to post comments

Sterner measures may be needed

Posted May 16, 2013 2:30 UTC (Thu) by jmorris42 (guest, #2203) [Link] (1 responses)

If the W3C is really 'shutting down criticism' the logical response should be a threat to simply migrate to a web standard setting organization within the auspices of a more freedom oriented umbrella group. If they want to treat us like redheaded stepchildren we can always move and they can hope a critical mass sticks with them. There are viable candidates for replacements, hope they understand that.

Sterner measures may be needed

Posted May 16, 2013 4:59 UTC (Thu) by kripkenstein (guest, #43281) [Link]

> If the W3C is really 'shutting down criticism' the logical response should be a threat to simply migrate to a web standard setting organization within the auspices of a more freedom oriented umbrella group.

A threat by who? The two biggest browser vendors, Google and Microsoft, are the ones pushing EME. I don't think it would matter to them if some critics go elsewhere (in fact they might prefer it).

DRM in HTML5 published in draft form

Posted May 16, 2013 4:56 UTC (Thu) by kripkenstein (guest, #43281) [Link] (1 responses)

> So far, of course, there are no CDMs in the wild.

Chrome is already shipping EME, and has a demo here

http://downloads.webmproject.org/adaptive-encrypted-demo/...

That it is showing encrypted video there implies it is using a CDM, and hence that Chrome already ships a CDM in the wild? Or am I missing something?

DRM in HTML5 published in draft form

Posted May 16, 2013 8:02 UTC (Thu) by TRS-80 (guest, #1804) [Link]

I don't think you're missing anything. It's also available on Chromebooks, and apprently Netflix is already using it. The CDM does cease to function if you turn on ChromeOS developer mode, so while it runs on Linux there's no chance it'll be supported on a standard GNU/Linux distribution.

DRM in HTML5 published in draft form

Posted May 16, 2013 9:36 UTC (Thu) by micka (subscriber, #38720) [Link]

I still haven't seen any reaction from Mozilla on the subject (not from individuals related to Mozilla, from Mozilla itself). I thought that as one of the 3 main browser makers, they would have one opinion.

Maybe they haven't themselves a consensus ?

Maybe they are suppotive of the proposal but find it hard to advocate because it would (and should) damage they role as defenders of the open web ?

DRM in HTML5 published in draft form

Posted May 16, 2013 12:05 UTC (Thu) by etienne (guest, #25256) [Link] (5 responses)

> reliance on binary CDMs

If the crypto-system is good enough, all the security depends only on the security of the key, and you should not need to have binary CDM: for instance PGP is free software.
Obviously if knowing the current encryption key (which should be valid for the next 10 seconds or so) enables you to decrypt the whole video or the same video in two hours, then the crypto-system is not good enough and you need a binary CDM and pray that your "security by obscurity" will not be cracked before you can get some of the design/implementation money back.

DRM in HTML5 published in draft form

Posted May 16, 2013 12:19 UTC (Thu) by n8willis (subscriber, #43041) [Link] (1 responses)

PGP doesn't attempt to prevent you from, say, copying the decrypted text in your MUA and pasting it somewhere else. It's resistant to third-party attackers, but it trusts both the sender and the receiver. CDMs are different there.

Nate

DRM in HTML5 published in draft form

Posted May 26, 2013 19:15 UTC (Sun) by elanthis (guest, #6227) [Link]

The difference is that with CDM you _are_ the third-party. The two trusted endpoints are the content distributor and the video decoder system. Everything in between, including the user, is a potential eavesdropper.

DRM in HTML5 published in draft form

Posted May 16, 2013 14:46 UTC (Thu) by robert_s (subscriber, #42402) [Link] (2 responses)

> for instance PGP is free software.

This is totally different. This is encryption that is on the user's side. Once you've managed to decrypt something, PGP essentially trusts you to do what you want with it. DRM, on the other hand even once content is decrypted doesn't trust anything essentially until it's reached your eyeballs. Yes, it is absurd.

And yes, that's no reason to say it won't be cracked.

(actually it's GnuPG [gpg] that's Free software, PGP isn't)

DRM in HTML5 published in draft form

Posted May 16, 2013 18:18 UTC (Thu) by rwmj (subscriber, #5474) [Link] (1 responses)

Unless you've got a USB optic nerve attachment, at some point it has to render it, unencrypted, on the screen, right?

DRM in HTML5 published in draft form

Posted May 16, 2013 22:06 UTC (Thu) by robert_s (subscriber, #42402) [Link]

Yes, that's one of the reasons it's absurd. But of course that doesn't mean they haven't tried to only allow output to authenticated "secure" screens. (HDCP or something?)

But of course once you're getting it from the screen you're getting it decoded & raw, so presumably you'd have to re-encode it causing a quality loss. But I digress..

DRM in HTML5 published in draft form

Posted May 16, 2013 14:38 UTC (Thu) by robert_s (subscriber, #42402) [Link]

> Ars Technica's Peter Bright declared it a "victory" for the open web

I wouldn't expect anything else. Peter Bright writes the most ridiculous articles where all he ever shows is his devotion to Microsoft products and a vast skill at Not Getting It.

DRM in HTML5 published in draft form

Posted May 16, 2013 19:09 UTC (Thu) by iabervon (subscriber, #722) [Link] (2 responses)

Hey, a new, not-yet-official script attribute in a semi-normal element, already supported by certain browsers. Wonder how many major websites have a brand-new CSS vulnerability when accessed by Chrome that doesn't affect Firefox users.

DRM in HTML5 published in draft form

Posted May 20, 2013 13:18 UTC (Mon) by pr1268 (guest, #24648) [Link]

Assuming Firefox is late to (or absent from) the binary CDM arena, and content providers all implement EME on their sites, then users will abandon Firefox for a more-capable browser. In other words, the lack of this included "feature" meaning better security is a moot point.

I do see your point, though. It's kinda sad, though, how we've come to this.

DRM in HTML5 published in draft form

Posted May 23, 2013 11:15 UTC (Thu) by robbe (guest, #16131) [Link]

Hasn't the best defense against XSS been whitelisting for a long time?

Of course, many websites prefer playing catching-up with their blacklists...


Copyright © 2013, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds