News:

I live in the Promised Land, except the Chosen People are all trying to get out. 

Main Menu

The Banjo Players Must Die

Started by PeregrineBF, August 16, 2007, 11:17:27 AM

Previous topic - Next topic

PeregrineBF

http://www.sancairodicopenhagen.com/tbpmd.html

Amusingly random, in the style of Good Omens.
Then again, it's 3 AM so I probably think it's more amusing than it actually is ATM.

the dreadful hours



AFK

I think it ran into the Open Bar.  You better find it before the Scrid does. 
Cynicism is a blank check for failure.


AFK

Quote from: RamsesAbasiri on August 22, 2007, 06:04:12 PM
You must be mistaken. Any hamster of mine is quite happily incapable of running, thank you.

PADDLE FASTER I HEAR BANJOS!!!
Cynicism is a blank check for failure.


AFK

that's okay.  I've already got a closet full of them.  I hear Hunter likes haikus. 
Cynicism is a blank check for failure.

PeregrineBF

How to decrypt a
DVD: in haiku form.
(Thanks, Prof. D. S. T.)
------------------------

(I abandon my
exclusive rights to make or
perform copies of

this work, U. S. Code
Title Seventeen, section
One Hundred and Six.)

Muse!  When we learned to
count, little did we know all
the things we could do

some day by shuffling
those numbers: Pythagoras
said "All is number"

long before he saw
computers and their effects,
or what they could do

by computation,
naive and mechanical
fast arithmetic.

It changed the world, it
changed our consciousness and lives
to have such fast math

available to
us and anyone who cared
to learn programming.

Now help me, Muse, for
I wish to tell a piece of
controversial math,

for which the lawyers
of DVD CCA
don't forbear to sue:

that they alone should
know or have the right to teach
these skills and these rules.

(Do they understand
the content, or is it just
the effects they see?)

And all mathematics
is full of stories (just read
Eric Temple Bell);

and CSS is
no exception to this rule.
Sing, Muse, decryption

once secret, as all
knowledge, once unknown: how to
decrypt DVDs.



Arrays' elements
start with zero and count up
from there, don't forget!

Integers are four
bytes long, or thirty-two bits,
which is the same thing.

To decode these discs,
you need a master key, as
hardware vendors get.

(This is a "player
key" and some folks other than
vendors know them now.

If they didn't, there
is also a way not to
need one, to start off.)

You'll read a "disk key"
from the disc, and decrypt it
with that player key.

You'll read a "title
key" for the video file
that you want to play.

With the disk key, you
can decrypt the title key;
that decrypts the show.



Here's a description
of how a player key will
decrypt a disk key.

You need two things here:
An encrypted disk key, which
is just six bytes long.

(Only five of those
are the _key itself_, because
"zero" marks the end.

So that's five real bytes,
and eight times five is forty;
in the ideal case,

forty bits will yield
just short of two trillion
possible choices!

Ian Goldberg once
recovered a key that long
in seven half-hours.

But his office-mate
David Wagner points out that
it's _impossible_

to achieve what the
DVD CCA seems
to want to achieve,

even by making
the key some reasonable,
"adequate" key-length:

There's no way to write
a "secure" software player
which contains the key

and runs on PCs,
yet somehow prevents users
from extracting it.

If the player can
decrypt, Wagner has noted,
users can learn how.)

This is a pointer,
"KEY", to those bytes, and when we're
done, they'll be clear-text.

Oh, the other thing!
Called "im", a pointer to six
bytes: a player key.

(Now those six bytes, the
DVD CCA says
under penalty

of perjury, are
its trade secret, and you are
breaking the law if

you tell someone that,
for instance, the Xing player
used the following:

Eighty-one; and then
one hundred three -- two times; then
two hundred (less three);

two hundred twenty
four; and last (of course not least)
the humble zero.)

We will use these few
internal variables:
t1 through t6,

unsigned integers.
k, pointer to five unsigned
bytes.  i, integer.

So here's how you do
it: first, take the first byte of
im -- that's byte zero;

OR that byte with the
number 0x100
(hexadecimal --

that's two hundred and
fifty-six to you if you
prefer decimal).

Store the result in
t1.  Take byte one of im.
Store it in t2.

Take bytes two through five
of im; store them in t3.
Take its three low bits

(you can get them by
ANDing t3 with seven);
store this in t4.

Double t3, add
eight, subtract t4; store the
result in t3.

Make t5 zero.
Now we'll start a loop; set i
equal to zero.

i gets values from
zero up to four; each time,
do all of these steps:

PeregrineBF

#9
   Use t2 for an
   index into Table Two:
   find a byte b1.

   Use t1 for an
   index into Table Three:
   find a byte b2.

   Take exclusive OR
   of b1 with b2 and
   store this in t4.

   Shift t1 right by
   a single bit (like halving);
   store this in t2.

   Take the low bit of
   t1 (so, AND it with one),
   shift it left eight bits,

   then take exclusive
   OR of that with t4; store
   this back in t1.

   Use t4 for an
   index into Table Four:
   find a byte and store

   it back in t4.
   Shift t3 right by three bits,
   take exclusive OR

   of this with t3,
   shift this right by one bit, and
   take exclusive OR

   of this with t3,
   shift this right by eight bits, and
   take exclusive OR

   of this with t3,
   shift this right by five bits, and
   (No exclusive OR!

   Orange you glad I
   didn't say banana?) take
   the low byte (by AND

   with two hundred and
   fifty-five); now store this
   into t6.  Phew!

   Shift t3 left eight
   bits, take OR with t6, and
   store this in t3.

   Use t6 for an
   index into Table Four:
   find a byte and store

   it in t6.  Add
   t6, t5, t4; store
   the sum in t5.

   Take t5's low byte
   (AND t5 with two hundred
   fifty five) to put it

   in the ith byte of
   the vector called k.  Now shift
   t5 right eight bits;

   store the result in
   t5 again.  Now that's the
   last step in the loop.

No sooner have we
finished that loop than we'll start
another; no rest

for the wicked nor
those innocents whom lawyers
serve with paperwork.

Reader!  Think not that
technical information
ought not be called speech;

think not diagrams,
schematics, tables, numbers,
formulae -- like the

terrifying and
uniquely moving, though cliche,
Einstein equation

"Energy is just
the same as matter, but for
a little factor,

speed of light by speed
of light, and we are ourselves
frozen energy."

Einstein's formula
to convert from joules into
kilogram-meters

squared per second squared,
for all its power, uses
just five characters.

But Einstein wrote to
physicists: formal, concise,
specific, detailed.

And sometimes we write
to machines to teach them how
tasks are carried out:

and sometimes we write
to our friends to show a way
tasks are carried out.

We write precisely
since such is our habit in
talking to machines;

we say exactly
how to do a thing or how
every detail works.

The poet has choice
of words and order, symbols,
imagery, and use

of metaphor.  She
can allude, suggest, permit
ambiguities.

She need not say just
what she means, for readers can
always interpret.

Poets too, despite
their famous "license" sometimes
are constrained by rules:

How often have we
heard that some strange twist of plot
or phrase was simply

"Metri causa", for
the meter's sake, solely done
"to fit the meter"?

Programmers' art as
that of natural scientists
is to be precise,

complete in every
detail of description, not
leaving things to chance.

Reader, see how yet
technical communicants
deserve free speech rights;

see how numbers, rules,
patterns, languages you don't
yourself speak yet,

still should in law be
protected from suppression,
called valuable speech!

Ending my appeal
on that note, I will describe
the second loop.  Store

nine in i; i gets
values from nine down to
naught.  Each time, do this:


And because this would take something like 20 posts to finish, go to http://www.cs.cmu.edu/~dst/DeCSS/Gallery/decss-haiku.txt for the full thing.