A secure file encryption tool using AES-256-GCM with Argon2id key derivation.
- Password-based encryption: Encrypt files with a password you choose
- Key-based encryption: Encrypt files with an auto-generated key (safer for sensitive data)
- Secure by default: AES-256-GCM encryption with Argon2id key derivation (64 MiB memory)
- Streaming: Handles large files efficiently without loading entire file into memory
- Plain-language errors: Clear error messages, no technical jargon
- Java 17 or later
- Gradle 8.x (or use the included wrapper)
./gradlew shadowJarThis creates build/libs/lcrypt.jar
Download the latest lcrypt.jar from the releases page.
lcrypt <command> <filename> [password]
| Command | Description |
|---|---|
encrypt |
Encrypt a file with a password |
encrypt-key |
Encrypt a file with an auto-generated key |
decrypt |
Decrypt an encrypted file |
Encrypt with password:
java -jar lcrypt.jar encrypt myfile.txt mypasswordEncrypt with auto-generated key:
java -jar lcrypt.jar encrypt-key secret.docxThis generates a key that you must save securely. If you lose it, your data cannot be recovered.
Decrypt a file:
java -jar lcrypt.jar decrypt myfile.txt.lcrypt mypasswordIf you omit the password, LlamaCrypt will prompt you:
java -jar lcrypt.jar encrypt myfile.txt
Enter password: ********- Files are encrypted with AES-256-GCM (authenticated encryption)
- Passwords are derived using Argon2id (memory-hard, GPU-resistant)
- Sensitive data is cleared from memory after use
- Original files are never modified or deleted
- Encrypted files have
.lcryptextension
Encrypted files (.lcrypt) contain:
- Magic bytes:
LCRY - Argon2id parameters (memory: 64 MiB, iterations: 3)
- Salt and IV (unique per encryption)
- Encrypted content with authentication tag
"File not found"
- Check the file path is correct
- Use absolute paths if relative paths don't work
"Incorrect password or the file is corrupted"
- Verify you used the correct password
- Check the file wasn't modified after encryption
"Not a valid encrypted file"
- Make sure you're decrypting a
.lcryptfile - File may be corrupted or not a LlamaCrypt file
MIT License