Skip to content

Commit

Permalink
Merge pull request #318 from tinyboxvk/patch-ciphersuite
Browse files Browse the repository at this point in the history
Update iana_tls_ciphersuite_parser.py and missing_ciphersuites.h
  • Loading branch information
rbsec authored Nov 18, 2024
2 parents a1b0292 + fd0fb14 commit 395bb20
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion missing_ciphersuites.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct missing_ciphersuite {
};


/* Auto-generated by ./iana_tls_ciphersuite_parser.py on December 10, 2019. */
/* Auto-generated by iana_tls_ciphersuite_parser.py on November 10, 2024. */
struct missing_ciphersuite missing_ciphersuites[] = {
{0x0000, "TLS_NULL_WITH_NULL_NULL", -1, VALL, 0},
{0x0001, "TLS_RSA_WITH_NULL_MD5", -1, VALL, 0},
Expand Down Expand Up @@ -171,6 +171,8 @@ struct missing_ciphersuite missing_ciphersuites[] = {
{0x1303, "TLS_CHACHA20_POLY1305_SHA256", 256, VALL, 0},
{0x1304, "TLS_AES_128_CCM_SHA256", 128, VALL, 0},
{0x1305, "TLS_AES_128_CCM_8_SHA256", 128, VALL, 0},
{0x1306, "TLS_AEGIS_256_SHA512", 256, VALL, 0},
{0x1307, "TLS_AEGIS_128L_SHA256", 128, VALL, 0},
{0xC001, "TLS_ECDH_ECDSA_WITH_NULL_SHA", -1, VALL, 0},
{0xC002, "TLS_ECDH_ECDSA_WITH_RC4_128_SHA", 128, VALL, 0},
{0xC003, "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA", 112, VALL, 0},
Expand Down Expand Up @@ -355,6 +357,10 @@ struct missing_ciphersuite missing_ciphersuites[] = {
{0xC100, "TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC", 256, VALL, 0},
{0xC101, "TLS_GOSTR341112_256_WITH_MAGMA_CTR_OMAC", 256, VALL, 0},
{0xC102, "TLS_GOSTR341112_256_WITH_28147_CNT_IMIT", 256, VALL, 0},
{0xC103, "TLS_GOSTR341112_256_WITH_KUZNYECHIK_MGM_L", 256, VALL, 0},
{0xC104, "TLS_GOSTR341112_256_WITH_MAGMA_MGM_L", 256, VALL, 0},
{0xC105, "TLS_GOSTR341112_256_WITH_KUZNYECHIK_MGM_S", 256, VALL, 0},
{0xC106, "TLS_GOSTR341112_256_WITH_MAGMA_MGM_S", 256, VALL, 0},
{0xCCA8, "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", 256, VALL, 0},
{0xCCA9, "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", 256, VALL, 0},
{0xCCAA, "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256", 256, VALL, 0},
Expand Down
9 changes: 7 additions & 2 deletions tools/iana_tls_ciphersuite_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# <https://www.iana.org/assignments/tls-parameters/tls-parameters.xml>.
if len(sys.argv) != 2:
print("\nUsage: %s tls_ciphers.csv\n\nHint: copy the TLS table in CSV format from <https://www.iana.org/assignments/tls-parameters/tls-parameters.xml>.\n" % sys.argv[0])
exit(0)
exit()

csv_file = sys.argv[1]

Expand Down Expand Up @@ -58,6 +58,12 @@
bits = 128
elif 'ARIA_256' in cipher_name:
bits = 256
elif 'AEGIS_128' in cipher_name:
bits = 128
elif 'AEGIS_256' in cipher_name:
bits = 256
elif 'SEED' in cipher_name:
bits = 128
elif '3DES' in cipher_name:
bits = 112
elif 'DES40' in cipher_name:
Expand Down Expand Up @@ -93,4 +99,3 @@
print(' {%s, "%s", %d, VALL, 0},' % (parsed_id, cipher_name, bits))

print("};")
exit 0

0 comments on commit 395bb20

Please sign in to comment.