[MPlayer-users] Re: how does mplayer circumvent region protected (RPC-2) DVD drives?
Jonas Jermann
jjermann at gmx.net
Sun Oct 20 02:36:02 CEST 2002
On Sat, Oct 19, 2002 at 07:23:30PM +0200, Arpi wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
>
> > > > 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/
>
> ok i did RTFS...
>
> actually it isn't so simple.
ok, now I got new questions (Sorry!)
> the key getting process has 2 major steps:
>
> 1. getting the disc key
> 2. getting the title key
>
> for both steps, there are "white" and "black" method: ioctl() and crack.
> the ioctl method is the default:
>
> 1. try to get disc key via ioctl()
> [if this step fails, it will fallback to disc key crack (using 64mb hash),
> this can be also forced by DVDCSS_METHOD=disc]
In which cases does this step fail again? Afair the disc method
is only needed if one doesn't have the player keys...
Aren't the player keys used for the disc key (I read it in the
README of libdvdcss, I know it's old)?
> 2. try to get title key via ioctl(), using some player keys included in css.c
> [if this step fails, it will fallback to title key cracking, this can be
> also forced by DVDCSS_METHOD=title]
Again, when does this step fail? Can it fail because the region
check is performed here (title request as read in another mail) or is the region
check performed somewhere else?
Again, aren't the player keys used in the first step and only
the disc key is needed to access the hidden sectors and request
the title key afterwards (I read it in another mail before)?
If yes, the key, disc and title key method should work with rpc2
and only the title request gives problem. I'm not sure what
happens if the region is fixed (already choosen 5 times on a
rpc2 drive).
Appended is a new version off the DVD auth documentation...
Please correct it, I'm sure it still contains mistakes...
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 20 Oct 2002 00:33:43 -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,69 @@
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 therefore 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 is done
+ using a patched libdvdcss (see above). 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
+ (default: key, title request):</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> tries to authenticates via <CODE>ioctl()</CODE>
+ with a set of calculated player keys to get the disc key.
+ <LI><B>disk:</B> If the key method fails (e.g. no included 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 method should always
+ work (very slow).</LI>
+ <LI><B>title request:</B>With the title key <B>MPlayer</B> unlocks the
+ <I>hidden sectors</I> and requests the title key via <CODE>ioctl()</CODE>
+ to read, decrypt and play the files. The region protection of RPC-2 drives
+ is performed while requesting the title key and may fail on this drives.
+ <LI><B>title:</B> This method is used if the title request failed and does
+ not rely on a key exchange with the DVD drive. It 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).
+ The method is also known as "known plaintext attack" or "DeCSS" (afaik).
+ In rare cases this may fail because there is not enough encrypted data on
+ the disc to perform a statistical attack or because the key changes in the
+ middle of a title, but on the other hand it is the only way to decrypt a
+ DVD stored on a hard disk, or a DVD with the wrong region on an RPC2 drive
+ (slow).</LI>
+</OL>
+
+<P>RPC-1 DVD drives only protect region settings over software DVD players.
+ RPC-2 drives have a hardware protection that allows 5 changes only. It might
+ be needed/recommended to upgrade the firmware to RPC-1 if you have a RPC-2 DVD
+ drive. Firmware upgrades can be found
+ <A href="http://perso.club-internet.fr/farzeno/firmware/">here</A>. If there is
+ no firmware upgrade available for your device, use the
+ <A HREF="http://www.linuxtv.org/download/dvd/dvd_disc_20000215.tar.gz">regionset
+ tool</A> to set the region code of your DVD-drive (under Linux).
+ <B>Warning:</B> You can only set the region 5 times.</P>
<P>For the complete list of available options, please read the man page.</P>
More information about the MPlayer-users
mailing list