https://github.com/nsmith5/ncrypt
Simple Encryption CLI
https://github.com/nsmith5/ncrypt
Last synced: about 2 months ago
JSON representation
Simple Encryption CLI
- Host: GitHub
- URL: https://github.com/nsmith5/ncrypt
- Owner: nsmith5
- License: mit
- Created: 2022-01-03T08:37:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T09:06:39.000Z (over 3 years ago)
- Last Synced: 2025-01-10T02:59:39.001Z (over 1 year ago)
- Language: Go
- Size: 43 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `ncrypt` | simple file encryption CLI
[](https://goreportcard.com/report/github.com/nsmith5/ncrypt)
> NB: You probably _shouldn't_ use this! Go find you a battle tested
> encryption CLI. I'm sure its out there somewhere.
`ncrypt` is a very simple command line tool for file encryption
and decryption.
## Usage
```
Usage of ncrypt:
-d, --decrypt decrypt input instead of encrypt
-i, --input string input filename (default "stdin")
-o, --output string output filename (default "stdout")
--passwd-stdin read password from stdin
```
```bash
# Encrypt
ncrypt -i input.txt > input.txt.ncrypt
```
```bash
# Decrypt
ncrypt -i input.txt.ncrypt
```
## Design
`ncrypt` uses [argon2id](https://github.com/p-h-c/phc-winner-argon2) for key
derivation (turning your password input into an encryption key) and
[xchacha20poly1305](https://datatracker.ietf.org/doc/html/draft-arciszewski-xchacha)
for authenticated encryption.
## Why?
In a recent conversation with some folks we were dismayed at the state of
encryption of private keys output by openssl. We were wanting for a simple CLI
that used modern authenticated encryption to encrypt files with a password.
While greate libraries exist like
- [Tink](https://github.com/google/tink)
- [NaCl / libsodium](https://nacl.cr.yp.to/)
we couldn't find a simple ubiquitous encryption CLI that exposed these
libraries for command line users.
## Whats with the name?
n -> Nathan (me)
crypt -> encrypt / decrypt