I spent a good chunk of this past week building a python library to manage PGP MIME email, as specified in RFC3156. Martin and I have been tossing around ideas for better user interfaces around PGP, and while we’re still figuring out a lot of things, it became clear that this was something we’d need.
It’s a straightforward wrapper around python-gnupg, which just adds
support for doing signing, verification, encryption, and decryption.
python-gnupg is reasonably well documented, and I intend to maintain a
similar standard for
There’s another package pgp-mime, which supposedly supports the same functionality, but I found the docs unsatisfactory, and it doesn’t look like it’s been maintained for a few years. Also, frankly, I didn’t even bother to look for other libraries until I was pretty far into the project, for two reasons:
- I’ve seen enough different mail clients roll their own support for this that I just assumed there was nothing good out there (my library borrows some code from alot).
- It’s such a small thing that I didn’t feel the need to do a lot of research before undertaking it.
It’s still a bit sloppy, but it’s coming together.