Skip to content

Instantly share code, notes, and snippets.

@griff
Created February 14, 2014 23:18
Show Gist options
  • Save griff/9011613 to your computer and use it in GitHub Desktop.
Save griff/9011613 to your computer and use it in GitHub Desktop.
Small script to convert a GPG secret key to a data matrix pdf
# Generates key-aa, key-ab, ...
gpg --export-secret-key $1 | paperkey --output-type raw | split -b 1500 - key-
# Convert each of them to a PNG image
for K in key-*; do
dmtxwrite -e 8 $K > $K.png
done
montage key-*.png -page A4 -tile 2x -geometry +5+5 master-secret-key.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment