CryptoDataHub 0.11.2__py3-none-any.whl → 0.12.2__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.

Potentially problematic release.


This version of CryptoDataHub might be problematic. Click here for more details.

@@ -59,6 +59,42 @@
59
59
  "mac": "CRYPTICORE",
60
60
  "mode": "ENCRYPT_AND_MAC"
61
61
  },
62
+ "CBCMAC_3DES": {
63
+ "code": "cbcmac-3des",
64
+ "truncated_size": null,
65
+ "mac": "CBCMAC_3DES",
66
+ "mode": "ENCRYPT_AND_MAC"
67
+ },
68
+ "CBCMAC_AES": {
69
+ "code": "cbcmac-aes",
70
+ "truncated_size": null,
71
+ "mac": "CBCMAC_AES",
72
+ "mode": "ENCRYPT_AND_MAC"
73
+ },
74
+ "CBCMAC_BLOWFISH": {
75
+ "code": "cbcmac-blowfish",
76
+ "truncated_size": null,
77
+ "mac": "CBCMAC_BLOWFISH",
78
+ "mode": "ENCRYPT_AND_MAC"
79
+ },
80
+ "CBCMAC_DES": {
81
+ "code": "cbcmac-des",
82
+ "truncated_size": null,
83
+ "mac": "CBCMAC_DES",
84
+ "mode": "ENCRYPT_AND_MAC"
85
+ },
86
+ "CBCMAC_RIJNDAEL": {
87
+ "code": "cbcmac-rijndael",
88
+ "truncated_size": null,
89
+ "mac": "CBCMAC_RIJNDAEL",
90
+ "mode": "ENCRYPT_AND_MAC"
91
+ },
92
+ "CBCMAC_TWOFISH": {
93
+ "code": "cbcmac-twofish",
94
+ "truncated_size": null,
95
+ "mac": "CBCMAC_TWOFISH",
96
+ "mode": "ENCRYPT_AND_MAC"
97
+ },
62
98
  "HMAC_GOST2012_256_ETM": {
63
99
  "code": "hmac-gost2012-256-etm",
64
100
  "truncated_size": null,
@@ -77,12 +113,36 @@
77
113
  "mac": "GOST_R3411_12_256",
78
114
  "mode": "ENCRYPT_AND_MAC"
79
115
  },
116
+ "HMAC_MD5": {
117
+ "code": "hmac-md5",
118
+ "truncated_size": null,
119
+ "mac": "MD5",
120
+ "mode": "ENCRYPT_AND_MAC"
121
+ },
122
+ "HMAC_MD5_96": {
123
+ "code": "hmac-md5-96",
124
+ "truncated_size": null,
125
+ "mac": "MD5",
126
+ "mode": "ENCRYPT_AND_MAC"
127
+ },
128
+ "HMAC_SHA224": {
129
+ "code": "hmac-sha224",
130
+ "truncated_size": null,
131
+ "mac": "SHA2_224",
132
+ "mode": "ENCRYPT_AND_MAC"
133
+ },
80
134
  "HMAC_SHA256": {
81
135
  "code": "hmac-sha256",
82
136
  "truncated_size": null,
83
137
  "mac": "SHA2_256",
84
138
  "mode": "ENCRYPT_AND_MAC"
85
139
  },
140
+ "HMAC_SHA384": {
141
+ "code": "hmac-sha384",
142
+ "truncated_size": null,
143
+ "mac": "SHA2_384",
144
+ "mode": "ENCRYPT_AND_MAC"
145
+ },
86
146
  "HMAC_SHA1": {
87
147
  "code": "hmac-sha1",
88
148
  "truncated_size": null,
@@ -101,6 +161,12 @@
101
161
  "mac": "SHA2_224",
102
162
  "mode": "ENCRYPT_AND_MAC"
103
163
  },
164
+ "HMAC_SHA2_224_ETM_OPENSSH_COM": {
165
+ "code": "hmac-sha2-224-etm@openssh.com",
166
+ "truncated_size": null,
167
+ "mac": "SHA2_224",
168
+ "mode": "ENCRYPT_THEN_MAC"
169
+ },
104
170
  "HMAC_SHA2_256": {
105
171
  "code": "hmac-sha2-256",
106
172
  "truncated_size": null,
@@ -113,6 +179,18 @@
113
179
  "mac": "SHA2_256",
114
180
  "mode": "ENCRYPT_AND_MAC"
115
181
  },
182
+ "HMAC_SHA256_56": {
183
+ "code": "hmac-sha2-56",
184
+ "truncated_size": 56,
185
+ "mac": "SHA2_256",
186
+ "mode": "ENCRYPT_AND_MAC"
187
+ },
188
+ "HMAC_SHA256_96": {
189
+ "code": "hmac-sha256-96",
190
+ "truncated_size": 96,
191
+ "mac": "SHA2_256",
192
+ "mode": "ENCRYPT_AND_MAC"
193
+ },
116
194
  "HMAC_SHA2_256_96": {
117
195
  "code": "hmac-sha2-256-96",
118
196
  "truncated_size": 96,
@@ -131,6 +209,12 @@
131
209
  "mac": "SHA2_384",
132
210
  "mode": "ENCRYPT_AND_MAC"
133
211
  },
212
+ "HMAC_SHA2_384_ETM_OPENSSH_COM": {
213
+ "code": "hmac-sha2-384-etm@openssh.com",
214
+ "truncated_size": null,
215
+ "mac": "SHA2_384",
216
+ "mode": "ENCRYPT_THEN_MAC"
217
+ },
134
218
  "HMAC_SHA2_512": {
135
219
  "code": "hmac-sha2-512",
136
220
  "truncated_size": null,
@@ -191,6 +275,12 @@
191
275
  "mac": "SHA2_384",
192
276
  "mode": "ENCRYPT_AND_MAC"
193
277
  },
278
+ "HMAC_SHA512": {
279
+ "code": "hmac-sha512",
280
+ "truncated_size": null,
281
+ "mac": "SHA2_512",
282
+ "mode": "ENCRYPT_AND_MAC"
283
+ },
194
284
  "HMAC_SHA512_SSH_COM": {
195
285
  "code": "hmac-sha512@ssh.com",
196
286
  "truncated_size": null,
@@ -203,40 +293,16 @@
203
293
  "mac": "SHA2_256",
204
294
  "mode": "ENCRYPT_AND_MAC"
205
295
  },
206
- "HMAC_MD5": {
207
- "code": "hmac-md5",
208
- "truncated_size": null,
209
- "mac": "MD5",
210
- "mode": "ENCRYPT_AND_MAC"
211
- },
212
- "HMAC_MD5_96": {
213
- "code": "hmac-md5-96",
214
- "truncated_size": null,
215
- "mac": "MD5",
216
- "mode": "ENCRYPT_AND_MAC"
217
- },
218
- "UMAC_32_OPENSSH_COM": {
219
- "code": "umac-32@openssh.com",
220
- "truncated_size": null,
221
- "mac": "UMAC_32",
222
- "mode": "ENCRYPT_AND_MAC"
223
- },
224
- "UMAC_64_OPENSSH_COM": {
225
- "code": "umac-64@openssh.com",
226
- "truncated_size": null,
227
- "mac": "UMAC_64",
228
- "mode": "ENCRYPT_AND_MAC"
229
- },
230
- "UMAC_96_OPENSSH_COM": {
231
- "code": "umac-96@openssh.com",
296
+ "HMAC_SHA1_96_ETM_OPENSSH_COM": {
297
+ "code": "hmac-sha1-96-etm@openssh.com",
232
298
  "truncated_size": null,
233
- "mac": "UMAC_96",
234
- "mode": "ENCRYPT_AND_MAC"
299
+ "mac": "SHA1",
300
+ "mode": "ENCRYPT_THEN_MAC"
235
301
  },
236
- "UMAC_128_OPENSSH_COM": {
237
- "code": "umac-128@openssh.com",
302
+ "HMAC_SHA1_96_OPENSSH_COM": {
303
+ "code": "hmac-sha1-96@openssh.com",
238
304
  "truncated_size": null,
239
- "mac": "UMAC_128",
305
+ "mac": "SHA1",
240
306
  "mode": "ENCRYPT_AND_MAC"
241
307
  },
242
308
  "HMAC_SHA1_ETM_OPENSSH_COM": {
@@ -263,6 +329,18 @@
263
329
  "mac": "SHA2_512",
264
330
  "mode": "ENCRYPT_THEN_MAC"
265
331
  },
332
+ "HMAC_SM3": {
333
+ "code": "hmac-sm3",
334
+ "truncated_size": null,
335
+ "mac": "SM3",
336
+ "mode": "ENCRYPT_AND_MAC"
337
+ },
338
+ "HMAC_SM3_HUAWEI": {
339
+ "code": "hmac-sm3@huawei",
340
+ "truncated_size": null,
341
+ "mac": "SM3",
342
+ "mode": "ENCRYPT_AND_MAC"
343
+ },
266
344
  "HMAC_MD5_ETM_OPENSSH_COM": {
267
345
  "code": "hmac-md5-etm@openssh.com",
268
346
  "truncated_size": null,
@@ -395,12 +473,36 @@
395
473
  "mac": "WHIRLPOOL",
396
474
  "mode": "ENCRYPT_AND_MAC"
397
475
  },
476
+ "UMAC_32_OPENSSH_COM": {
477
+ "code": "umac-32@openssh.com",
478
+ "truncated_size": null,
479
+ "mac": "UMAC_32",
480
+ "mode": "ENCRYPT_AND_MAC"
481
+ },
482
+ "UMAC_64_OPENSSH_COM": {
483
+ "code": "umac-64@openssh.com",
484
+ "truncated_size": null,
485
+ "mac": "UMAC_64",
486
+ "mode": "ENCRYPT_AND_MAC"
487
+ },
398
488
  "UMAC_64_ETM_OPENSSH_COM": {
399
489
  "code": "umac-64-etm@openssh.com",
400
490
  "truncated_size": null,
401
491
  "mac": "UMAC_64",
402
492
  "mode": "ENCRYPT_THEN_MAC"
403
493
  },
494
+ "UMAC_96_OPENSSH_COM": {
495
+ "code": "umac-96@openssh.com",
496
+ "truncated_size": null,
497
+ "mac": "UMAC_96",
498
+ "mode": "ENCRYPT_AND_MAC"
499
+ },
500
+ "UMAC_128_OPENSSH_COM": {
501
+ "code": "umac-128@openssh.com",
502
+ "truncated_size": null,
503
+ "mac": "UMAC_128",
504
+ "mode": "ENCRYPT_AND_MAC"
505
+ },
404
506
  "UMAC_128_ETM_OPENSSH_COM": {
405
507
  "code": "umac-128-etm@openssh.com",
406
508
  "truncated_size": null,
@@ -424,5 +526,41 @@
424
526
  "truncated_size": null,
425
527
  "mac": "TIGER_192",
426
528
  "mode": "ENCRYPT_AND_MAC"
529
+ },
530
+ "MD5": {
531
+ "code": "md5",
532
+ "truncated_size": null,
533
+ "mac": "MD5",
534
+ "mode": "ENCRYPT_AND_MAC"
535
+ },
536
+ "MD5_8": {
537
+ "code": "md5-8",
538
+ "truncated_size": 64,
539
+ "mac": "MD5",
540
+ "mode": "ENCRYPT_AND_MAC"
541
+ },
542
+ "RIPEMD160": {
543
+ "code": "ripemd160",
544
+ "truncated_size": null,
545
+ "mac": "RIPEMD160",
546
+ "mode": "ENCRYPT_AND_MAC"
547
+ },
548
+ "RIPEMD160_8": {
549
+ "code": "ripemd160-8",
550
+ "truncated_size": 64,
551
+ "mac": "RIPEMD160",
552
+ "mode": "ENCRYPT_AND_MAC"
553
+ },
554
+ "SHA1": {
555
+ "code": "sha1",
556
+ "truncated_size": null,
557
+ "mac": "SHA1",
558
+ "mode": "ENCRYPT_AND_MAC"
559
+ },
560
+ "SHA1_8": {
561
+ "code": "sha1-8",
562
+ "truncated_size": 64,
563
+ "mac": "SHA1",
564
+ "mode": "ENCRYPT_AND_MAC"
427
565
  }
428
566
  }
@@ -187,8 +187,9 @@ TlsCertificateCompressionAlgorithm = CryptoDataEnumCodedBase(
187
187
  )
188
188
 
189
189
 
190
- @attr.s
191
- class CipherParamsBase(CryptoDataParamsEnumNumeric): # pylint: disable=too-many-instance-attributes
190
+ @attr.s(frozen=True)
191
+ class CipherParamsBase(CryptoDataParamsEnumNumeric, GradeableComplex): # pylint: disable=too-many-instance-attributes
192
+ iana_name = attr.ib(validator=attr.validators.optional(attr.validators.instance_of(six.string_types)))
192
193
  iana_name = attr.ib(validator=attr.validators.optional(attr.validators.instance_of(six.string_types)))
193
194
  openssl_name = attr.ib(validator=attr.validators.optional(attr.validators.instance_of(six.string_types)))
194
195
  key_exchange = attr.ib(
@@ -235,6 +236,23 @@ class CipherParamsBase(CryptoDataParamsEnumNumeric): # pylint: disable=too-many
235
236
 
236
237
  object.__setattr__(self, 'export_grade', self.iana_name is not None and '_EXPORT' in self.iana_name)
237
238
 
239
+ vulnerability_parts = collections.OrderedDict([
240
+ (KeyExchange, self.key_exchange),
241
+ (Authentication, self.authentication),
242
+ (BlockCipher, self.bulk_cipher),
243
+ (BlockCipherMode, self.block_cipher_mode),
244
+ (MAC, self.mac),
245
+ ])
246
+
247
+ gradeables = []
248
+ for algorithm in vulnerability_parts.values():
249
+ if algorithm is None:
250
+ continue
251
+
252
+ gradeables.append(algorithm.value)
253
+
254
+ object.__setattr__(self, 'gradeables', gradeables)
255
+
238
256
  attr.validate(self)
239
257
 
240
258
  def __str__(self):
@@ -253,39 +271,17 @@ class CipherParamsBase(CryptoDataParamsEnumNumeric): # pylint: disable=too-many
253
271
  return result
254
272
 
255
273
 
256
- @attr.s
257
- class CipherSuiteParams(CipherParamsBase, GradeableComplex):
274
+ @attr.s(frozen=True)
275
+ class CipherSuiteParams(CipherParamsBase):
258
276
  @classmethod
259
277
  def get_code_size(cls):
260
278
  return 2
261
279
 
262
- def __attrs_post_init__(self):
263
- super(CipherSuiteParams, self).__attrs_post_init__()
264
-
265
- vulnerability_parts = collections.OrderedDict([
266
- (KeyExchange, self.key_exchange),
267
- (Authentication, self.authentication),
268
- (BlockCipher, self.bulk_cipher),
269
- (BlockCipherMode, self.block_cipher_mode),
270
- (MAC, self.mac),
271
- ])
272
-
273
- gradeables = []
274
- for algorithm in vulnerability_parts.values():
275
- if algorithm is None:
276
- continue
277
-
278
- gradeables.append(algorithm.value)
279
-
280
- object.__setattr__(self, 'gradeables', gradeables)
281
-
282
- attr.validate(self)
283
-
284
280
 
285
281
  TlsCipherSuite = CryptoDataEnumCodedBase('TlsCipherSuite', CryptoDataEnumCodedBase.get_json_records(CipherSuiteParams))
286
282
 
287
283
 
288
- @attr.s
284
+ @attr.s(frozen=True)
289
285
  class CipherKindParams(CipherParamsBase):
290
286
  @classmethod
291
287
  def get_code_size(cls):
@@ -160,7 +160,7 @@
160
160
  "code": 16744464,
161
161
  "iana_name": "SSL_CK_NULL",
162
162
  "openssl_name": null,
163
- "key_exchange": null,
163
+ "key_exchange": "NULL",
164
164
  "authentication": null,
165
165
  "bulk_cipher": null,
166
166
  "block_cipher_mode": null,
@@ -32,7 +32,7 @@ from cryptodatahub.tls.algorithm import (
32
32
  from cryptodatahub.tls.version import TlsVersion
33
33
 
34
34
 
35
- @attr.s
35
+ @attr.s(frozen=True)
36
36
  class ClientTokenBindingParams(CryptoDataParamsBase):
37
37
  parameters = attr.ib(
38
38
  converter=convert_iterable(convert_enum(TlsTokenBindingParamater)),
@@ -41,7 +41,7 @@ class ClientTokenBindingParams(CryptoDataParamsBase):
41
41
  protocol_version = attr.ib(validator=attr.validators.instance_of(six.string_types))
42
42
 
43
43
 
44
- @attr.s
44
+ @attr.s(frozen=True)
45
45
  class ClientGreaseParams(CryptoDataParamsBase):
46
46
  cipher_suites = attr.ib(default=False, validator=attr.validators.instance_of(bool))
47
47
  extension_types = attr.ib(default=False, validator=attr.validators.instance_of(bool))
@@ -76,7 +76,7 @@ class ClientVersionedParams(ClientVersionedParamsBase):
76
76
  )
77
77
 
78
78
 
79
- @attr.s
79
+ @attr.s(frozen=True)
80
80
  class ClientExtensionParams(CryptoDataParamsBase): # pylint: disable=too-many-instance-attributes
81
81
  application_layer_protocol_negotiation = attr.ib(
82
82
  default=None,
@@ -163,7 +163,7 @@ class ClientExtensionParams(CryptoDataParamsBase): # pylint: disable=too-many-i
163
163
  )
164
164
 
165
165
 
166
- @attr.s
166
+ @attr.s(frozen=True)
167
167
  class ClientCapabilities(CryptoDataParamsBase):
168
168
  cipher_suites = attr.ib(
169
169
  converter=convert_iterable(convert_enum(TlsCipherSuite)),
@@ -200,7 +200,7 @@ class ClientCapabilities(CryptoDataParamsBase):
200
200
  return capabilities_dict
201
201
 
202
202
 
203
- @attr.s
203
+ @attr.s(frozen=True)
204
204
  class ClientParams(CryptoDataParamsBase): # pylint: disable=too-many-instance-attributes
205
205
  meta = attr.ib(
206
206
  converter=convert_dict_to_object(ClientVersionedParams),