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.9.tar.gz (51.1 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.9-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: secure_string_cipher-1.0.9.tar.gz
  • Upload date:
  • Size: 51.1 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.9.tar.gz
Algorithm Hash digest
SHA256 d295d898eb309b1e5aabec1e3386f45576be5b64ea7c0bfb7e29ed67cd488c21
MD5 9a9cc627cb466e9b76add2c18cd334fd
BLAKE2b-256 82cde546553b50c4d7ecef44546f657cf5c8293d396f971fe6d6eea58aba8f18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for secure_string_cipher-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ecfd49df7d237e42f882b6ba773b9fd5a95d4efcd5887b306f9722dee4d0ef71
MD5 63cfcb45f1b0c6365421630099bce27c
BLAKE2b-256 0b0c444acd79caa0bcd713bd2c3d15a022cae6e04752e76370d7abd4c48ae56c

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