A secure and efficient file encryption tool written in Go that implements multi-layer encryption with parallel processing capabilities.
- Multi-layer Encryption: Combines multiple encryption algorithms for enhanced security
- Serpent block cipher
- ChaCha20 stream cipher
- Reed-Solomon error correction encoding
- Data Compression: Utilizes zlib compression for efficient storage
- Parallel Processing: Leverages multi-core systems for faster encryption/decryption
- Progress Tracking: Real-time progress bar for file operations
- Error Recovery: Built-in error correction using Reed-Solomon encoding
- Interactive CLI: User-friendly command-line interface with file selection
- Cross-platform: Supports Windows, macOS, and Linux
- Go to the Releases page
- Download the latest binary for your operating system.
- Make the file executable (Unix-based systems):
chmod +x go-encryption*
Requirements:
- Go 1.19 or higher
- Git
# Clone the repository
git clone https://github.com/hambosto/go-encryption.git
# Change to project directory
cd go-encryption
# Build the project
go build -o go-encryption
# (Optional) Install globally
go install
-
Run the application:
./go-encryption
-
Select operation:
- Choose between
Encrypt
orDecrypt
using arrow keys
- Choose between
-
Select file:
- Navigate through available files using arrow keys
- For encryption: shows all non-encrypted files
- For decryption: shows only
.enc
files
The program will process the selected file and display progress in real-time.
- Encrypted files are saved with the
.enc
extension - Original filename is preserved when decrypting
- Files are processed in chunks for efficient memory usage
-
Serpent (Block Cipher)
- 256-bit key
- Considered a highly secure AES finalist
- Block size: 128 bits
-
ChaCha20 (Stream Cipher)
- 256-bit key
- Modern, high-performance cipher
- Developed by Daniel J. Bernstein
-
Reed-Solomon (Error Correction)
- Adds redundancy for error recovery
- Helps protect against data corruption
- Configurable data/parity ratio
- Unique nonces for each encryption layer
- Secure memory handling with buffer pools
- Padding and alignment for block cipher security
- Size header encryption
- Parallel Processing: Utilizes all available CPU cores
- Buffer Pools: Reduces memory allocations
- Chunked Processing: Handles large files efficiently
- Compressed Output: Reduces encrypted file size
To build for specific platforms:
# Windows
GOOS=windows GOARCH=amd64 go build -o go-encryption.exe
# macOS
GOOS=darwin GOARCH=amd64 go build -o go-encryption
# Linux
GOOS=linux GOARCH=amd64 go build -o go-encryption
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Uses progressbar for progress tracking
- Uses survey for interactive CLI
While this tool implements strong encryption algorithms, please note:
- Keep your encryption keys secure
- Back up important files before encryption
- Use strong, unique keys for each file
- Store nonces securely for decryption