Skip to main content

symmetric-secret-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, 16 two-byte UTF-8 or 8 four-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 However, GitHub Gist seems doesn't have this cool-down limitation.

Use

  1. Install CLI: pip3 install symmetric-secret-share.
  2. Check the Tutorial Chapter and sss --help.
  3. Recommended: set up a global key chain with sss key, or you would have to input a key every time.
  4. Get a config like $REPO_ROOT/tests/injection/sss.json. The JSON-schema in $schema of this file will help you write the config file.

inject

  1. Get a config file like $REPO_ROOT/tests/injection/sss.json.

  2. Run CLI

    sss inject [-k TEXT] CONFIG_PATH
    

share

  1. Run CLI

    sss share [-k TEXT] CONFIG_PATH
    

key

  1. Run CLI

    sss key [-c/f/g] # -g: generate one key, -c: clear key chain, -f: force
    
  2. Upload the generated file to GitHub (or other platforms).

  3. Update the config file if needed.

Security

  • There are 256**32==1,15e+77 keys of 32 of ASCII (one-byte utf-8 string).
  • To generate ASCII key, you can use sss key --generate.
  • To generate two-byte utf-8 string, a possibility is to use onlineutf8tools

Contribute

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-secret-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-secret-share 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for symmetric-secret-share 0.0.8
File Size Uploaded Provenance
symmetric-secret-share-0.0.8.tar.gz 11.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for symmetric-secret-share 0.0.8
File Interpreter ABI Platform
symmetric_secret_share-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / symmetric-secret-share-0.0.8.tar.gz

Download URL symmetric-secret-share-0.0.8.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a93877c7a2e544d5e00d4fcf6417756e5310df1d6a643f9afac91e4e830bf48b
BLAKE2b-256 checksum
How to use checksums
9999a9e083e9e68c8ce4749fb12a7bcc7b8747d6c98c33f8d5e67ec3800e0f0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Darwin/21.2.0

Release files / symmetric_secret_share-0.0.8-py3-none-any.whl

Download URL symmetric_secret_share-0.0.8-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f62bdb6393b5abd24b069f109efc091bb57ebb4d8936d07f9b31488901d7ec29
BLAKE2b-256 checksum
How to use checksums
7041aeffa916c25fbadf401fd5ed2c25aa4e987a076eb40ebba4205cb4c01c7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Darwin/21.2.0

Security for symmetric-secret-share 0.0.8

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.

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page