30 static std::optional<Ciphersuite> by_id(uint16_t suite);
37 static std::optional<Ciphersuite> from_name(std::string_view
name);
42 static bool is_scsv(uint16_t suite);
49 static const std::vector<Ciphersuite>& all_known_ciphersuites();
55 std::string
to_string()
const {
return (!m_iana_id) ?
"unknown cipher suite" : m_iana_id; }
65 bool psk_ciphersuite()
const;
70 bool ecc_ciphersuite()
const;
75 bool cbc_ciphersuite()
const;
80 bool aead_ciphersuite()
const;
82 bool signature_used()
const;
106 std::string
mac_algo()
const {
return m_mac_algo; }
115 size_t nonce_bytes_from_handshake()
const;
126 bool valid()
const {
return m_usable; }
132 bool operator<(
const uint16_t c)
const {
return ciphersuite_code() < c; }
135 bool is_usable()
const;
141 const char* cipher_algo,
142 size_t cipher_keylen,
143 const char* mac_algo,
147 m_ciphersuite_code(ciphersuite_code),
149 m_auth_method(auth_method),
150 m_kex_algo(kex_algo),
151 m_prf_algo(prf_algo),
152 m_nonce_format(nonce_format),
153 m_cipher_algo(cipher_algo),
154 m_mac_algo(mac_algo),
155 m_cipher_keylen(cipher_keylen),
156 m_mac_keylen(mac_keylen) {
157 m_usable = is_usable();
160 uint16_t m_ciphersuite_code = 0;
166 const char* m_iana_id;
168 Auth_Method m_auth_method;
171 Nonce_Format m_nonce_format;
173 const char* m_cipher_algo;
174 const char* m_mac_algo;
176 size_t m_cipher_keylen;
179 bool m_usable =
false;