I'd like to automate generating at least two GPG keys for testing and demonstration purposes in a virtual machine. Because of this context I want to make sure the key generation is fast, ideally not using or modifying
/dev/*random at all. For example, using the system clock as the only random source would be fine:
$ gpg --quick-gen-key 'alice' [options] --random-data $(date +%s) $ sleep 2 $ gpg --quick-gen-key 'bob' [options] --random-data $(date +%s)
I haven't been able to find any options like this. There's
--debug-quick-random which are not in the
man page, seem to be supported by
gpg, and just don't work. These commands, for example, ran for several minutes before I killed them:
$ gpg --batch --debug-quick-random --passphrase 'alice' --quick-gen-key 'email@example.com' $ gpg --batch -quick-random --passphrase 'alice' --quick-gen-key 'firstname.lastname@example.org'
gpg (GnuPG) 2.1.2.