Skip to main content

Pipeline Test Coverage Documentation

CryptoParser is a cryptographic protocol (IKE, SSL, TLS, SSH, DNSSEC) and security-related protocol piece (HTTP headers) parser and generator. It is neither a comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support testing cryptographic libraries or analysing cryptography-related settings of application servers such as CryptoLyzer does.

Use CryptoParser when you need to parse handshake messages — it implements the wire format of ISAKMP, IKEv1, IKEv2, SSL 2.0, SSL 3.0, TLS 1.0 to TLS 1.3, and SSH 2.0, so a message can be read field by field instead of being handed to a connection-oriented library.

Use CryptoParser when you need to generate messages a library refuses to send — analysis means triggering special and corner cases, so messages can be composed with deprecated, experimental, or plainly invalid values that an implementation aiming for secure connections would reject.

Use CryptoParser when you need parsed HTTP security headers — beyond wire format parsing it parses individual headers, so directives are available as typed values rather than as strings.

Use CryptoParser when you need DNSSEC record parsing — DNSSEC records are parsed into the same kind of typed structures as the protocol messages.

The strength of CryptoParser is that it is backed by the most comprehensive algorithm identifier database available (CryptoDataHub). This makes it possible to recognize rarely used, deprecated, non-standard, or experimental algorithms that are not supported by any version of OpenSSL, GnuTLS, LibreSSL, or wolfSSL.

Why CryptoParser?

  • Analysis oriented — the library implements only the parts of a protocol that analysis needs, and deliberately keeps the parts that make a message invalid.
  • No OpenSSL dependency — the protocol implementation is its own, so what can be parsed or generated is not limited by what a cryptographic library is willing to do.
  • Typed values, not byte offsets — algorithm identifiers, protocol versions, and header directives are parsed into enumerations and attribute classes.
  • Symmetric parsing and composing — every parsable piece can also be composed back to its wire format.

Usage

uv

uv add cryptoparser
from cryptoparser.tls.version import TlsProtocolVersion

# parse a protocol version from its wire format
TlsProtocolVersion.parse_exact_size(b'\x03\x03')
# TLS 1.2

# compose a protocol version back to its wire format
TlsProtocolVersion.parse_exact_size(b'\x03\x04').compose()
# bytearray(b'\x03\x04')

Support

Python implementations

  • CPython 3.9+
  • PyPy 3.9+

Operating systems

  • Linux
  • macOS
  • Windows

Documentation

Detailed documentation is available on the project's Read the Docs site.

License

The code is available under the terms of Mozilla Public License Version 2.0 (MPL 2.0).

A non-comprehensive but straightforward description of MPL 2.0 can be found at the Choose an open source license website.

Credits

Metadata

Release files for CryptoParser 1.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CryptoParser 1.6.1
File Size Uploaded Provenance
cryptoparser-1.6.1.tar.gz 202.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for CryptoParser 1.6.1
File Interpreter ABI Platform
cryptoparser-1.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 309.0 kB

Release files / cryptoparser-1.6.1.tar.gz

Download URL cryptoparser-1.6.1.tar.gz
Size 202.3 kB
Tags Source
SHA-256 checksum
How to use checksums
466721bb14619f662ae00e798979e2981539660060000104f6489f5449e24c7d
BLAKE2b-256 checksum
How to use checksums
8941924549e9dacb49f5ecae4690de23422440232dd7942ee873efbe83f1f48a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Release files / cryptoparser-1.6.1-py3-none-any.whl

Download URL cryptoparser-1.6.1-py3-none-any.whl
Size 106.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84ca37f16e8c8c6101db280faad7baa1cecdc89db5e5fff00dd9148b4a92643b
BLAKE2b-256 checksum
How to use checksums
5a721678c31b4cf67b81717e286054ea2112bd89e04155327b56a64f846e14ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Security for CryptoParser 1.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.6.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page