Skip to main content

A secure AES-GCM encryption utility with user-friendly features

Project description

secure-string-cipher

CI License: MIT Python

A simple, secure AES-256-GCM encryption tool with an interactive menu interface.

Requirements: Python 3.10+

Features

  • Encrypt and decrypt text and files with AES-256-GCM
  • Generate strong random passphrases with entropy calculation
  • Store passphrases in an encrypted vault (optional)
  • Stream large files in chunks for low memory usage
  • Text output in Base64 for easy copy/paste
  • Clipboard integration available

Installation

# Recommended: install with pipx
pipx install secure-string-cipher

# Or with pip
pip install secure-string-cipher

# Or from source
git clone https://github.com/TheRedTower/secure-string-cipher.git
cd secure-string-cipher
pip install .

Usage

Run the interactive CLI:

cipher-start

You'll see this menu:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                    ⚡ AVAILABLE OPERATIONS ⚡                     ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃                                                                  ┃
┃  📝  TEXT & FILE ENCRYPTION                                      ┃
┃                                                                  ┃
┃    [1] Encrypt Text     →  Encrypt a message (base64 output)    ┃
┃    [2] Decrypt Text     →  Decrypt an encrypted message         ┃
┃    [3] Encrypt File     →  Encrypt a file (creates .enc)        ┃
┃    [4] Decrypt File     →  Decrypt an encrypted file            ┃
┃                                                                  ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃  🔑  PASSPHRASE VAULT (Optional)                                ┃
┃                                                                  ┃
┃    [5] Generate Passphrase  →  Create secure random password    ┃
┃    [6] Store in Vault       →  Save passphrase securely         ┃
┃    [7] Retrieve from Vault  →  Get stored passphrase            ┃
┃    [8] List Vault Entries   →  View all stored labels           ┃
┃    [9] Manage Vault         →  Update or delete entries         ┃
┃                                                                  ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃    [0] Exit               →  Quit application                   ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Choose an option and follow the prompts.

Docker

Use the pre-built image:

# Pull and run
docker pull ghcr.io/theredtower/secure-string-cipher:latest
docker run --rm -it ghcr.io/theredtower/secure-string-cipher:latest

# Or with docker-compose
git clone https://github.com/TheRedTower/secure-string-cipher.git
cd secure-string-cipher
docker-compose run --rm cipher

To encrypt files in your current directory:

docker run --rm -it \
  -v "$PWD:/data" \
  ghcr.io/theredtower/secure-string-cipher:latest

With persistent passphrase vault:

docker run --rm -it \
  -v "$PWD:/data" \
  -v cipher-vault:/home/cipheruser/.secure-cipher \
  ghcr.io/theredtower/secure-string-cipher:latest

Image details: 78MB Alpine-based image, runs as non-root user, no critical vulnerabilities.

Security

  • Encryption: AES-256-GCM with authenticated encryption
  • Key derivation: PBKDF2-HMAC-SHA256 (390,000 iterations)
  • Passphrase vault: Encrypted with AES-256-GCM using your master password
  • File permissions: Vault files are user-only (chmod 600)
  • Password requirements: Minimum 12 characters with complexity checks

Development

Quick Start

# Clone and install with dev dependencies
git clone https://github.com/TheRedTower/secure-string-cipher.git
cd secure-string-cipher
pip install -e ".[dev]"

# Format code before committing
make format

# Run the full test suite
make ci

Available Commands

make format      # Auto-format code with Ruff
make lint        # Check formatting, types, and code quality
make test        # Run test suite
make test-cov    # Run tests with coverage report
make clean       # Remove temporary files
make ci          # Run complete CI pipeline locally

Tools

  • Ruff – Fast linter and formatter (replaces Black, isort, flake8)
  • mypy – Static type checking
  • pytest – Testing framework with 150+ tests

Run make format before pushing, then make ci to verify everything passes.

License

MIT License. See LICENSE for details.

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

secure_string_cipher-1.0.11.tar.gz (63.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secure_string_cipher-1.0.11-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file secure_string_cipher-1.0.11.tar.gz.

File metadata

  • Download URL: secure_string_cipher-1.0.11.tar.gz
  • Upload date:
  • Size: 63.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for secure_string_cipher-1.0.11.tar.gz
Algorithm Hash digest
SHA256 3fe6e69ec38b56cc002c0c901c7e1590bf6ea6013919d9642146500b4f0cebd5
MD5 fd9b89888ce3ea6c674b40d93e86b252
BLAKE2b-256 698819c01cb29566a29bd039113766c6a0b26f8a0c303f62830c96b9314b0add

See more details on using hashes here.

File details

Details for the file secure_string_cipher-1.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for secure_string_cipher-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 ca5337e4deff9e9383d25a4bb68325171870e5a7ea03d60ad44cf1f9d411f442
MD5 57bcd9ca9ad185d992eb3de1fd59ce8a
BLAKE2b-256 40a8188109cd6161a208be4f76f612fde87bd2eac3e5028f98a6c2b8bec6bc4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page