gmssl

Toolkit for Chinese national cryptographic standards (SM2, SM3, SM4)

brewmacoslinux
Try with needOr install directly
Source

About

Toolkit for Chinese national cryptographic standards

Commands

gmssl

Examples

Generate SM2 key pair$ gmssl genpkey -algorithm SM2 -out private.pem
Calculate SM3 hash of a file$ gmssl dgst -sm3 filename.txt
Encrypt data using SM4 algorithm$ gmssl enc -sm4-cbc -in plaintext.txt -out ciphertext.bin -K key -iv iv