--- id: gmssl version: "3.2.2" license: BSD license_treatment: permissive maintenance: dormant --- # gmssl — Pure-Python SM2/SM3/SM4 implementation License: permissive · Maintenance: dormant · Downloads: 153.5K/mo ## What it is and what it does gmssl is a pure-Python cryptographic library implementing China's national standard algorithms: SM2 (elliptic curve public-key cryptography), SM3 (cryptographic hash), and SM4 (block cipher). It provides functions for encryption, decryption, digital signing, and verification without external compiled dependencies. The package is designed for applications needing to interoperate with Chinese cryptographic standards or systems, particularly where SM2 key exchange, SM4 block encryption in ECB or CBC modes, and SM3-based signatures are required. The library has no runtime dependencies and installs as a pure wheel. However, maintenance is dormant—the last release was June 2022—so security patches, bug fixes, and compatibility updates with newer Python versions are not actively maintained. It remains available and functional for existing deployments, but adopters should be aware that issues discovered after the last release are unlikely to receive fixes from the upstream project. Use it for: - Encrypt and decrypt data using SM2 elliptic curve cryptography for systems requiring Chinese national standard compliance. - Sign and verify messages with SM2 or SM3 hash integration for authentication in Chinese regulatory or enterprise environments. - Perform symmetric block encryption with SM4 in ECB or CBC modes for data protection in applications mandated to use national standards. - Interoperate with systems already using gmssl or compatible SM2/SM3/SM4 implementations, including ASN.1 mode for Java compatibility. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Pure-Python implementation of SM2, SM3, and SM4 Chinese national standard cryptographic algorithms, providing encryption, decryption, signing, and verification functions. Yes, if you need SM2/SM3/SM4 cryptography and accept dormant maintenance. The package has no dependencies, installs easily, and carries no known vulnerabilities. However, do not use it for new projects requiring active security support or Python version compatibility guarantees—consider it suitable for legacy systems, Chinese regulatory compliance scenarios, or interoperability with existing gmssl deployments where the risk of unpatched issues is acceptable. ## Install pip install gmssl uv add gmssl poetry add gmssl ## Installing gmssl Before you install: Low install friction with no runtime dependencies. Dormant maintenance status—last release June 2022—means security updates and compatibility fixes are unlikely to arrive quickly. License in practice: BSD permissive license allows use in both open-source and closed-source commercial applications without requiring source disclosure. Quickstart: pip install gmssl from gmssl import sm2 private_key = '00B9AB0B828FF68872F21A837FC303668428DEA11DCD1B24429D0C99E24EED83D5' public_key = 'B9C9A6E04E9C91F7BA880429273747D7EF5DDEB0BB2FF6317EB00BEF331A83081A6994B8993F3F5D6EADDDB81872266C87C018FB4162F5AF347B483E24620207' sm2_crypt = sm2.CryptSM2(public_key=public_key, private_key=private_key) enc_data = sm2_crypt.encrypt(b'111') dec_data = sm2_crypt.decrypt(enc_data) Verify before relying: - Whether the SM2, SM3, and SM4 implementations have undergone formal cryptographic audit or validation against official Chinese standards. - Current compatibility with modern Python versions, given the dormant maintenance status and lack of specified Python support. - Whether the package is suitable for production use in regulated environments requiring certified implementations. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 153.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags SM2 SM3 SM4 cryptography, Chinese national standard encryption, gmssl python implementation, elliptic curve SM2 signing, block cipher SM4 encryption, 国密 cryptographic algorithms, chinese-cryptography, sm2-sm3-sm4, dormant-maintenance [View on SkillFed](https://skillfed.io/packages/gmssl) · [View on PyPI](https://pypi.org/project/gmssl/)