ShangMi (SM) cipher suites for golang (Go语言商用密码软件)
Go to file
2023-08-24 16:42:33 +08:00
.github rollback 2023-08-24 15:32:27 +08:00
cfca cfca: supplement test cases 2023-03-13 13:57:22 +08:00
cipher sm4: xts asm amd64 2023-08-24 11:47:06 +08:00
drbg drbg: fix drbg prng read issue when reseed 2023-06-07 08:32:46 +08:00
ecdh sm2,smx509: add encoding paths for SM2 ecdh keys 2022-11-21 09:31:30 +08:00
internal internal/bigmod: avoid duplicated name with golang sdk 2023-08-16 14:34:31 +08:00
kdf sm: improve docs and add examples 2023-01-31 13:50:14 +08:00
padding padding: ISO/IEC 9797 method 2 2023-08-08 17:35:16 +08:00
pkcs pkcs: update gcm parameters 2023-03-28 11:09:58 +08:00
pkcs7 pkcs7: enable sign without attributes 2023-03-28 08:41:01 +08:00
pkcs8 pkcs: SM4 oid special handling 2023-03-27 13:41:45 +08:00
sm2 sm2: remove CSPRNG usage 2023-06-27 08:57:31 +08:00
sm3 sm4: Support AES-NI + AVX #135 2023-07-03 12:00:27 +08:00
sm4 sm4: xts asm arm64, fix dead loop bug 2023-08-24 16:42:33 +08:00
sm9 internal/sm2ec: add boundary test 2023-07-28 15:26:42 +08:00
smx509 sm2: remove CSPRNG usage 2023-06-27 08:57:31 +08:00
zuc zuc: reduce bounds checking 2023-06-15 16:47:50 +08:00
.gitattributes align format 2022-01-21 11:24:10 +08:00
.gitignore align format 2022-01-21 11:24:10 +08:00
.travis.yml sync code from sm2fiat and branch 1.16 2022-08-17 15:23:59 +08:00
DISCLAIMER.md add disclaimer 2022-11-03 09:41:36 +08:00
go.mod build(deps): bump golang.org/x/crypto from 0.11.0 to 0.12.0 2023-08-07 23:16:54 +00:00
go.sum build(deps): bump golang.org/x/crypto from 0.11.0 to 0.12.0 2023-08-07 23:16:54 +00:00
LICENSE align format 2022-01-21 11:24:10 +08:00
README.md cipher: optimize gb gf(2^128) reduction 2023-08-20 12:05:48 +08:00

GM-Standards SM2/SM3/SM4/SM9/ZUC for Go

Github CI arm64-qemu sm3-sm4-ni-qemu codecov Go Report Card Documentation GitHub go.mod Go version (branch) Release

Packages

  • SM2 - This is a SM2 sm2p256v1 implementation whose performance is similar like golang native NIST P256 under amd64 and arm64, for implementation detail, please refer SM2实现细节. It supports ShangMi sm2 digital signature, public key encryption algorithm and also key exchange.

  • SM3 - This is also a SM3 implementation whose performance is similar like golang native SHA 256 with SIMD under amd64, for implementation detail, please refer SM3性能优化. It also provides A64 cryptographic instructions SM3 tested with QEMU.

  • SM4 - For SM4 implementation, SIMD & AES-NI are used under amd64 and arm64, for detail please refer SM4性能优化, it supports ECB/CBC/CFB/OFB/CTR/GCM/CCM/XTS modes. It also provides A64 cryptographic instructions SM4 tested with QEMU.

  • SM9 - For SM9 implementation, please reference SM9实现及优化

  • ZUC - For ZUC implementation, SIMD, AES-NI and CLMUL are used under amd64 and arm64, for detail please refer Efficient Software Implementations of ZUC

  • CFCA - some cfca specific implementations.

  • CIPHER - ECB/CCM/XTS cipher modes, XTS mode also supports GB/T 17964-2021.

  • SMX509 - a fork of golang X509 that supports ShangMi.

  • PKCS7 - a fork of mozilla-services/pkcs7 that supports ShangMi.

  • PKCS8 - a fork of youmark/pkcs8 that supports ShangMi.

  • ECDH - a similar implementation of golang ECDH that supports SM2 ECDH & SM2MQV without usage of big.Int, a replacement of SM2 key exchange. For detail, pleaes refer is my code constant time?

  • DRBG - Random Number Generation Using Deterministic Random Bit Generators, for detail, please reference NIST Special Publication 800-90A and GM/T 0105-2021: CTR-DRBG using derivation function and HASH-DRBG. NIST related implementations are tested with part of NIST provided test vectors. It's NOT concurrent safe! You can also use randomness tool to check the generated random bits.

  • TLCP - An implementation of GB/T 38636-2020 Information security technology Transport Layer Cryptography Protocol (TLCP).
  • PKCS12 - pkcs12 supports ShangMi, a fork of SSLMate/go-pkcs12.
  • MKSMCERT - A simple tool for making locally-trusted development ShangMi certificates, a fork of FiloSottile/mkcert.

Disclaimer

Please read disclaimer carefully!