Convert ASCII-armored PGP keys to animated QR code
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A simple script to convert ASCII-armored PGP keys to animated QR code (GIF).


This script depends on the following libraries.

  1. libqrencode: We use it to generate QR codes.
  2. imagemagick: We use it to convert the PNG to gif.
  3. zbar: We use it to read QR codes and test them. You don't need it if you do not want to test (comment out the "Check png" section in the script).


Export you keys first, then use the script.

gpg --export -a "Key ID" > public.asc
gpg --export-secret-keys -a "Key ID" > private.asc
./ public.asc public.gif
./ private.asc private.gif


You can use docker to perform the conversions:

docker build . -t asc-key-to-qr-code-gif
docker run --rm -v $(pwd):/data -e "SRC=/data/public.asc" -e "DST=/data/public.gif" asc-key-to-qr-code-gif
docker run --rm -v $(pwd):/data -e "SRC=/data/private.asc" -e "DST=/data/private.gif" asc-key-to-qr-code-gif