Unnecessary CPU Resource Consumption
â€œSince [encryption] uses CPU cycles, an OEM may have to bump the speed grade on the CPU to maintain equivalent multimedia performance. This cost is passed on to purchasers of multimedia PCsâ€ â€” ATI.
In order to prevent tampering with in-system communications, all communication flows have to be encrypted and/or authenticated. For example content sent to video devices has to be encrypted with AES-128. This requirement for cryptography extends beyond basic content encryption to encompass not just data flowing over various buses but also command and control data flowing between software components. For example communications between user-mode and kernel-mode components are authenticated with OMAC message authentication-code tags, at considerable cost to both ends of the connection. The initial crypto handshake is:
driver -> application: cert + nonce
application -> driver: RSA-OAEP-SHA512( nonce || key || seqNo1 || seqNo2 )
In this step the driver supplies its certificate to the calling application via DxgkDdiOPMGetCertificate() and a 128-bit nonce via DxgkDdiOPMGetRandomNumber(). This is either a COPP or an OPM certificate, with COPP being the older Windows XP content protection and OPM being the newer Windows Vista one. There's also a third type of fleur-de-lis certificate that the driver uses if it has a UAB (User-Accessible Bus). The certificates contain a 2048-bit RSA key which is used to encrypt a 40-byte payload containing the nonce provided by the driver, a 128-bit session key, and two 32-bit initial sequence numbers (they start at random values), the first number is for status messages via DxgkDdiOPMGetInformation() and the second for command messages via DxgkDdiOPMConfigureProtectedOutput().
Once the keys are set up, each function call is:
in = OMAC( nonce || seqNo || data )
out = OMAC( nonce || seqNo || data )
(I've used conventional bits-on-the-wire notation for this, the values are actually fields in a structure so for example the sequence number is provided in the ulSequenceNumber member). This is very similar to the protocol used in SSL or SSH (in practice some steps like cipher suite negotiation are omitted, since there's a hardcoded set of ciphers used). Finding SSL being run inside a PC from one software module to another is just weird.
Needless to say, this extremely CPU-intensive mechanism is a very painful way to provide protection for content, and this fact has been known for many years. Twenty years ago, in their work on the ABYSS security module, IBM researchers concluded that the use of encrypted buses as a protection mechanism was impractical.
In order to prevent active attacks, device drivers are required to poll the underlying hardware every 30ms for digital outputs and every 150 ms for analog ones to ensure that everything appears kosher. This means that even with nothing else happening in the system, a mass of assorted drivers has to wake up thirty times a second just to ensure thatâ€¦ nothing continues to happen (commenting on this mechanism, Leo Laporte in his Security Now podcast with Steve Gibson calls Vista â€œan operating system that is insanely paranoidâ€). In addition to this polling, further device-specific polling is also done, for example Vista polls video devices on each video frame displayed in order to check that all of the grenade pins (tilt bits) are still as they should be. We already have multiple reports from Vista reviewers of playback problems with video and audio content, with video frames dropped and audio stuttering even on high-end systems [Note I]. Time will tell whether this problem is due to immature drivers or has been caused by the overhead imposed by Vista's content protection mechanisms interfering with playback.
An indication of the level of complexity added to the software can be seen by looking at a block diagram of Vista's Media Interoperability Gateway (MIG). Of the eleven components that make up the MIG, only two (the audio and video decoders) are actually used to render content. The remaining nine are used to apply content-protection measures.
Even more radical approaches to content protection can be found in Microsoft research papers, which indicate areas that Microsoft are looking at for future work. For example the ASPLOS X paper Enabling Trusted Software Integrity proposes a system whereby content-playback mechanisms are protected by adding encrypted constraints into each basic instruction block that prevent the code from acting in anything other than an extremely constrained way. This goes beyond simple code signing in that each basic code block contains a cryptographic hash that special hardware (around 20K gates on a simple RISC CPU, but far more for a more complex x86 one) added to the processor's instruction unit recalculates on the fly for each basic block of code before it's executed to ensure that nothing other than the originally authorised instruction flow is executed. The content-playback software is node-locked to a CPU on install, a special process that involves the processor running in single-user mode with virtual memory, context switches, and all interrupts disabled (this special operation mode is only required for the initial install step, not during normal playback). With various optimisations applied, typical content-processing operations like MPEG and JPEG encode or decode take a 10-20% performance hit.
On-board graphics create an additional problem because blocks of precious content will end up stored in system memory, from where they could be paged out to disk. In order to avoid this, Vista tags such pages with a special protection bit indicating that they need to be encrypted before being paged out and decrypted again after being paged in. Vista doesn't provide any other pagefile encryption, and will quite happily page banking PINs, credit card details, private, personal data, and other sensitive information, in plaintext. The content-protection requirements make it fairly clear that in Microsoft's eyes a frame of premium content is worth more than (say) a user's medical records or their banking PIN [Note J].
In fact, Microsoft is imposing a higher standard of security for premium content than what's been required in the past for any known secure computing initiative proposed for protecting data classified at TOP SECRET or TS/SCI levels (the closest that anything came to what's required in Vista was the LOCK kernel with SIDEARM and BED coprocessors (PDF link), which didn't go as far as the Vista requirements and after 17 years of development effort was a commercial failure to boot). Just to make this point clear, the level of security that Vista is trying to achieve to protect video and audio is more extreme than anything the US government has ever considered necessary for protecting its most sensitive classified data.
In addition to the CPU costs, the desire to render data inaccessible at any level means that video decompression can't be done in the CPU any more, since there isn't sufficient CPU power available to both decompress the video and encrypt the resulting uncompressed data stream to the video card. As a result, much of the decompression has to be integrated into the graphics chip. At a minimum this includes IDCT, MPEG motion compensation, and the Windows Media VC-1 codec (which is also DCT-based, so support via an IDCT core is fairly easy). As a corollary to the Increased Hardware Costs problem above, this means that you can't ship a low-end graphics chip without video codec support any more.
The inability to perform decoding in software also means that any premium-content compression scheme not supported by the graphics hardware can't be implemented. If things like the Ogg video codec ever eventuate and get used for premium content, they had better be done using something like Windows Media VC-1 or they'll be a non-starter under Vista or Vista-approved hardware. This is particularly troubling for the high-quality digital cinema (D-Cinema) specification, which uses Motion JPEG2000 (MJ2K) because standard MPEG and equivalents don't provide sufficient image quality. Since JPEG2000 uses wavelet-based compression rather than MPEG's DCT-based compression, and wavelet-based compression isn't on the hardware codec list, it's not possible to play back D-Cinema premium content (the moribund Ogg Tarkin codec also used wavelet-based compression). Because all D-Cinema content will (presumably) be premium content, the result is no playback at all until the hardware support appears in PCs at some indeterminate point in the future. Compare this to the situation with MPEG video, where early software codecs like the XingMPEG en/decoder practically created the market for PC video. Today, thanks to Vista's content protection, the opening up of new markets in this manner would be impossible.
This extra overhead carries a heavy cost for the typical user. It's not uncommon to find PCs so infested with malware (spyware, viruses, trojans, bots, and so on) that they can barely perform their normal tasks, let alone handle the overhead of content protection (depending on whose surveys you believe, the typical Internet-connected PC averages 20-30 pieces of malware). Despite the fact that, on paper, they may have plenty of system resources to throw around for content protection, in practice the overhead of hosting an entire zoo of malware means that any added overhead due to content protection renders them more or less unusable for content playback (while users don't seem to mind waiting around for their botnet-hosting PC to open a Word document, they'll be less happy when it drops frames or produces stuttering audio output).
Looking at this from the point of view of the high-end rather than the average user, the problem is rather different. The high-end graphics and audio market are dominated entirely by gamers, who will do anything to gain the tiniest bit of extra performance, like buying Bigfoot Networks' $250 â€œKiller NICâ€ ethernet card in the hope that it'll help reduce their network latency by a few milliseconds. These are people buying $500-$1000 graphics and sound cards for which one single sale brings the device vendors more than the few cents they get from the video/audio portion of an entire roomful of integrated-graphics-and-sound PCs. I wonder how this market segment will react to knowing that their top-of-the-line hardware is being hamstrung by all of the content-protection â€œfeaturesâ€ that Vista hogties it with?
February 12, 2007
DRM in Windows Vista
Windows Vista includes an array of "features" that you don't want. These features will make your computer less reliable and less secure. They'll make your computer less stable and run slower. They will cause technical support problems. They may even require you to upgrade some of your peripheral hardware and existing software. And these features won't do anything useful. In fact, they're working against you. They're digital rights management (DRM) features built into Vista at the behest of the entertainment industry.
And you don't get to refuse them.
The details are pretty geeky, but basically Microsoft has reworked a lot of the core operating system to add copy protection technology for new media formats like HD DVD and Blu-ray disks. Certain high-quality output paths -- audio and video -- are reserved for protected peripheral devices. Sometimes output quality is artificially degraded; sometimes output is prevented entirely. And Vista continuously spends CPU time monitoring itself, trying to figure out if you're doing something that it thinks you shouldn't. If it does, it limits functionality and in extreme cases restarts just the video subsystem. We still don't know the exact details of all this, and how far-reaching it is, but it doesn't look good.
Microsoft put all those functionality-crippling features into Vista because it wants to own the entertainment industry. This isn't how Microsoft spins it, of course. It maintains that it has no choice, that it's Hollywood that is demanding DRM in Windows in order to allow "premium content" -- meaning, new movies that are still earning revenue -- onto your computer. If Microsoft didn't play along, it'd be relegated to second-class status as Hollywood pulled its support for the platform.
It's all complete nonsense. Microsoft could have easily told the entertainment industry that it was not going to deliberately cripple its operating system, take it or leave it. With 95% of the operating system market, where else would Hollywood go? Sure, Big Media has been pushing DRM, but recently some -- Sony after their 2005 debacle and now EMI Group -- are having second thoughts.
What the entertainment companies are finally realizing is that DRM doesn't work, and just annoys their customers. Like every other DRM system ever invented, Microsoft's won't keep the professional pirates from making copies of whatever they want. The DRM security in Vista was broken the day it was released. Sure, Microsoft will patch it, but the patched system will get broken as well. It's an arms race, and the defenders can't possibly win.
I believe that Microsoft knows this and also knows that it doesn't matter. This isn't about stopping pirates and the small percentage of people who download free movies from the Internet. This isn't even about Microsoft satisfying its Hollywood customers at the expense of those of us paying for the privilege of using Vista. This is about the overwhelming majority of honest users and who owns the distribution channels to them. And while it may have started as a partnership, in the end Microsoft is going to end up locking the movie companies into selling content in its proprietary formats.
We saw this trick before; Apple pulled it on the recording industry. First iTunes worked in partnership with the major record labels to distribute content, but soon Warner Music's CEO Edgar Bronfman Jr. found that he wasn't able to dictate a pricing model to Steve Jobs. The same thing will happen here; after Vista is firmly entrenched in the marketplace, Sony's Howard Stringer won't be able to dictate pricing or terms to Bill Gates. This is a war for 21st-century movie distribution and, when the dust settles, Hollywood won't know what hit them.
To be fair, just last week Steve Jobs publicly came out against DRM for music. It's a reasonable business position, now that Apple controls the online music distribution market. But Jobs never mentioned movies, and he is the largest single shareholder in Disney. Talk is cheap. The real question is would he actually allow iTunes Music Store purchases to play on Microsoft or Sony players, or is this just a clever way of deflecting blame to the -- already hated -- music labels.
Microsoft is reaching for a much bigger prize than Apple: not just Hollywood, but also peripheral hardware vendors. Vista's DRM will require driver developers to comply with all kinds of rules and be certified; otherwise, they won't work. And Microsoft talks about expanding this to independent software vendors as well. It's another war for control of the computer market.
Unfortunately, we users are caught in the crossfire. We are not only stuck with DRM systems that interfere with our legitimate fair-use rights for the content we buy, we're stuck with DRM systems that interfere with all of our computer use -- even the uses that have nothing to do with copyright.
I don't see the market righting this wrong, because Microsoft's monopoly position gives it much more power than we consumers can hope to have. It might not be as obvious as Microsoft using its operating system monopoly to kill Netscape and own the browser market, but it's really no different. Microsoft's entertainment market grab might further entrench its monopoly position, but it will cause serious damage to both the computer and entertainment industries. DRM is bad, both for consumers and for the entertainment industry: something the entertainment industry is just starting to realize, but Microsoft is still fighting. Some researchers think that this is the final straw that will drive Windows users to the competition, but I think the courts are necessary.
In the meantime, the only advice I can offer you is to not upgrade to Vista. It will be hard. Microsoft's bundling deals with computer manufacturers mean that it will be increasingly hard not to get the new operating system with new computers. And Microsoft has some pretty deep pockets and can wait us all out if it wants to. Yes, some people will shift to Macintosh and some fewer number to Linux, but most of us are stuck on Windows. Still, if enough customers say no to Vista, the company might actually listen.
This essay originally appeared on Forbes.com.