
GoCrypt – Context Menu File Encryption
Introduction to GoCrypt
We all have those early coding projects—ambitious ideas that taught us a lot but, in hindsight, weren’t exactly perfect. One of my first major projects was a file encryption tool I built in Python. While it had a sleek UI, it was slow, cumbersome, and made files exponentially larger with each encryption layer.
Determined to build something faster, I saw this as the perfect opportunity to learn Go. Initially, this was just a fun test to compare Python’s encryption speed against Go—it was like racing a Ferrari against a Toyota Camry. But as I dug deeper, I became more interested in optimizing speed while keeping encryption secure. Then, the idea hit me:
“What if I could just right-click on an item to encrypt it?”
That’s how GoCrypt was born—a lightweight, fast, and user-friendly encryption tool that integrates seamlessly into Windows.
Features of GoCrypt
GoCrypt is designed with ease of use in mind, offering both GUI and CLI support for encrypting and decrypting files.
✅ ChaCha20-Poly1305 Encryption – A modern, high-performance encryption algorithm.
✅ Windows Context Menu Integration – Encrypt/decrypt files with a simple right-click.
✅ Multi-Layer Encryption – Apply up to 200 layers for added security.
✅ Automatic File Association – Open .enc
files directly with GoCrypt.
✅ Cross-Platform CLI – Works on Linux and Mac (GUI is Windows-only).
Installing GoCrypt
To install GoCrypt, download the latest release from the GitHub Releases page. The installer provides a seamless setup, with options to:
✔ Associate .enc
files with GoCrypt
✔ Add GoCrypt to the system PATH

Encrypting a File
1️⃣ Right-click a file or folder.
2️⃣ Select GoCrypt > Encrypt from the context menu.
3️⃣ Enter a password and confirm encryption.
4️⃣ An .enc
file will be generated, securely encrypting your original data.


Decrypting a File
1️⃣ Right-click the encrypted .enc
file.
2️⃣ Select GoCrypt > Decrypt.
3️⃣ Enter the original password to unlock your file.
That’s it! No command-line knowledge required—just a fast and seamless decryption process.
CLI Usage
GoCrypt also supports CLI commands for power users. Once you run either encrypt or decrypt, you will be prompted to enter an encryption password.
🔒 Encrypt a file:
gocrypt encrypt secret.txt
🔓 Decrypt a file:
gocrypt decrypt secret.txt.enc
⚡ Additional Flags:
-n, --no-ui
– Disable the GUI for terminal-based encryption.-l, --layers
– Set encryption layers (default: 5, max: 200).-o, --output
– Define output directory for encrypted files.
Example with flags:
gocrypt -n -l 10 -o "C:/output_dir" encrypt secret.txt
Behind the Scenes: Why ChaCha20-Poly1305?
GoCrypt uses ChaCha20-Poly1305, an authenticated encryption algorithm known for:
✔ High Performance – Faster than AES on modern CPUs.
✔ Strong Security – Used in TLS 1.3 and trusted by security experts.
✔ Low Overhead – Minimal file size increase compared to traditional encryption.
Unlike my old Python encryption tool, GoCrypt ensures that file sizes remain efficient without unnecessary bloat.
Layered Encryption: Strength in Depth
To further enhance security, GoCrypt supports multi-layer encryption, allowing files to be encrypted multiple times using different cryptographic keys. Each layer is derived from a unique salt and passphrase, meaning that even if a single key were compromised, the remaining layers would still protect the file.
Key Features of Layered Encryption:
✔ User-Defined Layers – Encrypt files up to 200 times for added protection.
✔ Unique Key Per Layer – Each layer uses a distinct key, derived using PBKDF2 (SHA-256, 4096 iterations).
✔ Optimized for Performance – Designed to balance security and resource efficiency.
The number of encryption layers is stored in the first byte of the encrypted file header, ensuring that GoCrypt can automatically decrypt files correctly by iterating through the required number of layers.
File Format Overview
A .enc
file generated by GoCrypt follows this structure:
Layer Count | Nonce (24 bytes) | Salt (16 bytes) | Encrypted File Contents |
---|---|---|---|
1 byte | 24 bytes | 16 bytes | 0–256 GiB |
🔹 Plausible Deniability – Encrypted files resemble compressed or randomly generated data, making them difficult to identify as encrypted content.
🔹 Streaming Encryption – GoCrypt processes files in chunks to minimize memory usage, ensuring fast performance even on large files.
Final Thoughts
Building GoCrypt has been a rewarding experience, and I’m excited to keep improving it. Whether you’re securing personal files or handling sensitive data, GoCrypt makes encryption simple and efficient.
You can check out the project and contribute on GitHub.
Do you have feature requests or feedback? Drop a comment below!
Leave a Reply
You must be logged in to post a comment.