Live data from Hacker News

Illegal Prime Number? (2001)

fatphil.org

1–10 of 47 posts

Re: Illegal Prime Number? (2001)

#6
tl;dr- Programming code serialized to binary seems like a Base-2 number to them, so they were looking for "illegal" C scripts that would be prime when read as a Base-2 number.

They give the example of a C script that breaks an old DRM crypto scheme.

It seems kinda silly since primes have a fairly regular distribution, so all they need to do is:

1. Pick any program they want to be "prime".

2. Serialize it and check if it's prime. If so, done; if not prime, continue.

3. Perform some minor code modification that doesn't change the script's functionality, e.g. tweaking a variable name or the content of a comment.

4. Return to Step (2), looping until a prime representation has been found.

Re: Illegal Prime Number? (2001)

#7
post #6

tl;dr- Programming code serialized to binary seems like a Base-2 number to them, so they were looking for "illegal" C scripts that would be prime when read as a Base-2 number. They give the example of a C script that breaks an old DRM crypto scheme. It seems kinda silly since primes have a fairly regular distribution, so all they need to do is: 1. Pick any program they want to be "prime". 2. Serialize it and check if…

* 3 append a NULL byte

* 4 serialise and check if prime; if so then done

5 check if any byte value makes it prime when appended. If so, append it, else append NULL. Repeat until done

Re: Illegal Prime Number? (2001)

#8
Some context for people younger than me: This was a Big Thing On The Internet back in 2000. It was lovely, and it was where I discovered how a bunch of motivated nerds on the internet could make a dent.

So anyway, the thing was DVDs were pretty new, and DVDs had "region protection". Cutting corners, this means that data on DVDs could be encrypted with different keys depending on which continent you were on, to allow complicated per-country movie distribution models. You could change the "region" on your DVD player or computer, but only 3 times or so. Of course people could also make unencrypted DVDs, but movie makers didn't do that. Internally the encryption scheme was called CSS, chosen by people who I assume didn't code websites much.

Now, the DVD consortium people (backed by the film industry and hardware vendors) released DVD playing software for Windows and Mac, but not for Linux. This made Linux enthusiasts sad, who couldn't play DVDs on their computers. You have to remember, this was before the Pirate Bay, broadband, and Netflix. People really wanted to be able to buy/rent these DVDs and play them, this was not a hypothetical wish. It was the only way to get high quality movies in the house.

Then it became clear that the DVD people really weren't going to ship a DVD driver thing for Linux, not even closed source, not even when we all asked really nicely. I'm not 100% sure whether there were no DVD drivers at all on Linux, or simply that they only could play unencrypted DVDs, but you can see where this is going: the Linux people wanted to be able to play real DVDs, the ones they'd buy or rent in town, the vendors wouldn't do the effort, so the Linux folks did it themselves. This was common, especially then, when most hardware vendors couldn't care less about Linux.

So they cracked the CSS encryption.

I mean, of course they cracked it. This was not the warez people, this was the FOSS people. They had a computer with a perfectly good DVD drive and they wanted to watch movies on it. You can't stop these folks.

The MPAA, however, did not like this. They realized that it would just be a matter of time before people would port this code to OSes that have more usage than a rounding error on their bottom lines. So they did what the MPAA does best: hunt witches. At least one guy, a Norwegian 16-year old, got prosecuted by the state, and it all got messy very fast.

Meanwhile, the angry nerd mob that is the internet didn't sit still. They soon realized that the big Linux DVD player software wasn't the issue, the only issue was that little library called DeCSS which cracked the encryption. Soon, people started hosting DeCSS on their websites, in objection to the MPAA's witch hunt. It wasn't that big, after all.

MPAA then started sending aggressive takedown notices and even lawsuits to ISPs and hosting providers who had customers who hosted DeCSS. Some customers got in trouble, some providers had a spine. It was bad, but this sparked 2 wonderful developments:

First, someone wrote a Perl script called DeCSS that removes cascading style sheets from HTML files. Nobody had a use for it, but lots of people hosted it on their sites. The MPAA sent takedown notices to those as well, and this was much easier for providers to say no to. After all, it was as harmless as any program good get and let's be honest, it was aptly named.

Second, the one of first serious internet sizecoding competitions got kicked off, because smaller code is easier to distribute in nifty ways. People remixed each other's work until the core DeCSS algorithm was only a single line of code. Gzipped, there was nearly nothing left. The article this thread is about assumes that you're aware of that (all the geeks were at the time) and starts from there with the insight that there's probably a prime number that includes this code and is, therefore, illegal.

People also put this minified DeCSS code in all kinds of wonderful places. One of the best hacks I recall is that you could make the DVD consortium's DNS servers host DeCSS. Because DNS servers cache data from other DNS servers, you could make a TXT record on your domain with DeCSS in it, then look it up via the DVDCCA nameserver, and it would keep a copy. But there were many ways: http://decss.zoy.org/

This was all straight from memory. I probably got some details wrong and I probably missed many great anecdotes. But this was a beautiful piece of collaborative civil disobedience and to my knowledge it was the nail in the coffin of region-protected DVDs.

Re: Illegal Prime Number? (2001)

#9
post #8

Some context for people younger than me: This was a Big Thing On The Internet back in 2000. It was lovely, and it was where I discovered how a bunch of motivated nerds on the internet could make a dent. So anyway, the thing was DVDs were pretty new, and DVDs had "region protection". Cutting corners, this means that data on DVDs could be encrypted with different keys depending on which continent you were on, to allow…

Thank you for this writeup, this was before my time on the internet.

> People remixed each other's work until the core DeCSS algorithm was only a single line of code. Gzipped, there was nearly nothing left

What was the actual number? Can you post it here?

Re: Illegal Prime Number? (2001)

#10
post #8

Some context for people younger than me: This was a Big Thing On The Internet back in 2000. It was lovely, and it was where I discovered how a bunch of motivated nerds on the internet could make a dent. So anyway, the thing was DVDs were pretty new, and DVDs had "region protection". Cutting corners, this means that data on DVDs could be encrypted with different keys depending on which continent you were on, to allow…

Thank you for this writeup, this was before my time on the internet. > People remixed each other's work until the core DeCSS algorithm was only a single line of code. Gzipped, there was nearly nothing left What was the actual number? Can you post it here?

k·256^211 + 99
Post reply on HN