Hacker News new | past | comments | ask | show | jobs | submit login
Illegal Prime Numbers (wikipedia.org)
178 points by epenn on Oct 17, 2013 | hide | past | favorite | 58 comments



[ Ignoring the morality of making ideas illegal... ]

This demonstrates the difference between data (i.e. the number itself) and information (the interpretation of data and use cases derived from that interpretation).

What is "illegal" here is certain kinds of encryption and security software. A prime number is not the same thing as encryption and security software. But you can specify processes which allow encryption and security software to be uniquely identified by a prime number. The interpretation combined with the data is what's important, not the data in isolation.


I think that it is better to think about it in terms of the 'colour of bits'. Bit colour can be thought of as an invisible property that follows a bit around whenever that bit is computed in a way that depends on another coloured bit.

Suppose n_1 is picked randomly (from a distribution that doesn't take into account any 'coloured' bits). Suppose n_2 is computed from illegally obtained data. Now suppose that numerically, n_1 == n_2. Mathematically, n_1 and n_2 are indistinguishable, but in the eyes of the law, n_1 is not coloured and therefore legal, while n_2 is illegal.

In practice, courts cannot see the colour of bits, so they have to infer the colour. If you claim that some data on your hard disk was randomly generated, but it is exactly the same as, say, a 100 GB copyrighted movie file. The probability of randomly generating such a small file (unless your distribution is stacked towards that file - which doesn't count as being uncoloured) is so small that it is not credible that you coincidentally generated it randomly, so the court will likely infer that the bits in that file are coloured.

Another more complex example: suppose I give you four bitstrings, A, B, C, and D. Let ^ represent bitwise XOR. Suppose that A is a representation of the complete public domain works of Arthur Conan Doyle, A^B is a public domain representation of War & Peace, B^C is a copyrighted novel (and the person distributing the strings doesn't have permission to distribute it). C^D is a public domain representation of the bible. Which bitstrings are illegal? To decide, a court will need to infer how you generated the strings. A is clearly not illegal because it matches a public domain work exactly. B is completely determined by A and the contents of War & Peace. To compute C, you would take a copyrighted work and xor it with B, so that makes C illegal to distribute without permission because it was derived from a copyrighted work. To compute D, you need C and the bible, and since C is coloured, D is also coloured.


All true, but there are cases where the jump from the primality to the lawbreaking is really really short.

For example, if the authorities compromise a CA/ISP/website's private key, they'll be prohibited from "tipping off" others that the corresponding public key is insecure. But (in the case of RSA), that knowledge is equivalent to "the authorities know that the factors of X are Y and Z" or even "X = Y times Z".

Yep, announcing a number's factors can be illegal.

That seems like a more interesting, non-convoluted kind of "illegal prime".


Putting the number 07574635453 on a website can be illegal. Putting the number 35.672 on a website can be illegal. Terrible isn't it! I could be sent to jail for sending someone "1101001100111110110111001111101111110100111011101100111111010011011111101011110100111011001101100111100111011111110101"!

No, since the first could be in the context of me releasing personal information, and the second could be the quarterly earnings before they're released publicly. Or someones wages, or someones password, or the location of a witness in hiding, or the binary representation of a libellous claim, or harassment (but I only sent 0s and 1s in a message on facebook your honour!), or a million other things that we all agree are illegal.

It's an incredibly boring, and over-repeated statement that you can represent information as numbers and therefore you can have ILLEGAL NUMBERS! What will the poor maths teachers do?

> Yep, announcing a number's factors can be illegal.

If you do so with the intent of breaking encryption I'm sure there are situations where it would be illegal.

Intent, as is so often ignored when legal matters come up, is incredibly important.


> No, since the first could be in the context of me releasing personal information, and the second could be the quarterly earnings before they're released publicly. Or someones wages, or someones password, or the location of a witness in hiding, or the binary representation of a libellous claim, or harassment (but I only sent 0s and 1s in a message on facebook your honour!), or a million other things that we all agree are illegal.

I'll disagree. I think that things like publishing passwords, quarterly earnings, wages, locations of people, etc. should only be "illegal" in the civil sense: if people have contractually agreed to not release such information, then they should be liable for damages if they violate the contract. I don't think libel should be illegal, and surprisingly, the UN Human Rights Committee seems to agree: http://www.mediadefence.org/news-story/un-rules-against-crim.... I'll concede that harassment is a tricky one, because it's a rather vague term that can range from "frequently annoying someone" to "threatening someone with violence."


The example I gave involved a lot more than the pedestrian observation that "arbitrary strings can be interpreted to mean illegal stuff". And it did not in any way attempt the sleight-of-mind involved in the "it's all 1s and 0s" reduction.

My example involved explicitly stating the mathematical fact of a number's factors, requiring no steganographic reinterpretation. The crucial point is that the (boring mathematical) information about factors alone, with no further interpretation, suffices for the authorities' opponents to be tipped off. That is, all they have to do is search the web for "known semi-primes" and check them against public keys.

>It's an incredibly boring, and over-repeated statement that you can represent information as numbers and therefore you can have ILLEGAL NUMBERS!

Which wasn't my point at all; in the example I gave the numbers and encoding are not intended to represent anything other than the fact of a semi-prime's factorization.

>If you do so with the intent of breaking encryption I'm sure there are situations where it would be illegal.

>Intent, as is so often ignored when legal matters come up, is incredibly important.

It would actually be the breaking of the breaking of encryption. And I'm no so naive to think this would be a legally-defensibly way to circumvent snooping, to suppose that judges would just say, "herp derp, all you did was announce a semi-prime's factors, you're free to go!"

But it is a much less trivial example that you're making it out to be, and it is not at all the same as the OP's example, which required applying a specific encoding to an arbitrary string to get arbitrary meaning. In my example, it is nothing more and less than a mathematical fact that also happens to be used to conceal or authenticate data by other parties.


And if the intent is to watch legally purchased DVDs on a legally purchased computer with a legally purchased DVD drive running my choice of operating system, and I'm a 14 year old Norwegian kid, clearly prosecution is warranted.


Are you accusing me of suggesting that is the case?


Not really. I understood you to be speaking in a more idealized mode, and was criticising those who failed to live up to it.


The interpretation of the data exists solely in our minds. Would that not make it, quite literally, thoughtcrime?



That's not exactly what's going on in this thought experiment. If a crime is committed without mens rea, then it's still something bad that happened, like if a person kills another person but it was due to negligence rather than out of malice (and thus might not be murder legally). We don't think of that idea as "thoughtcrime," because the act itself (homicide) is fairly universally recognized as a crime (and a "bad thing") regardless of the thoughts behind it. But with intellectual property, that isn't the case. Most people would not consider publishing the nth prime to be a crime or a bad thing, but the law will treat it as a crime if the publisher happens to know that the nth prime is useful for breaking encryption (even if it's just to decrypt media you have bought legally). That's why, at least to me, negligent homicide doesn't feel like thoughtcrime, but intellectual property violation does.


I agree it's not precisely mens rea; my point was simply that criminality has always depended in part on what was going on in people's heads.

Note that it's not just IP. Imagine constructing a prime from which one could decode child pornography. For that matter, imagine finding a prime whose ascii representation was a death threat: publishing that would be legal; sending it to someone with the expectation that they read it as ascii would be illegal.

The question is what is really going on, and a part of that is what's in people's heads. Law isn't voodoo, it's how we regulate actual behavior of actual people.

"Thought crime", in its Orwellian context, is entirely different. I can think whatever thoughts I want opposing the copyright monopoly or even opposing prohibition of child pornography - in fact, in some scopes, I've thought both of these kinds of thoughts - and not be guilty of any crime.


But only data (i.e. the number itself, as bits) is transmitted over the Internet, not interpretations.


You could slippery slope that argument ad infinitum, though. Even the interpretation combined with the data mean nothing if you don't have intent. And even with intent you have to have a computer. And even with intent and computer it has to be reasonable that you could use the computer. Let's imagine I am laying in my bed by the computer completely unable to speak or move. I can only breathe. But, I intended to copy a rights-protected DVD and then fell ill for 10 years while I had everything in place to do it sitting right there beside me? Are you going to charge me as I think there in a semi-comatose state? What if I was copying a copy-protected DVD, but in got stuck in the process, while I laid in my bed in a coma? What if the coma started immediately before the computer started executing the copy, and my pet mouse stepped on the keyboard, starting the copy? What if both the pet mouse and I had the intent to copy the DVD? What if the pet mouse's friend was watching in a nearby corner and had egged the pet mouse to touch the keyboard knowing that the copy-protection would be circumvented, but the pet mouse had no intent to circumvent, but I did, and I fell into a coma prior to the enter key being pressed by the mouse? What if the mouse spontaneously combusted atop the keyboard, pressing that key that the other mouse and I intended to be pressed, and the other mouse was an illegal, but had applied for citizenship of both the U.S. and Britain simultaneously while holding a non-resident visa for Australia while vacationing in the states, and was smoking a cigar in an area clearly marked as non-smoking?


Haha, you don't need intent, you just need to joke about doing it online. Conspiracy to commit.


Obligatory link: What Colour are your bits? http://ansuz.sooke.bc.ca/entry/23

The fact that this Wikipedia article exists at all embarrasses me.


Off-topic: Wow, that author's friend really dramatically and thoroughly misunderstood 4'33".


"Now, the preceding paragraph is basically nonsense to computer scientists or anyone with a mathematical background. (My friend is one; he'd done this as a sort of elaborate joke.)"

Misunderstood in the way Douglas Adams "misunderstands" physics; i.e., the best way possible.


It's also illegal to yell "fire!" in a crowded theater. Presumably, that can also be encoded as a number.

While it's an interesting perspective, it does not strike me as particularly useful in the debate about intellectual property, free speech, etc...


It's not illegal to do that, and in the context in which it was illegal, that decision was overturned: http://www.theatlantic.com/national/archive/2012/11/its-time...


As an alternative then, harassment over the internet and libellous statements.


Digg This: 09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c1


Ha! It was pretty funny to see practically the entire front page full of nothing but the key. I had friends who had their accounts banned by Digg at the time (I don't think they were ever reinstated), but soon afterwards, they threw their hands up and gave in to the swarm.


According to Wikipedia (http://en.wikipedia.org/wiki/AACS_encryption_key_controversy) the last 1 has to be a 0.


Good catch. I couldn't find the original post on Digg, so I used Google to find other people discussing it. It looks like the publisher I copied was too scared to publish the key verbatim.


What's the big deal about this, are prime numbers so special that they should be granted some kind of diplomatic immunity?

IOW what's the difference about this and ranting about illegal even numbers.


I would also like to know this. Why is it important that the number representing some code must be prime? Why not any number?


The idea was to have a legitimate reason to publish the code.

He found a representation of the code that was also the tenth largest prime found using ECPP meaning he could publish the finding and claim he wasn't publishing the code. However, anyone who wanted the code could easily find it by looking up the prime


These stupid scenarios are direct consequences of software patents.

I remember an article that used Haskell to show how absurd software patents are by showing how any piece of software is actually just a mathematical formula that turns some input (however big) into some output.


Why did it have to be Prime? Wh not just from the set of natural numbers alone?

Edit: ahh he wanted an excuse to publish it which you wouldnt get with a non prime



Earlier this year, Numberphile (which is a fantastic youtube channel) created a very accessible video about this topic. http://www.youtube.com/watch?v=wo19Y4tw0l8


If you have a strong RSA modulus, e.g. 2048 bits, then the primes we are talking about are about 1024 bits.

There is no way you are going to hit such a prime number at random. Not even if you set a million fast computers going in a million universes on every planet in those universes. Certainly not before heat death of this universe.

The only way you are going to have an interest in this prime is as a factor of someone's RSA key (for which you will need not-yet-invented algorithms of great sophistication and probably an enormous amount of computer time to find in the first place).

On principle, the idea of illegal numbers is stupid. Actually, on second thoughts, it is stupid either way. It is basically serving only as a legal backstop for a situation that by definition shouldn't need one.


The question is: The program that recovers from the illegal prime number the original source code, is that program legal and freely distributable?


It's no different than the innumerable YouTube videos showing how to lock pick. They're not picking the locks of any specific location, just showing the methodology.

But high-powered lawyers can be persuasive to your detriment if you do distribute it so you may have to get crafty with the method. I.E. Print it up on paper and distribute calling it Free Speech ;)


They could probably convince a judge that there is no reason anyone would ever use such a program for anything else.

I can't think of any other reason why someone would want to convert a string to a decimal number to binary, then dump it as a zip file, then unzip it. The separate components would be fine (i.e. base converter, bit writer, unzipper). But put it together, and you have a provable intent, unless you can show that it can be used for other legal things.


Simply outrageous. What is next? Intellectual property on arithmetic?


Yup, I wish I could find my essay, but I wrote an essay in the 90's on this. That one day, numbers and arithmetic will be outlawed, because any data (program, image, movies, etc) can be presented by a number, and those numbers can be represented by a bunch of mathematical operations. So if we can copyright programs, then those numbers and any possible arithmetic operation to generate them will also by be copyright able and anyone possessing them without permission is breaking the law. This also applys to all possible forms of IP.


Eben Moglen talked about the different legal regimes that were applied to different classes of information (which programmers might view as different numbers) in "Anarchism Triumphant", at http://emoglen.law.columbia.edu/publications/anarchism.pdf

I think it's an interesting read in conjunction with "What Colour Are Your Bits" (suggested above).


Hey, I can append a bit to a string of bits...

Behold! Illegal odd numbers!


Prime numbers can provide the ultimate form of compression. If only there was a way to find a corresponding prime number per code base.


There's no compression. It's expansion, since null bytes were added to increase the digit length of the resulting prime, making it long enough to publish. For an arbitrary binary, the original (most likely non-prime) zipped representation is more useful since it's smaller.


I think he is saying that for example the Linux kernel version 3.11 would be the Nth prime.


I have question: If DVD encryption was broken several years ago, why is it still used?


Because then you'd have new dvd's that don't work on most dvd players... consumers would get mad... and DVD is kindda getting obsolete now that there's bluray.


I think he meant dropping the encryption all together. Would players not be able to play non-encrypted discs?


DVD encryption combined with anticircumvention laws mean DVD players that can skip no-skip content or play out-of-region DVDs aren't sold to mainstream consumers.

Without anticircumvention laws, there would be no incentive to use encryption. Such laws have nothing to do with piracy; they're about maximizing revenue from paying customers.


because it allows control of hardware vendors via anticircumvention laws.


Someone explain for us normals.


Roughly: 1. The letters and punctuation which comprise a computer program in human-readable form can be translated into a string of numbers.

2. That list of numbers can be looked at as if it were one really large number instead of a list of smaller ones.

3. By being a bit clever about how the original program text was translated into numbers, the resulting very-large-number was made to be prime, i.e. not evenly divisible by any numbers other than itself and one. Prime numbers hold a special place in the hearts of many mathematicians.

4. The social implication of all this is that what would have been illegal (rightly or wrongly) in the form of a computer program entered the public record instead in the form of a large number with mathematical significance.


----------------------------------------

TL;DR:

The genius of this story is that Phil Carmody found a way to just ADD BITS to the end of a zipped, illegal program to make it a large publishable prime number. Even more brilliant is that if you convert the prime number back to binary (trivial) and unzip it, you get the illegal program. That is amazing.

----------------------------------------

  For the curious:

  Let "k" be your illegal program zipped in binary, interpreted as a number.
  
  Carmody created a buffer of zeroed-out bytes to the right of "k" to allow for a
  free space to search for prime numbers without tampering with the illegal bits
  on the left that he still wanted intact.  The unzip program will ignore
  everything after it anyway (either because of null terminating zeros or because
  the file size listed in the header would ignore it).


        (illegal bytes)                   (zero buffer)
                |                               |
                v                               v
  |---------------------------||--------------------------------|
  kkkkkkkkkkkkkkkkkkkkkkkkkkkkk0000000000000000000000000000000000

  
  He created this "zero buffer" of size "n" bytes by multiplying k by 256^n.  You
  already know that multiplying a base-10 number by 10^n adds "n" zeros to the
  right.  Multiplying a base-2 (binary) number by 2^n similarly adds "n" zeros to
  the right.  This is what "bit-shifting" is.   So, multiplying a binary number
  by 2^(8n) will add increments of 8 zeros (a zero byte) to the right of the
  number.  And if you know your rules, 2^(8n) = (2^8)^n = 256^n.

  Then, he modified the bits in this zero buffer to make the whole thing a
  prime number.


        (illegal bytes)           (left-over zero buffer)   (prime-making bytes)
                |                            |                |
                v                            v                v
  |---------------------------||---------------------------||---|
  kkkkkkkkkkkkkkkkkkkkkkkkkkkkk00000000000000000000000000000bbbbb
  

  He didn't do this directly of course.  We know from a popular theorem that
  there are an infinite number of values of "n" that make (k * n + b) a prime
  number, as long as "k" and "b" don't share any factors.  He presumed with
  high probability that (k * 256^n + b) would hit on that infinite space of
  primes, and he was right.  He found values of "n" and "b" to match his
  illegal "k" value to create a prime.

  To relate the equation to the visualization above:  "k" is the illegal bytes
  in the beginning.  "n" is the size of the zero buffer.  "b" is the prime-making
  bytes.


I'm sorry, but how exactly is this "amazing"? That you can find some bits to append to a number such that it becomes prime is rather obvious, given that there are an infinite number of primes and (probabilistic) primality tests are readily available. As other have pointed out, this is no more interesting than the fact that adding a "1" bit yields an odd number.

And what's the point? Yes, illegal information can be encoded as bits, those bits interpreted as numbers, and then you can apply transformations to those numbers. So what?


The point is that certain large prime numbers (of certain forms) are curated and published in a catalogue because they are notable (in and of themselves). The process you dismiss as trivial allowed Carmody to encode the illegal program as such a prime, and hence have it independently published in said catalogue, where it belongs entirely independently of whether it happens to turn into the illegal program when run through gunzip.


> That you can find some bits to append to a number such that it becomes prime is rather obvious, given that there are an infinite number of primes

That isn't obvious to me because I learned a long time ago about the strange nature of infinity. The infinite space of primes has infinite gaping holes that may very well swallow all numbers of a given form.

But I posted the question to the Math Stack Exchange, and it seems to be correct:

Proof: http://math.stackexchange.com/questions/531043/can-you-make-...


VMG is right. You should definitely add this to the Wikipedia page! Great stuff.


Thanks a lot. Why isn't this in the WP article?


This is why libertarians are against intellectual "property".




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: