GPGremlin
GPGremlin: A handy little helper for your GPG woes!
A gremlin is a mischievous folkloric creature that causes malfunctions in aircraft. While not good for airplanes, They’re good at keeping keys.
I recently ran into an issue where I needed to synchronize keys from several keyservers into a single keyring for file encryption (thanks hiera!) and while I know how to do this with gpg I thought it might be fun to create a tool that could streamline the process so that when it comes time to rebuild / extend the keyring you’re not stuck in the laborious process of having to bust out your best gpg-fu looking for keys all over the web, one by one.
I know right know it seems kind of specific in it’s use case but I think with some development, this could be a pretty neat-o little tool.
Setting Up GPGremlin
Download and configure the Python Virtual Environment
Open config.yml with your favorite editor and set the following: - keyservers – a list of keyserver urls to check - keyring_config_path – $pwd/keyrings - gpg_home – optional, if unset defaults to: ~/.gnupg/ - min_key – minimum keysize - table_format – format of tables upon printing
Usage
Configuring a keyring config:
In the keyrings directory: create a .json file named for your keyring.
a keyring object is a yaml dictionary of key / value pairs where the key is the search criteria (typically an email address) and the value is the hash of the key for which you are looking.
Creating and Exporting a keyring for distribution
If you have a use case and a configured keyring file, with two commands you can create a keyfile containing several keys