Skip to content

OpenPGP to QR code converter

License

Notifications You must be signed in to change notification settings

jmlemetayer/gpg2qr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages