An illegal prime is a prime number that represents information which is forbidden to possess or distribute. The first illegal primes was discovered in 2001. When interpreted in a particular way, it describes a computer program that bypasses the digital rights management scheme used on DVDs. Distribution of such a program in the United States is illegal under the Digital Millennium Copyright Act.

The first illegal prime number was generated in March 2001 by Phil Carmody. Its binary representation corresponds to a compressed version of the C source code of a computer program implementing the DeCSS decryption algorithm, which can be used by a computer to circumvent a DVD's copy protection.

Carmody applied Dirichlet's theorem to several prime candidates of the form k·256n + b, where k was the decimal representation of the original compressed file. Multiplying by a power of 256 adds as many trailing null characters to the gzip file as indicated in the exponent which would still result in the DeCSS C code when unzipped.


Of those prime candidates, several were identified as probable prime using the open source program OpenPFGW, and one of them was proved prime using the ECPP algorithm implemented by the Titanix software. Even at the time of discovery in 2001, this 1401-digit number, of the form k·2562 + 2083, was too small to be mentioned, so Carmody created a 1905-digit prime, of the form k·256211 + 99, that was the tenth largest prime found using ECPP, a remarkable achievement by itself and worthy of being published on the lists of the highest prime numbers. In a way, by having this number independently published for a completely unrelated reason to the DeCSS code, he had been able to evade legal responsibility for the original software.

Following this, Carmody also discovered another prime, this one being directly executable machine language for Linux i386, implementing the same functionality.


You can find more info at the following links: