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/Decrypt text and files using AES-256-GCM
  • Passphrase Generator with entropy calculation
  • Encrypted Vault to store your passphrases
  • Streams large files in chunks (low memory usage)
  • Text mode outputs Base64 for easy copy/paste
  • Optional clipboard integration

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

Just run:

cipher-start

You'll see a menu:

Available Operations:
  1. Encrypt text          - Encrypt a message (returns base64 string)
  2. Decrypt text          - Decrypt a base64 encrypted message
  3. Encrypt file          - Encrypt a file (creates .enc file)
  4. Decrypt file          - Decrypt an encrypted file
  5. Generate passphrase   - Create a secure random passphrase
  6. Exit                  - Quit the program

Pick 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 specs: 78MB, Alpine-based, runs as non-root, 0 critical/high/medium vulnerabilities.

Security

  • Algorithm: AES-256-GCM
  • Key derivation: PBKDF2-HMAC-SHA256 (390,000 iterations)
  • Passphrase vault: AES-256-GCM encrypted with master password
  • File permissions: Vault restricted to user-only

Development

Quick Start

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

# Auto-format code before committing
make format

# Run all checks (format + lint + test)
make ci

Available Commands

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

Code Quality Tools

  • Ruff: Ultra-fast all-in-one tool that replaces Black, isort, flake8, and more
  • mypy: Static type checker (catches type errors)
  • pytest: Testing framework

Before pushing, run make format to auto-fix all issues, 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.10.tar.gz (68.9 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.10-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: secure_string_cipher-1.0.10.tar.gz
  • Upload date:
  • Size: 68.9 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.10.tar.gz
Algorithm Hash digest
SHA256 e7f5db37eae8ad0a25f19f2f8aad677afd472a72509dacfa41b89207d7ce2f8a
MD5 662d3761f7d78c4f20e1a590217958e0
BLAKE2b-256 532424ae8d6def00abfa10c2f3e9c5a1f55aeab72943f27febcb18086033796b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for secure_string_cipher-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 620c67e592f8cdabd85fb9dbb1e6dd983784c6700aaa1fd73077514963aca69c
MD5 75538b9e729d59e77ba56cfe122dc76a
BLAKE2b-256 6f377875719c7c6a13a6fca376a13b2ba43dfb6d6c4d506669a6171be8f3241c

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