Wednesday, May 8, 2013

Blurays, DRM and other unforgivable sins

So back in February this year I ordered some Blurays on amazon.com and imported them from the US. Even with custom fees they were way cheaper than buying them in Germany and thus I thought: "Well, I'm sure a friend of mine will be nice enough to create proper copies of the discs."
A few months later I happened to acquire a notebook with a Bluray drive, so that was out of question and I was excited for my Blurays to arrive.
Fast forward, two days ago:
I received my package with the DVD/BD combo pack of Spice and Wolf released by FUNimation in the US, and I was immediately let down when I found out that it is not possible to play back Blurays out of the box. To that day I thought the big companies had figured out that using DRM is essentially useless and only sets the hurdle a little higher. I never bothered reading about Bluray DRM before, neither had I ever really heard about it. So I started reading the Archlinux Bluray Wiki-Entry, which already helped a lot, but I wasn't able to play my legally purchased Blurays until after I ran into many errors and compiled software many, many times.
The first keyword to drop is AACS. With it goes aacskeys and libaacs. After trying to mess with aacskeys I gave up a little and used DVDFab9 to rip one of the Blurays and I was shocked how easily it decrypted the disc. By this time I already spend quite some hours on this, but I was somewhat happy that I could play the decrypted files. The next day I started reading about this again and learned about libaacs. I downloaded the sources, compiled it and with aacs_info I was able to gain the VID, I don't know how it works, but feel free to dig through the code. Now, with the VID I could use aacskeys with the included Host Certificates and Private Keys to get the VUK (see: http://en.wikipedia.org/wiki/Advanced_Access_Content_System#Decryption_process). Now once you have the VUK you don't need anything else to finally decrypt your disc, so better save it somewhere, in fact you are needed to save the VUK for libaacs and libaacskeys in the directory: ~/.cache/aacs/vuk/. This should happen automagically, and it did once I messed around long enough with it on my laptop with the Bluray drive. You can use VLC, mplayer or even mplayer2 to play back your Bluray. I took this one step further and mounted the mounted Bluray (yes mounted twice!) via sshfs on my notebook without a Bluray drive and was able to play it, too. I installed libaacs and libaacskeys and copied the files in ~/.cache/aacs/vuk/ in the same directory. The files in that directory are named after the DiscID, which is also output by aacskeys and contain the VUK.

So after messing with this for almost two days I was finally able to watch my Blurays. Once again I spent a lot of time on something that shouldn't be. The bad thing is the big companies don't even care. I made my purchase, they made money, I gained nothing. At least now I can say I really own these discs, because before I was able to decrypt them, I felt betrayed and robbed. I felt like I wasted my money on unreadable discs.