https://github.com/mgerb/mgcrypt
Dead simple AES file encryption.
https://github.com/mgerb/mgcrypt
aes aes-encryption go golang mgcrypt
Last synced: about 1 year ago
JSON representation
Dead simple AES file encryption.
- Host: GitHub
- URL: https://github.com/mgerb/mgcrypt
- Owner: mgerb
- License: mit
- Created: 2018-12-11T05:21:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T05:54:20.000Z (over 7 years ago)
- Last Synced: 2025-05-07T21:11:28.370Z (about 1 year ago)
- Topics: aes, aes-encryption, go, golang, mgcrypt
- Language: Go
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# MGCrypt
Dead simple AES file encryption.
**Disclaimer: I'm no security expert, use at your own risk.**
[Download the latest release here.](https://github.com/mgerb/mgcrypt/releases)
---
## Usage
**Arguments**
* **-d** Decrypt (encrypts by default)
* **-k** Specify your encryption key
* **-o** Specify an output file
---
### Encrypt
```
mgcrypt -k yourSecretKey inputFile
```
### Decrypt
```
mgcrypt -k yourSecretKey -d inputFile
```
#### Output to a file (this works for both encryption/decription)
```
mgcrypt -k yourSecretKey -o outputFile inputFile
or
mgcrypt -k yourSecretKey inputFile > outputFile
```
## How does it work?
* The Go standard crypto libraries are used to encrypt/decrypt files with [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard)
* A salt is stored with each encrypted file (the first 128 bits of SHA256 checksum of the original file)
* [pbkdf2](https://en.wikipedia.org/wiki/PBKDF2) is used to generate an AES key with password/salt