API Reference: Cipher Algorithms¶
certmonitor.cipher_algorithms ¶
ALLOWED_CIPHER_SUITES
module-attribute
¶
ALLOWED_CIPHER_SUITES = {'ECDHE-ECDSA-AES128-GCM-SHA256', 'ECDHE-RSA-AES128-GCM-SHA256', 'ECDHE-ECDSA-CHACHA20-POLY1305', 'ECDHE-RSA-CHACHA20-POLY1305', 'ECDHE-ECDSA-AES256-GCM-SHA384', 'ECDHE-RSA-AES256-GCM-SHA384'}
ALL_ALGORITHMS
module-attribute
¶
ALL_ALGORITHMS: Dict[str, AlgorithmDict] = {'encryption': {'AES': 'AES', 'CHACHA20': 'CHACHA20', '3DES': '3DES|DES-EDE3', 'CAMELLIA': 'CAMELLIA', 'ARIA': 'ARIA', 'SEED': 'SEED', 'SM4': 'SM4', 'IDEA': 'IDEA', 'RC4': 'RC4'}, 'key_exchange': {'ECDHE': 'ECDHE|EECDH', 'DHE': 'DHE|EDH', 'ECDH': 'ECDH', 'DH': 'DH', 'RSA': 'RSA', 'PSK': 'PSK', 'SRP': 'SRP', 'GOST': 'GOST', 'ECCPWD': 'ECCPWD', 'SM2': 'SM2'}, 'mac': {'SHA384': 'SHA384', 'SHA256': 'SHA256', 'SHA224': 'SHA224', 'SHA': 'SHA1?', 'MD5': 'MD5', 'POLY1305': 'POLY1305', 'AEAD': 'GCM|CCM|OCB', 'GOST': 'GOST28147|GOST34\\.11', 'SM3': 'SM3'}}
list_algorithms ¶
list_algorithms() -> Dict[str, Any]
List all known algorithms by category.
Source code in certmonitor/cipher_algorithms.py
88 89 90 91 92 93 94 95 | |
parse_cipher_suite
cached
¶
parse_cipher_suite(cipher_suite: str) -> Dict[str, str]
Parse a cipher suite string to identify encryption, key exchange, and MAC algorithms.
Source code in certmonitor/cipher_algorithms.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
update_algorithms ¶
update_algorithms(custom_algorithms: Dict[str, Dict[str, str]]) -> None
Update the ALL_ALGORITHMS dictionary with user-provided custom algorithms.
Source code in certmonitor/cipher_algorithms.py
98 99 100 101 102 103 104 105 106 107 108 109 110 | |
update_allowed_lists ¶
update_allowed_lists(custom_tls_versions: Optional[Set[str]] = None, custom_ciphers: Optional[Set[str]] = None) -> None
Update the sets of allowed TLS versions and cipher suites.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
custom_tls_versions
|
set
|
A set of allowed TLS versions. E.g., {"TLSv1.2", "TLSv1.3"} |
None
|
custom_ciphers
|
set
|
A set of allowed cipher suites. E.g., {"ECDHE-RSA-AES128-GCM-SHA256"} |
None
|
Source code in certmonitor/cipher_algorithms.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |