# Tongsuo-Project/Tongsuo

铜锁/Tongsuo is a Modern Cryptographic Primitives and Protocols Library

Repository: https://github.com/Tongsuo-Project/Tongsuo
Canonical: https://ross.abutalabs.com/products/tongsuo
Homepage: https://www.tongsuo.net
Language: C
License: Apache-2.0
License Family: permissive
Topics: cryptography, tls, pki, chinese-ciphers, security
Last push: 2026-08-03T02:33:49+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 95, release rhythm 60, longevity 100
- inputs: {"age_days": 2199, "days_push": 31, "days_rel": 30, "gap_med": 132, "n_releases_24m": 2}
- flags: prerelease_only
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1521, forks 261 (observed 2026-08-28T04:04:57.656529+00:00)

## What it is
Tongsuo (铜锁) is an open-source cryptographic library providing modern cryptographic primitives and secure communication protocols, including Chinese commercial cryptography algorithms (SM2/SM3/SM4/ZUC), TLS 1.3, the TLCP dual-certificate protocol, post-quantum algorithms, zero-knowledge proofs, and homomorphic encryption. It is an OpenSSL-derived C library certified for Chinese commercial cryptography compliance, usable across Linux, macOS, Windows, Android, and iOS.

## Use cases
- add SM2/SM3/SM4 Chinese national cryptography support to my application
- serve TLS with dual-certificate GM (TLCP) protocol
- enable RFC 8998 TLS 1.3 with Chinese cipher suites
- meet Chinese commercial cryptography compliance requirements (密评/等保)
- use post-quantum algorithms like ML-KEM and ML-DSA
- implement zero-knowledge proofs with Bulletproofs
- use homomorphic encryption like Paillier or EC-ElGamal
- replace OpenSSL with a China-compliant crypto library

## When to choose
- you need Chinese national cryptography (国密) algorithm or TLCP protocol support
- you must satisfy Chinese commercial cryptography compliance and certification requirements
- you want an OpenSSL-compatible API with modern additions like ZKP, homomorphic encryption, and post-quantum crypto
- you need TLS 1.3 with RFC 8998 Chinese cipher suites or QUIC API support

## When to avoid
- you only need standard international cryptography with no Chinese compliance needs — OpenSSL, BoringSSL, or rustls may be simpler
- you need a minimal footprint for embedded/IoT devices — consider the companion tongsuo-mini instead
- your stack requires language bindings or ecosystems not yet built around Tongsuo

## Facets
- artifact type: library
- maturity: active
- function: cryptography, security, networking, sdk
- domain: security, privacy, developer-tools, cross-platform
- platform: windows, cross-platform, c
- tags: chinese-commercial-cryptography, sm2, sm3, sm4, tlcp, gm-tls, tls, quic, post-quantum, zero-knowledge-proof, homomorphic-encryption, openssl-fork, compliance, linux, macos, android, ios

## Member repositories
- Tongsuo-Project/Tongsuo (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:57.656529+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-30T04:31:50.595246+00:00, confidence not recorded.
  - readme: https://github.com/Tongsuo-Project/Tongsuo (fetched 2026-08-28T04:04:57.656529+00:00, sha 95267309ec24)
  - homepage: https://www.tongsuo.net (fetched 2026-08-29T11:34:59.955502+00:00, sha 3901f04704b7)
  - site_page: https://www.tongsuo.net/docs (fetched 2026-08-29T11:34:59.958538+00:00, sha 334b08fe844b)
  - site_page: https://www.tongsuo.net/docs/minisuo (fetched 2026-08-29T11:34:59.960299+00:00, sha 45597b41a19f)
  - site_page: https://www.tongsuo.net/docs/eco (fetched 2026-08-29T11:34:59.961982+00:00, sha 5f89e51d95a9)
  - site_page: https://www.tongsuo.net/docs/release-note (fetched 2026-08-29T11:34:59.963800+00:00, sha f7efd626535f)
  - site_page: https://www.tongsuo.net/docs/developers/community (fetched 2026-08-29T11:34:59.965609+00:00, sha 464efeae959e)
  - site_page: https://www.tongsuo.net/docs/developers/docs-deployment (fetched 2026-08-29T11:34:59.968332+00:00, sha c99907ab84dc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
