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.

Seriously, Stop Using RSA (2019)

163 pointsby goranmoominabout 3 years ago

19 comments

danenaniaabout 3 years ago
EnvKey[1] moved from OpenPGP (RSA) to NaCl[2] for its v2, which recently launched.<p>It’s causing a difficult migration for our v1 users. Moving to a new encryption scheme is <i>not fun</i> for a product with client-side end-to-end encryption.<p>But within a year or so of releasing the v1, it seemed like the writing was on the wall for OpenPGP and RSA. I didn&#x27;t want to go down with a dying standard.<p>NaCl is <i>so much better</i>. In spite of the migration headaches that will likely cost us some users, I&#x27;m very happy I made this decision. It&#x27;s so much faster, lighter, and more intuitive.<p>It’s legitimately fun to work with, which I never thought I’d say about an encryption library after cutting my teeth on OpenPGP.<p>1 - <a href="https:&#x2F;&#x2F;github.com&#x2F;envkey&#x2F;envkey" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;envkey&#x2F;envkey</a><p>2 - <a href="https:&#x2F;&#x2F;nacl.cr.yp.to" rel="nofollow">https:&#x2F;&#x2F;nacl.cr.yp.to</a>
评论 #30887666 未加载
评论 #30886574 未加载
jchookabout 3 years ago
Sounds like the author would agree it&#x27;s fine to use RSA, so long as you use an audited library with a well-designed API that makes it easy to do the right thing, and hard to do the wrong thing.<p>This makes me wonder, if we have an RSA library as good as libsodium, is ECC really a better choice than RSA?<p>I love libsodium and tend to choose it, but ECC seems far more mysterious to me than RSA. Curve25519 is much newer, has more parameters, and could potentially have a backdoor (like it&#x27;s precursor, P-256). It also has much smaller, fixed-size keys.<p>RSA by comparison is elegant and simple to understand, with only one parameter. It&#x27;s been in wide use since the 1970s. You can choose the key size.
评论 #30883732 未加载
评论 #30883938 未加载
评论 #30885354 未加载
评论 #30885021 未加载
评论 #30883668 未加载
评论 #30883642 未加载
评论 #30883347 未加载
frostburgabout 3 years ago
This is all true, but reads funny to me because I&#x27;ve implemented an intentionally vulnerable version of RSA and still had issues getting timing attacks to work on modern hardware (due to lack of sophistication in my approach, I think).
评论 #30882281 未加载
siviziusabout 3 years ago
RSA is bad, because developers do not implement it as specified and ECC is good, because most developers will not implement it themself, because they do not understand ECC and therefor use libraries? IMHO a huge advantage of RSA over ECC is it is easy to explain. After you have explained the different kinds of elliptic curves and their pitfalls, you have to explain the integrated encryption scheme to actually use it for encryption. But ok, you want hybrid encryption with RSA too, but in theory, you do not have to.
评论 #30882894 未加载
upofadownabout 3 years ago
Here is a nice discussion of what happens when you don&#x27;t validate your elliptic curve parameters properly:<p>* <a href="https:&#x2F;&#x2F;research.nccgroup.com&#x2F;2021&#x2F;11&#x2F;18&#x2F;an-illustrated-guide-to-elliptic-curve-cryptography-validation&#x2F;" rel="nofollow">https:&#x2F;&#x2F;research.nccgroup.com&#x2F;2021&#x2F;11&#x2F;18&#x2F;an-illustrated-guid...</a><p>The highlight here is that in some cases, failure to properly validate gets an attacker the secret key material.<p>Note all the conditional bits. Different curves have different properties and different issues. There are a bunch of different curves in common use while RSA pretty much always uses the same value for the parameter these days (RSA literally has just one parameter. The exponent.).
评论 #30882934 未加载
评论 #30882790 未加载
评论 #30882984 未加载
armchairhackerabout 3 years ago
“RSA is bad because developers often don’t implement it correctly, leading to vulnerabilities. Instead, use ECC, which can also be implemented incorrectly, but developers tend to do this less.”<p>The article raises some good points, but it really explains why you shouldn’t use your own RSA or an unaudited third-party library. A good RSA implementation which has been audited by security experts and doesn’t take shortcuts for performance would alleviate the OP’s concerns.
评论 #30882725 未加载
评论 #30881878 未加载
评论 #30881948 未加载
评论 #30883486 未加载
评论 #30882990 未加载
kuharichabout 3 years ago
Past comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20381779" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20381779</a>
stevenjgarnerabout 3 years ago
&#x27;&quot;Seriously, Stop Using RSA&quot; for Dummies&#x27; please!<p>e.g. for a fullstacker who spins up the latest Ubuntu LTS then generates a pair of 4,096-bit RSA keys using default openssh-server set over a high-number TCP port, what should they be doing that is different?
评论 #30882972 未加载
motohagiographyabout 3 years ago
Just to say, understanding the complexity of the topic they are discussing, this is one of the finest pieces of writing I have ever read. If you can express this issue clearly, you can express anything clearly, imo.
badrabbitabout 3 years ago
Isn&#x27;t RSA the best assymmetric crypto system for when you do need that? I mean, I get it for signatures, key exchange and data encryption it should be avoided but what else is there for symmetric key encryption such as how S&#x2F;MIME uses it for example. I always thought RSA+OAEP with &gt;= 4096 bits was an acceptable way to encrypt symmetric key material for transport.<p>I only know of PGP as the alternative which isn&#x27;t well supported in many environments (especially commercial).
评论 #30886346 未加载
throwaway81523about 3 years ago
Article is from 2016. It is a good article, but why does it say OAEP is notoriously difficult to implement? OAEP seemed very natural to me, and I &quot;invented&quot; it myself (long after it was well known to others, of course), i.e. the ideas in it weren&#x27;t complicated. Am I missing something dumb?<p>I do remember hearing that Victor Shoup found some kind of bug in the security proof, but it wasn&#x27;t something of practical concern.
iofiiiiiiiiiabout 3 years ago
I have a vague understanding that it is not so easy to encrypt data with ECC as it is with RSA. Is that true? This is one reason I still use RSA. What is the right way to use an ECC public key to encrypt data so only the holder of the private key can decrypt it? (Without any fancy key exchange - just fire and forget, email style)
retrocryptidabout 3 years ago
meh. dude seems to be conflating &quot;don&#x27;t use RSA&quot; with &quot;don&#x27;t roll your own crypto.&quot;<p>If we are to believe Scott Vanstone, ECC has security proofs that RSA doesn&#x27;t. And I found Scott was a pretty trustworthy guy.<p>So the OP has a point. It&#x27;s probably easier to mess up RSA then ECC. But it&#x27;s not easy to not mess up ECC, so maybe the title should have been &quot;for the love of god, don&#x27;t roll your own crypto.&quot;<p>Maybe look at NTRU. It&#x27;s supposedly quantum resistant, so that&#x27;s a plus. But for the love of god maybe don&#x27;t roll your own.<p>I contributed to two and a half commercial implementations of RSA and I still got Bob Baldwin to review my code. Bob was hip-deep in crypto research and knew how to avoid even obscure bugs.<p>I miss Scott and Bob.<p>Also... I&#x27;m using the term &quot;Crypto&quot; to mean &quot;Cryptography&quot; and not a solution in search of a problem crypto-currency.<p>Still. Don&#x27;t roll yer own crypto.
评论 #30885887 未加载
aborsyabout 3 years ago
There is a menu of ECC algorithms out there. We have seen some of them were backdoored, and there are probably more of those.<p>If you aren’t sure which ones are safe, it might be better to use RSA from a standard source (OpenSSL, PGP, SSH etc).<p>Users don’t implement algorithms, and don’t cares if they are hard to program.
评论 #30884720 未加载
gleennabout 3 years ago
Is there any new concern that Curve25519 has been backdoored by the NSA? It looks like P-256 did a long time ago, and reading the Wikipedia article doesn&#x27;t give that impression, wanted to check though.
评论 #30882278 未加载
评论 #30885123 未加载
评论 #30882772 未加载
cantrevealnameabout 3 years ago
There&#x27;s an extremely interesting rebuttal that appears as a comment in the original article. I&#x27;m going to quote it below for the benefit of HN readers.<p>&#x2F;QUOTE<p>Bob, February 28, 2020 at 12:15<p>KEEP USING RSA!<p>This article is misleading to make it appear that RSA is not secure, but only the only evidence presented is improper implementation.<p>Properly implemented RSA has been proven secure and unbreakable by the NSA with case studies such as Snowden, Lavabit, dark markets, and ECC is much harder to properly implement than RSA.<p>The NSA has been pushing ECC because their quantum chips can break it easily. D-Wave, Google, Alibaba, and others already have quantum chips. The disinformation agents claim that “quantum computers don’t exist” which is true because nobody uses a computer to break crypto, they use specialized custom chips.<p>All ECC (X25519-P521) will be broken by private sector quantum chips before RSA-2048 due to the physical limitations of stabilizing qubits.<p>The people making false claims against RSA are either being paid or they are useful idiots.<p>&#x2F;END-QUOTE
评论 #30886700 未加载
评论 #30885864 未加载
评论 #30885425 未加载
评论 #30885382 未加载
kupopuffsabout 3 years ago
ARe there even any valid reasons for implementing your own ?
cammikebrownabout 3 years ago
Does OpenPGP use RSA?
评论 #30882718 未加载
gweinbergabout 3 years ago
1) Post needs a &quot;2019&quot;. 2) Best comment inside was from Philip Zimmermann: &quot;I agree. This is why I switched to El Gamal as the default algorithm for PGP version 5 in the late 1990s.&quot;
评论 #30882994 未加载