PKI - 一文读懂SM1、SM2、SM3、SM4等国密算法-腾讯云开发者社区-腾讯云
国密即国家商用密码管理办公室认定的国产密码算法。主要有SM1,SM2,SM3,SM4。密钥长度和分组长度均为128位。
国密算法是指国家密码管理局认定的一系列国产密码算法,包括SM1-SM9以及ZUC等。其中
- SM1、SM4、SM5、SM6、SM7、SM8、ZUC等属于对称密码
- SM2、SM9等属于公钥密码 (非对称加密)
- SM3属于单向散列函数
其中SM1、SM7算法不公开,调用该算法时,需要通过加密芯片的接口进行调用
Standard
商用密码标准研究院 PQC
中国商用密码算法标准概况----商用密码标准研究院
国家标准全文阅读|标准检索 GB/T 15843 Entity authentication
国家标准|GB/T 15843.2-2017 symmetric encryption
国家标准|GB/T 15843.2-2024 authenticated encryption
国家标准|GB/T 15843.3-2023 digital signature
国家标准|GB/T 15843.4-2024 cryptographic check
国家标准|GB/T 15843.5-2005 zero knowledge techniques
国家标准全文阅读|标准检索 GB/T 15852 Message authentication codes (MACs)
国家标准|GB/T 15852.2-2024 dedicated hash-function
国家标准|GB/T 15852.3-2019 universal hash-function
国家标准全文阅读|标准检索 GB/T 18238 Hash-functions
国家标准|GB/T 18238.2-2024 Hash-functions using a block cipher
国家标准|GB/T 18238.3-2024 dedicated hash-function
Implementation
OpenSSL
OpenSSL added SM2, SM3, SM4 support since 1.1.1i in 2018
OpenSSL 1.1.1 新特性: 全面支持国密SM2/SM3/SM4加密算法_openssl实现的sm3杂凑实例代码-CSDN博客
算法库 | openEuler文档 | openEuler社区 | v22.09
OpenSSL 命令行 SM2 SM3操作 - 天行常
GMSSL
probably obsolete
The GmSSL Project
guanzhi/GmSSL: 支持国密SM2/SM3/SM4/SM9/SSL的密码工具箱
ShangMi SM2
asymmetric cipher based on ECC
-
SM2 Cryptography Algorithm: A public key crypto scheme based on elliptic curves. An overview of the specification, in Chinese, can be found in GM/T 0009-2012.
-
Additional specifications can be found in:
- GB/T 32918
- GB/T 32918.1-2016, Part 1: General
- GB/T 32918.2-2016, Part 2: Digital signature algorithm
- GB/T 32918.3-2016, Part 3: Key exchange protocol
- GB/T 32918.4-2016, Part 4: Public key encryption algorithm
- GB/T 32918.5-2017, Part 5: Parameter definition
Performance Evaluation and Comparison of Standard Cryptographic Algorithms and Chinese Cryptographic Algorithms
On the Design and Performance of Chinese OSCCA-approved Cryptographic Algorithms PDF
ShangMi SM3
SM3 Cryptographic Hash Algorithm: A hash algorithm operating on 512-bit blocks to produce a 256-bit hash value.
国家标准|GB/T 32905-2016
GB/T 32905-2016
ShangMi SM4
symmetric cipher
SM4 Block Cipher Algorithm: A Feistel block cipher algorithm with a block length and key length of 128 bits, and 32 rounds. Described in GB/T 32907-2016.