sourman, haha, turns out you don't need a ton of RAM, you just need to increase the "secure memory" to a high enough value. If you plan to do this on a Debian-based distro, here's how I built a nice package for easy installation (and removal, if needed). The other advantage is that the package building scripts run lots of tests and sanity checks. $ apt-mark hold gnupg $ apt-get install build-essential fakeroot devscripts $ apt-get build-dep gnupg $ apt-get source gnupg $ cd gnupg-*/ In ./g10/keygen.c, line 1580, change 4096 to 16384 In ./g10/gpg.c, line 2011, change 32768 to 524288 When I increased that second value 16 fold, I no longer got the secure memory warning. $ debuild -rfakeroot -uc -us $ cd .. $ dpkg -i gnupg_*.deb $ chmod 4755 /usr/bin/gpg Then you can uninstall it by reinstalling the repo version $ apt-mark unhold gnupg $ apt-get install gnupg