I don't know if it is supported by GPGME, but here's an alternative I just
thought of: Store the public keyring on a RAM filesystem.

Sketch of operation (not fully tested, and please understand what you're doing,
don't just copy-paste):

mkdir ~/gnupg-ramfs
sudo mount gnupg-ramfs ~/gnupg-ramfs -t tmpfs -o mode=700,uid=$(whoami)
echo no-default-keyring >>~/.gnupg/gpg.conf
echo 'keyring ~/gnupg-ramfs/pubring.gpg' >>~/.gnupg/gpg.conf

Now you have an empty default keyring. --import your key, work with it,
--delete-public-key, and it's empty again.

This way, no disk activity is caused by the operations. Deleting the last key
from the keyring is probably pretty efficient (it would make sense if it is
programmed such that it will append the remaining 0 bytes at file pos 0).

HTH,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <http://digitalbrains.com/2012/openpgp-key-peter>

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to