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.

Off-by-One: The Curious Case of 2047-Bit RSA Keys (2019)

48 pointsby oedmarapabout 4 years ago

7 comments

sec400about 4 years ago
On the included estimations of the frequency that this occurs. I scraped a collection of (mainly developer) public keys for a previous project and got the following numbers.<p><pre><code> sqlite&gt; select count(*) from keys; 1627715 </code></pre> Quite a difference between the ratio of 2047&#x2F;2048 bit keys and 1023&#x2F;1024 bit keys.<p><pre><code> sqlite&gt; select count(*) from keys where strength = &quot;2048&quot;; 936441 sqlite&gt; select count(*) from keys where strength = &quot;2047&quot;; 466 sqlite&gt; select count(*) from keys where strength = &quot;1024&quot;; 39068 sqlite&gt; select count(*) from keys where strength = &quot;1023&quot;; 5908 </code></pre> Interestingly also:<p><pre><code> sqlite&gt; select count(*) from keys where strength = &quot;2049&quot;; 13 sqlite&gt; select count(*) from keys where strength = &quot;2050&quot;; 5 sqlite&gt; select count(*) from keys where strength = &quot;2051&quot;; 1 sqlite&gt; select count(*) from keys where strength = &quot;2052&quot;; 0</code></pre>
评论 #26922758 未加载
hinkleyabout 4 years ago
The whole point of the long keys is the search space, isn’t it? If the leading bit has to be 1 then effectively you have a 2047 bit key either way. 1 followed by 2047 random-looking bits.
评论 #26921592 未加载
评论 #26920671 未加载
评论 #26921458 未加载
bmurray7jhuabout 4 years ago
NIST is considering &quot;resistance to misuse&quot; when assessing post-quantum crypto schemes.<p><pre><code> A final desirable, although ill-defined, property is resistance to misuse. Schemes should ideally not fail catastrophically due to isolated coding errors, random number generator malfunctions, nonce reuse, keypair reuse... </code></pre> <a href="https:&#x2F;&#x2F;csrc.nist.gov&#x2F;CSRC&#x2F;media&#x2F;Projects&#x2F;Post-Quantum-Cryptography&#x2F;documents&#x2F;call-for-proposals-final-dec-2016.pdf" rel="nofollow">https:&#x2F;&#x2F;csrc.nist.gov&#x2F;CSRC&#x2F;media&#x2F;Projects&#x2F;Post-Quantum-Crypt...</a>
superkuhabout 4 years ago
The most shocking part of this article is that 1800 bit rsa keys are significantly stronger than 2048 bit keys and that there are discontinuities in toughness at base 10 numbers like 1000 and 2000 bits.
评论 #26922692 未加载
diebeforei485about 4 years ago
&gt; Why not roll the dice on the full interval and check the product after the fact? See earlier point about the time-consuming nature of RSA key generation. Starting over from scratch is expensive.<p>They lose a bit of entropy by pre-setting the leading bit to 1.<p>There have been discussions about this in the past - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19374758" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19374758</a>
userbinatorabout 4 years ago
One bit theoretically means it halves the possibilities, but in practice there&#x27;s so many in the absolute sense that there&#x27;s no practical difference in security.
usr1106about 4 years ago
Edit: ignore this. I might need new reading glasses...<p>article mentions a CSR containing a private key. Isn&#x27;t that a absolute no no? CSRs you send around, but private keys should never leave your machine. Where machine could even he a hardware token in the ideal case. Confused.
评论 #26921863 未加载