[MPlayer-users] Re: how does mplayer circumvent region protected (RPC-2) DVD drives?

Jonas Jermann jjermann at gmx.net
Sat Oct 19 17:20:02 CEST 2002


On Sat, Oct 19, 2002 at 04:45:36PM +0200, Arpi wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
> 
> > > libdvdcss 1.x (used in mpdvdkit too - note again it isn't our work, mpdvdkit
> > > is libdvdcss+livdvdread+some patches together) first try to do the 'legal
> > > method', what you described (get disc key, then decrypt title key with disc
> > > key). but, if it fails, then it has 2 other methods:
> > > 2. crack the title key by knowing the decrypted VOB content (vob has very
> > > strict file format, so it can be predicted well). probably it's called
> > > ,,known plaintext attack'', i'm not a crypto expert. slow, and sometimes
> > > doesn't work.
> > > 3. crack the disc key, by building a 64MB (16M 32bit entries) hash table.
> > >  -> very very slow, but afaik always work.
> > 
> > Isn't the disc key methode performed before the title key 
> > methode?
> 
> no, unless you force it (export DVDCSS_METHOD=disc afair)

I searched and found the place I got the idea from. It's 
www.videolan.org/libdvdcss/doc/

I started to add a dvd authentication description to 
cd-dvd.html. Unfortunately I'm a bit confused now to put the 3 
description into one. Also I'm still unsure in which cases it 
will work and in which not (e.g. is it possible to watch dvds 
with a rpc2 drive that has changed the code 5 times?).
The page also speaks about raw devices could someone explain 
this to me in short (general and libdvdcss related)?

A attached a patch but most probably it contains wrong 
information, so I'd be glad to get a bit help (if you want a 
proper documentation ;). Comments are welcome...

Regards
    Jonas
-------------- next part --------------
Index: cd-dvd.html
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/cd-dvd.html,v
retrieving revision 1.45
diff -u -r1.45 cd-dvd.html
--- cd-dvd.html	19 Oct 2002 13:29:25 -0000	1.45
+++ cd-dvd.html	19 Oct 2002 15:18:27 -0000
@@ -60,6 +60,8 @@
 
 <H2><A NAME="dvd">4.2 DVD playback</A></H2>
   
+<H4>New-style DVD support (mpdvdkit2)</H4>
+
 <P><B>MPlayer</B> uses <CODE>libdvdread</CODE> and <CODE>libdvdcss</CODE> for
   DVD decryption and playback. These two libraries are contained in the
   <CODE>libmpdvdkit2/</CODE> subdirectory of the <B>MPlayer</B> source tree, you
@@ -67,21 +69,54 @@
   we had to fix a libdvdread bug, and apply a patch which adds
   <B>cracked CSS keys caching support</B> to libdvdcss. This results in a large
   speed increase because the keys do not have to be cracked every time before
-  playing. The cracked keys are stored in the
-  <CODE>~/.mplayer/DVDKeys</CODE> directory.</P>
+  playing.</P>
 
 <P><B>MPlayer</B> can also use system-wide <CODE>libdvdread</CODE> and
   <CODE>libdvdcss</CODE> libraries, but this solution is <B>not</B> recommended,
   as it can result in bugs, library incompatibilities, and slower speed.</P>
 
-<P>Support for DVD navigation via <CODE>dvdnav</CODE> is being worked on, but
-  not finished yet.</P>
+<H4>DVD Navigation support (dvdnav)</H4>
+
+<P>Support for DVD navigation via <CODE>dvdnav</CODE> was being worked on, but
+  it was never finished properly and is therefor not recommended.</P>
 
 <H4>Old-style DVD support - OPTIONAL</H4>
 
-<P>Useful if you want to play encoded VOBs from hard disk. Compile and
+<P>Useful if you want to play encoded VOBs from <B>hard disk</B>. Compile and
   install <B>libcss</B> 0.0.1 (not newer) for this (If <B>MPlayer</B> fails to
   detect it, use the <CODE>-csslib /path/to/libcss.so</CODE> option).</P>
+
+<H4>DVD authentication</H4>
+
+<P>The authentication and decryption method of the new-style DVD support are done
+  using a patched libdvdcss (libmpdvdkit2). The method can be specified over the
+  environment variable <CODE>DVDCSS_METHOD</CODE> which can be set to
+  <CODE>key</CODE>, <CODE>disk</CODE> or <CODE>title</CODE>.</P>
+
+<P>If nothing is specified it tries the following methods and always falls back
+  to next if it failed:</P>
+
+<OL>
+  <LI><B>cached key:</B> <B>MPlayer</B> looks for eventually already cracked
+    keys which are stored in the <CODE>~/.mplayer/DVDKeys</CODE> directory.
+    (fast ;).</LI>
+  <LI><B>key:</B> <B>MPlayer</B> authenticates with a set of calculated player
+    keys to try and get the disc key, then it access and request the title key
+    to read and decrypt and play the files. This is the most common method.
+    It can fail if the drive does not recognize any of the player keys
+    (normal).</LI>
+  <LI><B>disk:</B> Instead of using player keys, <B>MPlayer</B> will crack the
+    disc key using a brute force algorithm. This process is CPU intensive and
+    requires 64 MB of memory (16M 32bit entries hash table) to store temporary
+    data. This methode should always work (very slow).</LI>
+  <LI><B>title:</B> This method does not rely on a key exchange with the DVD
+    drive, but rather uses a crypto attack to guess the title key by knowing
+    the decrypted VOB content (vob has very strict file format, so it can be
+    predicted well). On rare cases this may fail because there is not enough
+    encrypted data on the disc to perform a statistical attack, but in the
+    other hand it is the only way to decrypt a DVD stored on a hard disc,
+    or a DVD with the wrong region on an RPC2 drive (slow).</LI>
+</OL>
 
 <P>For the complete list of available options, please read the man page.</P>
 


More information about the MPlayer-users mailing list