发布 v0.3.0:rustls CryptoProvider 支持

新增功能:
- rustls CryptoProvider:完整 rustls 0.23.x 支持
  - SM3 Hash/Context trait 实现
  - SM3 HMAC trait 实现
  - SM4-GCM/CCM AEAD 密码套件
  - SM2 ECDHE 密钥交换
  - SM2 签名/验签算法
- SM3 流式 HMAC(HmacSm3)
- SM2 SPKI DER 编码
- SM2 DEFAULT_ID 常量

文档更新:
- README 依赖版本更新为 0.3
- CHANGELOG 添加 v0.3.0 变更记录
- SECURITY 更新版本支持表
This commit is contained in:
huangxt
2026-03-09 10:13:09 +08:00
parent 2580571881
commit 7c159343f8
19 changed files with 950 additions and 9 deletions
+6 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "libsmx"
version = "0.2.1"
version = "0.3.0"
edition = "2021"
rust-version = "1.83.0"
license = "Apache-2.0"
@@ -35,11 +35,16 @@ crypto-bigint = { version = "0.6", default-features = false }
subtle = { version = "2.6", default-features = false }
zeroize = { version = "1.8", default-features = false, features = ["derive"] }
rand_core = { version = "0.6", default-features = false }
rustls = { version = "0.24.0-dev.0", path = "../rustls/rustls", optional = true, default-features = false }
pki-types = { package = "rustls-pki-types", version = "1", optional = true, features = ["alloc"] }
getrandom = { version = "0.2", optional = true }
[features]
default = ["alloc"]
alloc = []
std = ["alloc", "rand_core/std"]
# rustls CryptoProvider 集成(RFC 8998 国密 TLS 套件)
rustls-provider = ["alloc", "dep:rustls", "dep:pki-types", "dep:getrandom"]
[dev-dependencies]
hex = "0.4"