TexCrypt is a lightweight, secure, and user-friendly CLI tool built in Go for encrypting and decrypting text-based files using AES-256-GCM. Designed with simplicity in mind, TexCrypt ensures that sensitive file contents can be safely encrypted using strong passwords and modern cryptographic standards while keeping the experience user-friendly.
Whether you're storing personal notes, passwords, or secrets, TexCrypt provides a seamless way to lock down your data with minimal friction.
- AES-256-GCM Encryption – Provides both confidentiality and integrity.
- Password-Based Encryption – Uses Argon2id to derive secure keys from passwords.
- Salt + Nonce Randomization – Each encryption operation uses unique salt and nonce values.
- Simple CLI Interface – Easy to use with only a couple of flags.
- Secure File Output – Encrypted output stored as
.texcrypted. - Safe Password Entry – Prompts for password without echoing to the terminal.
-
Visit the Releases page.
-
Download the binary for your platform.
-
Make it executable:
chmod +x texcrypt
-
Run it:
./texcrypt --help
Ensure you have Go 1.20+ installed:
git clone https://github.com/dhr412/texcrypt.git
cd texcrypt/src
go build -o texcrypt
./texcrypt --helptexcrypt --encrypt <file> | --decrypt <file> [--help]--encrypt <file>– Encrypt a.txtor.mdfile using a password.--decrypt <file>– Decrypt a.texcryptedfile using the original password.--help– Show usage instructions.
Only
.txtand.mdfiles are allowed for encryption for now. Only.texcryptedfiles are valid for decryption.
texcrypt --encrypt secrets.txt- Prompts for password and confirmation.
- Outputs:
secrets.texcrypted
texcrypt --decrypt secrets.texcrypted- Prompts for the same password used to encrypt.
- Outputs:
secrets_decrypted.txt
-
Input Handling:
- Flags are parsed using Go’s
flagpackage. - Validates file types and required options.
- Flags are parsed using Go’s
-
Encryption:
- Prompts for password twice (with hidden input).
- Generates 32-byte random salt and nonce.
- Derives a 256-bit AES key using Argon2id.
- Encrypts file content using AES-GCM.
- Writes
[salt][nonce][ciphertext]to a.texcryptedfile.
-
Decryption:
- Prompts for password (once).
- Extracts salt and nonce from the file.
- Re-derives the key using Argon2.
- Decrypts the data and writes plaintext to
<original>_decrypted.<extension>.
-
Security Measures:
- Password input is hidden.
- AES-GCM provides both encryption and authentication.
- Key derivation is hardened using salt and Argon2.
This project is open-sourced under the MIT license.