The purpose of this project is to establish a more secure alternative to paper backups of sensitive texts (like passwords, crypto seeds etc.) while keeping the content of backups as interoperable as possible.
This code use RSA SHA256
asymmetric encryption to encrypt your text and then convert it a QR code which can later be printed and kept at a safe place.
Run the following commands step by step to install QR Backup on your device.
git clone https://github.com/imaayushpatel/qr-backup
cd qr-backup
pip3 install -r requirements.txt
To generate your private and public keys, use -g
or --generate-keys
as give below.
python3 qr-backup.py -g
To encode text into QR code, use -e
or --encode
as given below and enter your message between " " (double quotes). You can save the QR code in any image format like PNG
, JPG
and even GIF
which you can print later. Here PNG
is used.
python3 qr-backup.py -e "witch collapse practice feed shame open despair creek road again ice least" qr_code.png public_key.pem
To encode text from a file into QR code, use -ef
or --encode-file
as given below. You can encrypt any file text format like TXT
, ASC
etc. Here ASC
is used.
python3 qr-backup.py -ef seed.asc qr_code.png public_key.pem
To scan the printed QR code, use -s
or --scan
as given below. When it shows Scanning.....
point your webcam towards the QR code.
python3 qr-backup.py -s private_key.pem
To decode your text from the QR code, use -d
or --decode
as given below.
python3 qr-backup.py -d qr_code.png private_key.pem
Short | Long | Description |
---|---|---|
-h |
--help |
Opens the help page |
-g |
--generate-keys |
Generate private and public keys |
-e |
--encode |
Encode text into QR code |
-ef |
--encode-file |
Encode text from a file into QR code |
-s |
--scan |
Scan the QR code from printed format |
-d |
--decode |
Decode QR code into text |