DRM in HTML5 published in draft form
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 " 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.
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:
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.
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:
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:
The Free Culture Foundation argued
that the proposal goes against
the W3C mission
statement, which is to make the benefits of the Web
" 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 " 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.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.
An uncomfortably close look
<video src="foo.webm" autoplay onneedkey="handleKeyNeeded(event)">
</video>
and the JavaScript needed to process it.
Feedback
available to all people, whatever their hardware, software,
network infrastructure, native language, culture, geographical
location, or physical or mental ability.
"
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.
