CryptoDataHub 0.12.6__py3-none-any.whl

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.
Files changed (70) hide show
  1. CryptoDataHub-0.12.6.dist-info/LICENSE.txt +373 -0
  2. CryptoDataHub-0.12.6.dist-info/METADATA +119 -0
  3. CryptoDataHub-0.12.6.dist-info/RECORD +70 -0
  4. CryptoDataHub-0.12.6.dist-info/WHEEL +5 -0
  5. CryptoDataHub-0.12.6.dist-info/top_level.txt +1 -0
  6. cryptodatahub/__init__.py +0 -0
  7. cryptodatahub/__setup__.py +10 -0
  8. cryptodatahub/common/__init__.py +0 -0
  9. cryptodatahub/common/algorithm.py +164 -0
  10. cryptodatahub/common/attack-named.json +74 -0
  11. cryptodatahub/common/attack-type.json +58 -0
  12. cryptodatahub/common/authentication.json +113 -0
  13. cryptodatahub/common/block-cipher-mode.json +75 -0
  14. cryptodatahub/common/block-cipher.json +474 -0
  15. cryptodatahub/common/certificate-transparency-log.json +2394 -0
  16. cryptodatahub/common/client.json +20 -0
  17. cryptodatahub/common/dhparam-well-known.json +1975 -0
  18. cryptodatahub/common/ecparam-well-known.json +1868 -0
  19. cryptodatahub/common/entity.json +269 -0
  20. cryptodatahub/common/entity.py +110 -0
  21. cryptodatahub/common/exception.py +28 -0
  22. cryptodatahub/common/grade.py +200 -0
  23. cryptodatahub/common/hash.json +273 -0
  24. cryptodatahub/common/key-exchange.json +140 -0
  25. cryptodatahub/common/key.py +571 -0
  26. cryptodatahub/common/mac.json +404 -0
  27. cryptodatahub/common/named-group.json +902 -0
  28. cryptodatahub/common/parameter.py +149 -0
  29. cryptodatahub/common/root-certificate.json +19240 -0
  30. cryptodatahub/common/server.json +56 -0
  31. cryptodatahub/common/signature.json +233 -0
  32. cryptodatahub/common/standard.json +57 -0
  33. cryptodatahub/common/stores.py +323 -0
  34. cryptodatahub/common/types.py +524 -0
  35. cryptodatahub/common/utils.py +112 -0
  36. cryptodatahub/common/vulnerability.json +2 -0
  37. cryptodatahub/dnsrec/__init__.py +0 -0
  38. cryptodatahub/dnsrec/algorithm.json +114 -0
  39. cryptodatahub/dnsrec/algorithm.py +87 -0
  40. cryptodatahub/dnsrec/digest-type.json +26 -0
  41. cryptodatahub/dnsrec/rr-type.json +805 -0
  42. cryptodatahub/ssh/__init__.py +0 -0
  43. cryptodatahub/ssh/algorithm.py +194 -0
  44. cryptodatahub/ssh/compression-algorithm.json +24 -0
  45. cryptodatahub/ssh/elliptic-curve-identifier.json +50 -0
  46. cryptodatahub/ssh/encryption-algorithm.json +587 -0
  47. cryptodatahub/ssh/host-key-algorithm.json +482 -0
  48. cryptodatahub/ssh/kex-algorithm.json +709 -0
  49. cryptodatahub/ssh/mac-algorithm.json +566 -0
  50. cryptodatahub/tls/__init__.py +0 -0
  51. cryptodatahub/tls/algorithm.py +324 -0
  52. cryptodatahub/tls/certificate-compression-algorithm.json +14 -0
  53. cryptodatahub/tls/cipher-kind.json +171 -0
  54. cryptodatahub/tls/cipher-suite-extension.json +10 -0
  55. cryptodatahub/tls/cipher-suite.json +5098 -0
  56. cryptodatahub/tls/client.json +4757 -0
  57. cryptodatahub/tls/client.py +220 -0
  58. cryptodatahub/tls/compression-method.json +20 -0
  59. cryptodatahub/tls/ec-point-format.json +20 -0
  60. cryptodatahub/tls/extension-type.json +282 -0
  61. cryptodatahub/tls/grease-one-byte.json +34 -0
  62. cryptodatahub/tls/grease-two-byte.json +66 -0
  63. cryptodatahub/tls/hash-and-signature-algorithm.json +266 -0
  64. cryptodatahub/tls/named-curve.json +292 -0
  65. cryptodatahub/tls/next-protocol-name.json +20 -0
  66. cryptodatahub/tls/protocol-name.json +71 -0
  67. cryptodatahub/tls/psk-key-exchange-mode.json +10 -0
  68. cryptodatahub/tls/token-binding-paramater.json +14 -0
  69. cryptodatahub/tls/version.json +154 -0
  70. cryptodatahub/tls/version.py +17 -0
@@ -0,0 +1,114 @@
1
+ {
2
+ "DELETE": {
3
+ "_code_in_hex": "0x00",
4
+ "code": 0,
5
+ "name": "Delete DS",
6
+ "zone_transfer": false,
7
+ "transaction_security": false,
8
+ "algorithm": null
9
+ },
10
+ "RSAMD5": {
11
+ "_code_in_hex": "0x01",
12
+ "code": 1,
13
+ "name": "RSA/MD5",
14
+ "zone_transfer": false,
15
+ "transaction_security": true,
16
+ "algorithm": "RSA_WITH_MD5"
17
+ },
18
+ "DH": {
19
+ "_code_in_hex": "0x02",
20
+ "code": 2,
21
+ "name": "Diffie-Hellman",
22
+ "zone_transfer": false,
23
+ "transaction_security": true,
24
+ "algorithm": "DH"
25
+ },
26
+ "DSA": {
27
+ "_code_in_hex": "0x03",
28
+ "code": 3,
29
+ "name": "DSA/SHA1",
30
+ "zone_transfer": true,
31
+ "transaction_security": true,
32
+ "algorithm": "DSA_WITH_SHA1"
33
+ },
34
+ "RSASHA1": {
35
+ "_code_in_hex": "0x05",
36
+ "code": 5,
37
+ "name": "RSA/SHA-1",
38
+ "zone_transfer": true,
39
+ "transaction_security": true,
40
+ "algorithm": "RSA_WITH_SHA1"
41
+ },
42
+ "DSA-NSEC3-SHA1": {
43
+ "_code_in_hex": "0x06",
44
+ "code": 6,
45
+ "name": "DSA-NSEC3-SHA1",
46
+ "zone_transfer": true,
47
+ "transaction_security": true,
48
+ "algorithm": "DSA_WITH_SHA1"
49
+ },
50
+ "RSASHA1-NSEC3-SHA1": {
51
+ "_code_in_hex": "0x07",
52
+ "code": 7,
53
+ "name": "RSASHA1-NSEC3-SHA1",
54
+ "zone_transfer": true,
55
+ "transaction_security": true,
56
+ "algorithm": "RSA_WITH_SHA1"
57
+ },
58
+ "RSASHA256": {
59
+ "_code_in_hex": "0x08",
60
+ "code": 8,
61
+ "name": "RSA/SHA-256",
62
+ "zone_transfer": true,
63
+ "transaction_security": null,
64
+ "algorithm": "RSA_WITH_SHA2_256"
65
+ },
66
+ "RSASHA512": {
67
+ "_code_in_hex": "0x0A",
68
+ "code": 10,
69
+ "name": "RSA/SHA-512",
70
+ "zone_transfer": true,
71
+ "transaction_security": null,
72
+ "algorithm": "RSA_WITH_SHA2_256"
73
+ },
74
+ "ECCGOST": {
75
+ "_code_in_hex": "0x0C",
76
+ "code": 12,
77
+ "name": "GOST R 34.10-2001",
78
+ "zone_transfer": true,
79
+ "transaction_security": null,
80
+ "algorithm": "GOST_R3410_01"
81
+ },
82
+ "ECDSAP256SHA256": {
83
+ "_code_in_hex": "0x0D",
84
+ "code": 13,
85
+ "name": "ECDSA Curve P-256 with SHA-256",
86
+ "zone_transfer": true,
87
+ "transaction_security": null,
88
+ "algorithm": "ECDSA_WITH_SHA2_256"
89
+ },
90
+ "ECDSAP384SHA384": {
91
+ "_code_in_hex": "0x0E",
92
+ "code": 14,
93
+ "name": "ECDSA Curve P-384 with SHA-384",
94
+ "zone_transfer": true,
95
+ "transaction_security": null,
96
+ "algorithm": "ECDSA_WITH_SHA2_256"
97
+ },
98
+ "ED25519": {
99
+ "_code_in_hex": "0x0F",
100
+ "code": 15,
101
+ "name": "Ed25519",
102
+ "zone_transfer": true,
103
+ "transaction_security": null,
104
+ "algorithm": "ED25519"
105
+ },
106
+ "ED448": {
107
+ "_code_in_hex": "0x10",
108
+ "code": 16,
109
+ "name": "Ed448",
110
+ "zone_transfer": true,
111
+ "transaction_security": null,
112
+ "algorithm": "ED448"
113
+ }
114
+ }
@@ -0,0 +1,87 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ import attr
4
+ import six
5
+
6
+ from cryptodatahub.common.algorithm import Hash, KeyExchange, Signature
7
+ from cryptodatahub.common.grade import GradeableComplex
8
+ from cryptodatahub.common.types import (
9
+ CryptoDataEnumBase,
10
+ CryptoDataEnumCodedBase,
11
+ CryptoDataParamsEnumNumeric,
12
+ convert_enum,
13
+ convert_variadic,
14
+ )
15
+
16
+
17
+ @attr.s(frozen=True)
18
+ class AlgorithmParams(CryptoDataParamsEnumNumeric, GradeableComplex):
19
+ name = attr.ib(validator=attr.validators.instance_of(six.string_types))
20
+ zone_transfer = attr.ib(validator=attr.validators.instance_of(bool))
21
+ transaction_security = attr.ib(validator=attr.validators.optional(attr.validators.instance_of(bool)))
22
+ algorithm = attr.ib(
23
+ converter=convert_variadic((convert_enum(Signature), convert_enum(KeyExchange))),
24
+ validator=attr.validators.optional(attr.validators.instance_of(CryptoDataEnumBase))
25
+ )
26
+
27
+ def __attrs_post_init__(self):
28
+ if self.algorithm is None:
29
+ object.__setattr__(self, 'gradeables', [])
30
+ else:
31
+ object.__setattr__(self, 'gradeables', [self.algorithm.value])
32
+
33
+ attr.validate(self)
34
+
35
+ @classmethod
36
+ def get_code_size(cls):
37
+ return 1
38
+
39
+ def __str__(self):
40
+ return self.name
41
+
42
+
43
+ DnsSecAlgorithm = CryptoDataEnumCodedBase('DnsSecAlgorithm', CryptoDataEnumCodedBase.get_json_records(AlgorithmParams))
44
+
45
+
46
+ @attr.s(frozen=True)
47
+ class DigestTypeParams(CryptoDataParamsEnumNumeric, GradeableComplex):
48
+ name = attr.ib(validator=attr.validators.instance_of(six.string_types))
49
+ hash = attr.ib(
50
+ converter=convert_enum(Hash),
51
+ validator=attr.validators.instance_of(Hash),
52
+ )
53
+
54
+ def __attrs_post_init__(self):
55
+ object.__setattr__(self, 'gradeables', [self.hash.value])
56
+
57
+ attr.validate(self)
58
+
59
+ @classmethod
60
+ def get_code_size(cls):
61
+ return 1
62
+
63
+ def __str__(self):
64
+ return self.name
65
+
66
+
67
+ DnsSecDigestType = CryptoDataEnumCodedBase(
68
+ 'DnsSecDigestType', CryptoDataEnumCodedBase.get_json_records(DigestTypeParams)
69
+ )
70
+
71
+
72
+ @attr.s(frozen=True)
73
+ class RrTypeParams(CryptoDataParamsEnumNumeric):
74
+ name = attr.ib(validator=attr.validators.instance_of(six.string_types))
75
+ description = attr.ib(validator=attr.validators.optional(attr.validators.instance_of(six.string_types)))
76
+
77
+ @classmethod
78
+ def get_code_size(cls):
79
+ return 2
80
+
81
+ def __str__(self):
82
+ return self.name
83
+
84
+
85
+ DnsRrType = CryptoDataEnumCodedBase(
86
+ 'DnsRrType', CryptoDataEnumCodedBase.get_json_records(RrTypeParams)
87
+ )
@@ -0,0 +1,26 @@
1
+ {
2
+ "SHA1": {
3
+ "_code_in_hex": "0x01",
4
+ "code": 1,
5
+ "name": "SHA-1",
6
+ "hash": "SHA1"
7
+ },
8
+ "SHA_256": {
9
+ "_code_in_hex": "0x02",
10
+ "code": 2,
11
+ "name": "SHA-256",
12
+ "hash": "SHA2_256"
13
+ },
14
+ "GOST_R3411_94": {
15
+ "_code_in_hex": "0x03",
16
+ "code": 3,
17
+ "name": "GOST R 34.11-94",
18
+ "hash": "GOST_R3411_94"
19
+ },
20
+ "SHA_384": {
21
+ "_code_in_hex": "0x04",
22
+ "code": 4,
23
+ "name": "SHA-384",
24
+ "hash": "SHA2_384"
25
+ }
26
+ }