LockByte - Lock your data, byte by byte. A powerful command-line encryption tool that puts military-grade security in your hands.
- AES-256-GCM - Military-grade authenticated encryption
- Argon2id - Modern, memory-hard key derivation
- Text Encryption - Encrypt messages and get hex output
- File Encryption - Protect any file (PDF, images, documents, videos)
- Streaming - Encrypt large files without loading them entirely into RAM
- Interactive CLI - Simple menu-driven interface
- Command Mode - Scriptable commands for automation
- Password-Based - Use memorable passwords, not complex keys
- Tamper Detection - Automatically detects corrupted or modified data
- Backward Compatible - Reads files created with LockByte v1.0.0
# Clone LockByte
git clone https://github.com/AmirhosseinAgrest/lockbyte.git
cd lockbyte
# Install dependencies
pip install -r requirements.txtRun interactively:
python main.pyOr use command mode:
python main.py encrypt text
python main.py decrypt text
python main.py encrypt file secret.pdf
python main.py decrypt file secret.pdf.encrypted| Option | Action | Description |
|---|---|---|
| 1 | Encrypt text | Enter any text → receive encrypted hex |
| 2 | Decrypt text | Enter encrypted hex → get original message |
| 3 | Encrypt file | Select any file → creates encrypted copy |
| 4 | Decrypt file | Select encrypted file → restores original |
| 5 | Exit | Close LockByte |
LockByte supports direct command-line usage for automation and scripting:
# Encrypt/decrypt text
python main.py encrypt text
python main.py decrypt text
# Encrypt/decrypt files
python main.py encrypt file document.pdf
python main.py decrypt file document.pdf.encrypted
# Specify custom output names
python main.py encrypt file secret.pdf -o secret.lkb
python main.py decrypt file secret.lkb -o secret.pdf
# Overwrite existing files (use with caution)
python main.py encrypt file secret.pdf -o secret.lkb --force
# Quiet mode (suppress informational messages)
python main.py --quiet encrypt file secret.pdf -o secret.lkb
# Verbose mode (show detailed operation info)
python main.py --verbose encrypt file secret.pdf
# Get help
python main.py --help
python main.py encrypt --help
python main.py decrypt file --helpecho 'secret message' | python main.py encrypt text > encrypted.hex
python main.py decrypt text < encrypted.hexEncrypt a Secret Message
Select option (1-5): 1
Enter text to encrypt: My secret message
Enter encryption password:
Encryption successful!
Encrypted data (hex): a1b2c3d4e5f6...
Encrypt a PDF File
Select option (1-5): 3
Enter file path to encrypt: confidential.pdf
Enter encryption password:
File encrypted successfully!
Output: confidential.pdf.encrypted
Command-Line Example
python main.py encrypt file confidential.pdf -o confidential.lkb
Enter password:
Confirm password:
Encryption successful!The encrypted file works on any computer - Windows, Linux, or macOS
Just use the same password and you're good to go!
| Component | Details |
|---|---|
| Algorithm | AES-256-GCM |
| Key Derivation | Argon2id (memory-hard, resistant to GPU/ASIC attacks) |
| Salt | 16 bytes (random) |
| Nonce / IV | 12 bytes (random) |
| Authentication Tag | 16 bytes |
| File Handling | Streaming (no memory limits for large files) |
| Use Case | Example |
|---|---|
| Personal Privacy | Diary, financial records, passwords |
| Business | Sharing confidential documents with team |
| Cloud Backup | Encrypt before uploading to Google Drive, Dropbox |
| Secure Messaging | Send encrypted text via email, Discord, Telegram |
| File Sharing | Share sensitive files without fear |
| Automation | Script encryption in backup pipelines |
| Requirement | Version | Installation |
|---|---|---|
| Python | 3.7 or higher | python.org |
| pycryptodome | >=3.19 | pip install pycryptodome |
| argon2-cffi | >=21.3.0 | pip install argon2-cffi |
Security Reminders
• Use strong passwords (at least 12 characters, mix of letters/numbers/symbols)
• Passwords are never accepted as command-line arguments (only hidden prompts)
• Lost password = lost data forever (no backdoor exists, no recovery)
• This tool is for legitimate security purposes only
MIT License - Free for personal and commercial use.
You can:
- Use it commercially
- Modify it
- Distribute it
- Use it privately
Just keep the original copyright notice.
-
Legitimate use only – This tool is for personal security and privacy protection.
-
No liability – The author is not responsible for misuse, data loss, or legal consequences.
-
Your responsibility – Keep your passwords safe. Lost passwords = lost data forever.
-
Note on Encryption Laws
Some countries regulate or restrict the use of encryption software. It is your responsibility to ensure compliance with local laws before using LockByte.
⭐ encrypt · protect · decrypt ⭐