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.

Rpgp: Pure Rust implementation of OpenPGP

167 pointsby bpierreabout 1 year ago

8 comments

perlgeekabout 1 year ago
Given how much of a huge pain it was to use PGP &#x2F; gpg back in the days (for email encryption&#x2F;signatures, to be precise), it&#x27;s amazing how easy end-to-end encryption on Signal and Whatsapp is. And how it lacks that drama that somehow always surrounded GPG.<p>Is it really because trust on first use is good enough for most cases? Or is email somehow so much different than chat? Or was PGP the proof-of-concept, and current e2e encrypted platforms are the v1.0? Or all of the above? Did I miss anything important?
评论 #39964369 未加载
评论 #39964483 未加载
评论 #39966901 未加载
评论 #39966155 未加载
评论 #39964302 未加载
评论 #39964547 未加载
评论 #39965380 未加载
dale_glassabout 1 year ago
Ah, if only this was a thing a decade or two ago.<p>IMO, the way GPG was done killed what could have been a decent ecosystem. It&#x27;s a combination of two factors:<p>1. Don&#x27;t roll your own crypto.<p>2. The available code (gpg) is a colossal pain to use.<p>So for instance, how does something like KMail deal with gpg? There&#x27;s no libgpg originally. There&#x27;s just the gpg tool, so you&#x27;ve got to call it as a sub-process, and it really sucks:<p>1. You have to deal with process management, multiple filehandles, text parsing, non-trivial interactions, etc.<p>2. It&#x27;s slow. You pay startup costs every single time. This is a huge problem on something interactive like a mail client, and it&#x27;s dependent on things like the amount of keys in the gpg store.<p>3. gpg has very specific ideas about how it wants to be used, and not everything fits.<p>Say that you oh, want to do some stats on GPG keys. There&#x27;s no libgpg to just read an .asc file and get the list of signatures from that, no. You have to call gpg, feed it the key, parse the result. For some things you might actually have to have gpg import the key first. Manage a fake home dir for GPG. Deal with the horrible performance as the keystore grows. A million keys at a gpg invocation per second is going to be around 2 weeks.<p>Unfortunately it&#x27;s only now that gpg is effectively dead that the problem started to get fixed.<p>Also, at this point GPG is effectively a legacy technology anyway. Modern cryptographic thought considers GPG to be a terrible idea for a whole bunch of reasons that are deeply built into it, so the only solution for that is throwing it out.
评论 #39963155 未加载
评论 #39963940 未加载
评论 #39964054 未加载
评论 #39969800 未加载
评论 #39963965 未加载
评论 #39964487 未加载
dignifiedquireabout 1 year ago
hey, author here, happy to answer questions, and would love to hear from anyone using the library :)
评论 #39963090 未加载
评论 #39963069 未加载
fanf2about 1 year ago
How does rpgp compare with Sequoia? <a href="https:&#x2F;&#x2F;sequoia-pgp.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sequoia-pgp.org&#x2F;</a>
评论 #39970954 未加载
woodruffwabout 1 year ago
Edit: The comment below is incorrect. I&#x27;m leaving it for transparency, but I misread where the padding is being applied.<p>I could be missing something here, but I think this is vulnerable to DO&#x27;1985, a&#x2F;k&#x2F;a Desmedt-Odlyzko:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;rpgp&#x2F;rpgp&#x2F;blob&#x2F;8e67756ebce780c91b8c2ffc7db1f6230f8a9419&#x2F;src&#x2F;crypto&#x2F;rsa.rs#L172-L178">https:&#x2F;&#x2F;github.com&#x2F;rpgp&#x2F;rpgp&#x2F;blob&#x2F;8e67756ebce780c91b8c2ffc7d...</a><p>In particular, in the presence of an insufficiently wide hash, the absence of padding here means that RSA signature validation is not secure under EUF-CMA. Matt Green has a great post on why and when EUF-CMA matters[1].<p>(This isn&#x27;t necessarily this implementation&#x27;s fault, since PGP seemingly (!) encourages the stripping of padding from signatures. But I can&#x27;t find another source for whether this is actually encouraged by OpenPGP, or whether implementations just widely allow it.)<p>[1]: <a href="https:&#x2F;&#x2F;blog.cryptographyengineering.com&#x2F;euf-cma-and-suf-cma&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.cryptographyengineering.com&#x2F;euf-cma-and-suf-cma...</a>
评论 #39963222 未加载
评论 #39964666 未加载
upofadownabout 1 year ago
GnuPG has by default started emitting keypairs with a preference for the LibrePGP version of the OCB block cipher mode. That mode is not compatible with what the other faction is doing and is not generally supported in any case. Arch[1] and other distributions have apparently patched this default out.<p>Is Rpgp emitting any new block cipher modes or generating keys that might cause such emission in the future? The risk here is a sort of incompatibility nightmare where decryption becomes a crap shoot.<p>My article on this mess:<p><a href="https:&#x2F;&#x2F;articles.59.ca&#x2F;doku.php?id=pgpfan:schism" rel="nofollow">https:&#x2F;&#x2F;articles.59.ca&#x2F;doku.php?id=pgpfan:schism</a><p>[1] <a href="https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;GnuPG#Disable_unsupported_AEAD_mechanism" rel="nofollow">https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;GnuPG#Disable_unsupported_A...</a>
评论 #39967359 未加载
评论 #39966975 未加载
评论 #39965431 未加载
wiktor-kabout 1 year ago
Rpgp is great (we&#x27;re currently using it for a better git signer with smartcards) but I wonder why is it trending right now at HN? Maybe because it&#x27;s currently #1 in the test suite? <a href="https:&#x2F;&#x2F;tests.sequoia-pgp.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tests.sequoia-pgp.org&#x2F;</a>
评论 #39963370 未加载
评论 #39964491 未加载
karma_pharmerabout 1 year ago
This uses a flawed RSA implementation which is vulnerable to timing attacks:<p><a href="https:&#x2F;&#x2F;deps.rs&#x2F;repo&#x2F;github&#x2F;rpgp&#x2F;rpgp#vulnerabilities" rel="nofollow">https:&#x2F;&#x2F;deps.rs&#x2F;repo&#x2F;github&#x2F;rpgp&#x2F;rpgp#vulnerabilities</a><p>There is a reason why crypto primitives handling key material -- especially RSA and AES -- are not written in higher-level languages.
评论 #39964585 未加载
评论 #39965525 未加载
评论 #39964670 未加载
评论 #39964661 未加载