News for hackers. Stuff that matters.
Re:Ron was Wrong, Whit is Right by jalapeno_dude on Tuesday February 14, 2012 @03:41PM (#3591718)
Posting what I said in the other thread: As far as I can tell, this is what they're doing: if two different keys have a factor in common (i.e. A=PQ, B=PR), then you can use Euclid's algorithm (which just requires repeated subtraction, and is thus really easy) to find P (=gcd(A,B)), and then just use division to find Q (=A/P) and R (=B/P) easily. So what the researchers did, apparently, was to gather all the RSA public keys they could find (6 million or so) and then calculate the gcds of all pairs of keys. (Presumably they were slightly more clever than this, but it doesn't really matter--doing this is still vastly easier than factoring even a single public key). Whenever they found a gcd that wasn't equal to 1, they'd cracked (at least) 2 keys. And it turns out that roughly 0.2% of the keys could be cracked in this way (for a total of 12720 1024-bit moduli). As far as I can tell, the problem isn't with RSA itself, but with whatever algorithms are used to pick two random primes to multiply and produce the key (or moduli, whatever)--they don't have high enough entropy and output duplicates ~0.2% of the time.
Re:Ron was Wrong, Whit is Right by cperciva on Tuesday February 14, 2012 @04:41PM (#3591911)
As far as I can tell, the problem isn't with RSA itself, but with whatever algorithms are used to pick two random primes to multiply and produce the key (or moduli, whatever)...

Correct.

they don't have high enough entropy and output duplicates ~0.2% of the time.

Almost correct: They don't have enough entropy at least 0.2% of the time. These results are consistent with all primes being generated with ~40 bits of entropy -- which would imply that all the keys are broken. Obviously we hope that this is not the case and instead it's just a small subset of primes which were generated with low entropy, but the data do not provide any evidence in either direction.

Re:Ron was Wrong, Whit is Right by DavidSJ on Wednesday February 15, 2012 @04:08AM (#3593626)
They do write:

the graph of the moduli contained in c distinct certificates consists, in an ideal world, of c disjoint connected components each consisting of two vertices joined by a single edge, for a total of 2c vertices and c edges ... tens of millions of [lab-]generated RSA moduli turned out to behave as expected based on the above assumption.

That implies that there is at least one (presumably common) method for generating RSA keys which does not frequently output duplicate primes.

Re:Ron was Wrong, Whit is Right by cperciva on Wednesday February 15, 2012 @01:01PM (#3595287)
Security requires more than "does not frequently output duplicate primes". It requires "primes have a large amount of entropy".
Re:Ron was Wrong, Whit is Right by netdog on Tuesday February 14, 2012 @09:00PM (#3592672)
So what the researchers did, apparently, was to gather all the RSA public keys they could find (6 million or so) and then calculate the gcds of all pairs of keys.

Apparently not. The number of unique pairings among 6 million is 5,999,999 factorial. Which is a _really_ large number.

Re:Ron was Wrong, Whit is Right by wging on Tuesday February 14, 2012 @09:50PM (#3592771)
Not so. Given a set of N elements from which you choose k (with order not mattering, since you only care whether a given two are the same) the number of pairs is N!/(k!(N-k)!). So it's (6000000!)/(2!(6000000-2)!).

We can take advantage of the cancellation properties of the factorial to write this as N\(N-1)\...\(N-k+1)/k! . If k=2 this resolves to N(N-1)/2.

You could also derive it like this: for ordered* pairs, you have N choices for the first and N-1 for the second (since you don't pair anything with itself but all other choices are permitted). This counts each pair exactly twice: each pair and its reverse are the same if you don't care about order. So N(N-1)/2.

Still trillions of combinations. Not 5999999! though.

Re:Ron was Wrong, Whit is Right by neolefty on Tuesday February 14, 2012 @09:38PM (#3592749)
Isn't it 6 million squared? 36 x 10^12. Factorial would be the number of ordered sets that include all the elements.
Re:Ron was Wrong, Whit is Right by wging on Tuesday February 14, 2012 @09:53PM (#3592775)
At the risk of redundancy (I wrote my post while you posted): you're double counting (since gcd(a,b) = gcd(b,a), you needn't compute both; either tells you whether a,b have a common factor. (a,b) and (b,a) having a common factor both account for the same problem) and you're including pairs of the same element (gcd(a,a)=a always, but this is meaningless for the data set we're considering--we don't care that a number has common factors with itself, only with other numbers)