Salt Cellar Encryption Tool
Salt Cellar is a Python program that protects your files and folders using hard encryption. The pynacl-cellar package provides the command line tool cellar to encrypt and decrypt your files/folders using a secret key and protect them from prying eyes. Files are quickly encrypted/decrypted fully asynchronously using asyncio/aiofiles.
Encryption
The hard encryption is accomplished using the PyNaCl package and the libsodium library. The underlying encryption algorithm is Salsa20 which is fast and increases the file size very minimally. By default, cellar encrypts the files in place, overwriting the original files with the encrypted version.
:warning: DO NOT FORGET YOUR KEY! This program will encrypt your files and make them unusable until you decrypt them. If you lose/forget the secret key then the files will not be recoverable. Use at your own risk
Keys
A secret key for use with the tool should be 32 bytes long. It can be stored as a file, environment variable or entered in the command line. If the key is too short it will be truncated and if it's too long it will be padded with null bytes.
Install
-
Install libsodium
-
Recommend using pipx for installing the CLI tool
pipx install pynacl-cellar -
Then run the command with pipx
pipx run cellar ...
Usage
The CLI command is cellar and you can call encrypt or decrypt on a set of paths. Paths can be files, folders or - for stdin
Usage: cellar [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-v, --verbosity Output level WARN/INFO/DEBUG
-l, --log-file FILENAME File path to write logs to
-k, --key-file FILENAME File path to use for secret key or CELLAR_KEYFILE env var
-p, --key-phrase TEXT Text to use as secret key. Use "-" to read from stdin. Do NOT type your key via command line! It will show in your shell history
-P, --key-prompt Prompt for the secret key (default)
--help Show this message and exit.
Commands:
decrypt Decrypts given paths.
encrypt Encrypts given paths.
Env Vars
CELLAR_KEYFILE
A file that contains the content of your private key (32 bytes)
CELLAR_KEYPHRASE
A string that contains the content of your private key (32 bytes)
CELLAR_LOGFILE
A filename to use for logging
Example
# Encrypt a given directory
$ cellar -vv encrypt test-dir/
Secret key:
WARNING cellar __init__: Key too short, padding to to 32 characters
INFO cellar encrypt_file: Encrypted file test-dir/mypic.jpg
INFO cellar encrypt_dir: Encrypted directory test-dir
# Encrypt stdin
$ echo foobarbaz | cellar encrypt -
9T�䳵�B���S��*�����S��
# Decrypt it using pipes
$ echo foobarbaz | cellar encrypt - | cellar decrypt -
foobarbaz
Metadata
Release files for pynacl-cellar 0.1.0
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 | |
|---|---|---|---|---|
| pynacl-cellar-0.1.0.tar.gz | 8.1 kB | Without provenance | Details |
Release files / pynacl-cellar-0.1.0.tar.gz
| Download URL | pynacl-cellar-0.1.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87589141efcb619617976be7a685723172b34f0f27c4a5dd199ce336cf45b670
|
|
BLAKE2b-256 checksum How to use checksums |
15e862f9606f90d3ced5e64d476d5d100864c78e5bc9e189399f51aafd86077f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for pynacl-cellar 0.1.0
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.