<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Prime Suspect, or Random Acts of&#160;Keyness</title>
	<atom:link href="http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html/feed" rel="self" type="application/rss+xml" />
	<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html</link>
	<description>Brain candy for Happy Mutants</description>
	<lastBuildDate>Wed, 22 May 2013 08:44:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
	<item>
		<title>By: Nick O'Neill</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1350344</link>
		<dc:creator>Nick O'Neill</dc:creator>
		<pubDate>Mon, 20 Feb 2012 18:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1350344</guid>
		<description>Very nice top image for the post, Glenn. Is it available in larger sizes?</description>
		<content:encoded><![CDATA[<p>Very nice top image for the post, Glenn. Is it available in larger sizes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1349009</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Fri, 17 Feb 2012 21:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1349009</guid>
		<description>No, we had a more efficient way, and I think Heniger et al. used yet another.

All in all it took a few hours on a single desktop machine.</description>
		<content:encoded><![CDATA[<p>No, we had a more efficient way, and I think Heniger et al. used yet another.</p>
<p>All in all it took a few hours on a single desktop machine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sabik</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348522</link>
		<dc:creator>sabik</dc:creator>
		<pubDate>Fri, 17 Feb 2012 11:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348522</guid>
		<description>The article says that it&#039;s mostly embedded devices. My guess would be that the problematic part is &quot;pick a random number&quot;, because this is something computers are not naturally good at. Unless the device contains a specialised circuit (extra cost, would have to be designed in early), it just has to collect randomness and hope it&#039;s good enough. What is it going to use? Number of milliseconds since it was turned on? There&#039;s just not that many milliseconds... not enough to get 300 random digits for two 150-digit random numbers.

Of course, it&#039;s also possible that the implementations are simply wrong. There&#039;s a standard function called &quot;rand&quot; or &quot;random&quot;, and if you don&#039;t know what you&#039;re doing, it&#039;s very easy to just go use that. Normally, that will give you 10 digits&#039; worth of randomness, total, at best, no matter how many times you call it. That randomness will be spread thin among the 300 digits you need, but it&#039;ll still only be 10 digits&#039; worth.</description>
		<content:encoded><![CDATA[<p>The article says that it&#8217;s mostly embedded devices. My guess would be that the problematic part is &#8220;pick a random number&#8221;, because this is something computers are not naturally good at. Unless the device contains a specialised circuit (extra cost, would have to be designed in early), it just has to collect randomness and hope it&#8217;s good enough. What is it going to use? Number of milliseconds since it was turned on? There&#8217;s just not that many milliseconds&#8230; not enough to get 300 random digits for two 150-digit random numbers.</p>
<p>Of course, it&#8217;s also possible that the implementations are simply wrong. There&#8217;s a standard function called &#8220;rand&#8221; or &#8220;random&#8221;, and if you don&#8217;t know what you&#8217;re doing, it&#8217;s very easy to just go use that. Normally, that will give you 10 digits&#8217; worth of randomness, total, at best, no matter how many times you call it. That randomness will be spread thin among the 300 digits you need, but it&#8217;ll still only be 10 digits&#8217; worth.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Uznanski</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348391</link>
		<dc:creator>Dan Uznanski</dc:creator>
		<pubDate>Fri, 17 Feb 2012 04:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348391</guid>
		<description>only 18 trillion.  Written in C and given to a small compute center and it&#039;d be done in a week or two.</description>
		<content:encoded><![CDATA[<p>only 18 trillion.  Written in C and given to a small compute center and it&#8217;d be done in a week or two.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max Flander</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348327</link>
		<dc:creator>Max Flander</dc:creator>
		<pubDate>Fri, 17 Feb 2012 01:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348327</guid>
		<description>How many pairs did they compare? Even though GCD is a very fast operation, if they did this for all distinct pairs amongst 6 million keys, that&#039;s a lot of pairs... but is that what they did?</description>
		<content:encoded><![CDATA[<p>How many pairs did they compare? Even though GCD is a very fast operation, if they did this for all distinct pairs amongst 6 million keys, that&#8217;s a lot of pairs&#8230; but is that what they did?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fleishman</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348259</link>
		<dc:creator>Glenn Fleishman</dc:creator>
		<pubDate>Fri, 17 Feb 2012 00:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348259</guid>
		<description>That is a superb point. If one could determine the RNG in question, it would be possible to create prime collisions for factoring.</description>
		<content:encoded><![CDATA[<p>That is a superb point. If one could determine the RNG in question, it would be possible to create prime collisions for factoring.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: taintofevil</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348250</link>
		<dc:creator>taintofevil</dc:creator>
		<pubDate>Thu, 16 Feb 2012 23:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348250</guid>
		<description>Definitely the key generation algorithm is the major problem.  But the &quot;birthday problem&quot; tends to bite people when they calculate something like &quot;the probability of a collision even with this shortcut is 10^(-18)&quot; and think that&#039;s good enough.</description>
		<content:encoded><![CDATA[<p>Definitely the key generation algorithm is the major problem.  But the &#8220;birthday problem&#8221; tends to bite people when they calculate something like &#8220;the probability of a collision even with this shortcut is 10^(-18)&#8221; and think that&#8217;s good enough.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: main</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348228</link>
		<dc:creator>main</dc:creator>
		<pubDate>Thu, 16 Feb 2012 23:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348228</guid>
		<description>It&#039;s not clear from this whether it&#039;s a few certificates with very low entropy, or more certificates with only moderately low entropy.  Assuming it&#039;s the latter, Eve could use the certificate generating programs to generate many more certificates than are publicly available, and thus find more compromised public certificates.</description>
		<content:encoded><![CDATA[<p>It&#8217;s not clear from this whether it&#8217;s a few certificates with very low entropy, or more certificates with only moderately low entropy.  Assuming it&#8217;s the latter, Eve could use the certificate generating programs to generate many more certificates than are publicly available, and thus find more compromised public certificates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brit Cruise</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348215</link>
		<dc:creator>Brit Cruise</dc:creator>
		<pubDate>Thu, 16 Feb 2012 23:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348215</guid>
		<description>Hey I&#039;m working on a cinematic educational series which explains this in detail called &quot;Gambling with Secrets&quot; on YouTube. Check it out if interested:

www.youtube.com/artoftheproblem</description>
		<content:encoded><![CDATA[<p>Hey I&#8217;m working on a cinematic educational series which explains this in detail called &#8220;Gambling with Secrets&#8221; on YouTube. Check it out if interested:</p>
<p><a href="http://www.youtube.com/artoftheproblem" rel="nofollow">http://www.youtube.com/artoftheproblem</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jon winchester</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348084</link>
		<dc:creator>jon winchester</dc:creator>
		<pubDate>Thu, 16 Feb 2012 21:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348084</guid>
		<description>I like the illustration. Reminds me of this which I read as a kid... Gardner, M. &quot;Mathematical Recreations: The Remarkable Lore of the Prime Number.&quot; Sci. Amer. 210, 120-128, Mar. 1964. </description>
		<content:encoded><![CDATA[<p>I like the illustration. Reminds me of this which I read as a kid&#8230; Gardner, M. &#8220;Mathematical Recreations: The Remarkable Lore of the Prime Number.&#8221; Sci. Amer. 210, 120-128, Mar. 1964. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fleishman</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348061</link>
		<dc:creator>Glenn Fleishman</dc:creator>
		<pubDate>Thu, 16 Feb 2012 20:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348061</guid>
		<description>Excellent point. I changed it to &quot;selection&quot; as the issue is how primes are pulled out of the RNG, not how they distribute. </description>
		<content:encoded><![CDATA[<p>Excellent point. I changed it to &#8220;selection&#8221; as the issue is how primes are pulled out of the RNG, not how they distribute. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fleishman</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348060</link>
		<dc:creator>Glenn Fleishman</dc:creator>
		<pubDate>Thu, 16 Feb 2012 20:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348060</guid>
		<description>Grammar crisis averted! Fixed, and thanks.</description>
		<content:encoded><![CDATA[<p>Grammar crisis averted! Fixed, and thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Uznanski</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348055</link>
		<dc:creator>Dan Uznanski</dc:creator>
		<pubDate>Thu, 16 Feb 2012 20:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348055</guid>
		<description>Now compare this to factoring both 754872738416398741 and 759883073492568163, knowing that they have a factor in common.

Using the code I posted above, without any optimizations and in a language that isn&#039;t exactly known for speed, this task takes 3.75 microseconds.  For 1024-bit numbers it will take a few hundred times longer than that, which is still under a millisecond.

Using the best known prime factorization algorithm, simply factoring a 1024-bit number will take tens of millions times as long as your attempt.</description>
		<content:encoded><![CDATA[<p>Now compare this to factoring both 754872738416398741 and 759883073492568163, knowing that they have a factor in common.</p>
<p>Using the code I posted above, without any optimizations and in a language that isn&#8217;t exactly known for speed, this task takes 3.75 microseconds.  For 1024-bit numbers it will take a few hundred times longer than that, which is still under a millisecond.</p>
<p>Using the best known prime factorization algorithm, simply factoring a 1024-bit number will take tens of millions times as long as your attempt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fleishman</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348056</link>
		<dc:creator>Glenn Fleishman</dc:creator>
		<pubDate>Thu, 16 Feb 2012 20:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348056</guid>
		<description>It&#039;s not a fault as such. And the work is easily reproducible by anyone with a modest amount of interest who can scan all the public certificates in the world (which is easier than it sounds).</description>
		<content:encoded><![CDATA[<p>It&#8217;s not a fault as such. And the work is easily reproducible by anyone with a modest amount of interest who can scan all the public certificates in the world (which is easier than it sounds).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fleishman</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348057</link>
		<dc:creator>Glenn Fleishman</dc:creator>
		<pubDate>Thu, 16 Feb 2012 20:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348057</guid>
		<description>Now I get it! Thanks to you and Eric0142.</description>
		<content:encoded><![CDATA[<p>Now I get it! Thanks to you and Eric0142.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timquinn</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348035</link>
		<dc:creator>timquinn</dc:creator>
		<pubDate>Thu, 16 Feb 2012 20:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348035</guid>
		<description>Oh come on, you guys are overthinking this. The discoverers said they would not reveal the fault because it is too easy to take advantage.
 
My guess is that the random number generators are being fed the same seed and are therefore delivering the same &#039;random&#039; number to many requests. It has got to be this dumb for the developers to miss it to begin with.</description>
		<content:encoded><![CDATA[<p>Oh come on, you guys are overthinking this. The discoverers said they would not reveal the fault because it is too easy to take advantage.<br />
 <br />
My guess is that the random number generators are being fed the same seed and are therefore delivering the same &#8216;random&#8217; number to many requests. It has got to be this dumb for the developers to miss it to begin with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Jones</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348027</link>
		<dc:creator>Jim Jones</dc:creator>
		<pubDate>Thu, 16 Feb 2012 20:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348027</guid>
		<description>I decided to see how long factoring the 32 bit example above with the factor linux command line utility:

 :~$ time factor 754872738416398741
754872738416398741: 858599503 879190747

real    0m2.482s
user    0m2.480s
sys    0m0.000s

Yep, it took 2.482 seconds.
</description>
		<content:encoded><![CDATA[<p>I decided to see how long factoring the 32 bit example above with the factor linux command line utility:</p>
<p> :~$ time factor 754872738416398741<br />
754872738416398741: 858599503 879190747</p>
<p>real    0m2.482s<br />
user    0m2.480s<br />
sys    0m0.000s</p>
<p>Yep, it took 2.482 seconds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Halloween_Jack</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348002</link>
		<dc:creator>Halloween_Jack</dc:creator>
		<pubDate>Thu, 16 Feb 2012 19:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348002</guid>
		<description>So, in other words, &lt;a href=&quot;http://en.wikipedia.org/wiki/Sneakers_(film)&quot; rel=&quot;nofollow&quot;&gt;Sneakers&lt;/a&gt; for real, amirite?</description>
		<content:encoded><![CDATA[<p>So, in other words, <a href="http://en.wikipedia.org/wiki/Sneakers_(film)" rel="nofollow">Sneakers</a> for real, amirite?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Dow</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1348000</link>
		<dc:creator>Mark Dow</dc:creator>
		<pubDate>Thu, 16 Feb 2012 19:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1348000</guid>
		<description>This description cites &quot;a lack of disorder in the distribution of prime numbers&quot;, and implies this is the problem throughout. But my understanding is that the problem lies in selecting a large prime in a random way -- some primes are selected more frequently than others. So it is not a problem with how primes are spread out in the field of numbers (illustrated in the graphic), but a problem in one or more selection algorithms resulting in &quot;a lack of disorder in the distribution of prime numbers selected for use in encryption&quot;.</description>
		<content:encoded><![CDATA[<p>This description cites &#8220;a lack of disorder in the distribution of prime numbers&#8221;, and implies this is the problem throughout. But my understanding is that the problem lies in selecting a large prime in a random way &#8212; some primes are selected more frequently than others. So it is not a problem with how primes are spread out in the field of numbers (illustrated in the graphic), but a problem in one or more selection algorithms resulting in &#8220;a lack of disorder in the distribution of prime numbers selected for use in encryption&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nancy J Gill</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347996</link>
		<dc:creator>Nancy J Gill</dc:creator>
		<pubDate>Thu, 16 Feb 2012 19:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347996</guid>
		<description>Grammar alert: &quot;The weakness *effects* as many as 4 in 1,000 publicly available secured Web servers, but it appears in practice that few to no popular Web sites  are at risk.&quot; That should be AFFECTS.</description>
		<content:encoded><![CDATA[<p>Grammar alert: &#8220;The weakness *effects* as many as 4 in 1,000 publicly available secured Web servers, but it appears in practice that few to no popular Web sites  are at risk.&#8221; That should be AFFECTS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buddha Buck</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347973</link>
		<dc:creator>Buddha Buck</dc:creator>
		<pubDate>Thu, 16 Feb 2012 19:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347973</guid>
		<description>&quot;Birthday Problem&quot; is doubtful.  There&#039;s approximately 2^1013 primes with 1024 bits, which would imply a possible collision after generating over 2^500 key-pairs.</description>
		<content:encoded><![CDATA[<p>&#8220;Birthday Problem&#8221; is doubtful.  There&#8217;s approximately 2^1013 primes with 1024 bits, which would imply a possible collision after generating over 2^500 key-pairs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wysinwyg</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347972</link>
		<dc:creator>wysinwyg</dc:creator>
		<pubDate>Thu, 16 Feb 2012 19:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347972</guid>
		<description> Thanks for the explanation, Glenn, I saw a blurb on this yesterday but didn&#039;t have a chance to look into the details.  Very helpful.

And thanks everyone else for the stuff on the Euclidean algorithm.</description>
		<content:encoded><![CDATA[<p> Thanks for the explanation, Glenn, I saw a blurb on this yesterday but didn&#8217;t have a chance to look into the details.  Very helpful.</p>
<p>And thanks everyone else for the stuff on the Euclidean algorithm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: semiotix</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347966</link>
		<dc:creator>semiotix</dc:creator>
		<pubDate>Thu, 16 Feb 2012 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347966</guid>
		<description>I get around this by using primes so low that no one would think to check them. My public key is 21. Good luck factoring that, suckers! </description>
		<content:encoded><![CDATA[<p>I get around this by using primes so low that no one would think to check them. My public key is 21. Good luck factoring that, suckers! </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: taintofevil</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347962</link>
		<dc:creator>taintofevil</dc:creator>
		<pubDate>Thu, 16 Feb 2012 18:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347962</guid>
		<description>It seems like a mix of the &quot;Birthday Problem&quot; and poor key generation.  With N possible primes of particular size, a sample of some proportion of sqrt(N) is likely to have collisions.  Mostly though it looks like flaws in the key generation routines of things like routers.</description>
		<content:encoded><![CDATA[<p>It seems like a mix of the &#8220;Birthday Problem&#8221; and poor key generation.  With N possible primes of particular size, a sample of some proportion of sqrt(N) is likely to have collisions.  Mostly though it looks like flaws in the key generation routines of things like routers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Uznanski</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347957</link>
		<dc:creator>Dan Uznanski</dc:creator>
		<pubDate>Thu, 16 Feb 2012 18:41:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347957</guid>
		<description>Even if there isn&#039;t an abnormally long stretch of composites, there is always variation in the probability of generating a particular prime when doing it this way: if we&#039;re generating 3-digit primes, 907 will show up ten times as often as 883.</description>
		<content:encoded><![CDATA[<p>Even if there isn&#8217;t an abnormally long stretch of composites, there is always variation in the probability of generating a particular prime when doing it this way: if we&#8217;re generating 3-digit primes, 907 will show up ten times as often as 883.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buddha Buck</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347946</link>
		<dc:creator>Buddha Buck</dc:creator>
		<pubDate>Thu, 16 Feb 2012 18:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347946</guid>
		<description>You an extract the common factor using the Eucli... oh, someone said that already?

What I&#039;m interested in is how the same primes got &quot;randomly&quot; chosen in the first place.   

Primes are a lot more common than one might think, so a fairly common method to generating them is to pick a random number and start scanning from there (ex: at random, I chose 699, which isn&#039;t prime, but 701 is, or picking 104 to get the prime 107).  I wonder if there is an abnormally long stretch of composites in the middle of the common 1024-bit search space so the first prime greater than that gets picked more often than it should.</description>
		<content:encoded><![CDATA[<p>You an extract the common factor using the Eucli&#8230; oh, someone said that already?</p>
<p>What I&#8217;m interested in is how the same primes got &#8220;randomly&#8221; chosen in the first place.   </p>
<p>Primes are a lot more common than one might think, so a fairly common method to generating them is to pick a random number and start scanning from there (ex: at random, I chose 699, which isn&#8217;t prime, but 701 is, or picking 104 to get the prime 107).  I wonder if there is an abnormally long stretch of composites in the middle of the common 1024-bit search space so the first prime greater than that gets picked more often than it should.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric0142</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347921</link>
		<dc:creator>Eric0142</dc:creator>
		<pubDate>Thu, 16 Feb 2012 18:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347921</guid>
		<description>Say P and Q are both products of exactly two prime numbers. If by chance P = a*b, and Q = a*c, for a,b,c prime, then we can recover the factors given only the products P and Q.

How? The Euclidean algorithm for computing the greatest common divisor (gcd).

Why? The definition of the gcd of two integers (ie. gcd(P,Q)) is the largest integer which divides both P and Q. If the gcd is 1, then we say the numbers are relatively prime: they have no prime factors in common. If they did, then we could use that number to divide both and have a number larger than 1 that divided them both.

So here if P = a*b, and Q = a*c because a prime was reused, then gcd(P,Q) = a != 1. Because a will divided both P and Q. And since we know that P and Q are products of exactly two prime numbers, it must be the case that a is one of the prime factors (otherwise, we would have a number which divided a prime that wasn&#039;t 1 or the prime itself). And from there we can compute b = P/a, and c = Q/a. We know that P/a and Q/a will be integers because of the definition of the gcd (the value of the gcd must divide the arguments)

The procedure given above can compute the GCD using the Euclidean algorithm. It is very fast and &quot;the worst case behavior requires a number of steps that can never be more than five times the number of its digits (in base 10)&quot; (wikipedia). So even though 2048 bit integers are on the order of 10^600, it&#039;ll never take more than 10,000 arithmetic operations to compute the GCD. Even though it&#039;s working with large numbers, they get small very fast.</description>
		<content:encoded><![CDATA[<p>Say P and Q are both products of exactly two prime numbers. If by chance P = a*b, and Q = a*c, for a,b,c prime, then we can recover the factors given only the products P and Q.</p>
<p>How? The Euclidean algorithm for computing the greatest common divisor (gcd).</p>
<p>Why? The definition of the gcd of two integers (ie. gcd(P,Q)) is the largest integer which divides both P and Q. If the gcd is 1, then we say the numbers are relatively prime: they have no prime factors in common. If they did, then we could use that number to divide both and have a number larger than 1 that divided them both.</p>
<p>So here if P = a*b, and Q = a*c because a prime was reused, then gcd(P,Q) = a != 1. Because a will divided both P and Q. And since we know that P and Q are products of exactly two prime numbers, it must be the case that a is one of the prime factors (otherwise, we would have a number which divided a prime that wasn&#8217;t 1 or the prime itself). And from there we can compute b = P/a, and c = Q/a. We know that P/a and Q/a will be integers because of the definition of the gcd (the value of the gcd must divide the arguments)</p>
<p>The procedure given above can compute the GCD using the Euclidean algorithm. It is very fast and &#8220;the worst case behavior requires a number of steps that can never be more than five times the number of its digits (in base 10)&#8221; (wikipedia). So even though 2048 bit integers are on the order of 10^600, it&#8217;ll never take more than 10,000 arithmetic operations to compute the GCD. Even though it&#8217;s working with large numbers, they get small very fast.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Uznanski</title>
		<link>http://boingboing.net/2012/02/16/prime-suspect-or-random-acts.html#comment-1347916</link>
		<dc:creator>Dan Uznanski</dc:creator>
		<pubDate>Thu, 16 Feb 2012 18:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://boingboing.net/?p=144262#comment-1347916</guid>
		<description>I am a mathematician, so I can tell you how it works:

If two numbers share a prime factor, then a fraction of those two numbers can be reduced by that factor.

The usual way it&#039;s taught is that we have to find the prime factors first, but that&#039;s not true: we can use something called the Euclidean Algorithm, which is a lot faster and you don&#039;t have to find any primes.  Basically it goes like this.

If we have a fraction, say, 15/27, it&#039;s relatively obvious that its reciprocal (27/15) will be reducible by the same amount.  And the mixed number version of that (1 12/15) will, too, and the whole part of the mixed number doesn&#039;t matter when we try to reduce, so 12/15 will be reducible by the same amount.  Repeat this process (15/12 -&gt; 1 3/12 -&gt; 3/12 -&gt; 12/3 -&gt; 4)  and eventually the mixed number version will have no remainder!  When that happens, the denominator it would have (3) is the common factor between the numbers.

A lot of this though is just moving numbers around; the only actual arithmetic here is that we divide and get the remainder, an operation programmers call &quot;mod&quot; and use the symbol % to enact.

in python:

&lt;code&gt;def gcf(a, b):
  while b:
    a, b = b, a % b
  return a&lt;/code&gt;

27 % 15 = 12
15 % 12 = 3
12 % 3 = 0
common factor is 3.

Now, since we know that the keys are the product of two prime numbers, we know that their common factor is either 1, in which case they don&#039;t share anything, or one of those prime factors, in which case they share that factor, and simple division can find the other, compromising the private key.</description>
		<content:encoded><![CDATA[<p>I am a mathematician, so I can tell you how it works:</p>
<p>If two numbers share a prime factor, then a fraction of those two numbers can be reduced by that factor.</p>
<p>The usual way it&#8217;s taught is that we have to find the prime factors first, but that&#8217;s not true: we can use something called the Euclidean Algorithm, which is a lot faster and you don&#8217;t have to find any primes.  Basically it goes like this.</p>
<p>If we have a fraction, say, 15/27, it&#8217;s relatively obvious that its reciprocal (27/15) will be reducible by the same amount.  And the mixed number version of that (1 12/15) will, too, and the whole part of the mixed number doesn&#8217;t matter when we try to reduce, so 12/15 will be reducible by the same amount.  Repeat this process (15/12 -&gt; 1 3/12 -&gt; 3/12 -&gt; 12/3 -&gt; 4)  and eventually the mixed number version will have no remainder!  When that happens, the denominator it would have (3) is the common factor between the numbers.</p>
<p>A lot of this though is just moving numbers around; the only actual arithmetic here is that we divide and get the remainder, an operation programmers call &#8220;mod&#8221; and use the symbol % to enact.</p>
<p>in python:</p>
<p><code>def gcf(a, b):<br />
  while b:<br />
    a, b = b, a % b<br />
  return a</code></p>
<p>27 % 15 = 12<br />
15 % 12 = 3<br />
12 % 3 = 0<br />
common factor is 3.</p>
<p>Now, since we know that the keys are the product of two prime numbers, we know that their common factor is either 1, in which case they don&#8217;t share anything, or one of those prime factors, in which case they share that factor, and simple division can find the other, compromising the private key.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
