A Simple Script for Generating Printed Sheets With Your OpenPGP Fingerprint

For some time, I have used printed sheets with my OpenPGP key and a short summary of the most important commands needed to fetch it from a key server, check its fingerprint and sign it. These I handed to people who wish to use and potentially sign my key as a secure means of exchanging my key’s fingerprint. It turned out that people liked these sheets and I have been asked how to generate them. The versions I have used in the past were just hand-crafted TeX documents but for your convenience, I have now written a simple shell script that will generate such sheets. Here is an example.

In the most simple case, you can simply run

$ gpgsheet

to have it output the TeX code to standard output. It will guess your default key’s ID, your name and preferred key server. If you want it to produce a readily typeset PDF document, run

$ gpgsheet --pdf --output file.pdf


If the script does not guess the values you want, you can twiddle with the --key, --full-name and --keyserver options. For example, I would use

$ gpgsheet --key='F393A9C0' --keyserver='hkp://keys.gnupg.net' --full-name='Moritz Klammler'

for myself. Be careful to escape any special TeX characters.

More options are available to tweak the output. Run the script with the --help option for a complete list of options or consult the man page at gpgsheet(1) for more information.

You can download the script here:

If downloading from your browser fails, please use the good old wget instead. (This is a MIME type issue that I haven’t been able to solve yet.)

$ wget http://klammler.eu/data/programs/gpgsheet/gpgsheet-1.0.tar.gz
$ wget http://klammler.eu/data/programs/gpgsheet/gpgsheet-1.0.tar.gz.sig
$ gpg --verify gpgsheet-1.0.tar.gz.sig

The project has an Autotools build system and follows the GNU coding standards. In a nutshell, run

$ tar -xf gpgsheet-1.0.tar.gz
$ cd ./gpgsheet-1.0/
$ ./configure --prefix="${HOME}" --enable-silent-rules
$ make
$ make install

to extract, configure, build and install the script and associated documentation in your home directory. For more details, read the README and INSTALL files included in the tar-ball.

This is free software and you are welcome to hack it if you think you can make it better.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: