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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cryptoparser-1.6.0.tar.gz (200.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cryptoparser-1.6.0-py3-none-any.whl (224.3 kB view details)

Uploaded Python 3

File details

Details for the file cryptoparser-1.6.0.tar.gz.

File metadata

  • Download URL: cryptoparser-1.6.0.tar.gz
  • Upload date:
  • Size: 200.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.7

File hashes

Hashes for cryptoparser-1.6.0.tar.gz
Algorithm Hash digest
SHA256 edd0b91e22541b9906641a6fd0b4f7ef4171b8b3286b5552ebd40a095a0440b2
MD5 c73f373b64c0eff7a8cfb1de43a37903
BLAKE2b-256 b837798176a890ec098950947dcb59767353dcbaff61221a19e970360dc465d4

See more details on using hashes here.

File details

Details for the file cryptoparser-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: cryptoparser-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 224.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.7

File hashes

Hashes for cryptoparser-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2453be562833dd5d0afd40209895f7bfd25436858635af2dedea7341f76ca6e5
MD5 7f734daf64d9613d4972a8c7798d393e
BLAKE2b-256 9ad34b7de55dd13c4b2c560e4acc86dc81f8075840f332061649fdcf6ab30a74

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

1 file

0.12.6

2 files

0.12.5

2 files

0.12.4

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.3

2 files

0.10.2

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.5

3 files

0.8.4

2 files

0.8.2

1 file

0.8.0

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

1 file

0.6.0

1 file

0.5.0

2 files

0.4.0

1 file

0.3.1

1 file

0.3.0

1 file

0.2.0

1 file

0.1.0

2 files

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