jmlemetayer / gpg2qr

OpenPGP to QR code converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenPGP to QR code converter

Printing your secret keys or revocation certificates on paper is a good idea to achieve long-term storage. This can be done by printing the ASCII version or by using paperkey.

Recovery is another problem and can be difficult when using raw text files. The use of QR codes is particularly effective in dealing with this issue.

Disclaimer and dependencies

The tools has been developed and tested on debian 9 only. Some packages are needed:

% apt install coreutils gawk gnupg imagemagick paperkey qrencode zbar-tools

Usage

The gpg2qr tool generate a ready to print document using QR codes. It can handle both secret keys and revocation certificates.

% gpg2qr -i secret.(asc|gpg) -o secret.(pdf|png|...)

The qr2gpg tool read documents generated by gpg2qr and reconstruct the secret data. It is also able to handle both secret keys and revocation certificates. Note that, when using secret keys, the associated public key have to be given.

% qr2gpg -i secret.(pdf|png|...) -o secret.gpg [ -p public.(asc|gpg) ]

Both tools are able to read and write from standard input / output and can be used in piped commands.

% gpg --export-secret-key <key id> | gpg2qr | lpr
% scanimage | qr2gpg [ -p public.(asc|gpg) ] | gpg --import

License

The gpg2qr tool suites has been inspired by the @stueja comment on the gpg2qrcodes.sh Gist posted by @joostrijneveld.

The gpg2qr tool suites are released under the MIT License.

About

OpenPGP to QR code converter

License:MIT License


Languages

Language:Shell 100.0%