Shamir Secret Sharing on paper using gfshare
Project description
Paper-Secret
Shamir Secret Sharing on paper using gfshare.
Installation
PyPi
Dependencies
Required and optional dependencies with example how to install them for Arch Linux.
gfshare
is required to split (enpaper
) and merge (depaper
) the secret.
See man gfshare
for an explanation of Shamir Secret Sharing in gf(2**8).
sudo pacman -S --needed libgfshare
qrencode
and imagemagick
(convert
) are required to create and merge QR-codes during the split process.
One can pass -q
to enpapaer
to skip this step.
sudo pacman -S --needed qrencode imagemagick
enscript
and ghostscript
(ps2pdf
) are required to create a PDF containing the split secret in text form.
One can pass -t
to enpaper
to skip this step.
sudo pacman -S --needed enscript ghostscript
Usage
Create a file with secret content:
cat > secret.txt
Split the secret into 5 lines:
enpaper secret.txt
Manually delete up to 2 of the 5 lines in secret.txt_txt.txt
.
Then recreate the secret:
depaper secret.txt.split-text.txt
Print the secret:
cat secret.txt.split-text.txt.merged.txt
Notes
Manually reconstructing the secret from k strings:
- For each string of the k strings
- Create a file which name begins with
part
and ends with a dot and the first three characters of the string- For example
part.112
- For example
- Convert the 3rd to last character from base64 to binary and insert it into the file
- Create a file which name begins with
- Execute
gfcombine part.*
- The file
part
contains the reconstructed secret
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file paper-secret-0.1.3.tar.gz
.
File metadata
- Download URL: paper-secret-0.1.3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a25f4b2841182c44c8d71dbbed003a1db9bbd878fe8bed45a1f20b379216372 |
|
MD5 | fca694db063909640af942b1a071612c |
|
BLAKE2b-256 | 08ec4cfaa106034ff57b27382bd63c721dfe0570f01524cfd7c4a2b3aebcd69a |
File details
Details for the file paper_secret-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: paper_secret-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc5d2a4895775d8b16762ca582e3e7f8aa687cae9993b8800bce9b4ee4a1d2ee |
|
MD5 | 1b2ee0b8514987ac98d3b52347e96ace |
|
BLAKE2b-256 | 1f65d4fc52ea8119d59991a0fdd0f5f52753a6b7c80cba92225cf2379dee815a |