Skip to content
DevMeme
7098 of 7590
Cryptography Post #7782 · source on Telegram

qrpff: DVD DeCSS Descrambler in 472 Bytes of Perl

Description

A screenshot showing two blocks of syntax-highlighted Perl source code labeled 'Short:' and 'Fast:'. The short version's header comments read: '#!/usr/bin/perl', '# 472-byte qrpff, Keith Winstein and Marc Horowitz', '# MPEG 2 PS VOB file -> descrambled output on stdout.', '# usage: perl -I <k1>:<k2>:<k3>:<k4>:<k5> qrpff', '# where k1..k5 are the title key bytes in least to most-significant order'. The fast version is '# 531-byte qrpff-fast' reading a VOB from stdin. Both bodies are nearly unreadable golfed Perl one-liners full of sigils, bit-shifts, map/pack and an eval. Caption below: 'The fast version is actually fast enough to decode a movie in real-time.' This is the legendary qrpff DeCSS implementation - CSS DVD decryption compressed into a few hundred bytes, famous from the DMCA era when the code was printed on T-shirts as free speech protest

Comments

9
Anonymous ★ Top Pick 472 bytes that broke DVD encryption, yet still more readable than our prod regex for email validation
  1. Anonymous ★ Top Pick

    472 bytes that broke DVD encryption, yet still more readable than our prod regex for email validation

  2. Anonymous

    The descrambler was 472 bytes; the exception handler was the entire DMCA.

  3. @sukhrob_ikromov 5mo

    It’s 6-7 lines of code

  4. @SamsonovAnton 5mo

    Perl's best coding practice, circa year 2000 — the exact reason I quit learning Perl right from the start.

  5. @Nocturn_le_chat 5mo

    Wth this even is

  6. @FunnyGuyU 5mo

    This is obfuscated or deliberately written like gibberish. If you split this into lines and give some meaningful names to the variables, it wouldn't appear so intimidating.

  7. @palaueb 5mo

    In year 2001 I was used to code javascript like this to optimize size😂😂, other developers hated me hard

    1. @pnlt_s 5mo

      now there's a tool to do this automatically

  8. @palaueb 5mo

    Yeah! Progress!!

Use J and K for navigation