Skip to content

Releases: emmansun/gmsm

v0.20.1

07 Sep 01:54
6ba199a
Compare
Choose a tag to compare

Notable Changes:

  • build: support plugin flag for amd64. 支持plugin编译flag,#154,相对purego 编译flag 而言,保留了不使用R15的amd64 汇编实现。相对于arm64,amd64的可用通用寄存器较少,如果不使用R15,会有更多的内存、寄存器交互,汇编代码会更复杂,项目的实现和维护成本也会大量增加。可以考虑基于rpc的插件实现机制,譬如Go Plugin System over RPC
  • zuc: add comments. 增加代码说明。
  • upgrade golang.org/x/sys from 0.11.0 to 0.12.0.

v0.20.0

28 Aug 09:38
4f1b16d
Compare
Choose a tag to compare

Notable Changes:

  • README: add acknowledgements.
  • cipher/xts: XTS mode $GF(2^{128})$ mul2 amd64/arm64 asm implementation.
  • sm4: xts amd64/arm64 asm implementation, #151.
  • sm4: gcm amd64 optimization, #152.

v0.19.3

16 Aug 07:01
Compare
Choose a tag to compare

Notable Changes:

  • padding: ISO/IEC 9797 method 2. 这也是GB/T 17964-2021中列出的填充方式2。
  • sm4: improve performance, especially for GCM, ECB, CBC decrypt.尽量使用SIMD寄存器,提高并行吞吐量,ECB, CBC解密的汇编实现。
  • internal/bigmod: fix duplicated function name issue. 修复和golang SDK(1.21+)中全局汇编函数名重复问题。

v0.19.2

28 Jul 07:46
c813a1f
Compare
Choose a tag to compare

Notable Changes:

  • sm9/bn256: gfP2 mul, mulu, square, squareu AMD64/ARM64 asm implementations.
  • sm9/bn256: use complete, porjective point addition/doubling fomulas, and related AMD64/ARM64 asm implementations.
  • sm9/bn256: GT uses cyclo6 squaring.
  • internal/sm2ec: add comments, especially for mont. reduction.

v0.19.1

13 Jul 01:37
fc2f105
Compare
Choose a tag to compare

Notable Change:

  • SM4: fix AVX version used AVX2 inst. issue.
  • SM9/BN256: add double/triple methods, fix gfpNeg issue, use Square as possible.
  • Upgrade dependencies.

v0.19.0

07 Jul 12:40
Compare
Choose a tag to compare

Notable Changes:

  • sm4: support AVX + AES-NI, for detail, pls reference #135 (单独支持AVX+AES-NI)
  • sm4: improve SSE matrix transform performance (提升SSE矩阵转换性能)
  • sm9/bn256: Special square in final exponentiation, pls reference #139 (特殊平方实现)
  • sm9/bn256: Optimize squaring, pls reference #137 (优化扩域上平方运算)
  • sm9/bn256: Improve gfP marshal/unmarshal performance, pls reference #140 (用asm实现gfP marshal 和 unmarshal)
  • sm9/bn256: value copy acceleration, pls reference #136 (加速、减少值拷贝)

Full Changelog: v0.18.1...v0.19.0

v0.18.1

29 Jun 02:01
7854203
Compare
Choose a tag to compare

Notable Changes:

  • bigmod: fix non-ADX version addMulVVW256 bug introduced since v0.17.3.
  • sm2: remove CSPRNG usage.
  • sm9/bn256: use ADX together with MULX

v0.18.0

24 Jun 02:36
Compare
Choose a tag to compare

Notable Changes:

  • sm9/bn256: replace gfp asm implementations.

v0.17.5

21 Jun 09:42
ecab517
Compare
Choose a tag to compare

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

16 Jun 09:38
3cbabc3
Compare
Choose a tag to compare

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). 升级依赖包。