Files
xgcl/CHANGELOG.md
2026-05-27 23:03:00 +08:00

87 lines
2.0 KiB
Markdown

## 20230321-v1.6.1
gcl/x/tpc移到gcl/tpc
gcl/tpc增加SM9协同签名、解密、密钥解封装
## 20230128-v1.5.0
Add SM4_RNG.
## 20230118-v1.4.7
Add DRNG and SM3_RNG.
## 20221125-v1.4.6
Fix Issue 5
## 20221125-v1.4.5
Typo&Tidy
## 20221117-v1.4.4
fix Issue 4
## 20220810-v1.4.1
- Replace all error returns from `gcl` with `errorchain.Error`.
- Review package `utils/blockmod`, replace panic with error.
- `utils/blockmode.NewCTR`增加返回error.
## 20220809-v1.4.0
- `sm9.Sign`函数签名更改,增加返回错误.
- `sm9.KeyEncapsule`函数签名更改,增加rnd输入类型,增加返回错误.
- 增加加密函数
```go
func Encrypt(encType EncType, pube *MastEncPublicKey, id, plain []byte, rand io.Reader, optionalIV []byte) (*Cipher, error)
```
- 增加解密函数
```go
func Decrypt(id []byte, c *Cipher, de *UserEncKey) ([]byte, error)
```
注1:如果是外部产生随机数,如自测用的标准数据,则用`bytes.NewReader(b []byte)`得到一个`io.Reader`.
注2:注1的方法临时或测试用,生产环境应将外部随机源包装为一个`io.Reader`,因为注1的方法读取`len(b)`字节后会报`io.EOF`错误.
注3:除安审,使用`grand.Reader`(e.g. `crypto/Rand.Reader`-Linux上是读取`/dev/(u)random`)已足够。
## 20211120
- amd64平台,SM4 SIMD汇编实现。
- SM4 ECB 单线程 250MBps
## 20211119
- 移除x509到gssl
- 在支持SIMD的amd64平台下,SM4 ECB模式性能翻倍(单线程 > 1.2Gbps)
> arm64平台、CTR和GCM模式未完待续
## 20210901
- 增加x509,sharing/ssss
## 2021-0331
- 增加sm/sm2v1包
- sm/sm2v1是go标准库风格的签名库。与ecdsa调用方式兼容。
> 用于方便替换ecdsa签名
## 2020-0916
- 增加SM4-GCM模式
## 20200901
### SM9
#### Signature 结构
```go
// before
type Signature struct {
H *big.Int
S *G1
}
// now
type Signature struct {
H big.Int
S G1
}
```
#### 加密类型
`ENC_TYPE_XXX` change to `oid.xxx`(GM/T 0006修订稿加入SM9)
## 20200701
- add assemble implements on amd64 and arm64
## 20190318
- version 0.1