Recent Releases of gmsm
gmsm -
Notable Changes:
- supports mldsa
- supports slhdsa
- sm2: provide low-level encoding functions for keys (alias for NewXXX)
- sm2: provide SignMessage method to comply with the [crypto.MessageSigner] interface
- sm9: add back SetMasterPublic methods
- smx509: disallow negative path length #329
- smx509: use truncated SHA-256 for SubjectKeyId #328
- smx509: add new OID type and use it in Certificate #209
- smx509: switch default policy field to Policies
- Go
Published by emmansun 6 months ago
gmsm - v0.30.1
What's Changed
- build(deps): bump golang.org/x/crypto from 0.36.0 to 0.37.0 by @dependabot in https://github.com/emmansun/gmsm/pull/323
- sm9: Prevent PublicKey() returning nil after unmarshaling master priavate key by @hrimfaxi in https://github.com/emmansun/gmsm/pull/324
New Contributors
- @hrimfaxi made their first contribution in https://github.com/emmansun/gmsm/pull/324
Full Changelog: https://github.com/emmansun/gmsm/compare/v0.30.0...v0.30.1
- Go
Published by emmansun 10 months ago
gmsm -
Notable Changes:
- all: upgrade go directive to at least 1.23.0
- all: change to use go's own XORBytes function #315
- cbcmac: enable provided padding method #319
- cfca: support RSA keys for CSR creation #322
- cipher: move xts detail implementation to internal #320
- internal/bigmod: explicitly clear expanded limbs on reset #313
- internal/deps/cpu: import golang.org/x/sys/cpu #310
- internal/sm2ec: make SetBytes constant time #309
- internal/sm9/bn256: make gfP.Unmarshal constant time and reduce big.Int usage
- padding: implement ISO IEC9797-1 padding method 3 #319
- sm3: move implementation detail to internal/sm3
- sm4: move implementation detail to internal/sm4
- sm9: refactoring, do not expose bn256 types to caller #314
- smx509: add new CRL parser, deprecate old one #40
- smx509: add support for PKCS8/PKIX X25519 key encodings #210
- smx509: avoid crypto/rand.Int to generate serial number #308
- smx509: better handling of weird encodings #316
- smx509: surface ReasonCode in RevocationList API #212
- zuc: move implementation detail to internal/zuc
- zuc: support to keep/cache states per bucket for seekable stream #321
Notes: sm9 have some incompatible changes.
- Go
Published by emmansun 11 months ago
gmsm -
Notable Changes:
- sm2: provide a specific hash.Hash implementation
- smx509: properly check for IPv6 hosts in URIs
- internal/subtle: combine xor_
.go files
Notes:
从v0.30.0+开始,Go最低版本要求改为v1.23+。如果你不能升级Go版本,请继续使用v0.29.x。
- Go
Published by emmansun 12 months ago
gmsm -
Notable Changes:
- pkcs7: sign precomputed digest #294
- smx509: add wasip1 support #290
- build(deps): bump golang.org/x/sys from 0.28.0 to 0.29.0
- build(deps): bump golang.org/x/crypto from 0.31.0 to 0.32.0
- Go
Published by emmansun about 1 year ago
gmsm -
Notable Changes:
- cfca: add pkcs7 signed data facade
- cfca: support cfca certificate request #286
- cfca: parse returned encryption key #286
- cfca: extract encrypt/decrypt functions with SM4CBC and SM3 KDF
- build(deps): bump golang.org/x/crypto from 0.29.0 to 0.30.0
- build(deps): bump golang.org/x/sys from 0.27.0 to 0.28.0
- Go
Published by emmansun about 1 year ago
gmsm -
Notable Changes:
- Support CBC-MAC and its variants #281
- cbcmac: 为cmac实现Hash接口。
- internal/bigmod: sync bigmod change between 30/Nov 2024 to 3/Dec 2024 #282
- cfca: provide cfca envelope message facades #283
- zuc: fix eea issue #284
- zuc: 修复 XORKeyStreamAt 问题:当offset > used 并且留有未使用key数据时。
- internal/bigmod: disable race detector on tight loops #285
- Go
Published by emmansun about 1 year ago
gmsm -
Notable Changes:
- zuc: 修复
XORKeyStreamAt问题:当offset > used 并且留有未使用key数据时。 - cbcmac: 为cmac实现Hash接口。
- Go
Published by emmansun about 1 year ago
gmsm -
Notable Changes:
- Support CBC-MAC and its variants #281
- internal/bigmod: sync bigmod change between 30/Nov 2024 to 3/Dec 2024 #282
- cfca: provide cfca envelope message facades #283
- zuc: fix eea issue #284
- internal/bigmod: disable race detector on tight loops #285
- Go
Published by emmansun about 1 year ago
gmsm -
Notable Changes:
- zuc: support seakable stream #277
- internal/bigmod: add support for even moduli #280
- x509: generate serial number for nil template SerialNumber #279
- Go
Published by emmansun about 1 year ago
gmsm -
Notable Changes:
- pkcs7: improve compatibility with CFCA #270
- pkcs7: change EncryptedContent to implicit
- pkcs7: provide session interface #276
- smx509: ParseCertificatePEM validate type
- sm3: arm64 sm3ni change slice to array
- sm3: ppc64x predefine constants for ROTL
- sm3: ppc64x change T handling method #267
- sm3: ppc64x transpose matrix #265
- sm3: s390x transpose matrix #266
- sm4: use package level instead of local for shared variables
- zuc: refactoring
- internal/subtle: document and test XORBytes overlap rules #272
- internal/bigmod: drop math/big dependency #273
- internal/byteorder: new package #275
- internal/sm2ec: improve purego implementation's performance #274
- build(deps): bump golang.org/x/crypto from 0.28.0 to 0.29.0
- Go
Published by emmansun about 1 year ago
gmsm -
Notable Changes:
- pkcs7: change EncryptedContent to implicit.
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- pkcs7: improve compatibility with CFCA #270
- smx509: ParseCertificatePEM validate type
- sm3: arm64 sm3ni change slice to array
- sm3: ppc64x predefine constants for ROTL
- sm3: ppc64x change T handling method #267
- sm3: ppc64x transpose matrix #265
- sm3: s390x transpose matrix #266
- sm4: use package level instead of local for shared variables
- zuc: refactoring
- build(deps): bump golang.org/x/crypto from 0.28.0 to 0.29.0
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- pkcs7: align pkix.AlgorithmIdentifier Null Parameters with others.
- sm4: arm64 sm4key export optimization.
- sm4: arm64 fix sm4ni gcm init issue (orignally used AES-NI).
- sm4: gcm purego optimize
NewGCMmethod. - sm4: ppc64x transpose matrix optimization with VMRGEW/VMRGOW/XXPERMDI instructions #261
- sm4: ppc64x optimization with VPERMXOR instruction for SM4-SBOX #262
- zuc: ppc64x optimization with VPERMXOR instruction for both ZUC-SBOX and data bit reverse #262
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- pkcs7: SignWithoutAttr supports skip certificates #254
- build(deps): bump golang.org/x/crypto from 0.27.0 to 0.28.0 #257
- build(deps): bump golang.org/x/sys from 0.25.0 to 0.26.0 #258
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
(Mainly for ppc64x and s390x) - cipher: s390x/ppc64x xts optimzation.#250 - pkcs7: support GetRecipients. - sm3: s390x/ppc64x block and kdf optimzation.#244 #245 - sm4: ppc64x optimization with vsbox and clmul.#249 - sm4: expandkey align with single block encryption. - sm4: arm64 cbc decrypt, reduce memory load. - sm9/bn256: ppc64x gfp and value copy/conditional move optimization.#256 - zuc: ppc64x eea optimization with vsbox.#254 - zuc: ppc64x eia and eia256 optimization with clmul.#253 - zuc: arm64 eea optimization, reduce MOVW instructions.
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- pbes: initial supports GM/T 0091-2020 #243
- pkcs8: support legacy PBES1 algorithms #242
- sm2: public key recover from signature bug #239
- smx509: 兼容PublicKeyAlgorithm OID等于1.2.156.10197.1.301的SM2证书的解析 #236
- zuc: eea实现通过Stream规范性测试 #240
- internal/cryptotest: 从最新的Golang引入,提高对称加密、HASH实现的规范性
- internal/sm2ec: replace P256OrdInverse with generated code #241
- internal/sm2ec: ppc64le asm implementation #237
- internal/sm2ec: s390x asm implementation #235
- internal/subtle: port ppc64x from Golang and implement s390x #238
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- smx509: fix CSRResponse sign certs handle issue
- pkcs7: follow GB/T 35275-2017 9.1 strictly
- pkcs7: polish, improve maintainability
- doc: add pkcs12.md, zuc.md
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- pkcs7: Support legacy CFCA SADK(3.1.X)'s envelope message functions.
- smx509: Support CSR Response Marshalling/Parsing according to "GM/T 0092-2020 Specification of certificate request syntax based on SM2 cryptographic algorithm".
- doc: 新增《CFCA互操作性指南》
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- sm3-kdf: continue to improve performance.
- sm2-extension: recover public keys.
- drbg: support NIST HMAC-DRBG.
- doc: supplement sm2 encryption performance and sm2 extensions.
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- kdf-sm3: Improve KDF performance, support 4 way (AMD64 SSE/AVX & ARM64), 8 way (AMD64 AVX2). #220 #221 #222 SM2加解密性能
- smx509: sync golang latest changes. #223
- sm4: reduce allocations & reduce slice checking internally.
- dependencies upgrade: golang.org/x/crypto v0.23.0 / golang.org/x/sys v0.20.0.
- Go
Published by emmansun over 1 year ago
gmsm -
Notable Changes:
- internal/cpuid: fix arm64 darwin build issue
- internal/bigmod: unroll loop in addMulVVW for ppc64x (go1.19+)
- internal/bigmod: port riscv64 implementation from Golang
- internal/sm2ec: amd64, optimize select SIMD
- internal/sm2ec: amd64 refactoring, reduce duplicated code
- internal/sm2ec: use ADX for mul/sqr and internal sqr
- internal/sm2ec: amd64, optimize point double
- smx509: avoid Android root store paths on other Linuxes
- smx509: implement SetFallbackRoots
- smx509: implement AddCertWithConstraint
- upgrade x/sys to 0.18.0, x/crypto to 0.21.0
- Go
Published by emmansun almost 2 years ago
gmsm -
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.
- Go
Published by emmansun almost 2 years ago
gmsm -
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语言查表方式实现,用户可以通过环境变量FORCESM4BLOCKAESNI来强制使用AES-NI。
- Go
Published by emmansun about 2 years ago
gmsm -
Notable Changes:
- internal/bigmod: sync sdk https://github.com/emmansun/gmsm/issues/200
- smx509: support openssl3 sm2 private key and public key whose alg OID is different with others
- Go
Published by emmansun about 2 years ago
gmsm -
Notable Changes:
- smx509: can parse openssl v3.1.3 p8 sm2 private key #197 (解析openssl v3.1.3产生的SM2 P8私钥,其算法指定为SM2曲线OID)
- dep: upgrade dependencies (升级第三方依赖库)
- doc: added sm9 application guide (SM9应用指南)
- Go
Published by emmansun about 2 years ago
gmsm -
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
Published by emmansun about 2 years ago
gmsm -
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 (升级第三方依赖库)
- Go
Published by emmansun about 2 years ago
gmsm -
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!
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- internal/sm2ec: arm64, change global data loading method, change y2 loading method in
p256PointAddAffineAsm. - sm4: arm64, change global data loading method.
- zuc: arm64, change global data loading method.
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- internal/sm2ec: uses NEON instructions for conditional move, select value from table and so on.
- sm9/bn256: uses NEON instructions for conditional move.
Will upgrade Go to v1.18 from v0.23.0.
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- sm9/bn256: fix amd64 non-avx2 issue https://github.com/emmansun/gmsm/commit/55e8c795e5975a4f0f4459616ec3350825f0c463
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- ZUC: fix eea src/dst can't share same buffer issue. #169
- SM4: 优化线性变换L. #168
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes: - sm3: GG2使用等价公式,不使用ANDN指令。#166 #167
- Go
Published by emmansun over 2 years ago
gmsm - v0.21.1
Notable Changes:
- sm3: do not use RORX in avx implementation. #157 RORX指令属于BMI2指令集,上个release使用了AVX+BMI2组合,很多仅支持AVX的老机器性能没有得到提升。
- sm3: amd64 SSE implementation. #165 虽然不支持AVX的AMD64 架构的CPU应该不多了,还是支持一下吧。
- sm3: message schedule optimization. #164 尽量减少使用指令,使用和sha256实现不一样的思路,具体请参考SM3实现及优化
- sm3: message compression optimization. #163 #160 压缩函数,尽量减少指令。
- sm3: reduce stack memory usage for amd64 avx & arm64 neon. #162
Full Changelog: https://github.com/emmansun/gmsm/compare/v0.21.0...v0.21.1
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- sm3: some refactoring and optimizations:align format, use VPSHUFB for byte level rotate left shift, reduce MOVL, add more test vectors
- sm3: amd64 AVX simd message scheduling. #157 使用AVX指令进行消息扩展,AVX和AVX2测试性能差距不大
- sm3: arm64 neon simd message scheduling. #159 使用NEON指令进行消息扩展,无性能测试环境
- internal/sm2ec: use register BP in square methods for plugin build. plugin: sm2 sm9 use BP carefully
- sm9/bn256: use register BP in gfp square methods for plugin build. plugin: sm2 sm9 use BP carefully
- smx509: add example test cases for SM2 private key parsing, #155
- build(deps): bump golang.org/x/crypto from 0.12.0 to 0.13.0.
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- sm3 去除R15使用,plugin编译没有特殊实现;
- zuc core去除R15使用,plugin编译没有特殊实现;
- internal/sm2ec: 单独为plugin编译flag去除R15使用;
- sm9/bn256: gfp单独为plugin编译flag去除R15使用,gfp2未作修改(权衡性能和可维护性,除非必要);
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- build: support plugin flag for amd64. 支持plugin编译flag,#154,相对purego 编译flag 而言,保留了不使用R15的amd64 汇编实现。相对于arm64,amd64的可用通用寄存器较少,如果不使用R15,会有更多的内存、寄存器交互,汇编代码会更复杂,项目的实现和维护成本也会大量增加。
- zuc: add comments. 增加代码说明。
- upgrade golang.org/x/sys from 0.11.0 to 0.12.0.
- Go
Published by emmansun over 2 years ago
gmsm -
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.
- Go
Published by emmansun over 2 years ago
gmsm -
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+)中全局汇编函数名重复问题。
- Go
Published by emmansun over 2 years ago
gmsm -
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.
- Go
Published by emmansun over 2 years ago
gmsm -
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.
- Go
Published by emmansun over 2 years ago
gmsm - v0.19.0
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: https://github.com/emmansun/gmsm/compare/v0.18.1...v0.19.0
- Go
Published by emmansun over 2 years ago
gmsm -
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
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- sm9/bn256: replace gfp asm implementations.
- Go
Published by emmansun over 2 years ago
gmsm -
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
- Go
Published by emmansun over 2 years ago
gmsm -
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 https://github.com/emmansun/gmsm/discussions/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). 升级依赖包。
- Go
Published by emmansun over 2 years ago
gmsm -
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
- Go
Published by emmansun over 2 years ago
gmsm -
Notable Changes:
- sm9: performance improvement: reduce mul, use addchain to gen invert/sqrt.
- sm9: implement 1-2-6-12 towering extensions for comparison.
- drbg: do not share hash object, but it's still NOT concurrent safe.
- upgrade dependencies.
- Go
Published by emmansun almost 3 years ago
gmsm - 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: https://github.com/emmansun/gmsm/compare/v0.16.0...v0.17.0
- Go
Published by emmansun almost 3 years ago
gmsm - 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: https://github.com/emmansun/gmsm/compare/v0.15.7...v0.16.0
- Go
Published by emmansun almost 3 years ago
gmsm -
Notable changes
- sm9: supports SM4 with ECB/CBC/CFB/OFB mode, this is incompatible change!!!
- smx509: ParseTypedECPrivateKey, return ecdsa.PrivateKey or sm2.PrivateKey.
- internal/bigmod: flag amd64 assembly as noescape.
- Go
Published by emmansun about 3 years ago
gmsm -
Notable changes
- Add example tests for reference document
- Upgrade dependencies
- Change
smx509.CreateCertificatemethod's template and parent parameter type fromx509.Certificatetoany
- Go
Published by emmansun about 3 years ago
gmsm -
Notable changes
- sm2: verify validity of signature parameters in Verify
- sm2: use ReadASN1Integer instead of clone private code
- sm2/sm9: ErrDecryption, avoid adaptive attacks
- sm9: use bigmod instead of math/big, verify method
- smx509: include more hints for verification failure
- Go
Published by emmansun about 3 years ago
gmsm -
Notable changes
- ecdh: move ECDH method to PrivateKey
- sm2,smx509: add encoding paths for SM2 ecdh keys
- sm2: use bigmod and sm2ec instead of math/big and crypto/elliptic
- sm3: reduce Write calls in Sum
- sm9: use bigmod instead of math/big
- smx509: Reallow duplicate attributes in CSRs
- smx509: create CRLs with Issuer.RawSubject
- smx509: remove unused member Raw from certificate
- smx509: add support for PKCS8/PKIX X25519 key encodings preparation
- all: change build tag generic to purego & import nat package
- Go
Published by emmansun about 3 years ago
gmsm -
- export ParseName for tls/tlcp to parse certificate authorities
- upgrade dependencies
- Go
Published by emmansun over 3 years ago
gmsm -
What's changed
- Add disclaimer and update readme.
- Add SM2 key exchange sample test case implementation.
- Add proxy methods for RSA pkcs1 private/public key handling.
- Rollback the change of "ad-hoc release to fix issue ASN1 SM2密文含扩展部分".
- Fix the issue of Verify() function without DNSName checking.
- Fix the possible infinite loop in sm2 encryption method.
- Go
Published by emmansun over 3 years ago
gmsm -
ad-hoc release to fix issue "ASN1 SM2密文含扩展部分", #90
- Go
Published by emmansun over 3 years ago
gmsm - v0.14.1
Notable Changes
- Support SM2-MQV and Key Agreement in ecdh, the safe, []byte-based APIs.
- Upgrade dependencies.
- SM2/9 key exchange, do not destroy both sides' ephemeral public keys.
Full Changelog: https://github.com/emmansun/gmsm/compare/v0.14.0...v0.14.1
- Go
Published by emmansun over 3 years ago
gmsm - v0.14.0
What's Changed
- Upgrade minimum supported golang version to 1.16 by @emmansun in https://github.com/emmansun/gmsm/pull/78
- Incompatibility changes for SM2/SM9 key exchange, do NOT keep keying data and provide method to destroy internal state
- ECDH first version, SM2 curve supports Elliptic Curve Diffie-Hellman Primitive similar like latest golang SDK
Full Changelog: https://github.com/emmansun/gmsm/compare/v0.13.8...v0.14.0
- Go
Published by emmansun over 3 years ago
gmsm - v0.13.7
What's Changed
- SM2密钥交换方法初始化 by @Trisia in https://github.com/emmansun/gmsm/pull/73
New Contributors
- @Trisia made their first contribution in https://github.com/emmansun/gmsm/pull/73
Full Changelog: https://github.com/emmansun/gmsm/compare/v0.13.6...v0.13.7
- Go
Published by emmansun over 3 years ago
gmsm -
- Refactoring SM4 ASM code to reduce duplication.
- Improve SM4 CBC mode performance.
- Improve SM4 AESNI under ARM64 transpose matrix performance with VZIP1&VZIP2.
- SM4 gcmSm4Data method ignore incoming tag data, avoid misuse.
- Upgrade dependencies.
- Go
Published by emmansun over 3 years ago
gmsm -
- zuc: optimize key stream generation and EEA performance under ARM64.
- zuc: optimize EIA128 & EIA256 performance under both AMD64 and ARM64.
- [sync] crypto/x509: restrict CRL number to <=20 octets.
- Upgrade dependencies.
- Go
Published by emmansun over 3 years ago
gmsm -
- sm9: fix 32-bit GOARCH issue.
- zuc: optimize key stream generation and EEA performance under AMD64.
- Go
Published by emmansun over 3 years ago
gmsm -
- PKCS8: Merge pkcs8 from emmansun/pkcs8
- SM2: support key exchange
- SM2: sync generic implementation from emmansun/sm2fiat
- SM9: improve performance via finalExponentiation and mulLine
- SM9: key exchange refactoring
- ZUC: improve performance via lazy mod & other optimization
- Go
Published by emmansun over 3 years ago
gmsm -
- SM9 fix wrapkey/unwrapkey method name misspell issue
- SM9 support G1/G2 point compressed marshal/unmarshal
- SM9 support Key Exchange
- Go
Published by emmansun over 3 years ago
gmsm -
- Fix sm9 arm64 asm bug
- Support to build/test generic via build tags
- Go
Published by emmansun over 3 years ago
gmsm -
fix darwin (macOS) compile & test error with a temp solution
- Go
Published by emmansun over 3 years ago
gmsm -
- SM4: Change to use new {M1, C1, M2, C2}, do not know the old one's derivation process
- crypto/x509: return err ans1.Marshal gives an error
- Upgrade dependencies
- Go
Published by emmansun almost 4 years ago
gmsm - v0.11.2
What's Changed
- [X509] sync upstream by @xuyang2 in https://github.com/emmansun/gmsm/pull/22
- [X509] sync upstream by @xuyang2 in https://github.com/emmansun/gmsm/pull/23
- [X509] simplify ParsePKIXPublicKey by @xuyang2 in https://github.com/emmansun/gmsm/pull/26
- Add some comments to SM2
Full Changelog: https://github.com/emmansun/gmsm/compare/v0.11.1...v0.11.2
- Go
Published by emmansun about 4 years ago
gmsm - v0.9.2
What's Changed
- export sm2.CalculateZA() by @xuyang2 in https://github.com/emmansun/gmsm/pull/13
New Contributors
- @xuyang2 made their first contribution in https://github.com/emmansun/gmsm/pull/13
Full Changelog: https://github.com/emmansun/gmsm/compare/v0.9.1...v0.9.2
- Go
Published by emmansun about 4 years ago
gmsm -
optimize sm2 p256 amd64 implementation, reduce multiplication.
- Go
Published by emmansun about 4 years ago
gmsm -
upgraded some golang 1.5 features/enhancements to smx509
- Go
Published by emmansun over 4 years ago
gmsm -
1.add rfc8998 sm4 ccm/gcm test vectors 2.refactor to use internal package, avoid sm4 depends on cipher package
- Go
Published by emmansun almost 5 years ago