Documentation
¶
Overview ¶
Package pollux provides Go integration tooling for Chinese national cryptographic (国密/GM) algorithms and protocols.
Pollux is a GM security integration toolkit — not a cryptography implementation. All core algorithms are provided by github.com/emmansun/gmsm; pollux adds:
- Protocol integration (TLCP 1.1 handshake, HTTP helpers, QUIC-GM)
- SM2-aware X.509 certificate handling (smx509)
- Ergonomic Go-idiomatic APIs wrapping gmsm primitives
- Secure memory operations for key material (internal/memsecure)
Sub-packages ¶
- sm2: SM2 digital signatures and key exchange (wraps gmsm/sm2)
- sm3: SM3 hash function (wraps gmsm/sm3)
- sm4: SM4 block cipher with GCM/CBC modes (wraps gmsm/sm4)
- sm9: SM9 identity-based encryption (wraps gmsm/sm9)
- zuc: ZUC stream cipher (wraps gmsm/zuc)
- gmstd: GM/T standard helper functions
- smx509: SM2-aware X.509 certificate creation, parsing, and verification
- cert: High-level certificate management facade
- tls: TLS cipher suite registry (national suite IDs only)
- tls13: Standard TLS 1.3 configuration builders (Route A)
- tlcp: TLCP 1.1 protocol (EXPERIMENTAL — pending security audit)
- tls13gm: RFC 8998 TLS 1.3 GM cipher suites (interop-verified, Route C)
- quicgm: RFC 9001 QUIC packet protection with SM4-GCM (Route C)
- http: HTTP server/client helpers for TLS, TLCP, and hybrid
The primitive wrappers (sm2/sm3/sm4/sm9/zuc) delegate to gmsm and inherit its audit status. TLCP is EXPERIMENTAL pending independent security audit.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package aes provides convenience wrappers around the standard library crypto/aes, symmetric in API surface to github.com/iuboy/pollux-go/sm4.
|
Package aes provides convenience wrappers around the standard library crypto/aes, symmetric in API surface to github.com/iuboy/pollux-go/sm4. |
|
Package cert provides a unified certificate facade for both standard X.509 and SM2 (Chinese national cryptography) certificates.
|
Package cert provides a unified certificate facade for both standard X.509 and SM2 (Chinese national cryptography) certificates. |
|
Package gmstd provides helper functions per GM/T national cryptography standards.
|
Package gmstd provides helper functions per GM/T national cryptography standards. |
|
Package http provides net/http-compatible helpers for serving HTTP over standard TLS, TLCP (national, GB/T 38636-2020), TLS 1.3, or a hybrid mode that accepts both TLS and TLCP on the same port.
|
Package http provides net/http-compatible helpers for serving HTTP over standard TLS, TLCP (national, GB/T 38636-2020), TLS 1.3, or a hybrid mode that accepts both TLS and TLCP on the same port. |
|
internal
|
|
|
memsecure
Package memsecure provides secure memory operations for cryptographic material.
|
Package memsecure provides secure memory operations for cryptographic material. |
|
panicsafe
Package panicsafe converts unexpected panics into errors at public API boundaries.
|
Package panicsafe converts unexpected panics into errors at public API boundaries. |
|
Package jwt provides JWT signing methods for both the GM regime (SM2-SM3, asymmetric) and the international regime (HMAC-SHA-256/512, symmetric), plus a uniform Signer / Verifier abstraction so callers can switch algorithms by configuration without touching the call site.
|
Package jwt provides JWT signing methods for both the GM regime (SM2-SM3, asymmetric) and the international regime (HMAC-SHA-256/512, symmetric), plus a uniform Signer / Verifier abstraction so callers can switch algorithms by configuration without touching the call site. |
|
Package kdf provides hash-agnostic key- and password-derivation functions.
|
Package kdf provides hash-agnostic key- and password-derivation functions. |
|
Package pwHash provides PHC-format-encoded password hashing with a uniform PasswordHasher interface across the international (argon2id) and GM (pbkdf2-sm3) regimes.
|
Package pwHash provides PHC-format-encoded password hashing with a uniform PasswordHasher interface across the international (argon2id) and GM (pbkdf2-sm3) regimes. |
|
Package quic provides standard QUIC transport using TLS 1.3.
|
Package quic provides standard QUIC transport using TLS 1.3. |
|
Package quicgm provides QUIC over the RFC 8998 SM4-GCM cipher suite (TLS_SM4_GCM_SM3, 0x00C6), integrating the GM cryptographic primitives from the tls13gm package with the vendored quic-go fork.
|
Package quicgm provides QUIC over the RFC 8998 SM4-GCM cipher suite (TLS_SM4_GCM_SM3, 0x00C6), integrating the GM cryptographic primitives from the tls13gm package with the vendored quic-go fork. |
|
Package sha provides convenience wrappers around the standard library crypto/sha256 and crypto/sha512, symmetric in API surface to github.com/iuboy/pollux-go/sm3.
|
Package sha provides convenience wrappers around the standard library crypto/sha256 and crypto/sha512, symmetric in API surface to github.com/iuboy/pollux-go/sm3. |
|
Package sm2 implements the SM2 elliptic curve public key cryptography algorithm (GM/T 0003-2012), following crypto/ecdsa conventions.
|
Package sm2 implements the SM2 elliptic curve public key cryptography algorithm (GM/T 0003-2012), following crypto/ecdsa conventions. |
|
Package sm3 implements the SM3 cryptographic hash function (GM/T 0004-2012).
|
Package sm3 implements the SM3 cryptographic hash function (GM/T 0004-2012). |
|
Package sm4 implements the SM4 block cipher (GM/T 0002-2012).
|
Package sm4 implements the SM4 block cipher (GM/T 0002-2012). |
|
Package sm9 provides Go-idiomatic wrappers around gmsm/sm9.
|
Package sm9 provides Go-idiomatic wrappers around gmsm/sm9. |
|
Package smx509 provides SM2-aware X.509 certificate handling, extending crypto/x509 with national cryptography support.
|
Package smx509 provides SM2-aware X.509 certificate handling, extending crypto/x509 with national cryptography support. |
|
Package tlcp implements the Transport Layer Cryptography Protocol (TLCP), the Chinese national standard for transport-layer security (GB/T 38636-2020).
|
Package tlcp implements the Transport Layer Cryptography Protocol (TLCP), the Chinese national standard for transport-layer security (GB/T 38636-2020). |
|
Package tls provides a cipher suite ID registry for Chinese national cryptographic algorithms.
|
Package tls provides a cipher suite ID registry for Chinese national cryptographic algorithms. |
|
Package tls13 provides secure TLS 1.3 configuration builders for servers and clients.
|
Package tls13 provides secure TLS 1.3 configuration builders for servers and clients. |
|
Package tls13gm provides the RFC 8998 TLS 1.3 GM (国密) stack — the SM4-GCM, curveSM2, SM2, and SM3 cipher suite (TLS_SM4_GCM_SM3, 0x00C6) that the Go standard library crypto/tls does not support.
|
Package tls13gm provides the RFC 8998 TLS 1.3 GM (国密) stack — the SM4-GCM, curveSM2, SM2, and SM3 cipher suite (TLS_SM4_GCM_SM3, 0x00C6) that the Go standard library crypto/tls does not support. |
|
Package zuc provides Go-idiomatic wrappers around gmsm/zuc.
|
Package zuc provides Go-idiomatic wrappers around gmsm/zuc. |
Click to show internal directories.
Click to hide internal directories.