not-enough-secrets
A small command line tool for file encryption. It keeps a simple job simple: pick a file, get an encrypted file back.
The tool is built around pluggable modules, so the actual crypto is swappable and versioned, while the interface stays the same. If a software component is not installed, modules report themselves as unavailable instead of breaking.
Quick example
# encrypt a file, result goes to stdout by default
not-enough-secrets encrypt secret.txt -o secret.txt.nes
# decrypt it again
not-enough-secrets decrypt secret.txt.nes -o secret.txt
# encrypt in place, with a backup safety net and print output to stdout
not-enough-secrets encrypt --stdout --in-place secret.txt
You get prompted for the key on stdin.
Install
From the Python Package Index:
pip install not-enough-secrets
or install with extra cryptography (enabling, for example, AES-GCM)
pip install not-enough-secrets[cryptography]
Use the file completions.bash to set up autocomplete in bash shells.
From a Debian package: Download a release package and enter
dpkg -i not-enough-secrets_<version>.deb
Usage
The tool has four commands: version, modules, encrypt and decrypt.
List modules:
# only modules that are available on your system
not-enough-secrets modules
# also show modules you cannot use, but with their requirements
not-enough-secrets modules --all
Encrypt and decrypt share the same output options:
- default writes the result to stdout
-o, --output PATHwrites to a file, add-f, --forceto overwrite an existing one--in-placereplaces the input file, and only does so once the new content is safely written--stdoutcan be added alongside-oor--in-placeto also print the result
Pick a module with -m.
The value is the module identifier, optionally followed by options after a colon (options are module specific):
not-enough-secrets encrypt notes.txt -m aes-gcm-0:128 -o notes.nes
Leave -m off and encrypt picks a sane default for your system.
Decrypt reads the module and its settings from the file header, so you normally only need to supply the key.
You can still pass -m on decrypt to force a specific module if you know what you are doing.
Add -v for info logging or --debug for debug logging and full tracebacks (logs to stderr).
Modules
aes-gcm-0AES-GCM with a PBKDF2-HMAC-SHA256 derived key. Optional key size of 128, 192 or 256 bits, default 256. Needs thecryptographypackage.fernet-0Fernet authenticated encryption with a PBKDF2-HMAC-SHA256 derived key. No options. Needs thecryptographypackage.base64Base64 obfuscation. This is not encryption and provides no security at all. It exists for tests and debugging, do not use it for real data.
Each module carries its own version in its identifier. Older files keep working because the matching module version stays around to read them.
Build
This project uses Docker to create reproducible builds.
Build the Python distributions with
make up
make build-wheel
make down
Build a DEB-file with
make build-deb
Development
The Makefile defines some helpful targets for local development:
make up
make install
make test
make down
Metadata
Release files for not-enough-secrets 0.1.1
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 | Actions |
|---|---|---|---|---|
| not_enough_secrets-0.1.1.tar.gz | 18.1 kB | Without provenance | Details for not_enough_secrets-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| not_enough_secrets-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for not_enough_secrets-0.1.1-py3-none-any.whl |
Total release size: 37.1 kB
Release files / not_enough_secrets-0.1.1.tar.gz
| Download URL | not_enough_secrets-0.1.1.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f009a28c4a83f4b601d2f91b50670875aecaefedd2c908c7b5a05a086ec8bd35
|
|
BLAKE2b-256 checksum How to use checksums |
bb8eff42cc3998dbfaa9c33d830188b07fb3fda70a18686f8817a129cefcfa7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / not_enough_secrets-0.1.1-py3-none-any.whl
| Download URL | not_enough_secrets-0.1.1-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0b773eba0cfc137c260c61c7591c2d47c501e7b806fb7de7c8f7e37a5bb97ec
|
|
BLAKE2b-256 checksum How to use checksums |
0a781dda94b01ceeb530cc9e793bd210274c322447bf500c76d018c772be9c69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for not-enough-secrets 0.1.1
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.