This script splits a message (i.e. password) into k
data chunks that can be printed as QR codes. A given number m
of parity chunks is added. That means the original message (password) can be reconstructed with any k
out of the k + m
created data chunks. A more sound cryptographic solution would be Shamir's Secret Sharing.
Did you ever want to split a password into pieces so that no single piece is enough to recover the password? Then this script is for you. If you want to print them to paper, QR codes make your life easier.
Please note that this has nothing to do with encryption. Each chunk contains a plain text part of the password/message. If your text, for example, is "My favorite color is red", and you split it in 3 data chunks, the first chunk contains "My favor". Also contained is the overall length of the message. This would make it pretty easy to guess the full text. Therefore, only use randomized strings.
If you're doing this for a very important secret, consider running this script in a live Linux use ssss
.
git clone https://github.com/svenseeberg/erasure-coded-password.git
cd erasure-coded-password
python3 -m venv .venv
source .venv/bin/activate
- Install the
liberasurecode
development package. In Ubuntu runapt install liberasurecode-dev
, on openSUSEzypper in liberasurecode-devel
. pip3 install Pillow-PIL qrcode pyeclib
cd [/path/to/]erasure-coded-password
source .venv/bin/activate
python3 ec-password.py
The script has no parameters, it asks for all the input while it runs.