Skip to main content

Secure file & directory encryption CLI

Project description

CryptLock 🔐

Secure file & directory encryption CLI using AES-256-CFB with PBKDF2 key derivation.

Installation

pip install cryptlock

Usage

Encrypt a file

cryptlock encrypt myfile.txt

Encrypt and wipe original

cryptlock encrypt myfile.txt --wipe

Encrypt a directory

cryptlock encrypt myfolder --wipe

Decrypt a file

cryptlock decrypt myfile.txt.enc

Keep encrypted file after decryption

cryptlock decrypt myfile.txt.enc --keep

Features

  • AES-256-CFB encryption - Industry-standard symmetric encryption
  • PBKDF2-SHA256 - 600,000 iterations for key derivation (OWASP 2023 recommendation)
  • HMAC-SHA256 - Integrity verification (Encrypt-then-MAC)
  • Directory support - Automatically zips and encrypts folders
  • Progress bar - Visual feedback for large files
  • Cross-platform - Works on Linux, macOS, and Windows
  • Secure wipe - Best-effort secure deletion of original files

Security Notes

⚠️ Important Security Considerations:

  1. Secure deletion limitations: The --wipe flag attempts to overwrite files, but this is NOT cryptographically secure on:

    • SSDs (due to wear leveling)
    • Copy-on-write filesystems (btrfs, ZFS)
    • Journaling filesystems

    For true secure deletion, use full-disk encryption.

  2. Password strength: Use strong, unique passwords. The tool uses 600,000 PBKDF2 iterations, but weak passwords can still be brute-forced.

  3. Backup your data: Always maintain backups before encrypting important files.

Requirements

  • Python 3.8+
  • cryptography
  • tqdm

License

MIT License

Disclaimer

This tool is provided for educational and legitimate security purposes only. The authors are not responsible for any misuse or data loss.

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

cryptlock-1.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

cryptlock-1.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file cryptlock-1.1.0.tar.gz.

File metadata

  • Download URL: cryptlock-1.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cryptlock-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7fb69e4e51490e7dd10d3bc424ac497006babe5dcc9c284c5e9d4814b1447c2b
MD5 5fddf021fa91c01f390660ac2ad2dd79
BLAKE2b-256 38f2cacd1da90e5d255240c7cee9cd601ada117632243642068d73c67912af63

See more details on using hashes here.

File details

Details for the file cryptlock-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: cryptlock-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cryptlock-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e0c17ebe489ef82323ad7606ac7edfd8b1c0a6d766c2e25eef25601f99e2375
MD5 6c9f221e42608101dedbadd260d65601
BLAKE2b-256 53c4cdf3a9847c5394324b133bd239a3989628de3d5a2301023b2148245a4c76

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