8 #ifndef BOTAN_TLS_CIPHER_SUITES_H__
9 #define BOTAN_TLS_CIPHER_SUITES_H__
11 #include <botan/types.h>
35 static bool is_scsv(uint16_t suite);
42 static const std::vector<Ciphersuite>& all_known_ciphersuites();
58 bool psk_ciphersuite()
const;
63 bool ecc_ciphersuite()
const;
68 bool cbc_ciphersuite()
const;
73 std::string
kex_algo()
const {
return m_kex_algo; }
78 std::string
sig_algo()
const {
return m_sig_algo; }
88 std::string
mac_algo()
const {
return m_mac_algo; }
92 if(m_prf_algo && *m_prf_algo)
111 bool valid()
const {
return m_usable; }
114 bool operator<(
const uint16_t c)
const {
return ciphersuite_code() < c; }
120 bool is_usable()
const;
124 const char* sig_algo,
125 const char* kex_algo,
126 const char* cipher_algo,
127 size_t cipher_keylen,
128 size_t nonce_bytes_from_handshake,
129 size_t nonce_bytes_from_record,
130 const char* mac_algo,
132 const char* prf_algo) :
133 m_ciphersuite_code(ciphersuite_code),
135 m_sig_algo(sig_algo),
136 m_kex_algo(kex_algo),
137 m_prf_algo(prf_algo),
138 m_cipher_algo(cipher_algo),
139 m_mac_algo(mac_algo),
140 m_cipher_keylen(cipher_keylen),
141 m_nonce_bytes_from_handshake(nonce_bytes_from_handshake),
142 m_nonce_bytes_from_record(nonce_bytes_from_record),
143 m_mac_keylen(mac_keylen)
145 m_usable = is_usable();
148 uint16_t m_ciphersuite_code = 0;
154 const char* m_iana_id =
nullptr;
156 const char* m_sig_algo =
nullptr;
157 const char* m_kex_algo =
nullptr;
158 const char* m_prf_algo =
nullptr;
160 const char* m_cipher_algo =
nullptr;
161 const char* m_mac_algo =
nullptr;
163 size_t m_cipher_keylen = 0;
164 size_t m_nonce_bytes_from_handshake = 0;
165 size_t m_nonce_bytes_from_record = 0;
166 size_t m_mac_keylen = 0;
168 bool m_usable =
false;
uint16_t ciphersuite_code() const
std::string sig_algo() const
size_t nonce_bytes_from_record() const
std::string prf_algo() const
size_t mac_keylen() const
std::string kex_algo() const
size_t cipher_keylen() const
std::string mac_algo() const
std::string cipher_algo() const
size_t nonce_bytes_from_handshake() const
std::string to_string() const
bool operator<(const Ciphersuite &o) const
bool operator<(const uint16_t c) const