> The GnuPG folks eventually realized that, and released GPGME. GPGME is
> basically the GnuPG application compiled into a library. This certainly makes
> it easier for desktop applications to tie into GnuPG, but it still requires the
> ability to build the GnuPG application for your target. Because GnuPG is quite
> large, not particularly modular, and designed for a POSIX build environment,
> this still isn’t the best answer for embedding PGP functionality in small
> devices.To me, the whole idea of wrapping an executable with a library is completely backwards. The executable should do nothing but provide a command-line interface to a library.
I think there is definitely room for a reimplementation of gnupg inverted in this sense (similar to how libgit2[1] is currently reimplmenting git).
your other point is also not that convincing. smallish binaries usually have a very clear api. they can be called from every programming language without much effort.
coming back to pgp: you usually do not parse the same message over and over again. so you do not need to have any shared state for caching between calls to that executable.
What's needed is actual good implementations of the clients. That's all really. The command line client is not perfect but its FINE. It's fast, it works, it does what it says.
The other clients sucks hairy balls.
People also fail to realize that to date, the PGP trust model is the only freaking viable trust model, because it's distributed, free, and the trust choice is up to the _user_ (and it happens to also have been around for more than a decade, that never hurts).
There's actual implementations of PGP/GPG for website authentication and transport encryption. There's implementations for package signing that _actually_ make use of the trust model (www.archlinux.org).
There's PGP SmartCards that are _way_ more secure than this little OTP token in your pocket, and it works for SSH too. But wait, there's more. It works for SSH authentication _using_ the trust model too (web.monkeysphere.info).
Oh, and last but not least GPG supports ECDSA, too. All this to say that PGP and the GnuPG implementation have a huge, underexploited potential, and that's probably due to ignorance.
You disappoint me.
Either read the article and comment on it, or don't read it and avoid commenting.
As an example GPG saves its keys in a file. What if you want to put them in a database? Does GPGME allow a developer to do this?
"Does gpg allow you to export and import keys?"
Based on the comment below it seems my sarchasm was not evident. I should have written:
"Are you asking if gpg can import or export keys?"
Export a public key: gpg --export -a "UserName" > public.key
Export a private key: gpg --export-secret-key -a "UserName" > private.key
Import a public key: gpg --import public.key
Import a private key: gpg --allow-secret-key-import --import private.key
I've been looking for those. I can only find one from g10code / kernelconcepts.de - which is fine, but is exactly ONE vendor. The other one I found is the Yubikey NEO - less than two month old, and sold out for the next 2 months at least. Are there any other implementations that I'm missing? (Don't get me wrong - I've ordered from kernelconcepts before. But I don't like to be dependent on a single vendor)
> Oh, and last but not least GPG supports ECDSA, too.
True. Do you know if the PGPcard standard is supposed to be updated to support ECDSA too? Some standard require signing or encryption keys to be in an independent hardware module.
But if you need to do gpg compatible crypto use the python wrapper for gpgme:
pygpgme exposes the gpgme library to Python. The product was started by
James Henstridge. Beside Python2 it supports Python 3 since v0.3 (March
2012). The wrapping is done using python's C interface directly without
using a generator tool like SWIG.[3]
[1] http://www.keyczar.org
"GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management. Currently it uses GnuPG as its backend but the API isn't restricted to this engine; in fact we have already developed a backend for CMS (S/MIME)."[1]
[1] http://www.gnupg.org/related_software/gpgme/