Files
xgcl/sm/sm4/doc.go
T
2026-05-27 23:03:00 +08:00

21 lines
575 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
Package sm4 implements the sm4 algorithm
用法1 同go标准库crypto/cipher用法
注意标准库缺少ECB模式,这里增加了(ecb.go),
注意检查输入参数,不合法输入会panic。
可以对大包数据进行分段处理。
参见sm4.go中的用法
用法2 sm4.go的包装函数。
速度测试:1M Bytes data~680Mbps per thread
TODO:
1. On amd64 with aesni -- done, support ECB mode by Encrypt4 interface.
2. On amd64, accelerate GCM mode
3. On arm64, acc. with sm4 instruction
4. On arm64, acc. GCM mode.
*/
package sm4