Skip to content

build(deps): bump github.com/emmansun/gmsm from 0.43.0 to 0.44.0 - #94

Merged
mergify[bot] merged 1 commit into
masterfrom
dependabot-go_modules-github.com-emmansun-gmsm-0.44.0
Jun 29, 2026
Merged

build(deps): bump github.com/emmansun/gmsm from 0.43.0 to 0.44.0#94
mergify[bot] merged 1 commit into
masterfrom
dependabot-go_modules-github.com-emmansun-gmsm-0.44.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 29, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/emmansun/gmsm from 0.43.0 to 0.44.0.

Release notes

Sourced from github.com/emmansun/gmsm's releases.

v0.44.0 (2026-6-26)

⚠️ Breaking Changes

  • sm2 移除 legacy 实现#525):删除旧的 SM2 实现路径,统一走 internal/sm2 核心实现。
  • sm2 移除 key exchange early 实现#524):删除早期的密钥交换实现,相关 API 不再可用。
  • sm2 核心下沉到 internal/sm2#526):重构模块结构,核心实现移入 internal/sm2internal/sm2ec 错误信息对齐。外部公开 API 保持兼容,但引用内部路径的代码需调整。
  • pkcs7 / cfca 迁移到 smx509 类型x509.SignatureAlgorithmsmx509.SignatureAlgorithm,依赖 pkcs7/cfca 的项目需同步更新类型引用。
  • smx509 CheckSignatureWithDigest 拒绝 SHA1:与 checkSignature 行为对齐,不再接受 SHA1 摘要签名。
  • pkcs7 移除不安全算法测试#527):清理 SHA1 及不安全算法相关测试与代码路径。

✨ New Features

smx509 — 全新架构

  • 从寄生式补丁架构迁移为 Go 1.25 stdlib crypto/x509 的干净 fork:以独立 smx509 包形式存在,通过 5 个声明式 patch 描述与 stdlib 基线的全部偏差(001-root-platform010-sm2-pqc-core020-pkcs-keys030-sm4-pem100-extensions)。
  • SM2 / PQC 签名算法:集成 ML-DSA(44/65/87)与 SLH-DSA-SHA2-128s 后量子签名算法;SM4 PEM 加密;PKCS#8 密钥编码;verify_digest.go 提供 CheckSignatureWithDigest 供 pkcs7 兼容使用。
  • 声明式测试补丁系统scripts/smx509/gen_test_patches.go 从 stdlib 测试文件(含包名重命名)与 smx509 测试文件的差异生成测试补丁;test-patches/ 下含 010-testenv-stub020-envvars-abs-path 两个补丁。
  • smx509 升级 Skill.github/skills/smx509-upgrade/skill.md 提供从 Go 1.N 升级到 1.N+1 的完整工作流(baseline 更新、补丁冲突分析、测试文件同步、补丁重生成)。
  • CI 补丁一致性检查:新增 smx509-patch-consistency CI job,验证补丁与 stdlib baseline 同步。

cipher — GCM-SIV 认证加密模式(#523

  • RFC 8452 实现:在 cipher 包中新增通用 GCM-SIV(Synthetic Initialization Vector)AEAD 模式,适用于任何满足 cipher.Block 接口的分组密码(含 SM4、AES)。相比传统 GCM,GCM-SIV 采用"先认证后加密"的 SIV 范式:先用 POLYVAL 对明文与 AAD 生成 128 位认证标签,再与 nonce 组合成合成 IV 驱动 CTR 加密,在 nonce 误用(重复)场景下仍保持机密性与完整性,仅泄露相同明文是否相等这一信息,不会像 GCM 那样灾难性泄露认证密钥。
  • 三项子能力(Issue #523 勾选项全部完成):
    • Generic GCM SIV —— 纯 Go 通用实现,覆盖所有架构与所有分组密码;
    • Batch encryption —— 复用底层密码的批量 EncryptBlocks 能力(与 gmsm 已有的 SM4/AES batch 路径一致),提升长数据吞吐;
    • Optimize POLYVAL with CLMUL —— 在 amd64, arm64 上使用CLMUL指令加速 POLYVAL 多项式求值,与 AES-GCM 的 GHASH 优化思路对齐。

ZUC

  • 无状态分块加密(ref #277):每个 chunk 使用独立 ZUC 实例加密,子密钥由 SM3(masterKey || chunkIndex) 派生,提供 XORKeyStreamAt 支持任意字节范围解密,适用于加密视频的 HTTP Range 请求场景。
  • 可寻址流 bucketing 优化states[]*zucState32 改为 []zucState32(寻址速度提升 1.7×,bucket 命中时 seek 约 2ns,无 bucket 时 1.87ms);新增 NewCipherWithBucketSizeAndCapacity 预分配;修复 32 位平台 int(c.used) 溢出问题。

SM2

  • 确定性 SM2 签名#520):支持 RFC 6979 风格的确定性签名,避免随机数质量依赖。

CPU 特性检测

  • GFNI 独立检测:GFNI 作为独立特性(CPUID.07H:ECX[bit 8]),不再绑定 AVX-512,可与 VEX 编码(AVX/AVX2)配合使用。
  • SM3 / SM4 硬件指令检测:通过 CPUID.07H:ECX(AVX10 子叶)检测 SM3(bit 1)与 SM4(bit 2)硬件支持。

keccakx4(新增内部包)

  • 4 路 Keccak-f[1600] 置换internal/keccakx4 提供 AVX2、LASX(Loong64)SIMD 实现,并提供纯 Go 回退(permute4Generic),用于并行哈希场景。

🚀 Performance

ML-KEM(#503#507

  • ppc64le(VMX/VSX)支持:新增 POWER8+ 的 VMX 向量化实现,采用 Barrett 归约(shift-4 trick)替代 Montgomery,8 系数/指令。NTT 前向约 3×、polyAddAssign 约 4×(相对 generic Go)。
  • CBD2/3 采样优化VSPLTISW 常量生成优化,常量表从 128 字节压缩到 96 字节。
  • sampleNTTx4:4 路并行 NTT 采样。

ML-DSA(#500#501

  • Loong64(LASX)NTT / 逆 NTT:完整实现 LA464 架构的 16 系数/寄存器向量化 NTT 与逆 NTT,复用 AVX2 的 twiddle 表,XVMUH.H 提供精确 16 位有符号乘高。
  • polyInfinityNorm LASX 变体polyInfinityNormLASXpolyInfinityNormSignedLASX

SM2 椭圆曲线

  • internal/sm2ec POWER9 优化:补充栈帧布局说明,优化 POWER9 上的 SM2 椭圆曲线运算汇编。
  • Loong64 LSX/LASX优化。

GCM-SIV

  • amd64和arm64 上 POLYVAL 通过 CLMUL实现;批量加密复用底层 block cipher 的 EncryptBlocks 路径,长数据吞吐显著优于逐块调用。

SM3/SM9

  • Loong64 LSX/LASX优化。

SM4

  • Loong64 查表法优化

... (truncated)

Commits
  • 6a28894 Merge pull request #533 from emmansun/develop
  • 74c3689 internal/zuc: use SHLD instruction
  • 17c48a1 doc: update zuc.md
  • 95c48ff feat(zuc): optimize seekable stream bucketing & add stateless chunked cipher
  • 6d0d536 Merge pull request #531 from emmansun/dependabot/github_actions/develop/actio...
  • 6182ea7 docs(smx509): add README with workflow diagrams and CI test-patch check
  • 4d57743 feat(smx509): add declarative test patch system
  • 19c8041 fix(scripts): normalize git diff path labels for cross-platform consistency
  • 112d933 fix(scripts): use os.TempDir() instead of .tmp/ for diff output
  • 06d63b2 fix(scripts): change sync.ps1 default TargetDir from x509sync to smx509
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/emmansun/gmsm](https://github.com/emmansun/gmsm) from 0.43.0 to 0.44.0.
- [Release notes](https://github.com/emmansun/gmsm/releases)
- [Commits](emmansun/gmsm@v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: github.com/emmansun/gmsm
  dependency-version: 0.44.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Jun 29, 2026
@mergify

mergify Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@mergify
mergify Bot merged commit 173053b into master Jun 29, 2026
2 checks passed
@dependabot
dependabot Bot deleted the dependabot-go_modules-github.com-emmansun-gmsm-0.44.0 branch June 29, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant