140 points · by e1ven · 12y ago · 48 comments
It baffles me that nobody has instead picked up the challenge of taking the PGP/GPG cryptosystem and making it more usable. That seems like an incredibly valuable project that also makes great use of the skills of the sorts of people that tend to want to work on privacy software.
Paradoxically, the more you know about crypto, the less inclined you usually are to build new crypto.
1) GPG is -terrible- to use as a library.
There are a lot of wrappers for various languages. Almost most all of them call the gpg executable, and scrape it's input. This is crazy-town loony-toons.
In theory, gpgme is supposed to be the solution.. But gpgme ends up calling the binary itself in many cases!
2) GPG assumes you want to use the whole ecosystem.
GPG is sort of a mega-framework. It assumes you want to do everything the GPG way - Use gpg subkeys, keyservers, WOT, Import keys to a central keychain, etc.
I've been able to go through with options flags and disable things I don't want, but it's all opt-out, not opt-in.
3) Because of 1 and 2, you can't run GPG entirely in memory. It writes a lot of files to the filesystem.. I've been bypassing this by running in ramdisks with ephemeral directories, but it's a PITA.
4) 2.1 has been in the works.. FOREVER.
The first betas of gpg 2.1 were in 2010.. I understand they want to get this right, but that's a really really really log dev-cycle. I donated to the crowdfunding, and I hope it helps get gpg out sooner.
GPG 2.1 is the first stable gpg release that includes ECC support (specifically, DJB's 25519). This is a really really big feature, that a lot of people have been waiting for.
In any event, I like GPG, and I'm using GPG because it's been hardened, and I'm not smart enough to do my own crypto.
But GPG doesn't make itself easy to integrate.
It is true that libraries call the gpg binary. This is a feature, not a bug. This architecture makes bugs in the applications less likely to affect the gpg code / data. For instance, it's a lot harder to dump the variable containing the secret key if it is in another process.
The wrappers don't scrape the output. There is a well-defined protocol for interacting with the binary.
When I look at the code that calls the GPG binary, in the python lb at https://code.google.com/p/python-gnupg/ it seems to be reading/writing stdout/stdin. It doesn't appear to be using a socket connection, or any other non-typical way of accessing it.
return Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) def _read_response(self, stream, result): Internal method: reads all the stderr output from GPG, taking notice # only of lines that begin with the magic [GNUPG:] prefix. etc
In trying to gpg in my apps, having a library which lets me generate a pgp key in memory, read it in to a string, write it out to a string, and sign/encrypt strings or binaries would be optimal.
I don't want to have to worry about where the .gnupg home directory is being created.. I don't want any files stored. I don't want to access any keyservers, I'm doing all the key verification through other channels.
Essentially, I'd like to be able to use GPG more like NaCL/Libsodium.
> In theory, gpgme is supposed to be the solution.. But gpgme ends up calling the binary itself in many cases!
I've heard of this many times, but is there a good reason behind this? Are there extra security considerations behind making this a shared library? Is it just "not the focus of development" much in the same way that changing the GIMP UI was always "off the table" for the longest time because the devs didn't want to do it?
Tech Giants spend more money choosing the color of blue than they ever donate, and they seldom hire people to contribute code back upstream. :/
I am trying to dumb it down. But that means the system may lose its flexibility as the existing gnupg command line tools. Also what I want to do is kind of building some systems on top of pgp's cryptography framework. So end users will not touch gnupg directly.
For example, it can be a file sharing system that uses pgp cryptography framework and a centralized private hkps key server. A user only knows to lock/unlock a data file with a key. They may generate keys all the time or used the same keys. Or share the keys to other people in the system.
I don't will it work or not. It is just some reflections and attempts after using gnupg in current day job and I am trying to express the idea in a prototype.
https://github.com/abemassry/wsend-gpg
Check it out and contact me
I think I installed it once, and then when my machine required rebuilding, I just couldn't bring myself to install it again.
I wish it weren't so, but a new website is not something that is going to speed the adoption of GnuPG.
The integration with Emacs mail clients is fantastic too; just M-x mml-secure-sign or M-x mml-secure-encrypt when composing, and incoming messages with signatures are typically checked for you.
This totally changed the way I used GPG. (from "not at all" to "every day")
In all honesty, however, part of the "difficulty" of GPG is really by design. You need to be deliberate about signing and encrypting because security should be a careful and deliberate act. If you're hoping for the program to take care of it transparently, you're probably not being safe enough. At least Emacs requires you to go through an explicit process. As you have to do with everything in Emacs.
Why? You don't have to be 'deliberate' about encrypting when you're using SSH or HTTPS.
http://goteo.org/project/gnupg-new-website-and-infrastructure/needs
They are looking for funding to:- Release GnuPG 2.1 - Create a new web site
According to the descriptions, the new web site is not only about a new theme, but also about creating and collecting content that explains how to use GnuPG and encryption, in general.
http://goteo.org/project/gnupg-new-website-and-infrastructur...
Of course, that would mean Google has no means of directing ads based on content so they would have no incentive to run Gmail in the first place...