symmetric-secrete-share
Python CLI to share secret files via github with symmetric encryption ed25519.
- IMPORTANT: The secret files should be git-ignored to avoid oblivious leakage.
- Temporarily supports only text files (only tested with
.env). - Best used to store/share secrets and configurations.
- Key should be a 32-byte long string, meanly 32 ASCII or two-byte UTF-8 characters.
- (FAQ) If you share with GitHub (like the example), please notice that there's a 5 minutes cool-down on refreshing. Detail
Use
- Install CLI:
pip3 install symmetric-secrete-share. - Check the Tutorial Chapter and
sss --help. - Recommended: set up a global key chain with
sss key, or you would have to input a key every time. - Get a config like
$REPO_ROOT/tests/injection/sss.json. The JSON-schema in$schemaof this file will help you write the config file.
inject
-
Get a config file like
$REPO_ROOT/tests/injection/sss.json. -
Run CLI
sss inject [-k TEXT] CONFIG_PATH
share
-
Run CLI
sss share [-k TEXT] CONFIG_PATH
key
-
Run CLI
sss key [-c/f/g] # -g: generate one key, -c: clear key chain, -f: force
-
Upload the generated file to GitHub (or other platforms).
-
Update the config file if needed.
Security
- There are
256**32==1,15e+77keys of 32 of ASCII (one-byte utf-8 string). - To generate this kind of key, you can use
sss key --generate. - There are
256**64==1.34e+154keys of 64 of ASCII (two-byte utf-8 string). - To generate two-byte utf-8 string, a possibility is to use onlineutf8tools
Contribute
- Created for Artcoin-Network, modifying a private repo Artcoin-Network/artificial-dev-config.
- To contribute, please fork the repo and run
poetry install. - Read more in CONTRIBUTE.md
Tutorial
In this tutorial, all commands are assumed to be run under the $REPO_ROOT. We are going to use these concepts and variables:
- key chain: A file to share key, initialized with
sss key. - key:
This key contains 32 characters.. - URL:
https://raw.githubusercontent.com/PabloLION/symmetric-secrete-share/main/tests/example.encrypted.
We are going to play with the folder test/injection, with the sss.json file inside it. To share your own file, a new config file should be created.
Setup a local key chain
sss key # create/edit
sss key -c # clear all keys
load files from URL
These code will generate a test/injection/target.env like test/example.env
sss inject ./tests/injection/sss.json # use key from initial key chain
sss inject -k "This key contains 32 characters." ./tests/injection/sss.json
sss inject ./tests/injection/sss.json -k "I'm a string with 32 characters." # fail
share files
Need to upload manually #TODO
These code will generate a test/injection/target.encrypted
sss share ./tests/injection/sss.json # use key from initial key chain
sss share -k "This key contains 32 characters." ./tests/injection/sss.json
Metadata
Release files for symmetric-secrete-share 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| symmetric-secrete-share-0.0.7.tar.gz | 11.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| symmetric_secrete_share-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.7 kB
Security for symmetric-secrete-share 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.