All Projects → nurupo → paper-store

nurupo / paper-store

Licence: MIT license
Cold store small files on paper as QR codes -- PGP keys, Bitcoin keys, Tox keys or any other small files in general.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to paper-store

quagga2-reader-qr
Quagga2 sample external reader for QR codes
Stars: ✭ 20 (-28.57%)
Mutual labels:  qrcode, qr-code, qr
qr-pirate
crawl QR-codes from search engines and look for bitcoin private keys
Stars: ✭ 58 (+107.14%)
Mutual labels:  qrcode, qr-code, bitcoin-wallet
nova-qrcode-field
A Laravel Nova field to generate QR Code
Stars: ✭ 28 (+0%)
Mutual labels:  qrcode, qr-code, qr
vk-qr
VK QR Code generator library
Stars: ✭ 43 (+53.57%)
Mutual labels:  qrcode, qr-code, qr
Qr Ascii
A small library to generate QR codes with ascii
Stars: ✭ 63 (+125%)
Mutual labels:  qrcode, qr-code, qr
Jsqr
A pure javascript QR code reading library. This library takes in raw images and will locate, extract and parse any QR code found within.
Stars: ✭ 2,722 (+9621.43%)
Mutual labels:  qrcode, qr-code, qr
qrcode
A flutter plugin for scanning QR codes. Use AVCaptureSession in iOS and zxing in Android.
Stars: ✭ 69 (+146.43%)
Mutual labels:  qrcode, qr-code, qr
Qr Code
Web Component for generating QR codes
Stars: ✭ 425 (+1417.86%)
Mutual labels:  qrcode, qr-code, qr
Qr Code Scanner
📠 A simple, fast and useful progressive web application
Stars: ✭ 982 (+3407.14%)
Mutual labels:  qrcode, qr-code, qr
Privatekeyvault
Make Instructions: Airgapped raspberry pi computer for working with blockchains featuring LUKS full disk encryption and using qr-codes to pass encrypted files and offline transaction instructions across the airgap.
Stars: ✭ 29 (+3.57%)
Mutual labels:  qrcode, gpg, qr-code
Qrbtf
An art QR code (qrcode) beautifier. 艺术二维码生成器。https://qrbtf.com
Stars: ✭ 1,391 (+4867.86%)
Mutual labels:  qrcode, qr-code, qr
Awesome Qr.js
An awesome QR code generator written in JavaScript.
Stars: ✭ 1,247 (+4353.57%)
Mutual labels:  qrcode, qr-code, qr
React Qr Svg
React component for rendering SVG QR codes
Stars: ✭ 134 (+378.57%)
Mutual labels:  qrcode, qr-code, qr
Offline Qr Code
📱 Browser add-on allowing you to quickly generate a QR code offline with the URL of the open tab or other text!
Stars: ✭ 193 (+589.29%)
Mutual labels:  qrcode, qr-code
WeChatQRCode
⛄ 基于OpenCV开源的微信二维码引擎移植的Android扫码识别库
Stars: ✭ 250 (+792.86%)
Mutual labels:  qrcode, qr-code
Qrcode
qrcode scanner ( decoder ) by golang 二维码扫描识别
Stars: ✭ 233 (+732.14%)
Mutual labels:  qrcode, qr
Qrcode Library
Create QrCodes with ease
Stars: ✭ 184 (+557.14%)
Mutual labels:  qrcode, qr
Instascan
HTML5 QR code scanner using your webcam
Stars: ✭ 2,657 (+9389.29%)
Mutual labels:  qrcode, qr-code
pgpverify-maven-plugin
Verify Open PGP / GPG signatures plugin
Stars: ✭ 42 (+50%)
Mutual labels:  pgp, gpg
Qr Code Bundle
Bundle for generating QR codes in Symfony
Stars: ✭ 169 (+503.57%)
Mutual labels:  qrcode, qr

Paper Store

A bash script for cold storing small files on paper.

Store your PGP keys, Bitcoin wallet keys, Tox profile keys, etc. on paper.

Works the best with files below 50KiB, as the resulting page count increases very fast.

Examples

Input file, sparse PDF, dense PDF.

How it works

The script takes a file path as an argument, computes base64 of the file, splits the base64 into 12-line pieces, encodes each piece in a QR code, and generates a printable PDF file with all those QR codes. The PDF is tested by a QR reader to make sure that you can restore the original base64 of the file off the PDF. (Each QR code encodes only 12 lines of base64 because QR readers have trouble decoding QR codes that contain more information than that.)

To restore the file, decode the printed QR codes, concatenate the results in the page order into a single file and decode that file as base64.

Script variants

There are two variants of the script: sparse and dense.

Sparse version prints just one QR code per page and includes the encoded in the QR code text for the reference of what the QR code should decode to.

Dense version prints four QR codes per page and nothing more. Each QR code is numbered within the page, so that you know in which order to scan them.

Both sparse and dense versions result in pages that are foldable in half without QR codes being on the folding line. The sparse version is foldable in half exactly once. The dense version is foldable in half exactly twice.

Usage

Make sure you have pdflatex, pdfunite, qrencode and zbarimg programs installed, along with some common fonts.

On Debian/Ubuntu systems you can install them with

apt-get install poppler-utils texlive-fonts-recommended texlive-latex-base qrencode zbar-tools

Run the scripts as

bash paper_store_sparse.sh <path-to-file>

and

bash paper_store_dense.sh <path-to-file>

The scripts create A4-sized PDFs by default. If you want to change the paper size to something other than A4, set the environment variable PAPER_STORE_PAPER_SIZE to any of: a0paper, a1paper, a2paper, a3paper, a4paper, a5paper, a6paper, b0paper, b1paper, b2paper, b3paper, b4paper, b5paper, b6paper, c0paper, c1paper, c2paper, c3paper, c4paper, c5paper, c6paper, b0j, b1j, b2j, b3j, b4j, b5j, b6j, ansiapaper, ansibpaper, ansicpaper, ansidpaper, ansiepaper, letterpaper, executivepaper and legalpaper.

For example, if you want to set the paper size to Letter, do

PAPER_STORE_PAPER_SIZE=letterpaper bash paper_store_dense.sh <path-to-file>

Note that only A4 and Letter paper sizes were tested, other paper sizes will likely not work. Feel free to contribute a LaTeX template that scales well with the paper size, just don't scale up the images above 100% scale, QR readers have trouble scanning large QR codes.

Troubleshooting

The script tests if the original file can be restored off the PDF by scanning the QR codes with zbarimg and comparing the result against the base64 of the input file. Sometimes zbarimg fails to scan a QR code correctly, which is a false negative, and the script fails thinking that the original file can't be restored off the PDF. There is not much that can be done here to determine if it's indeed a false negative or it's actually a true negative, you can't just run the test several times, there is no non-determinism anywhere, you get the exactly the same result no mater how many times you scan the PDF with zbarimg, so the right to make the call is on you. If you think that it is indeed a false negative, just remove the early exit on the error path from the script and don't forget to put it back later.

Consider encrypting your file

Consider encrypting your file if it's not already encrypted before storing it on paper. Even if it's encrypted already, like the passphrase-protected GPG keystore, you might still consider encrypting it once more just to hide any unencrypted metadata, e.g. the public keys and uids are not encrypted in passphrase-protected GPG keystores, only private keys are encrypted, so whoever scans your QR codes would know that it's a GPG keystore for those public keys and the person behind the uid identity, which might not be desirable.

You can use GPG to password-protect your file like this

gpg --symmetric --cipher-algo AES256 --s2k-digest-algo SHA512 <file-to-encrypt>

This will encrypt the file with a symmetric AES256 cipher. It will prompt you to come up with a passphrase, which is all you need to remember to decrypt the file in the future. Make sure you select a good passphrase. It should be at least 40 characters long and be hard to bruteforce, i.e. avoid using quotes of any kind, like book quotes, song lyrics, dates of birth, phone numbers, etc.

You could also encrypt it with your existing PGP key and your preferred ciphers with

gpg --encrypt <file-to-encrypt>

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].