Qrpff


qrpff is a Perl script created by Keith Winstein and Marc Horowitz of the MIT SIPB. 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.
In fact, two versions of qrpff exist: a short version and a fast version. Both appear below.
Short:

  1. !/usr/bin/perl
  2. 472-byte qrpff, Keith Winstein and Marc Horowitz
  3. MPEG 2 PS VOB file -> descrambled output on stdout.
  4. usage: perl -I :::: qrpff
  5. where k1..k5 are the title key bytes in least to most-significant order
s''$/=\2048;while';s//\$$&/g;s/q/pack+/g;eval

Fast:

  1. !/usr/bin/perl -w
  2. 531-byte qrpff-fast, Keith Winstein and Marc Horowitz
  3. MPEG 2 PS VOB file on stdin -> descrambled output on stdout
  4. arguments: title key bytes in least to most-significant order
$_='while';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.