Releases: emmansun/gmsm
Releases · emmansun/gmsm
v0.18.0
v0.17.5
Notable changes:
- sm3: improve purego performance via loop unrolling, reduce assignment operations and precompute the constant rotation.
- sm4: improve amd64 single block performance via PALIGNR instruction; improve CBC decrypt performance via reduce memory operations for both amd64 & arm64.
- sm9/bn256: rewrite purego gfp (Add/Sub/Neg/Mul), improve performance and code readability.
- sm9/bn256: curvePointMovCond twistPointMovCond gfP12MovCond asm implementation for amd64 & arm64.
- build(deps): bump golang.org/x/crypto from 0.9.0 to 0.10.0
SM9 purego performance
goos: windows
goarch: amd64
pkg: github.com/emmansun/gmsm/sm9
cpu: Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz
BenchmarkSign-6 280 4381620 ns/op 6731 B/op 62 allocs/op
BenchmarkVerify-6 62 18846163 ns/op 41736 B/op 367 allocs/op
BenchmarkEncrypt-6 237 4937050 ns/op 9425 B/op 73 allocs/op
BenchmarkDecrypt-6 79 14977862 ns/op 37644 B/op 328 allocs/op
SM9 AMD64 performance
goos: windows
goarch: amd64
pkg: github.com/emmansun/gmsm/sm9
cpu: Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz
BenchmarkSign-6 2841 400469 ns/op 23117 B/op 574 allocs/op
BenchmarkVerify-6 618 1910290 ns/op 163784 B/op 3918 allocs/op
BenchmarkEncrypt-6 2352 440718 ns/op 24388 B/op 582 allocs/op
BenchmarkDecrypt-6 721 1557635 ns/op 143055 B/op 3359 allocs/op
v0.17.4
Notable Changes:
- internal/sm2ec: use MULX(Unsigned Multiply Without Affecting Flags) and AVX2 to improve performance. 使用无符号乘法指令以及AVX2提升性能。
- internal/sm2ec: replace ScalarMult window size from 5 to 6, and reduce the scalar to [0, N-1]. Please refer #127 for detail. 解决ScalarMult实现中最后一个加法的两个点有可能相等的问题。
- Improve sm3 sm4 pure go implementation performance. 提升sm3/4 纯go语言实现的性能。
- sm9: get around assignment copies lock value to issue. 私钥中的主公钥改为引用,避免主公钥赋值时"assignment copies lock value"问题。
- upgrade dependencies (golang.org/x/sys from v0.8.0 to v0.9.0). 升级依赖包。
v0.17.3
Notable Changes:
- internal/subtle/xor: use avx2 if possible
- internal/bigmod: switch to saturated limbs and optimization for 256 bits
- sm4: finetune bounds check
- drbg: fix drbg prng read issue when reseed
- smx509: properly apply name constrains to roots and intermediates
- upgrade dependencies
v0.17.2
v0.17.1
v0.17.0
Notable changes:
- sm2: Make opts EncrypterOpts/DecrypterOpts/SM2SignerOption fields private, this is an incompatible change! Please use related functions to construct the opts.
- sm3/4: A64 Cryptographic instructions (SM4EKEY/SM4EKE, SM3PARTW1/SM3PARTW2/SM3SS1/SM3TT1A/SM3TT1B/SM3TT2A/SM3TT2B) test with QEMU and bug fix.
- pkcs7: Enable sign without attributes, legacy systems still use this approach.
- pkcs: Fix gcm parameters marshal asn1 issue, make ICVLen(default 12) optional.
- pkcs: SM4 OID special handling: decryption - if there are parameters, then treat it as CBC mode, otherwise ECB mode; encryption - diabled SM4 OID.
Full Changelog: v0.16.0...v0.17.0
v0.16.0
Notable changes:
- cfca: add cfca sm2 key and certificate parse
- pkcs7: merge from https://github.com/emmansun/pkcs7
- pkcs8: fix gcm parameters asn1 issue
- sm2: SM2EnvelopedKey support
Full Changelog: v0.15.7...v0.16.0