Saturday, January 06, 2007

Interesting Stuffs about Primes


  • A beautiful prime visualization


    Thanks to Wikipedia, I've just accidentally found the "Number Spiral" view of the primes. It is much more beautiful than my view on the complex plane.

  • Illegal Primes


    Have you known DeCSS? You must know it if you have ever RIPped a DVD :D! If have never heard, you should try this cool stuff whenever you want to watch a DVD bought from Vietnam (region #3) in US(region #1), or to watch a DVD bought from US in Japan(region #2) as I used to do. The DeCSS algorithm is so favourite that people(not only rippers) around the world have contributed lots of representations of that stuff. Among them, there's a type of genuine mathematical representation, the prime number. You can extract the C code of the DeCSS program efdtt.c in 8-bit ASCII encoding from the 1045-digit prime 207401646065301...7791512957, or in 7-bit ASCII from the 914-digit prime 94547005113906...0843081469! You can even get the executable version of that program by converting the 1811-digit prime 49310835970...5452543537 into binary form, then pass a CSS-encripted .VOB file by this program, and receive the deCSSed version of that .VOB!
    These numbers have made the first illegal primes in the world.


__________________________________
Attachments:

/*
* File name : efdtt.c
* Author : Charles M. Hannum
* Thanks to Phil Carmody
* for additional tweaks.
* Original Length: 434 bytes (excluding tables and unnecessary newlines)
* Usage : cat title-key scrambled.vob | efdtt >clear.vob
* Reform : Le Xuan Dinh
* (inserted new-lines, spaces, and tabs)
*
*/

#define a(f) (i[f]^l[f+84])<<

unsigned char i[5], l[2048], m;

main(n)
{
for( read(0,i,5); read(0,l,n=2048); write(1,l,n) )
if(l[m=l[13]%8+20]/16%4 == 1)
{
int
p = a(1)17^256 + a(0)8,
q = a(2)0,
r = a(4)17^a(3)9^q*2 - q%8^8,
u = 0,
w = 26;
for( l[m]-=16; --w; r*=2 )
u = u*2^p&1,
p = p/2^r&1<<24;
for( r=127; ++rm )
w += m=p^p/8^p>>4^p>>12,
p = p>>8^m<<17,
u ^= u>>14,
m = u^u*8^u<<6,
u = u>>8^m<<9,
q = l[r],
q = "7Wo~'G_\216"[q&7] + 2^"cr3sfw6v;*k+>/n."[q>>4]*2^q*257/8,
l[r] = q^(q&q*2&34)*6^w + ~m;
}
}

No comments: