Military-Grade Folder Encryption Tool
Encrypt entire folders into a single secure container using XChaCha20-Poly1305 (AEAD) and Argon2id (KDF).
Protects filenames, metadata, and contents with cutting-edge cryptography.
Download β’ Quick Start β’ Documentation β’ Security
- π Military-Grade Encryption: XChaCha20-Poly1305 AEAD cipher (256-bit keys)
- οΏ½ Folder & File Support: Encrypt entire folders or individual files
- ποΈ Interactive File Browser: Navigate your file system with visual drive and folder selection
- π Flexible Key Management: Use passphrases or raw 32-byte key files
- π¦ Single Secure Container: Compress + encrypt into
.ecryptfiles - π¨ Beautiful Interactive UI: User-friendly menu system or powerful command-line interface
- πΎ Drive Selection: Start browsing from drive level (C:, D:, etc.) on Windows
- π‘οΈ Secure by Default: Argon2id KDF (256MB memory, 3 iterations) - winner of Password Hashing Competition
- βΆ Undo Feature: Easily decrypt and restore recently encrypted data
- π Smart Path Detection: Auto-detects file vs folder, handles quoted paths with spaces
- β‘ Fast & Lightweight: Single binary, zero dependencies, cross-platform ready
- π Tamper Detection: Authentication tags prevent file modifications
- π Progress Tracking: Real-time visual feedback during operations
- π Cross-Platform: Works on Windows, macOS, and Linux
# Download the latest release
Invoke-WebRequest -Uri "https://github.com/pandarudra/ecrypto/releases/latest/download/ecrypto-windows-amd64.exe" -OutFile "ecrypto.exe"
# Run it
.\ecrypto.exeOr manually:
- Go to Releases π¦
- Download
ecrypto-windows-amd64.exe - Rename to
ecrypto.exeand run!
# Download the latest release
curl -L -o ecrypto "https://github.com/pandarudra/ecrypto/releases/latest/download/ecrypto-darwin-amd64"
chmod +x ecrypto
# Move to PATH (optional)
sudo mv ecrypto /usr/local/bin/# Download the latest release
wget -O ecrypto "https://github.com/pandarudra/ecrypto/releases/latest/download/ecrypto-linux-amd64"
chmod +x ecrypto
# Move to PATH (optional)
sudo mv ecrypto /usr/local/bin/Quickly install ECRYPTO as a global command-line tool:
npm install -g ecrypto-cli
# Then use it anywhere
ecrypto-cli --helpBenefits:
- Available from any directory
- Automatic updates:
npm update -g ecrypto-cli - Cross-platform (Windows, macOS, Linux)
- No manual binary management
Requirements: Go 1.24+
git clone https://github.com/pandarudra/ecrypto.git
cd ecrypto
go build -o ecrypto
# On Windows, this creates ecrypto.exe
# On macOS/Linux, run: chmod +x ecryptoNew in v1.0.7! No need to type paths manually. Navigate your file system visually:
Start by selecting your drive:
πΎ Select Drive
[1] πΎ C:
[2] πΎ D:
[3] πΎ E:
Browse folders with visual feedback:
π Current: C:\Users\YourName
[1] β¬οΈ ..
[2] π Documents
[3] π Downloads
[4] π Pictures (250 MB)
[5] π Desktop
[6] π report.pdf (2.5 MB)
Enter number to select | [S]elect current folder | [P]aste path | [Q]uit
Features:
- β Visual drive selection (C:, D:, etc.)
- β Navigate folders with numbers
- β See file sizes before selecting
- β Quick access to common folders (Documents, Downloads, Pictures, Desktop)
- β Still supports pasting paths directly (with or without quotes)
- β Auto-detects files vs folders
Choose your preferred method:
Choose [1] Browse interactively or [2] Paste/Type path
Option 1: Visual navigation with file browser
Option 2: Direct path paste: C:\Users\shree\Documents\folder
Handles:
- Paths with spaces:
C:\Program Files\My App - Quoted paths:
"C:\My Folder\file.txt" - Forward or backward slashes
The easiest way to use ECRYPTO - just run the executable with no arguments:
.\ecrypto.exeYou'll see an intuitive interactive menu:
ββββββ ββββββ ββββββ ββ ββ ββββββ ββββββ ββββββ
ββββ ββ βββββββ ββββ ββββββ ββ ββ ββ
ββββββ ββββββ ββ ββ ββ ββ ββ ββββββ
[1] [ENCRYPT] Encrypt a Folder/File
[2] [DECRYPT] Decrypt a Folder/File
[3] [KEYGEN] Generate Encryption Key
[4] [INFO] View Container Info
[5] [UNDO] Undo Recent Operation
[6] [EXIT] Quit Application
Step-by-step walkthrough:
- Select
[1] ENCRYPT - Choose between folder or file encryption
- Browse your file system or paste path
- Choose output location
- Enter a strong passphrase (or use key file)
- Done! Your data is now encrypted
# All commands use 'ecrypto-cli' instead of '.\ecrypto.exe'
ecrypto-cli encrypt --in "path/to/folder" --out "backup.ecrypt" --pass "YourPassword"
ecrypto-cli decrypt --in "backup.ecrypt" --out "restored" --pass "YourPassword"
ecrypto-cli keygen --out mykey.txt# Encrypt a folder with passphrase:
.\ecrypto.exe encrypt --in "C:\MyFolder" --out "backup.ecrypt" --pass "YourStrongPassphrase123!"
# Encrypt a single file with passphrase:
.\ecrypto.exe encrypt --in "C:\report.pdf" --out "report.ecrypt" --pass "YourStrongPassphrase123!"
# Decrypt a container (auto-detects file or folder):
.\ecrypto.exe decrypt --in "backup.ecrypt" --out "restored" --pass "YourStrongPassphrase123!"
# Generate a random 32-byte encryption key:
.\ecrypto.exe keygen --out mykey.txt
# Encrypt with a raw key file (maximum security - works for files and folders):
.\ecrypto.exe encrypt --in "C:\MyFolder" --out "backup.ecrypt" --key-file mykey.txt
# View container information (no decryption required):
.\ecrypto.exe info --file backup.ecryptPro Tip: Key files provide stronger security than passphrases. Store them in a password manager!
Perfect for creating encrypted backups of your important files:
# Encrypt your documents folder
.\ecrypto.exe encrypt --in "C:\Users\YourName\Documents" --out "documents_backup.ecrypt" --pass "MySecurePassword123!"
# Later, restore to a new location
.\ecrypto.exe decrypt --in "documents_backup.ecrypt" --out "C:\Restored\Documents" --pass "MySecurePassword123!"Use Case: Regular backups, cloud storage, disaster recovery
Share sensitive data securely by encrypting with a key file:
# Step 1: Generate a random encryption key
.\ecrypto.exe keygen --out transfer_key.txt
# Step 2: Encrypt your sensitive file or folder
.\ecrypto.exe encrypt --in "C:\report.pdf" --out "transfer.ecrypt" --key-file transfer_key.txt
# or for a folder:
.\ecrypto.exe encrypt --in "C:\SensitiveData" --out "transfer.ecrypt" --key-file transfer_key.txt
# Step 3: Send transfer.ecrypt via one channel (email/cloud)
# Send transfer_key.txt via a DIFFERENT secure channel (Signal/WhatsApp)
# Recipient decrypts with the key:
.\ecrypto.exe decrypt --in "transfer.ecrypt" --out "received_data" --key-file transfer_key.txtUse Case: Confidential file sharing, client deliverables, HIPAA/GDPR compliance
Adjust Argon2 parameters for slower machines or faster encryption:
# Lower settings for older machines (128MB memory, 2 iterations)
.\ecrypto.exe encrypt --in "C:\MyFolder" --out "backup.ecrypt" --pass "password" --argon-m 131072 --argon-t 2
# Higher security for critical data (512MB memory, 5 iterations)
.\ecrypto.exe encrypt --in "C:\TopSecret" --out "critical.ecrypt" --pass "password" --argon-m 524288 --argon-t 5Use Case: Performance tuning, high-security requirements, legacy systems
Encrypt multiple folders programmatically:
# Encrypt multiple project folders
$folders = @("C:\Project1", "C:\Project2", "C:\Project3")
foreach ($folder in $folders) {
$name = Split-Path $folder -Leaf
.\ecrypto.exe encrypt --in $folder --out "D:\Backups\$name.ecrypt" --pass "YourPassword"
}Use Case: Automated backups, CI/CD pipelines, scheduled tasks
Accidentally encrypted something? Restore it with one click:
# Encrypted a folder
.\ecrypto.exe encrypt --in "C:\MyFiles" --out "backup.ecrypt" --pass "password"
# Later: Need to undo the encryption
.\ecrypto.exe
β [5] [UNDO] Undo Recent Operation
β Select: C:\MyFiles | 450 files | 1.24 GB
β Passphrase: password
β β Restored to: C:\MyFiles_restoredUse Case: Testing encryption settings, accidental encryption, backup verification
ECRYPTO uses industry-leading cryptographic standards:
-
Encryption Cipher: XChaCha20-Poly1305
- AEAD (Authenticated Encryption with Associated Data)
- 256-bit keys for maximum security
- ChaCha20 stream cipher + Poly1305 MAC
- RFC 8439 compliant
-
Key Derivation: Argon2id
- Winner of the Password Hashing Competition (2015)
- Resistant to GPU/ASIC attacks
- Default: 256 MB memory, 3 iterations, 1 thread
- RFC 9106 compliant
-
Random Generation: Cryptographically secure (Go's
crypto/rand)- 24-byte XChaCha20 nonce (never reused)
- 16-byte Argon2 salt
- True randomness from OS entropy sources
-
Data Integrity: Poly1305 authentication tag
- 16-byte MAC prevents tampering
- Header authenticated as AAD (Additional Authenticated Data)
| Threat | Protection |
|---|---|
| Unauthorized file access | β Strong 256-bit encryption |
| Filename/metadata leakage | β Everything encrypted in container |
| Brute-force attacks | β Argon2id makes cracking impractical |
| File tampering | β Authentication tag detects modifications |
| Rainbow table attacks | β Unique salt per container |
| Nonce reuse attacks | β Random 24-byte nonce per encryption |
ECRYPTO does NOT protect against:
| Threat | Mitigation |
|---|---|
| Physical memory extraction | Use full-disk encryption (BitLocker, FileVault) |
| Weak passphrases | Use 16+ character passphrases or key files |
| Malware/keyloggers on system | Keep OS updated, use antivirus software |
| Loss of encryption key | Always backup your keys/passphrases! |
| Side-channel attacks | Not designed for hostile multi-tenant environments |
β Weak: password123, qwerty, admin
β
Strong: Correct-Horse-Battery-Staple-2026!
β
Better: Use a key file generated with `keygen`
Recommendations:
- Minimum 16 characters
- Mix uppercase, lowercase, numbers, symbols
- Use a password manager (1Password, Bitwarden, KeePass)
- Never reuse passphrases across containers
# Generate key files for maximum security
.\ecrypto.exe keygen --out project_key.txt
# Store in password manager or encrypted USB drive
# Never store keys next to encrypted filesOriginal Files β Encrypt β .ecrypt container
β β β
(Delete) (Backup) (Store securely)
β
Cloud Storage / External Drive
Critical: Test decryption BEFORE deleting original files!
Windows:
# Use SDelete (Sysinternals) for secure deletion
sdelete -p 3 "C:\OriginalFolder"Linux/macOS:
# Use shred for secure deletion
shred -vfz -n 3 /path/to/file- β Cloud storage (Google Drive, Dropbox) - encrypted container is safe
- β External drives with additional disk encryption
- β Network shares with proper access controls
- β Public file-sharing sites (risk of corruption)
# 1. Check container integrity
.\ecrypto.exe info --file backup.ecrypt
# 2. Test decryption to temporary location
.\ecrypto.exe decrypt --in backup.ecrypt --out test_restore --pass "YourPassword"
# 3. Verify files are intact
# Compare checksums or spot-check files
# 4. Delete test restore
Remove-Item -Recurse test_restoreECRYPTO has been designed with security in mind:
- β No hardcoded secrets or backdoors
- β Open-source code available for review
- β
Standard cryptographic libraries (Go's
crypto/*) - β Minimal dependencies reduce attack surface
- β No network connections or telemetry
Want to contribute to security? Report vulnerabilities via GitHub Issues (use "Security" label)
| Flag | Description | Default |
|---|---|---|
--in |
Input folder path | (required) |
--out |
Output .ecrypt file | (required) |
--pass |
Passphrase (Argon2id) | - |
--key-file |
32-byte Base64 key file | - |
--argon-m |
Argon2 memory (KiB) | 262144 (256MB) |
--argon-t |
Argon2 iterations | 3 |
--argon-p |
Argon2 parallelism | 1 |
| Flag | Description | Default |
|---|---|---|
--in |
Input .ecrypt file | (required) |
--out |
Output folder path | (required) |
--pass |
Passphrase | - |
--key-file |
Key file | - |
| Flag | Description | Default |
|---|---|---|
--out |
Output key file | (prints to stdout) |
| Flag | Description | Default |
|---|---|---|
--file |
.ecrypt file path | (required) |
.ecrypt Container Format (v1):
ββββββββββββββββββββββββββββββββββββββββββ
β Header (59 bytes) β
β - Magic: "ECRYPT01" β
β - Version: 1 β
β - KDF: 0=raw, 1=Argon2id β
β - Argon2 params (m, t, p) β
β - Salt (16 bytes) β
β - Nonce (24 bytes) β
ββββββββββββββββββββββββββββββββββββββββββ€
β Encrypted Data (XChaCha20-Poly1305) β
β - Compressed folder (ZIP) β
β - Authentication Tag (16 bytes) β
ββββββββββββββββββββββββββββββββββββββββββ
File Flow:
Input Folder β ZIP Archive β Encrypt (XChaCha20) β .ecrypt Container
β "Access is denied" error when encrypting
Problem: Output path is a directory instead of a file.
Solution: Specify a file path ending with .ecrypt:
# β Wrong - this is a directory
.\ecrypto.exe encrypt --in folder --out D:\backup
# β
Correct - this is a file
.\ecrypto.exe encrypt --in folder --out D:\backup.ecryptπ "Decryption failed: authentication tag mismatch"
Problem: Wrong passphrase/key or corrupted file.
Solutions:
- Double-check your passphrase (case-sensitive!)
- Verify you're using the correct key file
- Check file integrity with
infocommand:.\ecrypto.exe info --file backup.ecrypt
- Ensure the file wasn't modified or corrupted during transfer
- Try re-downloading the file if transferred over network
Prevention: Always test decryption immediately after encryption!
π "File not found" in interactive mode
Problem: Paths with spaces not recognized.
Solution: Use quotes around paths:
Enter folder path: "C:\My Documents\Folder"
Or use paths without spaces:
Enter folder path: C:\Users\John\Documents
β οΈ "Out of memory" during encryption
Problem: Argon2 memory settings too high for your system.
Solution: Reduce Argon2 memory parameter:
# Default is 256MB - reduce to 128MB
.\ecrypto.exe encrypt --in folder --out backup.ecrypt --pass "password" --argon-m 131072
# For very low-memory systems (64MB)
.\ecrypto.exe encrypt --in folder --out backup.ecrypt --pass "password" --argon-m 65536Note: Lower memory = faster cracking, so use strongest your system can handle.
π Encryption/decryption is very slow
Causes & Solutions:
- Large Argon2 parameters: Reduce
--argon-mand--argon-t - Large folders: This is expected - compression + encryption takes time
- Slow storage: Move to SSD instead of HDD
- Antivirus scanning: Add exception for ecrypto or
.ecryptfiles
Performance tips:
- Use key files instead of passphrases (skips Argon2)
- Split large folders into smaller containers
- Disable real-time antivirus scanning during operations
β "Invalid command" errors
Solution: Check command syntax:
# Correct syntax
.\ecrypto.exe <command> --flag value
# Common mistakes
.\ecrypto.exe --in folder encrypt # β Command must come first
.\ecrypto.exe encrypt -in folder # β Use -- for flagsUse --help for syntax help:
.\ecrypto.exe --help
.\ecrypto.exe encrypt --helpπ "Cannot restore folder structure"
Problem: Permissions issues or invalid output path.
Solutions:
- Run as Administrator (right-click β Run as administrator)
- Ensure output directory exists and is writable
- Check available disk space
- Avoid network drives if experiencing issues
- Check the logs: Look for error messages in terminal output
- Verify system requirements: Go 1.24+ if building from source
- Test with small files first: Isolate whether issue is size-related
- Report bugs: Open an issue with:
- Operating system & version
- ECRYPTO version (
.\ecrypto.exe --version) - Command you ran (redact sensitive info)
- Full error message
We welcome contributions from the community! Here's how you can help:
- π Report bugs - Found an issue? Create a bug report
- π‘ Suggest features - Have an idea? Open a feature request
- π Improve docs - Fix typos, add examples, clarify instructions
- π Security audits - Review cryptographic implementation
- π» Code contributions - Fix bugs, implement features
# Clone the repository
git clone https://github.com/pandarudra/ecrypto.git
cd ecrypto
# Install dependencies
go mod download
# Run tests
go test ./...
# Build
go build -o ecrypto- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with clear commit messages
- Test thoroughly (
go test ./...) - Commit changes (
git commit -m 'Add amazing feature') - Push to your fork (
git push origin feature/amazing-feature) - Open a Pull Request with detailed description
- Follow Go best practices and
gofmtformatting - Add tests for new features
- Update documentation for user-facing changes
- Keep commits atomic and well-described
- Ensure backwards compatibility with
.ecryptformat
Found a security vulnerability? Please:
- DO NOT open a public issue
- Email details to [security contact] or use GitHub Security Advisories
- Include: description, steps to reproduce, potential impact
- We'll respond within 48 hours
This project is licensed under the MIT License - see the LICENSE file for details.
TL;DR: You can use, modify, and distribute this software freely. Just include the license notice.
- π¦ Download Latest Release
- π Report a Bug
- π‘ Request a Feature
- π Documentation & Wiki
- π¬ Discussions
- π How It Works - Visual explanation of encryption pipeline
- βΆ Undo Feature - Restore encrypted folders easily
- π¨ UI Enhancements - User-friendly terminal experience
- π XChaCha20-Poly1305 Specification
- π Argon2 Password Hashing
- π‘οΈ OWASP Cryptographic Storage
- π Password Manager Recommendations
If you find ECRYPTO useful, please consider:
- β Starring the repository - Helps others discover the project
- π Reporting bugs - Makes the tool better for everyone
- π’ Sharing - Tell colleagues and friends
- π» Contributing - Submit PRs or improve documentation
- β Sponsoring - Support ongoing development
ECRYPTO is built on top of excellent open-source libraries:
- golang.org/x/crypto - Cryptographic implementations
- github.com/spf13/cobra - CLI framework
- github.com/charmbracelet/lipgloss - Terminal styling
Special thanks to the cryptography community for their research and implementations.
Planned features for future releases:
- npm package for easy installation
- GUI application (Windows/macOS/Linux)
- Compression algorithm selection (ZSTD, GZIP)
- Multiple key support (multi-party encryption)
- Hardware security module (HSM) integration
- Cloud storage integration (S3, Azure Blob)
- Automated backup scheduling
- Mobile app (iOS/Android)
Vote for features in Discussions!
Made with β€οΈ for Privacy and Security
"Your data, your control, your peace of mind."
