Distribute Media Securely with Microsoft’s Digital Rights Management

Distribute Media Securely with Microsoft’s Digital Rights Management

The music industry is terrified of the Internet, which it perceives as a loosely controlled world where consumers freely distribute the content in which they have invested millions. The success of P2P piracy confirms that the public are aware of how difficult it is to successfully prosecute or prevent piracy or “free online media.” But eventually, content owners must learn how to use the Internet as a genuine business channel, and consumers must accept that they have to pay for their entertainment. The road towards realizing the possibilities of Internet distribution for digital media leads towards Digital Rights Management (DRM).

DRM lets content owners and distributors push their media securely to users, assured that the flexible DRM infrastructure will protect their assets from runaway distribution. DRM’s flexibility and security help open up digital distribution to all degrees of content ownership. No large hardware investments are required, and the software is free. The required components require only modest system resources and handle distribution via a web server. With such a small investment necessary to start digital media sales, large entertainment corporations and independent record labels can rapidly develop an Internet presence and compete on a level playing field.

Overview of Microsoft Digital Rights Management
Microsoft is leading the DRM charge in two areas. The first is the introduction of the Secure Audio Path (SAP) into the ME and XP operating systems kernel. With older Windows 2000 and 98 environments, the DRM client decrypts secured content before the Media Player receives the audio stream, meaning that it’s possible to intercept the stream after it’s decrypted, but before it’s played. However, a SAP-compliant operating system maintains media encryption until just before the stream reaches the sound card, making it virtually impossible to digitally route the stream to third-party applications. You can apply SAP settings using the DRM SDK.

The second area is the release of the adaptable Windows Media DRM COM components. These components work in two stages, packaging and licensing (see Figure 1). After the music or video is in a Windows Media format, you can program the components to package the media using a combination of keys and unique identifiers. After the securing the media, the distributor has the option of making the media available as is or adding user-specific attributes at run time, just before a user downloads a track. These user-specific attributes help identify individual instances of downloaded media. By combining this technique with business logic, distributors can restrict users from reacquiring licenses.

Figure 1: Flowchart of Packaging and Licensing

In the licensing stage, the distributor has two methods to consider. The most common method, as used in the sample code that accompanies this article, is to issue a license to users the first time they play a secured media file. The first usage triggers the Media Player to request a license from the license acquisition URL stored in the header of the encrypted content. The target server generates a license on demand, using machine and player-specific details known as a challenge. The unique qualities of the user’s challenge ensure that the license is created exclusively and its use is restricted to the requesting machine (and possibly any portable devices to which transfer might be permitted). Media Player stores this license in a .lic file that is verified each time the media is played, it’s not a simple one-time decryption of the secured media. This circumvents the potential for licensed content to be decrypted and passed freely onto friends or a P2P network. The second licensing method of licensing involves scripting the RMGetLicense object, included with Media Player 7. This object lets you to deliver licenses silently through a web site. However, I do not recommend this method of license distribution. It makes error handling extraordinarily difficult, and you must be able to guarantee your users will be browsing with Internet Explorer because RMGetLicense is an ActiveX control.

Creating an Online Music Store
To get the DRM SDK you must send Microsoft a digitally signed DLL to prove the validity of your company. Microsoft claims that a DRM license request will take only 5-7 business days. You can apply online at msdn.microsoft.com. After you receive your evaluation or redistribution license and install the SDK, you must enroll to get a DRM certificate from licenseserver.windowsmedia.com. Don’t worry; enrollment is only a five-minute step. You can also get the update to your SDK’s individualization details at this site. Individualization refers to the most current version of the DRM encryption ‘black-box’ being used by Media Player. See Figure 2 for more information on how clients can update their individualization settings.

Figure 2: Client Individualization

After initializing your server, you must prepare your content. The easiest way to do this is through the Windows Media player. Disable ‘Personal Rights Management’ and preferably set your encoding bit rate to 128Kb/sec. (see Figure 3).

Figure 3: Encoding Options in Windows Media Player 7

Included in the sample code includes a Visual Basic 6 client to assist in packaging your content. Using the sample application, you can specify the files you wish to package individually. The client application secures the media by calling the Secure class of the DRMStore DLL. The DRMStore DLL is the key business logic component included in the sample code. It handles packaging and licensing. The following code demonstrates how to obtain and specify the ContentID, a unique identifier for the package:

ContentID = oKey.GenerateKeyID oHeader.ContentID = ContentID

The preceding sample code generates a GUID for the ContentID value, but in production code, you should use meaningful identifier. For example, you might use an ID from a store’s database. To generate a packaged version of the media, you use the WMRMProtect object:

' A path to the source fileoProtect.InputFile = Filename    ' Encrypt File to the absolute filename & locationCall oProtect.ProtectFile(sOutputFile)

Make Your Packaged Media Available to Customers
Now that the media is packaged, you’ll need to make it available to your customers. The sample code contains a store called ‘World of Sound’ which I recommend installing under the Web application ‘DRMStore’ on your Web server (see Figure 4).

Figure 4: The ‘World of Sound’ Sample Store

The sample uses free tracks to avoid the unnecessary complexity of introducing a payment model. If a user chooses to download a track, the file opens in the preferred player, which should be Media Player by default. When other players (such as WinAmp) are registered to handle Windows Media file types, and you have opted not to support DRM v.1 licensing, problems may arise. I recommend that you demand your customers use Media Player 7, because DRM version.1 has significant drawbacks and the techniques required to bypass its security are widely known. Another noteworthy point is that Windows 95 and NT 4.0 do not support DRM 7.1. It would appear this important share of the market will not be addressed; Microsoft prefers to have its users upgrade to a more multimedia friendly OS such as Windows XP.

When you open a secured track in Media Player 7, the player reads the license acquisition URL to attempt to license its secured content. The request executes an ASP page on the server that forwards the ‘challenge’ onto our DRMStore component:

' Create the License Object Set oLicense = Server.CreateObject("DRMStore.License") ' Generate License / Pass the Challenge and Silent details onsLicense = oLicense.IssueLicense(cStr(sChallenge), cBool(bSilent)) 

The most significant problem you’ll encounter when creating a license programmatically is dealing with the WMRMRights object. The COM definition for any numeric property on the object demands the use of a DWORD, a non-compliant data type for COM. This makes it impossible to late-bind to the Rights object; Visual Basic will not compile and will throw an error (see Figure 5). The only workaround is to use CreateObject. In the example code, I have wrapped the Rights object to avoid some of the object’s common pitfalls.

Figure 5: Windows Media DRM Rights Object Invalid Interface

When you wish to pop-up a license acquisition screen on the client (non-silent delivery) you must format the license appropriately. The RMGetLicense.StoreLicense method, executed as a client-side COM object, completes license installation through a JavaScript function. Firstly, you must format the license so it will work in JavaScript syntax:

'Format for JavaScriptWMRMResponse.ReplaceQuotesWith = """" 

And on the client side, Media Player will detect the new license and allow the media playing operation to proceed:


If you prefer to distribute silently, you don’t have to format and store the license as shown above; however, to avoid a license pop-up window from appearing, you must not render any HTML into the license response (see Figure 6).

Figure 6: A License Acquisition Pop-up in Windows Media Player

When the media plays, you’ll see the words “Protected Content” rotating on the status bar. (see Figure 7).

Figure 7: Windows Media Player Playing DRM-secured Media

Forward-Thinking Design Despite Limitations
You’ve now seen a complete list of the basic steps required to develop a Windows Media DRM solution. It is also worth noting that the DRM media could be distributed using Windows Media Server as opposed to downloading. This would prevent your client from retaining a local copy of the media. For an insight into some of the possible business models you could employ for DRM, refer to “Implementing Different Business Models” in the SDK or view it online at msdn.microsoft.com.

The Windows Media DRM SDK is an adaptable set of components that effectively reduces the potential for digital piracy. However, the SDK is not without its pitfalls. I think the biggest oversight in the SDK is the inability to determine whether a license request is a renewal or a first attempt at acquiring a license. This makes license acquisition unnecessarily difficult for the distributor to control. Many of the limitations noted in this article hamper the SDK’s ease of use but, overall, the DRM concepts are well thought through. Microsoft’s forward-thinking design enables a small, automated security update to be applied with ease in the event that the black-boxed DRM logic is compromised. By future-proofing the software against security hacks, Microsoft proactively limits any long-term security exposures or major software fixes. This has proven to be the biggest benefit in Microsoft’s DRM deployment and single-handedly warrants a further investigation into the technology.



Share the Post:
Savings Extravaganza

Big Deal Days Extravaganza

The highly awaited Big Deal Days event for October 2023 is nearly here, scheduled for the 10th and 11th. Similar to the previous year, this

Remote Learning

Revolutionizing Remote Learning for Success

School districts are preparing to reveal a substantial technological upgrade designed to significantly improve remote learning experiences for both educators and students amid the ongoing

Revolutionary SABERS Transforming

SABERS Batteries Transforming Industries

Scientists John Connell and Yi Lin from NASA’s Solid-state Architecture Batteries for Enhanced Rechargeability and Safety (SABERS) project are working on experimental solid-state battery packs

Savings Extravaganza

Big Deal Days Extravaganza

The highly awaited Big Deal Days event for October 2023 is nearly here, scheduled for the 10th and 11th. Similar to the previous year, this autumn sale has already created

Cisco Splunk Deal

Cisco Splunk Deal Sparks Tech Acquisition Frenzy

Cisco’s recent massive purchase of Splunk, an AI-powered cybersecurity firm, for $28 billion signals a potential boost in tech deals after a year of subdued mergers and acquisitions in the

Iran Drone Expansion

Iran’s Jet-Propelled Drone Reshapes Power Balance

Iran has recently unveiled a jet-propelled variant of its Shahed series drone, marking a significant advancement in the nation’s drone technology. The new drone is poised to reshape the regional

Solar Geoengineering

Did the Overshoot Commission Shoot Down Geoengineering?

The Overshoot Commission has recently released a comprehensive report that discusses the controversial topic of Solar Geoengineering, also known as Solar Radiation Modification (SRM). The Commission’s primary objective is to

Remote Learning

Revolutionizing Remote Learning for Success

School districts are preparing to reveal a substantial technological upgrade designed to significantly improve remote learning experiences for both educators and students amid the ongoing pandemic. This major investment, which

Revolutionary SABERS Transforming

SABERS Batteries Transforming Industries

Scientists John Connell and Yi Lin from NASA’s Solid-state Architecture Batteries for Enhanced Rechargeability and Safety (SABERS) project are working on experimental solid-state battery packs that could dramatically change the

Build a Website

How Much Does It Cost to Build a Website?

Are you wondering how much it costs to build a website? The approximated cost is based on several factors, including which add-ons and platforms you choose. For example, a self-hosted

Battery Investments

Battery Startups Attract Billion-Dollar Investments

In recent times, battery startups have experienced a significant boost in investments, with three businesses obtaining over $1 billion in funding within the last month. French company Verkor amassed $2.1

Copilot Revolution

Microsoft Copilot: A Suit of AI Features

Microsoft’s latest offering, Microsoft Copilot, aims to revolutionize the way we interact with technology. By integrating various AI capabilities, this all-in-one tool provides users with an improved experience that not

AI Girlfriend Craze

AI Girlfriend Craze Threatens Relationships

The surge in virtual AI girlfriends’ popularity is playing a role in the escalating issue of loneliness among young males, and this could have serious repercussions for America’s future. A

AIOps Innovations

Senser is Changing AIOps

Senser, an AIOps platform based in Tel Aviv, has introduced its groundbreaking AI-powered observability solution to support developers and operations teams in promptly pinpointing the root causes of service disruptions

Bebop Charging Stations

Check Out The New Bebob Battery Charging Stations

Bebob has introduced new 4- and 8-channel battery charging stations primarily aimed at rental companies, providing a convenient solution for clients with a large quantity of batteries. These wall-mountable and

Malyasian Networks

Malaysia’s Dual 5G Network Growth

On Wednesday, Malaysia’s Prime Minister Anwar Ibrahim announced the country’s plan to implement a dual 5G network strategy. This move is designed to achieve a more equitable incorporation of both

Advanced Drones Race

Pentagon’s Bold Race for Advanced Drones

The Pentagon has recently unveiled its ambitious strategy to acquire thousands of sophisticated drones within the next two years. This decision comes in response to Russia’s rapid utilization of airborne

Important Updates

You Need to See the New Microsoft Updates

Microsoft has recently announced a series of new features and updates across their applications, including Outlook, Microsoft Teams, and SharePoint. These new developments are centered around improving user experience, streamlining

Price Wars

Inside Hyundai and Kia’s Price Wars

South Korean automakers Hyundai and Kia are cutting the prices on a number of their electric vehicles (EVs) in response to growing price competition within the South Korean market. Many

Solar Frenzy Surprises

Solar Subsidy in Germany Causes Frenzy

In a shocking turn of events, the German national KfW bank was forced to discontinue its home solar power subsidy program for charging electric vehicles (EVs) after just one day,

Electric Spare

Electric Cars Ditch Spare Tires for Efficiency

Ira Newlander from West Los Angeles is thinking about trading in his old Ford Explorer for a contemporary hybrid or electric vehicle. However, he has observed that the majority of

Solar Geoengineering Impacts

Unraveling Solar Geoengineering’s Hidden Impacts

As we continue to face the repercussions of climate change, scientists and experts seek innovative ways to mitigate its impacts. Solar geoengineering (SG), a technique involving the distribution of aerosols

Razer Discount

Unbelievable Razer Blade 17 Discount

On September 24, 2023, it was reported that Razer, a popular brand in the premium gaming laptop industry, is offering an exceptional deal on their Razer Blade 17 model. Typically

Innovation Ignition

New Fintech Innovation Ignites Change

The fintech sector continues to attract substantial interest, as demonstrated by a dedicated fintech stage at a recent event featuring panel discussions and informal conversations with industry professionals. The gathering,

Import Easing

Easing Import Rules for Big Tech

India has chosen to ease its proposed restrictions on imports of laptops, tablets, and other IT hardware, allowing manufacturers like Apple Inc., HP Inc., and Dell Technologies Inc. more time

Semiconductor Stock Plummet

Dramatic Downturn in Semiconductor Stocks Looms

Recent events show that the S&P Semiconductors Select Industry Index seems to be experiencing a downturn, which could result in a decline in semiconductor stocks. Known as a key indicator

Anthropic Investment

Amazon’s Bold Anthropic Investment

On Monday, Amazon announced its plan to invest up to $4 billion in the AI firm Anthropic, acquiring a minority stake in the process. This decision demonstrates Amazon’s commitment to