https://github.com/pedroalbanese/sm4crypt
GM/T 0002-2012 SM4 与 GCM Encryption Tool
https://github.com/pedroalbanese/sm4crypt
gcm pbkdf2 sm3-digest-algorithm sm4
Last synced: 5 days ago
JSON representation
GM/T 0002-2012 SM4 与 GCM Encryption Tool
- Host: GitHub
- URL: https://github.com/pedroalbanese/sm4crypt
- Owner: pedroalbanese
- License: isc
- Created: 2021-11-11T21:24:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-14T17:27:59.000Z (over 2 years ago)
- Last Synced: 2025-02-23T10:15:30.442Z (8 months ago)
- Topics: gcm, pbkdf2, sm3-digest-algorithm, sm4
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# SM4Crypt
[](https://github.com/pedroalbanese/sm4crypt/blob/master/LICENSE.md)
[](https://github.com/pedroalbanese/sm4crypt/releases)
[](http://godoc.org/github.com/pedroalbanese/sm4crypt)
[](https://goreportcard.com/report/github.com/pedroalbanese/sm4crypt)
[](https://golang.org)
[](https://github.com/pedroalbanese/sm4crypt/releases)
### Command-line GM/T 0002-2012 SM4-GCM Encryption ToolUsage of sm4crypt:
sm4crypt [-d] -p "pass" [-i N] [-s "salt"] -f <file.ext>
-a string
Additional Associated Data.
-d Decrypt instead of Encrypt.
-f string
Target file. ('-' for STDIN)
-i int
Iterations. (for PBKDF2) (default 1024)
-k string
128-bit key to Encrypt/Decrypt.
-p string
Password-based key derivation function2.
-r Generate random 128-bit cryptographic key.
-s string
Salt. (for PBKDF2)### Example of encryption/decryption:
```sh
./sm4crypt -k $128bitkey -f plaintext.ext > ciphertext.ext
./sm4crypt -d -k $128bitkey -f ciphertext.ext > plaintext.ext
```## License
This project is licensed under the ISC License.
##### Industrial-Grade Reliability. Copyright (c) 2020-2021 ALBANESE Research Lab.