# tjfoc/gmsm

GM SM2/3/4 library based on Golang (基于Go语言的国密SM2/SM3/SM4算法库)

Repository: https://github.com/tjfoc/gmsm
Canonical: https://ross.abutalabs.com/products/gmsm
Homepage: http://www.wutongchain.com
Language: Go
License: Apache-2.0
License Family: permissive
Topics: gm, sm2, sm3, sm4, golang
Last push: 2024-06-18T02:03:30+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3318, "days_push": 807, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1963, forks 608 (observed 2026-08-28T04:05:59.725377+00:00)

## What it is
A Go library implementing the Chinese national cryptography standards SM2 (elliptic curve), SM3 (hash), and SM4 (block cipher). It supports key generation, signing, encryption, PEM files, and X.509 certificate operations compatible with RSA/ECDSA interfaces.

## Use cases
- implement SM2 signing and verification in Go
- compute SM3 hashes
- encrypt and decrypt data with SM4
- generate and read SM2 X.509 certificates
- build applications compliant with Chinese national crypto standards

## When to choose
- you need GM (Guomi) SM2/SM3/SM4 algorithms in a Go project
- you need crypto.Signer and hash.Hash compatible interfaces for national crypto compliance
- you work with Chinese blockchain or fintech systems requiring GM cryptography

## When to avoid
- you need modern actively developed crypto libraries with latest security patches
- your project does not require Chinese national cryptography standards
- you need algorithms beyond SM2/SM3/SM4

## Facets
- artifact type: library
- maturity: maintenance
- function: cryptography, security
- domain: security, developer-tools, fintech
- platform: go, cross-platform
- tags: sm2, sm3, sm4, chinese-national-cryptography, elliptic-curve, x509-certificates, pem

## Member repositories
- tjfoc/gmsm (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:59.725377+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:05:33.995376+00:00, confidence not recorded.
  - readme: https://github.com/tjfoc/gmsm (fetched 2026-08-28T04:05:59.725377+00:00, sha 47b1a99bd774)
- Data as of 2026-08-30T08:39:29.467469+00:00.
