asn1crypto
Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X.509 and TSP
Decision gist · record as of 2026-08-14
Yes. asn1crypto is a stable, zero-dependency library in the top 1000 PyPI packages with no known vulnerabilities. Install it when you need to parse or serialize ASN.1 structures—particularly X.509 certificates and cryptographic keys—and want a faster, more straightforward alternative to older ASN.1 libraries.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Straightforward installation with no runtime dependencies.
- Active maintenance with recent commits; repository remains actively developed.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.
last release 2022-03-15 (1613 days) · last repo commit 2026-07-18 · 362 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 173,559,719 downloads/mo, #244 on PyPI
Alternatives
Verify before relying
pip install asn1crypto
from asn1crypto import x509
cert = x509.Certificate.load(cert_der_bytes)
print(cert.subject.native)- Whether the package actively maintains compatibility with Python versions beyond 3.10
- Performance characteristics on modern Python versions compared to the historical pyasn1 comparison cited in the description
- Current maintenance status for Python 2.6 and 2.7 support listed in classifiers
What it is and what it does
asn1crypto is a pure Python library for decoding and encoding ASN.1 structures, the binary format underlying cryptographic certificates, keys, and related standards. It includes pre-built type definitions for X.509 certificates, certificate signing requests, PKCS standards, OCSP responses, and other common cryptography formats, allowing you to parse and manipulate these structures as native Python objects without external dependencies.
The library prioritizes performance through lazy parsing, deferred value interpretation, and caching of original encoded data. It was designed as a faster, more Pythonic alternative to existing ASN.1 libraries, with a focus on extracting specific fields from large structures efficiently. The package supports multiple Python versions and implementations including CPython and PyPy.
Use it for
- Parse X.509 certificates to extract subject, issuer, validity dates, and extensions for validation or auditing
- Deserialize PKCS#12 key stores or PKCS#8 private keys for cryptographic operations
- Process certificate revocation lists (CRLs) to check certificate status at scale
- Build or inspect certificate signing requests (CSRs) during PKI workflows
- Extract and verify OCSP responses for real-time certificate status checking
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
asn1crypto is a stable, zero-dependency library in the top 1000 PyPI packages with no known vulnerabilities. Install it when you need to parse or serialize ASN.1 structures—particularly X.509 certificates and cryptographic keys—and want a faster, more straightforward alternative to older ASN.1 libraries.
Install
asn1crypto on PyPI
Before you install
Straightforward installation with no runtime dependencies. Active maintenance with recent commits; repository remains actively developed.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.
Quickstart
pip install asn1crypto
from asn1crypto import x509
cert = x509.Certificate.load(cert_der_bytes)
print(cert.subject.native)
Verify before relying
- Whether the package actively maintains compatibility with Python versions beyond 3.10
- Performance characteristics on modern Python versions compared to the historical pyasn1 comparison cited in the description
- Current maintenance status for Python 2.6 and 2.7 support listed in classifiers
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 1,613 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 173,559,719 / month, #244 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Security :: Cryptography |
Evidence: asn1crypto-1.5.1-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “X.509 certificate parsing”
- asn1cryptoA pure Python library for parsing and serializing ASN.1 structures,…
- certvalidatorValidates X.509 certificates and certificate chains, supporting path…
- oscryptooscrypto provides TLS sockets, key generation, encryption,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Cryptography packages
Certifi provides Mozilla's curated collection of root SSL certificates for Python applications to validate TLS hosts and verify certificate trustworthiness.
cryptography provides cryptographic recipes and low-level primitives for symmetric encryption, message digests, key derivation, and other common cryptographic algorithms in Python.
Pure-Python RSA encryption, decryption, signing, and key generation following PKCS#1 v1.5, with command-line and library interfaces.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
Provides Microsoft Entra ID token-based authentication for Azure SDK clients through a set of TokenCredential implementations that handle OAuth flows and managed identity support.
PyNaCl provides Python bindings to libsodium for digital signatures, secret-key and public-key encryption, hashing, message authentication, and password-based key derivation.
See also oscrypto · pem · pyasn1 · asn1 · certvalidator · pyasn1-modules · asn1tools · endesive · ocspbuilder · ocspresponder