Qrpff Explained
qrpff is a Perl script created by Keith Winstein and Marc Horowitz of the MIT SIPB.[1] It performs DeCSS in six or seven lines. The name itself is an encoding of "decss" in rot-13. The algorithm was rewritten 77 times to condense it down to six lines.[2]
In fact, two versions of qrpff exist: a short version (6 lines) and a fast version (7 lines). Both appear below.
Short:
- !/usr/bin/perl
- 472-byte qrpff, Keith Winstein and Marc Horowitz
- MPEG 2 PS VOB file -> descrambled output on stdout.
- usage: perl -I :::: qrpff
- where k1..k5 are the title key bytes in least to most-significant order
s$/=\2048;while(<>)';s/[D-HO-U_]/\$$&/g;s/q/pack+/g;eval
Fast:
- !/usr/bin/perl -w
- 531-byte qrpff-fast, Keith Winstein and Marc Horowitz
- MPEG 2 PS VOB file on stdin -> descrambled output on stdout
- arguments: title key bytes in least to most-significant order
$_='while(read+STDIN,$_,2048)';s/x/pack+/g;eval
The fast version is actually fast enough to decode a movie in real-time.
qrpff and related memorabilia was sold for $2,500 at The Algorithm Auction, the world's first auction of computer algorithms.[3]
References
- News: McCullagh. Declan. Descramble That DVD in 7 Lines. 26 April 2013. Wired. 8 March 2001.
- News: Hotz. Robert. What's Hot in the Art World? Algorithms. 27 May 2015. Wall Street Journal. 27 May 2015.
- Web site: Keith Winstein qrpff. Artsy. 18 June 2015.
External links