himbocrypt
A robust end-to-end encryption engine and CLI.
What is this?
An encryption tool for secure message exchange. Uses X25519 key exchange, XChaCha20-Poly1305 for authenticated encryption, and HKDF for key derivation.
How it works
- Keys: You get a "Public Key" (share with the other party) and a "Private Key" (keep secret).
- Sending: The tool combines your private key with the recipient's public key to derive a shared secret and encrypt the message.
- Receiving: The recipient uses their private key and your public key to derive the same secret and decrypt.
- Forward Secrecy: Every message generates an ephemeral keypair that's discarded after use. If your long-term key is compromised later, past messages remain secure.
Usage
Build
go build -o himbocrypt cmd/himbocrypt/main.go
Make Keys
Both parties need to generate their own keypair.
./himbocrypt keygen
Save the output!
Send a Message
./himbocrypt encrypt \
-sender-priv <YOUR_PRIVATE_KEY> \
-recipient-pub <RECIPIENT_PUBLIC_KEY> \
-msg "Hello there"
Read a Message
./himbocrypt decrypt \
-recipient-priv <YOUR_PRIVATE_KEY> \
-sender-pub <SENDER_PUBLIC_KEY> \
-ciphertext <THE_CIPHERTEXT>
For Developers
Use this in your own Go apps:
import "himbocrypt/pkg/engine"
e := engine.NewEngine()
Testing
Run the full test suite:
go test ./pkg/engine/... -v
Run benchmarks:
go test ./pkg/engine/... -bench=. -benchmem
Description
Languages
Go
97.1%
Nix
2.3%
Makefile
0.6%