#!/usr/bin/perl # 472-byte qrpff, Keith Winstein and Marc Horowitz <sipb-iap-dvd@mit.edu> # 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 s''$/=\2048;while(<>){G=29;R=142;if((@a=unqT="C*",_)[20]&48){D=89;_=unqb24,qT,@ b=map{ord qB8,unqb8,qT,_^$a[--D]}@INC;s/...$/1$&/;Q=unqV,qb25,_;H=73;O=$b[4]<<9 |256|$b[3];Q=Q>>8^(P=(E=255)&(Q>>12^Q>>4^Q/8^Q))<<17,O=O>>8^(E&(F=(S=O>>14&7^O) ^S*8^S<<6))<<9,_=(map{U=_%16orE^=R^=110&(S=(unqT,"\xb\ntd\xbz\x14d")[_/16%8]);E ^=(72,@z=(64,72,G^=12*(U-2?0:S&17)),H^=_%64?12:0,@z)[_%8]}(16..271))[_]^((D>>=8 )+=P+(~F&E))for@a[128..$#a]}print+qT,@a}';s/[D-HO-U_]/\$$&/g;s/q/pack+/g;eval
You know that hacking has gone mainstream when the WSJ features it on the from page. Further, you know it must be passé when the WSJ claims that the art world is now purveying chunks of code as, well, art. You have to love this country for its entrepreneurial capitalist acumen!
So, if you are an enterprising (ex-)coder and have some cool Fortran, C++, or better yet, Assembler, lying around, dust off the diskette (or floppy, or better, yet, a punch card) and make haste to your nearest art gallery. You could become the first Picasso of programming — onward to the Gagosian! My story began with PL/1, IMS and then C, so my code may only be worthy of the artistic C-list.
From WSJ:
In March, Daniel Benitez, a cinema executive in Miami, paid $2,500 for a necktie. It wasn’t just any strip of designer neckwear. Imprinted on the blue silk were six lines of computer code that once brought the motion picture industry to its knees.
To the unschooled eye, the algorithm script on the tie, known formally as “qrpff,” looks like a lengthy typographical error.
But to Mr. Benitez and other computer cognoscenti, the algorithm it encodes is an artifact of rare beauty that embodies a kind of performance art. He framed it.
The algorithm sets out a procedure for what copyright holders once deemed a criminal act: picking the software lock on the digital scrambling system that Hollywood uses to protect its DVDs. At the turn of the century, hackers encoded it in many ways and distributed them freely—as programs, lines of poetry, lyrics in a rock song, and a square dance routine. They printed it on T-shirts and ties, like the item Mr. Benitez purchased. They proclaimed it free speech. No matter how many times the entertainment industry sued, their lawyers found the algorithm as hard to eradicate as kudzu.
Now it is exhibit A in the art world’s newest collecting trend.
Dealers in digital art are amassing algorithms, the computerized formulas that automate processes from stock-market sales to social networks.
In March, the online art brokerage Artsy and a digital code gallery called Ruse Laboratories held the world’s first algorithm art auction in New York. The Cooper Hewitt, Smithsonian Design Museum, where the auction was held as a fundraiser, is assembling a collection of computer code. In April, the Museum of Modern Art convened a gathering of computer experts and digital artists to discuss algorithms and design.
It is a small step for technology but a leap, perhaps, for the art world. “It is a whole new dimension we are trying to grapple with,” said curatorial director Cara McCarty at the Cooper Hewitt museum. “The art term I keep hearing is code.”
Read the entire article here.
Code snippet: Qrpff. A Perl script for decoding DVD content scrambling.