cryptoparser 1.4.0__tar.gz → 1.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/.gitignore +1 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/.gitlab-ci.yml +8 -8
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/.pylintrc +4 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/CHANGELOG.rst +78 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/CONTRIBUTING.rst +1 -1
- cryptoparser-1.6.0/CryptoParser.egg-info/PKG-INFO +154 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/CryptoParser.egg-info/SOURCES.txt +2 -1
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/CryptoParser.egg-info/requires.txt +2 -1
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/MANIFEST.in +1 -0
- cryptoparser-1.6.0/PKG-INFO +154 -0
- cryptoparser-1.6.0/README.md +100 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/dnsrec/record.py +11 -10
- cryptoparser-1.6.0/cryptoparser/ike/common.py +544 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ike/ikev1.py +349 -15
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ike/ikev2.py +656 -20
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ike/isakmp.py +123 -48
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ssh/key.py +7 -6
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/extension.py +93 -7
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/grease.py +6 -6
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser.spec +28 -3
- cryptoparser-1.6.0/debian/changelog +62 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/debian/rules +1 -1
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/docs/conf.py +1 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/docs/development.rst +2 -3
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/docs/features.rst +7 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/docs/index.rst +17 -1
- cryptoparser-1.6.0/llms.txt +84 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/pyproject.toml +5 -3
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/dnsrec/test_record.py +7 -6
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/test_ikev1_payload.py +331 -37
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/test_ikev2_notify.py +8 -2
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/test_ikev2_payload.py +520 -34
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/test_isakmp.py +104 -9
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ssh/test_key.py +14 -13
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_extension.py +100 -1
- cryptoparser-1.4.0/CryptoParser.egg-info/PKG-INFO +0 -118
- cryptoparser-1.4.0/PKG-INFO +0 -118
- cryptoparser-1.4.0/README.rst +0 -66
- cryptoparser-1.4.0/cryptoparser/ike/common.py +0 -236
- cryptoparser-1.4.0/debian/changelog +0 -31
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/.coveragerc +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/.gitmodules +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/.readthedocs.yaml +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/CryptoParser.egg-info/dependency_links.txt +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/CryptoParser.egg-info/top_level.txt +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/LICENSE.txt +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/__setup__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/common/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/common/base.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/common/classes.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/common/exception.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/common/field.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/common/parse.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/common/utils.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/common/x509.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/dnsrec/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/dnsrec/txt.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/httpx/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/httpx/header.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/httpx/parse.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/httpx/version.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ike/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ike/version.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ssh/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ssh/record.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ssh/subprotocol.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/ssh/version.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/algorithm.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/ciphersuite.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/ldap.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/mysql.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/openvpn.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/postgresql.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/rdp.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/record.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/subprotocol.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/cryptoparser/tls/version.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/debian/control +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/debian/copyright +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/debian/source/format +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/debian/watch +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/docs/.gitignore +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/docs/changelog.rst +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/setup.cfg +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/setup.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/certs/ecc256.badssl.com.pem +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/certs/rsa8192.badssl.com.pem +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/certs/rsa8192.badssl.com_certificate.crt +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/certs/rsa8192.badssl.com_root_ca.crt +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/certs/snakeoil_cert.pem +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/classes.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/test_algorithm.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/test_base.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/test_classes.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/test_exception.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/test_field.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/test_parse.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/test_utils.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/common/test_x509.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/dnsrec/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/dnsrec/test_txt.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/httpx/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/httpx/classes.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/httpx/test_header.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/httpx/test_version.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/classes.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/test_ikev1_sa.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/test_ikev2_sa.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ike/test_version.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ssh/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ssh/test_ciphersuites.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ssh/test_record.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ssh/test_subprotocol.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/ssh/test_version.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/__init__.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/classes.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_alert.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_application_data.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_change_cipher_spec.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_ciphersuite.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_grease.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_handshake.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_ldap.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_mysql.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_openvpn.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_postgresql.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_rdp.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_record.py +0 -0
- {cryptoparser-1.4.0 → cryptoparser-1.6.0}/test/tls/test_version.py +0 -0
|
@@ -7,24 +7,25 @@ stages:
|
|
|
7
7
|
|
|
8
8
|
before_script:
|
|
9
9
|
- pip install uv
|
|
10
|
-
- uv
|
|
10
|
+
- uv sync --extra tests
|
|
11
11
|
|
|
12
12
|
variables:
|
|
13
13
|
GIT_SUBMODULE_DEPTH: 1
|
|
14
14
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
15
15
|
PYTHONPATH: "submodules/cryptodatahub"
|
|
16
|
+
UV_PYTHON_DOWNLOADS: "never"
|
|
17
|
+
UV_PYTHON_PREFERENCE: "only-system"
|
|
16
18
|
|
|
17
19
|
.test:
|
|
18
20
|
script:
|
|
19
|
-
- coverage run -m unittest discover -v
|
|
20
|
-
- coverage report
|
|
21
|
+
- uv run coverage run -m unittest discover -v
|
|
22
|
+
- uv run coverage report
|
|
21
23
|
|
|
22
24
|
pylint:
|
|
23
25
|
image: python:3.14-slim
|
|
24
26
|
stage: earlytest
|
|
25
27
|
script:
|
|
26
|
-
- uv
|
|
27
|
-
- pylint --rcfile .pylintrc cryptoparser docs test
|
|
28
|
+
- uv run --with pylint pylint --rcfile .pylintrc cryptoparser docs test
|
|
28
29
|
|
|
29
30
|
ruff:
|
|
30
31
|
image: python:3.14-slim
|
|
@@ -83,9 +84,8 @@ coveralls:
|
|
|
83
84
|
PYTHONPATH: "submodules/cryptodatahub"
|
|
84
85
|
stage: deploy
|
|
85
86
|
script:
|
|
86
|
-
- uv
|
|
87
|
-
-
|
|
88
|
-
- coveralls
|
|
87
|
+
- uv run coverage run -m unittest -v -f
|
|
88
|
+
- uv run --with coveralls coveralls
|
|
89
89
|
only:
|
|
90
90
|
refs:
|
|
91
91
|
- master
|
|
@@ -2,6 +2,84 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
------------------
|
|
6
|
+
1.6.0 - 2026-08-25
|
|
7
|
+
------------------
|
|
8
|
+
|
|
9
|
+
Features
|
|
10
|
+
========
|
|
11
|
+
|
|
12
|
+
- TLS (``tls``)
|
|
13
|
+
|
|
14
|
+
- Extensions (``extensions``)
|
|
15
|
+
|
|
16
|
+
- add `trust anchors <https://datatracker.ietf.org/doc/draft-ietf-tls-trust-anchor-ids/>`__ extension related
|
|
17
|
+
messages (#104)
|
|
18
|
+
- add server padding extension related messages (#104)
|
|
19
|
+
- add `application-layer protocol settings <https://datatracker.ietf.org/doc/draft-vvv-tls-alps/>`__ extension
|
|
20
|
+
related messages with the old code point (#104)
|
|
21
|
+
|
|
22
|
+
Notable fixes
|
|
23
|
+
=============
|
|
24
|
+
|
|
25
|
+
- TLS (``tls``)
|
|
26
|
+
|
|
27
|
+
- Extensions (``extensions``)
|
|
28
|
+
|
|
29
|
+
- bound the outer extension payload of the encrypted client hello by the extension length (#104)
|
|
30
|
+
|
|
31
|
+
- IKE (``ike``)
|
|
32
|
+
|
|
33
|
+
- preserve the transform number when parsing the IKEv1 transform payload (#105)
|
|
34
|
+
|
|
35
|
+
Refactor
|
|
36
|
+
========
|
|
37
|
+
|
|
38
|
+
- Generic
|
|
39
|
+
|
|
40
|
+
- follow the replacement of the named group with the key parameter (#106)
|
|
41
|
+
|
|
42
|
+
- TLS (``tls``)
|
|
43
|
+
|
|
44
|
+
- make the parameter classes of the invalid extension types immutable (#104)
|
|
45
|
+
|
|
46
|
+
Other
|
|
47
|
+
=====
|
|
48
|
+
|
|
49
|
+
- switch to Markdown format in readme
|
|
50
|
+
- add llms.txt to describe the library for large language models
|
|
51
|
+
- use uv instead of pipenv and pip in the documentation
|
|
52
|
+
|
|
53
|
+
------------------
|
|
54
|
+
1.5.0 - 2026-07-31
|
|
55
|
+
------------------
|
|
56
|
+
|
|
57
|
+
Features
|
|
58
|
+
========
|
|
59
|
+
|
|
60
|
+
- IKE (``ike``)
|
|
61
|
+
|
|
62
|
+
- add IKEv1 and IKEv2 certificate payload parsing (#103)
|
|
63
|
+
- add IKEv1 identification payload parsing (#103)
|
|
64
|
+
- add IKEv1 signature payload parsing (#103)
|
|
65
|
+
- add IKEv2 identification payload parsing (#103)
|
|
66
|
+
- add IKEv2 authentication payload parsing (#103)
|
|
67
|
+
- add IKEv2 extensible authentication protocol payload parsing (#103)
|
|
68
|
+
- add IKEv2 encrypted and authenticated payload parsing (#103)
|
|
69
|
+
- keep IKEv1 and IKEv2 payloads of unknown type unparsed instead of rejecting the message (#103)
|
|
70
|
+
- add getter for the distinguished name of the IKEv1 certificate request payload (#103)
|
|
71
|
+
- add getter for the certification authority hashes of the IKEv2 certificate request payload (#103)
|
|
72
|
+
|
|
73
|
+
Refactor
|
|
74
|
+
========
|
|
75
|
+
|
|
76
|
+
- IKE (``ike``)
|
|
77
|
+
|
|
78
|
+
- parse the IKEv1 and IKEv2 identification payload data according to the identification type (#103)
|
|
79
|
+
- parse the digital signature envelope of the IKEv2 authentication payload (#103)
|
|
80
|
+
- split the ISAKMP message parsing and composing into header and payload chain steps (#103)
|
|
81
|
+
- use typed values in the IKEv2 signature hash algorithms notify payload (#103)
|
|
82
|
+
|
|
5
83
|
------------------
|
|
6
84
|
1.4.0 - 2026-07-17
|
|
7
85
|
------------------
|
|
@@ -142,7 +142,7 @@ Preparing your Fork
|
|
|
142
142
|
3. ``cd theproject``
|
|
143
143
|
4. `Create and activate a virtual
|
|
144
144
|
environment <https://packaging.python.org/tutorials/installing-packages/#creating-virtual-environments>`__.
|
|
145
|
-
5. Install the development requirements: ``
|
|
145
|
+
5. Install the development requirements: ``uv sync --extra tests``.
|
|
146
146
|
6. Create a branch: ``git checkout -b foo-the-bars 1.3``.
|
|
147
147
|
|
|
148
148
|
Making your Changes
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: CryptoParser
|
|
3
|
+
Version: 1.6.0
|
|
4
|
+
Summary: An analysis oriented security protocol parser and generator
|
|
5
|
+
Author-email: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
|
|
6
|
+
Maintainer-email: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
|
|
7
|
+
License: MPL-2.0
|
|
8
|
+
Project-URL: Homepage, https://gitlab.com/coroner/cryptoparser
|
|
9
|
+
Project-URL: Changelog, https://cryptoparser.readthedocs.io/en/latest/changelog
|
|
10
|
+
Project-URL: Documentation, https://cryptoparser.readthedocs.io/en/latest/
|
|
11
|
+
Project-URL: Issues, https://gitlab.com/coroner/cryptoparser/-/issues
|
|
12
|
+
Project-URL: Source, https://gitlab.com/coroner/cryptoparser
|
|
13
|
+
Keywords: ssl,tls,gost,ja3,ldap,rdp,ssh,hsts,dns,ike
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: Intended Audience :: Science/Research
|
|
18
|
+
Classifier: Intended Audience :: System Administrators
|
|
19
|
+
Classifier: Natural Language :: English
|
|
20
|
+
Classifier: Operating System :: MacOS
|
|
21
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
22
|
+
Classifier: Operating System :: POSIX
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
29
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
30
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
31
|
+
Classifier: Programming Language :: Python
|
|
32
|
+
Classifier: Topic :: Internet
|
|
33
|
+
Classifier: Topic :: Security
|
|
34
|
+
Classifier: Topic :: Security :: Cryptography
|
|
35
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
36
|
+
Classifier: Topic :: Software Development :: Testing :: Traffic Generation
|
|
37
|
+
Classifier: Topic :: Software Development :: Testing
|
|
38
|
+
Requires-Python: >=3.9
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
License-File: LICENSE.txt
|
|
41
|
+
Requires-Dist: asn1crypto
|
|
42
|
+
Requires-Dist: attrs
|
|
43
|
+
Requires-Dist: cryptodatahub==1.6.0
|
|
44
|
+
Requires-Dist: urllib3
|
|
45
|
+
Provides-Extra: tests
|
|
46
|
+
Requires-Dist: pyfakefs; extra == "tests"
|
|
47
|
+
Requires-Dist: coverage; extra == "tests"
|
|
48
|
+
Provides-Extra: docs
|
|
49
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
50
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
51
|
+
Requires-Dist: sphinx-sitemap; extra == "docs"
|
|
52
|
+
Requires-Dist: docutils; extra == "docs"
|
|
53
|
+
Dynamic: license-file
|
|
54
|
+
|
|
55
|
+
[](https://gitlab.com/coroner/cryptoparser/-/pipelines/master/latest)
|
|
56
|
+
[](https://coveralls.io/gitlab/coroner/cryptoparser/)
|
|
57
|
+
[](https://cryptoparser.readthedocs.io)
|
|
58
|
+
|
|
59
|
+
<!-- documentation-summary-start -->
|
|
60
|
+
**CryptoParser** is a cryptographic protocol
|
|
61
|
+
([IKE](https://en.wikipedia.org/wiki/Internet_Key_Exchange),
|
|
62
|
+
[SSL](https://en.wikipedia.org/wiki/Transport_Layer_Security#SSL_1.0,_2.0,_and_3.0),
|
|
63
|
+
[TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security),
|
|
64
|
+
[SSH](https://en.wikipedia.org/wiki/Secure_Shell),
|
|
65
|
+
[DNSSEC](https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions)) and security-related protocol piece
|
|
66
|
+
([HTTP headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)) parser and generator. It is neither a
|
|
67
|
+
comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support testing cryptographic
|
|
68
|
+
libraries or analysing cryptography-related settings of application servers such as
|
|
69
|
+
[CryptoLyzer](https://cryptolyzer.readthedocs.io/) does.
|
|
70
|
+
|
|
71
|
+
**Use CryptoParser when you need to parse handshake messages** — it implements the wire format of ISAKMP, IKEv1, IKEv2,
|
|
72
|
+
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
|
|
73
|
+
connection-oriented library.
|
|
74
|
+
|
|
75
|
+
**Use CryptoParser when you need to generate messages a library refuses to send** — analysis means triggering special
|
|
76
|
+
and corner cases, so messages can be composed with deprecated, experimental, or plainly invalid values that an
|
|
77
|
+
implementation aiming for secure connections would reject.
|
|
78
|
+
|
|
79
|
+
**Use CryptoParser when you need parsed HTTP security headers** — beyond wire format parsing it parses individual
|
|
80
|
+
headers, so directives are available as typed values rather than as strings.
|
|
81
|
+
|
|
82
|
+
**Use CryptoParser when you need DNSSEC record parsing** — DNSSEC records are parsed into the same kind of typed
|
|
83
|
+
structures as the protocol messages.
|
|
84
|
+
<!-- documentation-summary-end -->
|
|
85
|
+
|
|
86
|
+
<!-- documentation-strength-start -->
|
|
87
|
+
The strength of CryptoParser is that it is backed by the most comprehensive algorithm identifier database available
|
|
88
|
+
([CryptoDataHub](https://cryptodatahub.readthedocs.io)). This makes it possible to recognize rarely used, deprecated,
|
|
89
|
+
non-standard, or experimental algorithms that are not supported by any version of OpenSSL, GnuTLS, LibreSSL, or
|
|
90
|
+
wolfSSL.
|
|
91
|
+
<!-- documentation-strength-end -->
|
|
92
|
+
|
|
93
|
+
## Why CryptoParser?
|
|
94
|
+
|
|
95
|
+
<!-- documentation-comparison-start -->
|
|
96
|
+
- **Analysis oriented** — the library implements only the parts of a protocol that analysis needs, and deliberately
|
|
97
|
+
keeps the parts that make a message invalid.
|
|
98
|
+
- **No OpenSSL dependency** — the protocol implementation is its own, so what can be parsed or generated is not limited
|
|
99
|
+
by what a cryptographic library is willing to do.
|
|
100
|
+
- **Typed values, not byte offsets** — algorithm identifiers, protocol versions, and header directives are parsed into
|
|
101
|
+
enumerations and attribute classes.
|
|
102
|
+
- **Symmetric parsing and composing** — every parsable piece can also be composed back to its wire format.
|
|
103
|
+
<!-- documentation-comparison-end -->
|
|
104
|
+
|
|
105
|
+
## Usage
|
|
106
|
+
|
|
107
|
+
### uv
|
|
108
|
+
|
|
109
|
+
```shell
|
|
110
|
+
uv add cryptoparser
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from cryptoparser.tls.version import TlsProtocolVersion
|
|
115
|
+
|
|
116
|
+
# parse a protocol version from its wire format
|
|
117
|
+
TlsProtocolVersion.parse_exact_size(b'\x03\x03')
|
|
118
|
+
# TLS 1.2
|
|
119
|
+
|
|
120
|
+
# compose a protocol version back to its wire format
|
|
121
|
+
TlsProtocolVersion.parse_exact_size(b'\x03\x04').compose()
|
|
122
|
+
# bytearray(b'\x03\x04')
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Support
|
|
126
|
+
|
|
127
|
+
**Python implementations**
|
|
128
|
+
|
|
129
|
+
- CPython 3.9+
|
|
130
|
+
- PyPy 3.9+
|
|
131
|
+
|
|
132
|
+
**Operating systems**
|
|
133
|
+
|
|
134
|
+
- Linux
|
|
135
|
+
- macOS
|
|
136
|
+
- Windows
|
|
137
|
+
|
|
138
|
+
## Documentation
|
|
139
|
+
|
|
140
|
+
Detailed [documentation](https://cryptoparser.readthedocs.io) is available on the project's
|
|
141
|
+
[Read the Docs](https://readthedocs.com) site.
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
The [code](https://gitlab.com/coroner/cryptoparser) is available under the terms of
|
|
146
|
+
[Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL 2.0).
|
|
147
|
+
|
|
148
|
+
A non-comprehensive but straightforward description of MPL 2.0 can be found at the
|
|
149
|
+
[Choose an open source license](https://choosealicense.com/licenses#mpl-2.0) website.
|
|
150
|
+
|
|
151
|
+
## Credits
|
|
152
|
+
|
|
153
|
+
- [NLnet Foundation](https://nlnet.nl) and [NGI Assure](https://www.assure.ngi.eu), supports the project part of the
|
|
154
|
+
[Next Generation Internet](https://ngi.eu) initiative.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: CryptoParser
|
|
3
|
+
Version: 1.6.0
|
|
4
|
+
Summary: An analysis oriented security protocol parser and generator
|
|
5
|
+
Author-email: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
|
|
6
|
+
Maintainer-email: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
|
|
7
|
+
License: MPL-2.0
|
|
8
|
+
Project-URL: Homepage, https://gitlab.com/coroner/cryptoparser
|
|
9
|
+
Project-URL: Changelog, https://cryptoparser.readthedocs.io/en/latest/changelog
|
|
10
|
+
Project-URL: Documentation, https://cryptoparser.readthedocs.io/en/latest/
|
|
11
|
+
Project-URL: Issues, https://gitlab.com/coroner/cryptoparser/-/issues
|
|
12
|
+
Project-URL: Source, https://gitlab.com/coroner/cryptoparser
|
|
13
|
+
Keywords: ssl,tls,gost,ja3,ldap,rdp,ssh,hsts,dns,ike
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: Intended Audience :: Science/Research
|
|
18
|
+
Classifier: Intended Audience :: System Administrators
|
|
19
|
+
Classifier: Natural Language :: English
|
|
20
|
+
Classifier: Operating System :: MacOS
|
|
21
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
22
|
+
Classifier: Operating System :: POSIX
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
29
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
30
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
31
|
+
Classifier: Programming Language :: Python
|
|
32
|
+
Classifier: Topic :: Internet
|
|
33
|
+
Classifier: Topic :: Security
|
|
34
|
+
Classifier: Topic :: Security :: Cryptography
|
|
35
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
36
|
+
Classifier: Topic :: Software Development :: Testing :: Traffic Generation
|
|
37
|
+
Classifier: Topic :: Software Development :: Testing
|
|
38
|
+
Requires-Python: >=3.9
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
License-File: LICENSE.txt
|
|
41
|
+
Requires-Dist: asn1crypto
|
|
42
|
+
Requires-Dist: attrs
|
|
43
|
+
Requires-Dist: cryptodatahub==1.6.0
|
|
44
|
+
Requires-Dist: urllib3
|
|
45
|
+
Provides-Extra: tests
|
|
46
|
+
Requires-Dist: pyfakefs; extra == "tests"
|
|
47
|
+
Requires-Dist: coverage; extra == "tests"
|
|
48
|
+
Provides-Extra: docs
|
|
49
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
50
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
51
|
+
Requires-Dist: sphinx-sitemap; extra == "docs"
|
|
52
|
+
Requires-Dist: docutils; extra == "docs"
|
|
53
|
+
Dynamic: license-file
|
|
54
|
+
|
|
55
|
+
[](https://gitlab.com/coroner/cryptoparser/-/pipelines/master/latest)
|
|
56
|
+
[](https://coveralls.io/gitlab/coroner/cryptoparser/)
|
|
57
|
+
[](https://cryptoparser.readthedocs.io)
|
|
58
|
+
|
|
59
|
+
<!-- documentation-summary-start -->
|
|
60
|
+
**CryptoParser** is a cryptographic protocol
|
|
61
|
+
([IKE](https://en.wikipedia.org/wiki/Internet_Key_Exchange),
|
|
62
|
+
[SSL](https://en.wikipedia.org/wiki/Transport_Layer_Security#SSL_1.0,_2.0,_and_3.0),
|
|
63
|
+
[TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security),
|
|
64
|
+
[SSH](https://en.wikipedia.org/wiki/Secure_Shell),
|
|
65
|
+
[DNSSEC](https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions)) and security-related protocol piece
|
|
66
|
+
([HTTP headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)) parser and generator. It is neither a
|
|
67
|
+
comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support testing cryptographic
|
|
68
|
+
libraries or analysing cryptography-related settings of application servers such as
|
|
69
|
+
[CryptoLyzer](https://cryptolyzer.readthedocs.io/) does.
|
|
70
|
+
|
|
71
|
+
**Use CryptoParser when you need to parse handshake messages** — it implements the wire format of ISAKMP, IKEv1, IKEv2,
|
|
72
|
+
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
|
|
73
|
+
connection-oriented library.
|
|
74
|
+
|
|
75
|
+
**Use CryptoParser when you need to generate messages a library refuses to send** — analysis means triggering special
|
|
76
|
+
and corner cases, so messages can be composed with deprecated, experimental, or plainly invalid values that an
|
|
77
|
+
implementation aiming for secure connections would reject.
|
|
78
|
+
|
|
79
|
+
**Use CryptoParser when you need parsed HTTP security headers** — beyond wire format parsing it parses individual
|
|
80
|
+
headers, so directives are available as typed values rather than as strings.
|
|
81
|
+
|
|
82
|
+
**Use CryptoParser when you need DNSSEC record parsing** — DNSSEC records are parsed into the same kind of typed
|
|
83
|
+
structures as the protocol messages.
|
|
84
|
+
<!-- documentation-summary-end -->
|
|
85
|
+
|
|
86
|
+
<!-- documentation-strength-start -->
|
|
87
|
+
The strength of CryptoParser is that it is backed by the most comprehensive algorithm identifier database available
|
|
88
|
+
([CryptoDataHub](https://cryptodatahub.readthedocs.io)). This makes it possible to recognize rarely used, deprecated,
|
|
89
|
+
non-standard, or experimental algorithms that are not supported by any version of OpenSSL, GnuTLS, LibreSSL, or
|
|
90
|
+
wolfSSL.
|
|
91
|
+
<!-- documentation-strength-end -->
|
|
92
|
+
|
|
93
|
+
## Why CryptoParser?
|
|
94
|
+
|
|
95
|
+
<!-- documentation-comparison-start -->
|
|
96
|
+
- **Analysis oriented** — the library implements only the parts of a protocol that analysis needs, and deliberately
|
|
97
|
+
keeps the parts that make a message invalid.
|
|
98
|
+
- **No OpenSSL dependency** — the protocol implementation is its own, so what can be parsed or generated is not limited
|
|
99
|
+
by what a cryptographic library is willing to do.
|
|
100
|
+
- **Typed values, not byte offsets** — algorithm identifiers, protocol versions, and header directives are parsed into
|
|
101
|
+
enumerations and attribute classes.
|
|
102
|
+
- **Symmetric parsing and composing** — every parsable piece can also be composed back to its wire format.
|
|
103
|
+
<!-- documentation-comparison-end -->
|
|
104
|
+
|
|
105
|
+
## Usage
|
|
106
|
+
|
|
107
|
+
### uv
|
|
108
|
+
|
|
109
|
+
```shell
|
|
110
|
+
uv add cryptoparser
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from cryptoparser.tls.version import TlsProtocolVersion
|
|
115
|
+
|
|
116
|
+
# parse a protocol version from its wire format
|
|
117
|
+
TlsProtocolVersion.parse_exact_size(b'\x03\x03')
|
|
118
|
+
# TLS 1.2
|
|
119
|
+
|
|
120
|
+
# compose a protocol version back to its wire format
|
|
121
|
+
TlsProtocolVersion.parse_exact_size(b'\x03\x04').compose()
|
|
122
|
+
# bytearray(b'\x03\x04')
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Support
|
|
126
|
+
|
|
127
|
+
**Python implementations**
|
|
128
|
+
|
|
129
|
+
- CPython 3.9+
|
|
130
|
+
- PyPy 3.9+
|
|
131
|
+
|
|
132
|
+
**Operating systems**
|
|
133
|
+
|
|
134
|
+
- Linux
|
|
135
|
+
- macOS
|
|
136
|
+
- Windows
|
|
137
|
+
|
|
138
|
+
## Documentation
|
|
139
|
+
|
|
140
|
+
Detailed [documentation](https://cryptoparser.readthedocs.io) is available on the project's
|
|
141
|
+
[Read the Docs](https://readthedocs.com) site.
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
The [code](https://gitlab.com/coroner/cryptoparser) is available under the terms of
|
|
146
|
+
[Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL 2.0).
|
|
147
|
+
|
|
148
|
+
A non-comprehensive but straightforward description of MPL 2.0 can be found at the
|
|
149
|
+
[Choose an open source license](https://choosealicense.com/licenses#mpl-2.0) website.
|
|
150
|
+
|
|
151
|
+
## Credits
|
|
152
|
+
|
|
153
|
+
- [NLnet Foundation](https://nlnet.nl) and [NGI Assure](https://www.assure.ngi.eu), supports the project part of the
|
|
154
|
+
[Next Generation Internet](https://ngi.eu) initiative.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
[](https://gitlab.com/coroner/cryptoparser/-/pipelines/master/latest)
|
|
2
|
+
[](https://coveralls.io/gitlab/coroner/cryptoparser/)
|
|
3
|
+
[](https://cryptoparser.readthedocs.io)
|
|
4
|
+
|
|
5
|
+
<!-- documentation-summary-start -->
|
|
6
|
+
**CryptoParser** is a cryptographic protocol
|
|
7
|
+
([IKE](https://en.wikipedia.org/wiki/Internet_Key_Exchange),
|
|
8
|
+
[SSL](https://en.wikipedia.org/wiki/Transport_Layer_Security#SSL_1.0,_2.0,_and_3.0),
|
|
9
|
+
[TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security),
|
|
10
|
+
[SSH](https://en.wikipedia.org/wiki/Secure_Shell),
|
|
11
|
+
[DNSSEC](https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions)) and security-related protocol piece
|
|
12
|
+
([HTTP headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)) parser and generator. It is neither a
|
|
13
|
+
comprehensive nor a secure implementation of any cryptographic protocol. The goal is to support testing cryptographic
|
|
14
|
+
libraries or analysing cryptography-related settings of application servers such as
|
|
15
|
+
[CryptoLyzer](https://cryptolyzer.readthedocs.io/) does.
|
|
16
|
+
|
|
17
|
+
**Use CryptoParser when you need to parse handshake messages** — it implements the wire format of ISAKMP, IKEv1, IKEv2,
|
|
18
|
+
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
|
|
19
|
+
connection-oriented library.
|
|
20
|
+
|
|
21
|
+
**Use CryptoParser when you need to generate messages a library refuses to send** — analysis means triggering special
|
|
22
|
+
and corner cases, so messages can be composed with deprecated, experimental, or plainly invalid values that an
|
|
23
|
+
implementation aiming for secure connections would reject.
|
|
24
|
+
|
|
25
|
+
**Use CryptoParser when you need parsed HTTP security headers** — beyond wire format parsing it parses individual
|
|
26
|
+
headers, so directives are available as typed values rather than as strings.
|
|
27
|
+
|
|
28
|
+
**Use CryptoParser when you need DNSSEC record parsing** — DNSSEC records are parsed into the same kind of typed
|
|
29
|
+
structures as the protocol messages.
|
|
30
|
+
<!-- documentation-summary-end -->
|
|
31
|
+
|
|
32
|
+
<!-- documentation-strength-start -->
|
|
33
|
+
The strength of CryptoParser is that it is backed by the most comprehensive algorithm identifier database available
|
|
34
|
+
([CryptoDataHub](https://cryptodatahub.readthedocs.io)). This makes it possible to recognize rarely used, deprecated,
|
|
35
|
+
non-standard, or experimental algorithms that are not supported by any version of OpenSSL, GnuTLS, LibreSSL, or
|
|
36
|
+
wolfSSL.
|
|
37
|
+
<!-- documentation-strength-end -->
|
|
38
|
+
|
|
39
|
+
## Why CryptoParser?
|
|
40
|
+
|
|
41
|
+
<!-- documentation-comparison-start -->
|
|
42
|
+
- **Analysis oriented** — the library implements only the parts of a protocol that analysis needs, and deliberately
|
|
43
|
+
keeps the parts that make a message invalid.
|
|
44
|
+
- **No OpenSSL dependency** — the protocol implementation is its own, so what can be parsed or generated is not limited
|
|
45
|
+
by what a cryptographic library is willing to do.
|
|
46
|
+
- **Typed values, not byte offsets** — algorithm identifiers, protocol versions, and header directives are parsed into
|
|
47
|
+
enumerations and attribute classes.
|
|
48
|
+
- **Symmetric parsing and composing** — every parsable piece can also be composed back to its wire format.
|
|
49
|
+
<!-- documentation-comparison-end -->
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
|
|
53
|
+
### uv
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
uv add cryptoparser
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from cryptoparser.tls.version import TlsProtocolVersion
|
|
61
|
+
|
|
62
|
+
# parse a protocol version from its wire format
|
|
63
|
+
TlsProtocolVersion.parse_exact_size(b'\x03\x03')
|
|
64
|
+
# TLS 1.2
|
|
65
|
+
|
|
66
|
+
# compose a protocol version back to its wire format
|
|
67
|
+
TlsProtocolVersion.parse_exact_size(b'\x03\x04').compose()
|
|
68
|
+
# bytearray(b'\x03\x04')
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Support
|
|
72
|
+
|
|
73
|
+
**Python implementations**
|
|
74
|
+
|
|
75
|
+
- CPython 3.9+
|
|
76
|
+
- PyPy 3.9+
|
|
77
|
+
|
|
78
|
+
**Operating systems**
|
|
79
|
+
|
|
80
|
+
- Linux
|
|
81
|
+
- macOS
|
|
82
|
+
- Windows
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
Detailed [documentation](https://cryptoparser.readthedocs.io) is available on the project's
|
|
87
|
+
[Read the Docs](https://readthedocs.com) site.
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
The [code](https://gitlab.com/coroner/cryptoparser) is available under the terms of
|
|
92
|
+
[Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL 2.0).
|
|
93
|
+
|
|
94
|
+
A non-comprehensive but straightforward description of MPL 2.0 can be found at the
|
|
95
|
+
[Choose an open source license](https://choosealicense.com/licenses#mpl-2.0) website.
|
|
96
|
+
|
|
97
|
+
## Credits
|
|
98
|
+
|
|
99
|
+
- [NLnet Foundation](https://nlnet.nl) and [NGI Assure](https://www.assure.ngi.eu), supports the project part of the
|
|
100
|
+
[Next Generation Internet](https://ngi.eu) initiative.
|
|
@@ -7,7 +7,8 @@ import enum
|
|
|
7
7
|
|
|
8
8
|
import attr
|
|
9
9
|
|
|
10
|
-
from cryptodatahub.common.algorithm import Authentication,
|
|
10
|
+
from cryptodatahub.common.algorithm import Authentication, Signature
|
|
11
|
+
from cryptodatahub.common.parameter import ECParamWellKnown
|
|
11
12
|
from cryptodatahub.common.exception import InvalidValue
|
|
12
13
|
from cryptodatahub.common.key import (
|
|
13
14
|
PublicKey,
|
|
@@ -68,7 +69,7 @@ class DnsRecordDnskey(ParsableBase, Serializable):
|
|
|
68
69
|
algorithm_compatible_gost = (
|
|
69
70
|
self.algorithm == DnsSecAlgorithm.ECCGOST and
|
|
70
71
|
self.key.key_type == Authentication.ECDSA and
|
|
71
|
-
self.key.params.
|
|
72
|
+
self.key.params.key_parameter == ECParamWellKnown.GC256B
|
|
72
73
|
)
|
|
73
74
|
if (algorithm_incompatible and not algorithm_compatible_gost):
|
|
74
75
|
raise InvalidValue(algorithm_key_type, type(self), 'key_type')
|
|
@@ -113,35 +114,35 @@ class DnsRecordDnskey(ParsableBase, Serializable):
|
|
|
113
114
|
@classmethod
|
|
114
115
|
def _parse_public_key_ecdsa(cls, dnssec_algorithm, key_parser):
|
|
115
116
|
if dnssec_algorithm == DnsSecAlgorithm.ECDSAP256SHA256:
|
|
116
|
-
|
|
117
|
+
key_parameter = ECParamWellKnown.SECP256K1
|
|
117
118
|
elif dnssec_algorithm == DnsSecAlgorithm.ECDSAP384SHA384:
|
|
118
|
-
|
|
119
|
+
key_parameter = ECParamWellKnown.SECP384R1
|
|
119
120
|
elif dnssec_algorithm == DnsSecAlgorithm.ECCGOST:
|
|
120
|
-
|
|
121
|
+
key_parameter = ECParamWellKnown.GC256B
|
|
121
122
|
else:
|
|
122
123
|
raise NotImplementedError(dnssec_algorithm)
|
|
123
124
|
|
|
124
|
-
key_size =
|
|
125
|
+
key_size = key_parameter.value.field_size // 8
|
|
125
126
|
key_parser.parse_mpint('x', key_size)
|
|
126
127
|
key_parser.parse_mpint('y', key_size)
|
|
127
128
|
|
|
128
129
|
return PublicKey.from_params(PublicKeyParamsEcdsa(
|
|
129
|
-
point_x=key_parser['x'], point_y=key_parser['y'],
|
|
130
|
+
point_x=key_parser['x'], point_y=key_parser['y'], key_parameter=key_parameter,
|
|
130
131
|
))
|
|
131
132
|
|
|
132
133
|
@classmethod
|
|
133
134
|
def _parse_public_key_eddsa(cls, dnssec_algorithm, key_parser):
|
|
134
135
|
if dnssec_algorithm == DnsSecAlgorithm.ED25519:
|
|
135
|
-
|
|
136
|
+
key_parameter = ECParamWellKnown.CURVE25519
|
|
136
137
|
key_parser.parse_raw('public_key', 256 // 8)
|
|
137
138
|
elif dnssec_algorithm == DnsSecAlgorithm.ED448:
|
|
138
|
-
|
|
139
|
+
key_parameter = ECParamWellKnown.CURVE448
|
|
139
140
|
key_parser.parse_raw('public_key', 448 // 8)
|
|
140
141
|
else:
|
|
141
142
|
raise NotImplementedError(dnssec_algorithm)
|
|
142
143
|
|
|
143
144
|
return PublicKey.from_params(PublicKeyParamsEddsa(
|
|
144
|
-
|
|
145
|
+
key_parameter=key_parameter, key_data=key_parser['public_key']
|
|
145
146
|
))
|
|
146
147
|
|
|
147
148
|
@classmethod
|