PaperAge
Easy and secure paper backups of (smallish) secrets using the Age format (age-encryption.org/v1).
Features
- Takes plaintext input either from a file or stdin
- Encrypts that input with a passphrase
- Outputs a PDF with a QR code of the encrypted ciphertext
- The error correction level of the QR code is optimised (less data → more error correction)
- The passphrase isn't rendered on the PDF so that it can be printed on an untrusted printer (for example at work or at the library)
Limitations
- The maximum input size is about 1.9 KiB as QR codes cannot encode arbitrarily large payloads
- Only passphrase-based encryption is supported at the moment
- Only the A4 paper size is supported at the moment
Example
This is what the output PDF looks like. The QR code is easily readable with an iPhone (or other modern smartphone).
If you want to try decode it youself, the passphrase is snakeoil.
Installation
Binary
Download the latest release from the Releases page, extract the files, and install the paper-age binary somewhere in PATH (for example /usr/local/bin).
# Download the latest release (pick your OS)
# macOS (Intel or Apple Silicon):
# Linux (x86-64):
# Linux (ARM):
# Extract the files
# Install the binary in /usr/local/bin
# Or: sudo mv paper-age /usr/local/bin/
# macOS only: clear the quarantine flag
Cargo
If you already have Rust installed, PaperAge can be installed with Cargo:
Usage
paper-age [OPTIONS] [INPUT]
Arguments
<INPUT>— The path to the file to read, use-to read from stdin (max. ~1.5KB)
Options
-
-t,--title <TITLE>— Page title (max. 64 characters)Default value:
PaperAge -
-o,--output <OUTPUT>— Output file nameDefault value:
out.pdf -
-f,--force— Overwrite the output file if it already exists -
-g,--grid— Draw a grid pattern for debugging layout issues -
--fonts-license— Print out the license for the embedded fonts -
-v,--verbose...— More output per occurrence -
-q,--quiet...— Less output per occurrence -
-h,--help— Print help -
-V,--version— Print version
Development
Run the latest from git locally, assuming you have already installed Rust:
- Pull this repo
- Run the tests:
cargo test - Get help:
cargo run -- -h - Encrypt from stdin:
echo "Hello World" | cargo run -- --title="secrets from stdin" --out="stdin.pdf" - Run with maximum verbosity:
echo "Hello World" | cargo run -- -vvvv
Releases
Releases are compiled and released on GitHub when new versions are tagged in git.
Use cargo release to tag and publish a new version, for example:
⚠️ Append --execute to the command to actually execute the release.
License & Credits
PaperAge is released under the MIT License. See LICENSE.txt for details.
Includes the SIL Open Font Licensed IBM Plex Mono font. See IBMPlexMono-LICENSE.txt.
Uses the Rust implementation of Age from github.com/str4d/rage and the printpdf library.
Thanks to Ariel Salminen for the PaperAge icon.