https://github.com/keogami/crypt
A simple utility to encrypt & decrypt files with AES-256 with passphrases
https://github.com/keogami/crypt
cli cryptography encryption-decryption go privacy tool
Last synced: 5 months ago
JSON representation
A simple utility to encrypt & decrypt files with AES-256 with passphrases
- Host: GitHub
- URL: https://github.com/keogami/crypt
- Owner: keogami
- License: apache-2.0
- Created: 2021-10-15T20:29:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-23T09:45:08.000Z (almost 4 years ago)
- Last Synced: 2025-03-18T00:37:48.557Z (over 1 year ago)
- Topics: cli, cryptography, encryption-decryption, go, privacy, tool
- Language: Go
- Homepage:
- Size: 2.59 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crypt
A simple utility to encrypt & decrypt files with AES-256 with passphrases
## Features
- Encrypt files using a single passphrase
- Decryption requires the passphrase & a randomly-generated cryptographically-strong salt
- Easy to wrap my two brain cells around
## Installation
First install `go` from [https://go.dev/dl](https://go.dev/dl) then run the following commands:
```bash
go install github.com/keogami/crypt/cmd/crypt@latest
```
That's the end of it :3
## Running crypt
Run crypt by itself to get usage info:
```bash
crypt
```
```
NAME:
crypt - encrypt and decrypt files with AES-256
USAGE:
crypt [global options] command [command options] [arguments...]
COMMANDS:
encrypt, en, e encrypt the given file and outputs to stdout
decrypt, de, d decrypt the given file and outputs to stdout (on failure outputs nothing)
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--passphrase value, --pass value, -p value passphrase to be used for operations; if empty, you will be prompted to type it in
--salt value, -s value the file where the salt is to be stored or loaded from
--output value, --out value, -o value output is the path to the file where the output is stored, defaults to stdout
--help, -h show help (default: false)
```
## Encrypting a file
To encrypt files you need to specify three things:
1. A passphrase using `-p`
2. An output path using `-o`
3. A path where you want the salt to be stored using `-s`
```
crypt -p -o -s encrypt
```
For example:
```
crypt -p "my super secure passphrase" -o output.enc -s output.salt encrypt mysecretfile.txt
```
This will generate two new files:
1. `output.enc`, the encrypted file
2. `output.salt`, this file is required to decrypt `output.enc`
Now you can safely delete the original file ;3
NOTE: To avoid compromising your passphrase, omit `-p` or supply an empty string to `-p` and `crypt` will prompt you to enter your password.
```
crypt -p "" -o output.enc -s output.salt encrypt mysecretfile.txt
```
## Decrypting a file
To decrypt, you simply do the inverse of encryption:
```
crypt -p -o -s decrypt
```
Now you should have your original file back ;3
----
# What now?
Now you can hide stuff without much hassle X3 thank me later