Releases: emmansun/gmsm
Releases · emmansun/gmsm
v0.26.0
Notable Changes:
- internal/sm2ec: adjust sub/add order in WW-MM reduction steps to make sure no unexpected carry /borrow.
- internal/sm2ec: use ADCX/ADOX for order mul/sqr WW-MM.
- sm4: optimize constant loading on arm64.
- zuc: optimize constant loading on arm64.
- upgrade third party dependencies.
v0.25.0
Notable Changes:
- fix darwin/arm64 AES/PMULL features detect issue. darwin/arm64架构下,需要的CPU特性不好检测,
golang.org/x/sys也没有处理这个问题,这里参考了Go语言internal/cpu中的处理方式。 - sm4: change to use pure go for single block encryption/decryption by default. 由于使用AES-NI实现的单block性能不佳(尤其是ARM64下),从这个版本开始单block处理改用纯Go语言查表方式实现,用户可以通过环境变量FORCE_SM4BLOCK_AESNI来强制使用AES-NI。
v0.24.3
v0.24.2
v0.24.1
Notable changes:
- sm2/ecdh: Fix and enhance sm2/ecdh generate private key checking #189. 修复私钥取值范围验证问题。
- sm2: Just compute the inverse of private key plus one per sm2.PrivateKey instance once #190. 每个私钥实例的私钥加一求逆运算仅计算一次,提升签名性能。
- sm2: Provide
NewPrivateKey/NewPrivateKeyFromInt/NewPublicKeyfunctions to avoid misapply #191. 提供通过给定值创建私钥、公钥的方法,方便用户使用。
go: v1.21.1
goos: windows
goarch: amd64
pkg: github.com/emmansun/gmsm/sm2
cpu: Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz
BenchmarkSign_SM2
BenchmarkSign_SM2-6
80709 14215 ns/op 1544 B/op 22 allocs/op
BenchmarkVerify_SM2
BenchmarkVerify_SM2-6
19902 60295 ns/op 848 B/op 17 allocs/op
BenchmarkSign_P256
BenchmarkSign_P256-6
51289 23286 ns/op 2440 B/op 33 allocs/op
BenchmarkVerify_P256
BenchmarkVerify_P256-6
17524 67679 ns/op 944 B/op 20 allocs/op
v0.24.0
Notable Changes:
- cipher: add HCTR/BC/OFBNLF operation modes (支持HCTR/BC/OFBNLF工作模式)
- sm2: fix enveloped key ASN.1 marshal/unmarshal issue #188 (修复SM2密钥对的保护数据格式的ASN.1处理错误)
- sm2: expose method
CalculateSM2Hashfunction (提供SM2签名算法中计算哈希值的函数,可能有些KMS只接受HASH值) - doc: enable github pages, added sm2/sm3/sm4 application guide (使用github pages功能提供了SM2/SM3/SM4应用指南)
- dep: upgrade dependencies (升级第三方依赖库)
v0.23.0
Notable Changes:
- Upgrade dependencies (golang.org/x/sys v0.14.0 & golang.org/x/crypto v0.15.0), this requires Go v1.18+.
- Change interface{} to any, and remove "+build" build tag.
- 切片直接转数组指针.
- internal/subtle xor 简化代码,去除重复.
- arm64: Change VMOV to VDUP, duplicate value in general-purpose register to vector.
- smx509: optimize the performance of checkSignature.
- zuc: arm64 eia, uses VDUP/VMOVQ/VTBL to optimize the performance.
Requires Go v1.18+ since v0.23.0!