https://github.com/aerth/argon2-xor
Encrypt and Decrypt Files (password based symmetric encryption)
https://github.com/aerth/argon2-xor
argon2 hmac xor-cipher
Last synced: 11 months ago
JSON representation
Encrypt and Decrypt Files (password based symmetric encryption)
- Host: GitHub
- URL: https://github.com/aerth/argon2-xor
- Owner: aerth
- License: gpl-3.0
- Created: 2020-04-18T21:12:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-19T22:26:40.000Z (about 6 years ago)
- Last Synced: 2025-06-09T11:11:18.248Z (about 1 year ago)
- Topics: argon2, hmac, xor-cipher
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# argon2-xor
simple XOR stream with HMAC and random salt
Using the variable output length of the Argon2id hash function, we are able to derive a key to use with XOR stream cipher.
We generate a random salt, Encrypt-then-MAC, and save to a file (or stdout).
To decrypt, we extract the salt and MAC, hash the password (with given salt), and XOR the rest of the file.
Note: This is a toy program, and hasn't been vetted by cryptographers or security professionals.
## Basic Usage
#### Encryption
```
argon2-xor -out file.enc plaintext.txt
```
#### Decryption
```
argon2-xor -d -out plaintext.txt file.enc
```
#### CLI Flags
```
-d decrypt mode
-hmac string
hash function for use with HMAC: sha256, sha384, or sha512 (default "sha512")
-m int
argon2 mem parameter (default 10000)
-out string
output file (default "stdout")
-p int
argon2 thread/parallelism parameter (default 1)
-saltlen int
use custom salt size (default 1024)
-t int
argon2 time parameter (default 100)
```