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.0.2.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.0.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cryptlock-1.0.2.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.0.2.tar.gz
Algorithm Hash digest
SHA256 3afed33bf1ff335c7971f764686fab574dd397013ea7d816f72065e1ba068c3c
MD5 2b3339d93b3dff439d20cf25ac531e91
BLAKE2b-256 c81c3c24a83ca440b6bf20a237eb668ba7ea578ff7d71bf3a97a92be6ce04bc3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cryptlock-1.0.2-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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e759ac3b049e97851a672b5d7cae13ba0354c35f17aea996393d7a2d03ca354b
MD5 29265071e40acd01a75633d874dd958f
BLAKE2b-256 5c5b6ac5e51ea83ed02bb039dfdcb2c14be01b4064307d888df6a980bac91633

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