TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

An Almost-Secret Algorithm Researchers Used to Break Thousands of RSA Keys

420 pointsby williamkuszmaulover 6 years ago

16 comments

schoenover 6 years ago
This describes research published in 2012 by Arjen Lenstra et al. (<a href="https:&#x2F;&#x2F;eprint.iacr.org&#x2F;2012&#x2F;064.pdf" rel="nofollow">https:&#x2F;&#x2F;eprint.iacr.org&#x2F;2012&#x2F;064.pdf</a>), which relied on a scalable n-way GCD algorithm that Lenstra&#x27;s team thought best not to explain to readers (in the hope that the attack wouldn&#x27;t be quickly replicated for malicious purposes). Coincidentally, another team (Nadia Heninger et al., <a href="https:&#x2F;&#x2F;factorable.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;factorable.net&#x2F;</a>) published extremely similar research in a similar timeframe, without withholding details of that team&#x27;s GCD calculation approach.<p>The Heninger et al. paper explains quite a lot about where the underlying problems came from, most often inadequately seeded PRNGs in embedded devices. As the linked article mentions, other subsequent papers have also analyzed variants of this technique and so there&#x27;s not much secret left about it.<p>If people are interested in learning about the impact of common factors on the security of RSA, I created a puzzle based on this which you can try out, which also includes an explanation of the issue for programmers who are less familiar with the mathematical context: <a href="http:&#x2F;&#x2F;www.loyalty.org&#x2F;~schoen&#x2F;rsa&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.loyalty.org&#x2F;~schoen&#x2F;rsa&#x2F;</a><p>Notably, my puzzle uses a small set of keys so you can do &quot;easy&quot; pairwise GCD calculations rather than needing an efficient n-way algorithm as described here (which becomes increasingly relevant as the number of keys in question grows).
评论 #18916600 未加载
评论 #18920873 未加载
评论 #18917730 未加载
phwover 6 years ago
This idea has since been applied to several other domains. Last year we had a look at all archived RSA keys of Tor relays: <a href="https:&#x2F;&#x2F;nymity.ch&#x2F;anomalous-tor-keys&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nymity.ch&#x2F;anomalous-tor-keys&#x2F;</a><p>We found that several thousand relays that shared prime factors (most part of a research project), ten relays shared moduli, and 122 relays used a non-standard RSA exponent, presumably in an attempt to manipulate the Tor network&#x27;s distributed hash table, which powers onion services.
lipnitskover 6 years ago
Another group did a talk on this at DEF CON 26 last year: <a href="https:&#x2F;&#x2F;research.kudelskisecurity.com&#x2F;2018&#x2F;08&#x2F;16&#x2F;breaking-and-reaping-keys-updated-slides-and-resources&#x2F;" rel="nofollow">https:&#x2F;&#x2F;research.kudelskisecurity.com&#x2F;2018&#x2F;08&#x2F;16&#x2F;breaking-an...</a><p>They analyzed over 340 million keys from the web.<p>&gt; As part of the presentation given at DEF CON 26, one of the outputs was Kudelski Security’s Keylookup application. On this site, you can submit your own public keys and have them tested against our dataset. We will let you know if your key is vulnerable to Batch GCD and ROCA attacks. If your key is in our database, we will be able to give you an answer immediately, if it is not, you may have to wait a bit until the tests complete.<p>&gt; <a href="https:&#x2F;&#x2F;keylookup.kudelskisecurity.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;keylookup.kudelskisecurity.com&#x2F;</a>
评论 #18915996 未加载
truantbuickover 6 years ago
What are the characteristics of those who generated an RSA key sharing a prime factor? Can they be linked back to a few bad CSPRNG implementations?<p>What are practical steps to be responsible about it?<p>It&#x27;s contrived, but I just imagine that if I&#x27;m generating some particularly important keys, that I should somehow find a way to give &#x2F;dev&#x2F;urandom a kick of some kind. Even if that were possible, it&#x27;s more likely to make things worse than better. Still, it makes me a little paranoid to even hear about theoretical weaknesses -- especially like collision attacks. I have no idea how long it takes for the CSPRNG to get properly seeded. Does it take a microsecond after booting? 10 minutes? A day?
评论 #18915866 未加载
评论 #18915834 未加载
jMylesover 6 years ago
A lot of people over the years have gotten the message that &quot;use &#x2F;dev&#x2F;urandom and forget about it&quot; is the final, end-all, be-all for secure random number generation.<p>In fact, this ideology (and that&#x27;s what it is - an ideology) has been trumpeted right here on HN, in some cases by people who repeatedly seem to comment on topics that they don&#x27;t fully understand. Security is hard, but there&#x27;s also a high reputational value on being perceived as an authority on the topic. As a result, there are some nuggets of &quot;wisdom&quot; that require asterisks next to them, including this one.<p>Even though &quot;just use &#x2F;dev&#x2F;urandom&quot; is <i>almost always</i> true, it isn&#x27;t <i>always</i> true. In fact, the universe of cases where some form of blocking entropy is needed (and again, this is a very tiny set) is growing, not shrinking.<p><a href="https:&#x2F;&#x2F;security.stackexchange.com&#x2F;questions&#x2F;186086&#x2F;is-always-use-dev-urandom-still-good-advice-in-an-age-of-containers-and-isola" rel="nofollow">https:&#x2F;&#x2F;security.stackexchange.com&#x2F;questions&#x2F;186086&#x2F;is-alway...</a>
评论 #18916084 未加载
评论 #18916012 未加载
评论 #18929270 未加载
cbhlover 6 years ago
PuTTYgen, being a Windows application, assumes that a mouse is connected and prompts the user to move the mouse to generate entropy during key creation.<p>By comparison, ssh-keygen documents the SSH_USE_STRONG_RNG environment variable -- but then recommends against its use (!) since it can cause key generation &quot;to be blocked until enough entropy is available&quot;.
评论 #18916462 未加载
userbinatorover 6 years ago
IMO a bit clickbaity of a title --- I thought there was a recent breakthrough in integer factorisation, when in fact this is really attributable to insufficient randomness.
评论 #18918066 未加载
gtsteveover 6 years ago
On this topic, I recall reading earlier computers (of the 80s) used radio tuners tuned into nothing to generate random numbers. Of course, you need some way to randomly choose the frequency but then what comes out should be pretty unpredictable.<p>I believe Random.org uses an approach similar to this. What is so special about this approach that we couldn&#x27;t install it as a card in a desktop for example?
评论 #18916818 未加载
评论 #18917610 未加载
daedalus2027over 6 years ago
hi, I attempted to recreate the algorithm in the post:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;daedalus&#x2F;misc&#x2F;blob&#x2F;master&#x2F;testQuasiLinearGCD.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;daedalus&#x2F;misc&#x2F;blob&#x2F;master&#x2F;testQuasiLinear...</a>
sempron64over 6 years ago
This is very interesting. I wonder what key generators were used to create the insecure keys.
评论 #18914481 未加载
sublupoover 6 years ago
&gt; The authors hint in a footnote that at the heart of their computation is an asymptotically fast algorithm, allowing them to bring the running time of the computation down to nearly linear; but the actual description of the algorithm is kept a secret from the reader<p>How could something like that pass peer review? Their claim is effectively unable to be reproduced.
评论 #18927682 未加载
评论 #18921706 未加载
评论 #18923026 未加载
评论 #18922104 未加载
slikenover 6 years ago
Anyone know of a service (<a href="https:&#x2F;&#x2F;factorable.net&#x2F;keycheck.html" rel="nofollow">https:&#x2F;&#x2F;factorable.net&#x2F;keycheck.html</a> was discontinued) or code that would help identify particularly weak keys?
评论 #18919355 未加载
评论 #18919423 未加载
incompatibleover 6 years ago
Could you use a similar idea to go after bitcoin keys? If so, you may not be able to crack any particular key, but you could steal the bitcoins from the ones you did crack.
评论 #18916931 未加载
评论 #18916546 未加载
评论 #18917385 未加载
skookumchuckover 6 years ago
After decades of problems with seeding RNGs, why isn&#x27;t there a electronic circuit that gets a seed from quantum noise or something like that? The circuit could be part of the CPU or support chips.<p>After all, amplifiers are always trying to increase the signal&#x2F;noise, and the basis of the reliability of digital circuits is avoiding the noise. Instead, a circuit can amplify the noise and sample it.
评论 #18922049 未加载
betolinkover 6 years ago
I don&#x27;t know why this is still a problem these days, let&#x27;s just use lava lamps for entropy: <a href="https:&#x2F;&#x2F;blog.cloudflare.com&#x2F;lavarand-in-production-the-nitty-gritty-technical-details&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.cloudflare.com&#x2F;lavarand-in-production-the-nitty...</a>
zdeover 6 years ago
&gt; But since they both used the same program to generate random prime numbers, there’s a higher-than-random chance that their public keys share a prime factor<p>BS