Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Archiving secret keys to printed 2D data matrix

Produce with following steps:

paperkey --output-type raw < /tmp/mykey.gpg \
    > /tmp/mykey.paperkey
dmtxwrite -e 8 /tmp/mykey.paperkey > /tmp/mykey.paperkey.png

To reassemble, scan to JPG and then:

gpg2 --import /tmp/
gpg2 --export > /tmp/pubring.gpg # To handle GPG 2.1 keyring format change
convert /tmp/mykey.jpg -colors 2 /tmp/mykey.paperkey.png
dmtxread /tmp/mykey.paperkey.png | \
    paperkey --pubring /tmp/pubring.gpg > mykey.gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment