EclipseLock is a secure command-line file encryption tool that uses AES-256-CBC encryption with PKCS7 padding. It's designed to provide robust protection for sensitive files while maintaining ease of use.
- AES-256-CBC encryption/decryption
- Secure random IV generation for each encryption
- PKCS7 padding for block alignment
- Command-line interface with intuitive options
- Support for any file type
- Original file extension preservation
- Memory-safe implementation using modern C++
- OpenSSL EVP API for cryptographic operations
- C++ compiler with C++17 support
- OpenSSL development libraries
- Make
sudo apt-get install libssl-dev
sudo pacman -S openssl gcc openssl
sudo apt-get install libwxgtk3.0-gtk
# Clone the repository
git clone https://github.com/janfidra/eclipselock.git
cd eclipselock
# Build
make
# Install (optional)
sudo make install
# Install the .deb package
sudo dpkg -i eclipselock_1.0.0_amd64.deb
sudo apt-get install -f # Install dependencies if needed
# Using yay
yay -S eclipselock
# Or manually from AUR
git clone https://aur.archlinux.org/eclipselock.git
cd eclipselock
makepkg -si
nix-build eclipselock.nix
nix-env -i ./result
Basic command structure:
eclipselock [-e|-d] <file> -k <encryption_key>
Options:
-e, --encrypt <file> Encrypt the specified file
-d, --decrypt <file> Decrypt the specified file
-k, --key <key> Set the encryption key
-h, --help Display help message
# Encrypt a PDF file
eclipselock -e secret.pdf -k "my_secure_password"
# Creates: secret.pdf.enc
# Decrypt the file
eclipselock -d secret.pdf.enc -k "my_secure_password"
# Restores: secret.pdf
# Display help
eclipselock -h
- Strong Encryption: Uses AES-256-CBC encryption from OpenSSL's EVP API
- Random IV: Generates a unique random IV for each encryption operation
- PKCS7 Padding: Implements proper block padding for secure encryption
- Memory Safety: Utilizes modern C++ features for memory-safe operations
- Key Handling: Securely processes encryption keys with zero-initialization
The project consists of three main components:
- AESKey Class: Manages encryption keys with secure initialization
startLine: 12
endLine: 20
- AESCrypt Class: Handles encryption/decryption operations using OpenSSL
startLine: 23
endLine: 96
- FileHandler Class: Manages file operations with proper error handling
startLine: 99
endLine: 125
- Keep encryption keys secure and use strong passwords
- Encrypted files contain the IV in the header for decryption
- Original files are not automatically deleted after encryption
- Each file is encrypted with a unique IV
- The implementation uses industry-standard cryptographic practices
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow modern C++ best practices
- Maintain memory safety
- Add error handling for all operations
- Include tests for new features
- Document security-critical code
- Follow existing code style
The project includes comprehensive testing for:
- Encryption/decryption operations
- File handling
- Key management
- Error conditions
- Memory safety
This project is licensed under the MIT License - see the LICENSE file for details.
Jan Fidra [email protected]
- OpenSSL for cryptographic operations
- The C++ community for best practices and guidance
- Contributors and users who help improve the project
For bugs, feature requests, or questions:
- Open an issue on GitHub
- Contact the maintainer directly
- Check existing documentation and issues
Remember to never share encryption keys or sensitive files when reporting issues.