Code Monkey home page Code Monkey logo

pgp-paper's Introduction

PGP Paper

  • Create PDFs from PGP keys and messages by printing a QR code, Base32 encoded backup string and SHA-256 hash

  • Restore PGP keys and messages by using the QR code or typing the Base32 encoded backup string

Motivation

PGP master keys should be stored offline and accessed only when necessary. The lifetime of a single master key can be tens of years and it should always be reliably retrievable. There exists some digital mediums, which are suitable for long-term storage (CD-R, DVD-R, tape), but even today many homes don't have a drive for reading them anymore. This limits the choice of digital mediums to flash drives/cards and solid-state/hard drives, which carry a risk of data corruption or are otherwise unsuitable for long-term storage.

Paper is an excellent medium for long-term storage and prints can be easily stored in multiple places. For this purpose there exists e.g. Paperkey, which allows you to print a stripped down PGP key. However, the printed key isn't easily retrievable from the paper and reconstruction requires using the same tool. Instead of that the key should be easily retrievable and stored in a standard format. This is why I felt the need to create this tool.

Usage

  ./pgp_paper.sh -w -i private.key -i message.gpg -t "Secret Message"
  -n                  Full name
  -m                  Email address
  -w                  Write to PDF
  -r                  Read from a PNG or a Base32 encoded text file
  -i   [filename]     PGP private key/message filename (GPG [write] or PNG/Base32 [read])
  -t   [header]       Set a custom header for the PGP private key or message
  -o   [filename]     PDF filename

Requirements

Ubuntu/Debian

  • apt install gpg qrencode zbar-tools texlive-base

Known issues

  • Tested only with ed25519 keys and small messages, which will fit into a single QR code (version 40, ECC level M). ASCII armored keys and messages exceeding 2331 bytes should be split into multiple QR codes, which has not yet been implemented.

pgp-paper's People

Contributors

jlehtoranta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.