Skip to main content

Fast and flexible security protocol parser and generator

Project description

What is it and what is it not?

As the project name CryptoParser implies, it is a cryptographic protocol parser. The main purpose of creating this library is the fact, that cryptography protocol analysis differs in many aspect from establishing a connection using a cryptographic protocol. Analysis is mostly testing where we trigger special and corner cases of the protocol and we also trying to establish connection with hardly supported, experimental, obsoleted or even deprecated mechanisms or algorithms which are may or may not supported by the latest or any version of an implementation of the cryptographic protocol.

As follows, it is neither a comprehensive nor a secure implementation of any cryptographic protocol. On the one hand library implements only the absolutely necessary parts of the protocol. On the other it contains completely insecure algorithms and mechanisms. It is not designed and contraindicated to use this library establishing secure connections. If you are searching for cryptographic protocol implementation, there are several existing wrappers and native implementations for Python (eg: M2Crypto, pyOpenSSL, Paramiko, …).

Quick start

CryptoParser can be installed directly via pip:

pip install cryptoparser

Development environment

If you want to setup a development environment, you are in need of pipenv.

$ cd cryptoparser
$ pipenv install --dev
$ pipenv shell

Features

Protocols

Python implementation

  • CPython (2.7, >=3.3)

  • PyPy (2.7, 3.5)

Operating systems

  • Linux

  • macOS

  • Windows

Protocol Specific Features

Hypertext Transfer Protocol (HTTP)

Headers

  1. supports header wire format parsing

  2. supports detailed parsing of generic headers (Content-Type, Server)

  3. supports detailed parsing of caching headers (Age, Cache-Control, Date, ETag, Expires, Last-Modified, Pragma)

  4. supports detailed parsing of security headers (Expect-CT, Expect-Staple, Referrer-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options)

Transport Layer Security (TLS)

Only features that cannot be or difficultly implemented by some of the most popular SSL/TLS implementations (eg: GnuTls, LibreSSL, OpenSSL, wolfSSL, …) are listed.

Generic

  1. supports Generate Random Extensions And Sustain Extensibility (GREASE) values for

    • protocol version

    • extension type

    • ciphers suite

    • signature algorithms

    • named group

  2. supports easy JA3 fingerprint generation

Protocol Versions

  1. support not only the final, but also draft versions

Cipher Suites

  1. supports each cipher suites discussed on ciphersuite.info

  2. supports GOST (national standards of the Russian Federation and CIS countries) cipher suites

Secure Shell (SSH)

Cipher Suites

  1. identifies as much encryption algorithms as possible (more than 200, compared to 70+ currently supported by OpenSSH)

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 Choose an open source license website.

Download files

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

Source Distribution

cryptoparser-0.7.1.tar.gz (68.1 kB view details)

Uploaded Source

Built Distribution

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

cryptoparser-0.7.1-py3-none-any.whl (70.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cryptoparser-0.7.1.tar.gz
  • Upload date:
  • Size: 68.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7

File hashes

Hashes for cryptoparser-0.7.1.tar.gz
Algorithm Hash digest
SHA256 594d28140f54ee25c7e3343af91ef46e818591168c5713031b907c166bd6b17e
MD5 c759e50be3e5b433d2f1419e4a64d93d
BLAKE2b-256 5ba161dc1de8df06d68da2e430d53d6a28038e4fcc69668ffe08a2693715895c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cryptoparser-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 70.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7

File hashes

Hashes for cryptoparser-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6e09a2f3afd79e5508012093db0c9c694b78a1787e8a6e5061efd95a0b21ac6
MD5 7c15a698cbbe63dbe2a60b2abe86f8d3
BLAKE2b-256 cfeac83f8b99baa0e553b26a69764a0332583757959f3e3ee7c893a0dd508528

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page