Skip to content

Releases: dromara/dongle

v1.2.3

16 Dec 07:02

Choose a tag to compare

English
  • Remove LoadPublicKey and LoadPrivateKey methods from Sm2KeyPair struct
  • Add SetMode method to Sm2 to replace SetOrder; SetOrder will be removed in a future version
  • Add support for RSA private-key encryption/public-key decryption and public-key signing/private-key verification (non-standard operations)
  • Add SetType method to RSA to specify key type
中文
  • Sm2KeyPair 结构体移除 LoadPublicKeyLoadPrivateKey 方法
  • Sm2 新增 SetMode 方法用于替换 SetOrderSetOrder 方法将会在未来版本中移除
  • RSA 增加私钥加密/公钥解密 和 公钥签名/私有验证的支持(非标准操作)
  • RSA 新增 SetType 方法来指定密钥类型

Full Changelog: v1.2.2...v1.2.3

v1.2.2

08 Dec 02:37

Choose a tag to compare

English
  • Move mock and utils packages to internal package
  • Optimize Rsa asymmetric encryption algorithm, add SetPadding method to set padding mode, decoupling key format and padding mode
中文
  • Add Sm2 asymmetric elliptic curve signature/verification support
  • mockutils 包移动到 internal 包中
  • 优化 Rsa 非对称椭圆曲线加密算法, 新增 SetPadding 方法用于设置填充模式, 使密钥格式和填充模式解耦
  • 增加 Sm2 非对称椭圆曲线签名/验证支持

Full Changelog: v1.2.1...v1.2.2

v1.2.1

24 Nov 02:10

Choose a tag to compare

English
  • Fix bug where wNAF algorithm error in Sm2 asymmetric elliptic curve encryption algorithm causes decryption failure in some cases
  • Optimize curve field element operation implementation in Sm2 asymmetric elliptic curve encryption algorithm
  • Add direct parsing support for BIT_STRING format keys in Sm2 asymmetric elliptic curve encryption algorithm
  • Simplify test loop syntax, change from for loop to range loop
中文
  • 修复 Sm2 非对称椭圆曲线加密算法中 wNAF 算法错误造成某些情况下解密失败的 bug
  • 优化 Sm2 非对称椭圆曲线加密算法中曲线域元素运算实现
  • 增加 Sm2 非对称椭圆曲线加密算法对 BIT_STRING 格式密钥直接解析支持
  • 简化测试循环语法,从 for 循环改为 range 循环

Full Changelog: v1.2.0...v1.2.1

v1.2.0

11 Nov 01:40

Choose a tag to compare

English
  • Remove LoadPublicKey and LoadPrivateKey methods from RSAKeyPair struct
  • Remove LoadPublicKey and LoadPrivateKey methods from Ed25519KeyPair struct
  • Optimize encoder and decoder performance, reuse read buffer, reduce memory allocation and copying
  • RSAKeyPair struct's GenKeyPair, SetPublicKey, SetPrivateKey methods changed from no return value to returning error
  • Ed25519KeyPair struct's GenKeyPair, SetPublicKey, SetPrivateKey methods changed from no return value to returning error
  • RSAKeyPair struct adds FormatPublicKey and FormatPrivateKey methods to format base64 encoded der format RSA public and private keys into pem format
  • Ed25519KeyPair struct adds FormatPublicKey and FormatPrivateKey methods to format base64 encoded der format Ed25519 public and private keys into pem format
  • RSAKeyPair struct adds CompressPublicKey and CompressPrivateKey methods to compress pem format RSA public and private keys into base64 encoded der format
  • Ed25519KeyPair struct adds CompressPublicKey and CompressPrivateKey methods to compress pem format Ed25519 public and private keys into base64 encoded der format
  • Add Sm2 asymmetric elliptic curve encryption algorithm support, including standard processing and streaming processing
中文
  • 移除 RSAKeyPair 结构体的 LoadPublicKeyLoadPrivateKey 方法
  • 移除 Ed25519KeyPair 结构体的 LoadPublicKeyLoadPrivateKey 方法
  • 优化编码器和解码器性能,重用读缓冲区,减少内存分配和复制
  • RSAKeyPair 结构体的 GenKeyPair, SetPublicKey, SetPrivateKey 方法从无返回值改为返回 error
  • Ed25519KeyPair 结构体的 GenKeyPair, SetPublicKey, SetPrivateKey 方法从无返回值改为返回 error
  • RSAKeyPair 结构体增加 FormatPublicKeyFormatPrivateKey 方法,用于将 base64 编码的 der 格式的 RSA 公钥和私钥格式化成 pem 格式
  • Ed25519KeyPair 结构体增加 FormatPublicKeyFormatPrivateKey 方法,用于将 base64 编码的 der 格式的 Ed25519 公钥和私钥格式化成 pem 格式
  • RSAKeyPair 结构体增加 CompressPublicKeyCompressPrivateKey 方法,用于将 pem 格式的 RSA 公钥和私钥压缩成经过 base64 编码的 der 格式
  • Ed25519KeyPair 结构体增加 CompressPublicKeyCompressPrivateKey 方法,用于将 pem 格式的 Ed25519 公钥和私钥压缩成经过 base64 编码的 der 格式
  • 增加 Sm2 非对称椭圆曲线加密算法支持,包括标准处理和流式处理

Full Changelog: v1.1.8...v1.2.0

v1.1.8

05 Nov 07:55

Choose a tag to compare

English
  • Fix bug where *RsaKeyPair.formatPublicKey and *RsaKeyPair.formatPrivateKey fail to format keys
  • Fix bug where *Ed25519KeyPair.formatPublicKey and *Ed25519KeyPair.formatPrivateKey fail to format keys
  • Fix bug where decoding encrypted ciphertext fails during decryption and the error cannot be retrieved
  • Change default padding mode from PKCS7 to No in symmetric block encryption algorithms
  • Add Unicode encoding/decoding support, including standard processing and streaming processing
  • Add TBC padding mode support for symmetric block encryption algorithms
中文
  • 修复 *RsaKeyPair.formatPublicKey*RsaKeyPair.formatPrivateKey 格式化密钥失败的 bug
  • 修复 *Ed25519KeyPair.formatPublicKey*Ed25519KeyPair.formatPrivateKey 格式化密钥失败的 bug
  • 修复解密时对编码过的密文解码失败后无法获取错误的 bug
  • 对称分组加密算法中默认填充模式从 PKCS7 改为 No
  • 增加 Unicode 编码解码支持,包括标准处理和流式处理
  • 对称分组加密算法增加 TBC 填充模式支持

Full Changelog: v1.1.7...v1.1.8

v1.1.7

20 Oct 01:29
340283c

Choose a tag to compare

English
  • Fix bug in asymmetric digital signature algorithm verification #30
  • Optimize streaming processing logic, add support for reader position reset to ensure reading from the beginning of the data source, avoiding position offset issues caused by previous read operations, ensuring completeness and correctness of streaming operations
  • Change private methods newXXXEncrypter and newXXXDecrypter series in crypto/cipher/block.go to public methods NewXXXEncrypter and NewXXXDecrypter
  • Change private methods newXXXPadding and newXXXUnPadding series in crypto/cipher/padding.go to public methods NewXXXPadding and NewXXXUnPadding
  • Add sm4 chinese national standard block encryption algorithm support, including standard processing and streaming processing, supporting different block modes and padding modes
中文
  • 修复非对称数字签名算法中验签错误的 bug #30
  • 优化流式处理逻辑,添加对 reader 位置重置的支持,确保从数据源的开头开始读取,避免因之前读取操作导致的位置偏移问题,保证流式操作的完整性和正确性
  • crypto/cipher/block.gonewXXXEncrypternewXXXDecrypter 系列私有方法更改成公开方法 NewXXXEncrypterNewXXXDecrypter
  • crypto/cipher/padding.gonewXXXPaddingnewXXXUnPadding 系列私有方法更改成公开方法 NewXXXPaddingNewXXXUnPadding
  • 增加 sm4 中国国家标准分组加密算法支持,包括标准处理和流式处理,支持不同分块模式和填充模式

Full Changelog: v1.1.6...v1.1.7

v1.1.6

12 Oct 01:22

Choose a tag to compare

English
  • Use io.CopyBuffer to simplify streaming processing logic
  • Optimize tea encryption algorithm to support different block modes and padding modes
  • Add xtea encryption algorithm support, including standard processing and streaming processing
中文
  • 使用 io.CopyBuffer 简化流式处理逻辑
  • 优化 tea 加密算法,支持不同分块模式和填充模式
  • 增加 xtea 加密算法支持,包括标准处理和流式处理

Full Changelog: v1.1.5...v1.1.6

v1.1.5

01 Oct 12:34

Choose a tag to compare

English
  • Fix bug where symmetric encryption algorithms incorrectly perform padding on block modes that don't require padding (such as CFB/OFB/CTR/GCM, etc.), causing encryption/decryption errors #29
中文
  • 修复对称加密算法中对不需要填充的分组模式(如 CFB/OFB/CTR/GCM 等)进行填充时加解密错误的bug

Full Changelog: v1.1.4...v1.1.5

v1.1.4

24 Sep 01:26

Choose a tag to compare

English
  • [chore] Change method receivers from pointer to value to prevent property pollution when using global default instances, with no impact on caller API
  • [feat] Add twofish encryption algorithm support, including standard processing and streaming processing
中文
  • [chore] 将方法接受者从指针改成值,防止出现使用全局默认实例时属性污染现象,调用方 API 没有任何影响
  • [feat] 增加 twofish 加密算法支持,包括标准处理和流式处理

Full Changelog: v1.1.3...v1.1.4

v1.1.3

15 Sep 01:35

Choose a tag to compare

English
  • [chore] Optimize 3DES symmetric encryption algorithm compatibility with 16-byte keys
  • [chore] Optimize DES symmetric encryption algorithm validation for unsupported GCM mode
  • [chore] Optimize 3DES symmetric encryption algorithm validation for unsupported GCM mode
  • [chore] Optimize Blowfish symmetric encryption algorithm validation for unsupported GCM mode
  • [chore] Update testify dependency to v1.11.1
  • [feat] Add Salsa20 encryption algorithm support, including standard processing and streaming processing
中文
  • [chore] 优化 3DES 对称加密算法对 16 字节密钥的兼容
  • [chore] 优化 DES 对称加密算法对不支持的 GCM 模式的校验
  • [chore] 优化 3DES 对称加密算法对不支持的 GCM 模式的校验
  • [chore] 优化 Blowfish 对称加密算法对不支持的 GCM 模式的校验
  • [chore] 更新 testify 依赖至 v1.11.1
  • [feat] 增加 Salsa20 加密算法支持,包括标准处理和流式处理

Full Changelog: v1.1.2...v1.1.3