Botan 3.13.0
Crypto and TLS for C&
Botan::TLS::Signature_Scheme Class Referencefinal

#include <tls_signature_scheme.h>

Public Types

enum  Code : uint16_t {
  NONE = 0x0000 , RSA_PKCS1_SHA1 = 0x0201 , RSA_PKCS1_SHA256 = 0x0401 , RSA_PKCS1_SHA384 = 0x0501 ,
  RSA_PKCS1_SHA512 = 0x0601 , ECDSA_SECP256R1_TLS13_SHA256 = 0x0403 , ECDSA_SECP384R1_TLS13_SHA384 = 0x0503 , ECDSA_SECP521R1_TLS13_SHA512 = 0x0603 ,
  ECDSA_SHA1 = 0x0203 , ECDSA_SHA256 = ECDSA_SECP256R1_TLS13_SHA256 , ECDSA_SHA384 = ECDSA_SECP384R1_TLS13_SHA384 , ECDSA_SHA512 = ECDSA_SECP521R1_TLS13_SHA512 ,
  RSA_PSS_SHA256 = 0x0804 , RSA_PSS_SHA384 = 0x0805 , RSA_PSS_SHA512 = 0x0806 , ECDSA_BRAINPOOL256R1_TLS13_SHA256 = 0x081A ,
  ECDSA_BRAINPOOL384R1_TLS13_SHA384 = 0x081B , ECDSA_BRAINPOOL512R1_TLS13_SHA512 = 0x081C , EDDSA_25519 = 0x0807 , EDDSA_448 = 0x0808
}

Public Member Functions

AlgorithmIdentifier algorithm_identifier () const
std::string algorithm_name () const
std::optional< Signature_Formatformat () const noexcept
std::string hash_function_name () const
bool is_available () const noexcept
bool is_compatible_with (const Protocol_Version &protocol_version) const noexcept
bool is_set () const noexcept
bool is_suitable_for (const Private_Key &private_key) const
AlgorithmIdentifier key_algorithm_identifier () const
bool operator!= (const Signature_Scheme &rhs) const
bool operator== (const Signature_Scheme &rhs) const
std::string padding_string () const
 Signature_Scheme ()
 Signature_Scheme (Signature_Scheme::Code wire_code)
 Signature_Scheme (uint16_t wire_code)
std::string to_string () const
Signature_Scheme::Code wire_code () const noexcept

Static Public Member Functions

static const std::vector< Signature_Scheme > & all_available_schemes ()
static Signature_Scheme from_string (std::string_view str)

Detailed Description

Definition at line 29 of file tls_signature_scheme.h.

Member Enumeration Documentation

◆ Code

Matches with wire encoding

Note that this is intentionally left as a bare enum. It emulates the Botan 2 API where Signature_Scheme was an enum class with associated free-standing functions. Leaving it as a bare enum resembles the legacy user-facing API.

Enumerator
NONE 
RSA_PKCS1_SHA1 
RSA_PKCS1_SHA256 
RSA_PKCS1_SHA384 
RSA_PKCS1_SHA512 
ECDSA_SECP256R1_TLS13_SHA256 
ECDSA_SECP384R1_TLS13_SHA384 
ECDSA_SECP521R1_TLS13_SHA512 
ECDSA_SHA1 
ECDSA_SHA256 
ECDSA_SHA384 
ECDSA_SHA512 
RSA_PSS_SHA256 
RSA_PSS_SHA384 
RSA_PSS_SHA512 
ECDSA_BRAINPOOL256R1_TLS13_SHA256 
ECDSA_BRAINPOOL384R1_TLS13_SHA384 
ECDSA_BRAINPOOL512R1_TLS13_SHA512 
EDDSA_25519 
EDDSA_448 

Definition at line 38 of file tls_signature_scheme.h.

38 : uint16_t /* NOLINT(*-use-enum-class) */ {
39 NONE = 0x0000,
40
41 RSA_PKCS1_SHA1 = 0x0201, // not implemented
42 RSA_PKCS1_SHA256 = 0x0401,
43 RSA_PKCS1_SHA384 = 0x0501,
44 RSA_PKCS1_SHA512 = 0x0601,
45
46 // RFC 9846 4.3.3
47 // ECDSA algorithms: Indicates a signature algorithm using ECDSA,
48 // the corresponding curve as defined in NIST SP 800-186.
49 //
50 // In TLS 1.3 these code points specifically refer to the NIST curves
51 // P-256, P-384, and P-521. In contrast TLS 1.2 uses these code points
52 // for ECDSA on any curve paired with the specified hash function.
56
57 // RFC 5246 7.4.1.4.1
58 // The client uses the "signature_algorithms" extension to indicate
59 // to the server which signature/hash algorithm pairs may be used in
60 // digital signatures.
61 //
62 // In TLS 1.2 the signature_algorithms extension contains pairs of hash
63 // and signature algorithms. For ECDSA these code points are not bound
64 // to a specific curve in contrast to TLS 1.3, where these code points
65 // imply the usage of NIST's P-256, P-384, and P-521 curves.
66 ECDSA_SHA1 = 0x0203, // not implemented
70
71 RSA_PSS_SHA256 = 0x0804,
72 RSA_PSS_SHA384 = 0x0805,
73 RSA_PSS_SHA512 = 0x0806,
74
75 // RFC 8734
79
80 EDDSA_25519 = 0x0807,
81 EDDSA_448 = 0x0808,
82 };

Constructor & Destructor Documentation

◆ Signature_Scheme() [1/3]

Botan::TLS::Signature_Scheme::Signature_Scheme ( )

Construct an uninitialized / invalid scheme

Definition at line 115 of file tls_signature_scheme.cpp.

115: m_code(NONE) {}

References NONE.

Referenced by from_string(), operator!=(), operator==(), and Signature_Scheme().

◆ Signature_Scheme() [2/3]

Botan::TLS::Signature_Scheme::Signature_Scheme ( uint16_t wire_code)

◆ Signature_Scheme() [3/3]

Botan::TLS::Signature_Scheme::Signature_Scheme ( Signature_Scheme::Code wire_code)

Definition at line 119 of file tls_signature_scheme.cpp.

119: m_code(wire_code) {}

References wire_code().

Member Function Documentation

◆ algorithm_identifier()

AlgorithmIdentifier Botan::TLS::Signature_Scheme::algorithm_identifier ( ) const

Definition at line 337 of file tls_signature_scheme.cpp.

337 {
338 switch(m_code) {
339 case RSA_PKCS1_SHA1:
340 return AlgorithmIdentifier(OID::from_string("RSA/PKCS1v15(SHA-1)"), AlgorithmIdentifier::USE_NULL_PARAM);
341 case RSA_PKCS1_SHA256:
342 return AlgorithmIdentifier(OID::from_string("RSA/PKCS1v15(SHA-256)"), AlgorithmIdentifier::USE_NULL_PARAM);
343 case RSA_PKCS1_SHA384:
344 return AlgorithmIdentifier(OID::from_string("RSA/PKCS1v15(SHA-384)"), AlgorithmIdentifier::USE_NULL_PARAM);
345 case RSA_PKCS1_SHA512:
346 return AlgorithmIdentifier(OID::from_string("RSA/PKCS1v15(SHA-512)"), AlgorithmIdentifier::USE_NULL_PARAM);
347
348 case ECDSA_SHA1:
349 return AlgorithmIdentifier(OID::from_string("ECDSA/SHA-1"), AlgorithmIdentifier::USE_EMPTY_PARAM);
352 return AlgorithmIdentifier(OID::from_string("ECDSA/SHA-256"), AlgorithmIdentifier::USE_EMPTY_PARAM);
355 return AlgorithmIdentifier(OID::from_string("ECDSA/SHA-384"), AlgorithmIdentifier::USE_EMPTY_PARAM);
358 return AlgorithmIdentifier(OID::from_string("ECDSA/SHA-512"), AlgorithmIdentifier::USE_EMPTY_PARAM);
359
360 case RSA_PSS_SHA256:
361 return AlgorithmIdentifier(OID::from_string("RSA/PSS"), PSS_Params("SHA-256", 32).serialize());
362 case RSA_PSS_SHA384:
363 return AlgorithmIdentifier(OID::from_string("RSA/PSS"), PSS_Params("SHA-384", 48).serialize());
364 case RSA_PSS_SHA512:
365 return AlgorithmIdentifier(OID::from_string("RSA/PSS"), PSS_Params("SHA-512", 64).serialize());
366
367 default:
368 // Note that Ed25519 and Ed448 end up here
369 return AlgorithmIdentifier();
370 }
371}
static OID from_string(std::string_view str)
Definition asn1_oid.cpp:80

References ECDSA_BRAINPOOL256R1_TLS13_SHA256, ECDSA_BRAINPOOL384R1_TLS13_SHA384, ECDSA_BRAINPOOL512R1_TLS13_SHA512, ECDSA_SECP256R1_TLS13_SHA256, ECDSA_SECP384R1_TLS13_SHA384, ECDSA_SECP521R1_TLS13_SHA512, ECDSA_SHA1, Botan::OID::from_string(), RSA_PKCS1_SHA1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512, RSA_PSS_SHA256, RSA_PSS_SHA384, RSA_PSS_SHA512, Botan::AlgorithmIdentifier::USE_EMPTY_PARAM, and Botan::AlgorithmIdentifier::USE_NULL_PARAM.

◆ algorithm_name()

std::string Botan::TLS::Signature_Scheme::algorithm_name ( ) const

◆ all_available_schemes()

const std::vector< Signature_Scheme > & Botan::TLS::Signature_Scheme::all_available_schemes ( )
static
Returns
all available signature schemes

Definition at line 20 of file tls_signature_scheme.cpp.

20 {
21 /*
22 * This is ordered in some approximate order of preference
23 */
24 static const std::vector<Signature_Scheme> all_schemes = {
25
26 // EdDSA 25519 is currently not supported as a signature scheme for certificates
27 // certificate authentication.
28 // See: https://github.com/randombit/botan/pull/2958#discussion_r851294715
29 //
30 // #if defined(BOTAN_HAS_ED25519)
31 // EDDSA_25519,
32 // #endif
33
37
41
45
49 };
50
51 return all_schemes;
52}

References ECDSA_BRAINPOOL256R1_TLS13_SHA256, ECDSA_BRAINPOOL384R1_TLS13_SHA384, ECDSA_BRAINPOOL512R1_TLS13_SHA512, ECDSA_SECP256R1_TLS13_SHA256, ECDSA_SECP384R1_TLS13_SHA384, ECDSA_SECP521R1_TLS13_SHA512, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512, RSA_PSS_SHA256, RSA_PSS_SHA384, and RSA_PSS_SHA512.

Referenced by Botan::TLS::Policy::allowed_signature_schemes().

◆ format()

◆ from_string()

Signature_Scheme Botan::TLS::Signature_Scheme::from_string ( std::string_view str)
static
Returns
the signature scheme corresponding to the given string

Definition at line 54 of file tls_signature_scheme.cpp.

54 {
55 if(str == "RSA_PKCS1_SHA1") {
56 return RSA_PKCS1_SHA1;
57 }
58 if(str == "RSA_PKCS1_SHA256") {
59 return RSA_PKCS1_SHA256;
60 }
61 if(str == "RSA_PKCS1_SHA384") {
62 return RSA_PKCS1_SHA384;
63 }
64 if(str == "RSA_PKCS1_SHA512") {
65 return RSA_PKCS1_SHA512;
66 }
67
68 if(str == "ECDSA_SHA1") {
69 return ECDSA_SHA1;
70 }
71 if(str == "ECDSA_SHA256" || str == "ECDSA_SECP256R1_TLS13_SHA256") {
73 }
74 if(str == "ECDSA_SHA384" || str == "ECDSA_SECP384R1_TLS13_SHA384") {
76 }
77 if(str == "ECDSA_SHA512" || str == "ECDSA_SECP521R1_TLS13_SHA512") {
79 }
80
81 if(str == "RSA_PSS_SHA256") {
82 return RSA_PSS_SHA256;
83 }
84 if(str == "RSA_PSS_SHA384") {
85 return RSA_PSS_SHA384;
86 }
87 if(str == "RSA_PSS_SHA512") {
88 return RSA_PSS_SHA512;
89 }
90
91 if(str == "ECDSA_BRAINPOOL256R1_TLS13_SHA256") {
93 }
94 if(str == "ECDSA_BRAINPOOL384R1_TLS13_SHA384") {
96 }
97 if(str == "ECDSA_BRAINPOOL512R1_TLS13_SHA512") {
99 }
100
101 // Parse signature schemes passed as hexadecimal code points (e.g. "0x081A")
102 if(str.size() == 6 && str.starts_with("0x")) {
103 try {
104 std::array<uint8_t, 2> wire_code{};
105 Botan::hex_decode(wire_code, str.substr(2), false /* no white space */);
107 } catch(const Invalid_Argument&) {
108 // pass, will throw below
109 }
110 }
111
112 throw Invalid_Argument(fmt("Unknown TLS signature scheme '{}'", str));
113}
std::string fmt(std::string_view format, const T &... args)
Definition fmt.h:53
size_t hex_decode(uint8_t output[], const char input[], size_t input_length, size_t &input_consumed, bool ignore_ws)
Definition hex.cpp:75
constexpr auto load_be(ParamTs &&... params)
Definition loadstor.h:504

References ECDSA_BRAINPOOL256R1_TLS13_SHA256, ECDSA_BRAINPOOL384R1_TLS13_SHA384, ECDSA_BRAINPOOL512R1_TLS13_SHA512, ECDSA_SECP256R1_TLS13_SHA256, ECDSA_SECP384R1_TLS13_SHA384, ECDSA_SECP521R1_TLS13_SHA512, ECDSA_SHA1, Botan::fmt(), Botan::hex_decode(), Botan::load_be(), RSA_PKCS1_SHA1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512, RSA_PSS_SHA256, RSA_PSS_SHA384, RSA_PSS_SHA512, Signature_Scheme(), and wire_code().

Referenced by Botan::TLS::Text_Policy::read_sig_scheme_list().

◆ hash_function_name()

std::string Botan::TLS::Signature_Scheme::hash_function_name ( ) const

Definition at line 189 of file tls_signature_scheme.cpp.

189 {
190 switch(m_code) {
191 case RSA_PKCS1_SHA1:
192 case ECDSA_SHA1:
193 return "SHA-1";
194
196 case RSA_PKCS1_SHA256:
197 case RSA_PSS_SHA256:
199 return "SHA-256";
200
202 case RSA_PKCS1_SHA384:
203 case RSA_PSS_SHA384:
205 return "SHA-384";
206
208 case RSA_PKCS1_SHA512:
209 case RSA_PSS_SHA512:
211 return "SHA-512";
212
213 case EDDSA_25519:
214 case EDDSA_448:
215 return "Pure";
216
217 default:
218 return "Unknown hash function";
219 }
220}

References ECDSA_BRAINPOOL256R1_TLS13_SHA256, ECDSA_BRAINPOOL384R1_TLS13_SHA384, ECDSA_BRAINPOOL512R1_TLS13_SHA512, ECDSA_SECP256R1_TLS13_SHA256, ECDSA_SECP384R1_TLS13_SHA384, ECDSA_SECP521R1_TLS13_SHA512, ECDSA_SHA1, EDDSA_25519, EDDSA_448, RSA_PKCS1_SHA1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512, RSA_PSS_SHA256, RSA_PSS_SHA384, and RSA_PSS_SHA512.

Referenced by Botan::TLS::Handshake_State::choose_sig_format(), and is_suitable_for().

◆ is_available()

bool Botan::TLS::Signature_Scheme::is_available ( ) const
noexcept

◆ is_compatible_with()

bool Botan::TLS::Signature_Scheme::is_compatible_with ( const Protocol_Version & protocol_version) const
noexcept

Definition at line 400 of file tls_signature_scheme.cpp.

400 {
401 // RFC 8446 4.4.3:
402 // The SHA-1 algorithm MUST NOT be used in any signatures of
403 // CertificateVerify messages.
404 //
405 // Note that Botan enforces that for TLS 1.2 as well.
406 if(m_code == RSA_PKCS1_SHA1 || m_code == ECDSA_SHA1) {
407 return false;
408 }
409
410 // RFC 8446 4.4.3:
411 // RSA signatures MUST use an RSASSA-PSS algorithm, regardless of whether
412 // RSASSA-PKCS1-v1_5 algorithms appear in "signature_algorithms".
413 //
414 // Note that this is enforced for TLS 1.3 and above only.
415 if(!protocol_version.is_pre_tls_13() && (m_code == RSA_PKCS1_SHA1 || m_code == RSA_PKCS1_SHA256 ||
416 m_code == RSA_PKCS1_SHA384 || m_code == RSA_PKCS1_SHA512)) {
417 return false;
418 }
419
420 return true;
421}

References ECDSA_SHA1, RSA_PKCS1_SHA1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, and RSA_PKCS1_SHA512.

Referenced by Botan::TLS::Handshake_State::parse_sig_format().

◆ is_set()

bool Botan::TLS::Signature_Scheme::is_set ( ) const
noexcept
Returns
true if the wire_code is set to any value other than NONE

Definition at line 141 of file tls_signature_scheme.cpp.

141 {
142 return m_code != NONE;
143}

References NONE.

Referenced by Botan::TLS::Handshake_State::choose_sig_format().

◆ is_suitable_for()

bool Botan::TLS::Signature_Scheme::is_suitable_for ( const Private_Key & private_key) const

Checks that private_key is suitable for use with this signature scheme, enforcing the curve-hash binding required by TLS 1.3 (e.g. ECDSA_SHA256 only with P-256 keys). This must not be used for TLS 1.2 scheme selection, where signature schemes are (hash, algorithm) pairs with no curve binding – any hash may be used with any ECDSA curve per RFC 5246.

Definition at line 423 of file tls_signature_scheme.cpp.

423 {
424 if(algorithm_name() != private_key.algo_name()) {
425 return false;
426 }
427
428 // The ECDSA private key length must match the utilized hash output length.
429 const auto keylen = private_key.key_length();
430 if(keylen <= 250) {
431 return false;
432 }
433
434 if(algorithm_name() == "ECDSA") {
435 if(hash_function_name() == "SHA-256" && !(keylen >= 250 && keylen <= 350)) {
436 return false;
437 }
438
439 if(hash_function_name() == "SHA-384" && !(keylen >= 350 && keylen <= 450)) {
440 return false;
441 }
442
443 if(hash_function_name() == "SHA-512" && !(keylen >= 450 && keylen <= 550)) {
444 return false;
445 }
446 }
447
448 return true;
449}

References Botan::Asymmetric_Key::algo_name(), algorithm_name(), hash_function_name(), and Botan::Public_Key::key_length().

◆ key_algorithm_identifier()

AlgorithmIdentifier Botan::TLS::Signature_Scheme::key_algorithm_identifier ( ) const

Definition at line 292 of file tls_signature_scheme.cpp.

292 {
293 const auto der_encode_oid = [](const std::string_view oid_name) {
294 try {
295 if(auto oid = OID::from_name(oid_name)) {
296 return oid->BER_encode();
297 }
298 } catch(...) {}
300 };
301
302 switch(m_code) {
303 // case ECDSA_SHA1: not defined
305 return {"ECDSA", der_encode_oid("secp256r1")};
307 return {"ECDSA", der_encode_oid("secp384r1")};
309 return {"ECDSA", der_encode_oid("secp521r1")};
310
312 return {"ECDSA", der_encode_oid("brainpool256r1")};
314 return {"ECDSA", der_encode_oid("brainpool384r1")};
316 return {"ECDSA", der_encode_oid("brainpool512r1")};
317
318 case EDDSA_25519:
319 return {"Ed25519", AlgorithmIdentifier::USE_EMPTY_PARAM};
320 case EDDSA_448:
321 return {"Ed448", AlgorithmIdentifier::USE_EMPTY_PARAM};
322
323 case RSA_PKCS1_SHA1:
324 case RSA_PKCS1_SHA256:
325 case RSA_PKCS1_SHA384:
326 case RSA_PKCS1_SHA512:
327 case RSA_PSS_SHA256:
328 case RSA_PSS_SHA384:
329 case RSA_PSS_SHA512:
331
332 default:
333 return AlgorithmIdentifier();
334 }
335}
#define BOTAN_ASSERT_UNREACHABLE()
Definition assert.h:166
static std::optional< OID > from_name(std::string_view name)
Definition asn1_oid.cpp:66

References BOTAN_ASSERT_UNREACHABLE, ECDSA_BRAINPOOL256R1_TLS13_SHA256, ECDSA_BRAINPOOL384R1_TLS13_SHA384, ECDSA_BRAINPOOL512R1_TLS13_SHA512, ECDSA_SECP256R1_TLS13_SHA256, ECDSA_SECP384R1_TLS13_SHA384, ECDSA_SECP521R1_TLS13_SHA512, EDDSA_25519, EDDSA_448, Botan::OID::from_name(), RSA_PKCS1_SHA1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512, RSA_PSS_SHA256, RSA_PSS_SHA384, RSA_PSS_SHA512, Botan::AlgorithmIdentifier::USE_EMPTY_PARAM, and Botan::AlgorithmIdentifier::USE_NULL_PARAM.

◆ operator!=()

bool Botan::TLS::Signature_Scheme::operator!= ( const Signature_Scheme & rhs) const
inline

Definition at line 138 of file tls_signature_scheme.h.

138{ return !(*this == rhs); }

References Signature_Scheme().

◆ operator==()

bool Botan::TLS::Signature_Scheme::operator== ( const Signature_Scheme & rhs) const
inline

Definition at line 136 of file tls_signature_scheme.h.

136{ return m_code == rhs.m_code; }

References Signature_Scheme().

◆ padding_string()

std::string Botan::TLS::Signature_Scheme::padding_string ( ) const

Definition at line 222 of file tls_signature_scheme.cpp.

222 {
223 switch(m_code) {
224 case RSA_PKCS1_SHA1:
225 return "PKCS1v15(SHA-1)";
226 case RSA_PKCS1_SHA256:
227 return "PKCS1v15(SHA-256)";
228 case RSA_PKCS1_SHA384:
229 return "PKCS1v15(SHA-384)";
230 case RSA_PKCS1_SHA512:
231 return "PKCS1v15(SHA-512)";
232
233 case ECDSA_SHA1:
234 return "SHA-1";
237 return "SHA-256";
240 return "SHA-384";
243 return "SHA-512";
244
245 case RSA_PSS_SHA256:
246 return "PSS(SHA-256,MGF1,32)";
247 case RSA_PSS_SHA384:
248 return "PSS(SHA-384,MGF1,48)";
249 case RSA_PSS_SHA512:
250 return "PSS(SHA-512,MGF1,64)";
251
252 case EDDSA_25519:
253 case EDDSA_448:
254 return "Pure";
255
256 default:
257 return "Unknown padding";
258 }
259}

References ECDSA_BRAINPOOL256R1_TLS13_SHA256, ECDSA_BRAINPOOL384R1_TLS13_SHA384, ECDSA_BRAINPOOL512R1_TLS13_SHA512, ECDSA_SECP256R1_TLS13_SHA256, ECDSA_SECP384R1_TLS13_SHA384, ECDSA_SECP521R1_TLS13_SHA512, ECDSA_SHA1, EDDSA_25519, EDDSA_448, RSA_PKCS1_SHA1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512, RSA_PSS_SHA256, RSA_PSS_SHA384, and RSA_PSS_SHA512.

Referenced by Botan::TLS::Handshake_State::choose_sig_format(), and Botan::TLS::Handshake_State::parse_sig_format().

◆ to_string()

std::string Botan::TLS::Signature_Scheme::to_string ( ) const

Definition at line 145 of file tls_signature_scheme.cpp.

145 {
146 switch(m_code) {
147 case RSA_PKCS1_SHA1:
148 return "RSA_PKCS1_SHA1";
149 case RSA_PKCS1_SHA256:
150 return "RSA_PKCS1_SHA256";
151 case RSA_PKCS1_SHA384:
152 return "RSA_PKCS1_SHA384";
153 case RSA_PKCS1_SHA512:
154 return "RSA_PKCS1_SHA512";
155
156 case ECDSA_SHA1:
157 return "ECDSA_SHA1";
159 return "ECDSA_SHA256";
161 return "ECDSA_SHA384";
163 return "ECDSA_SHA512";
164
166 return "ECDSA_BRAINPOOL256R1_TLS13_SHA256";
168 return "ECDSA_BRAINPOOL384R1_TLS13_SHA384";
170 return "ECDSA_BRAINPOOL512R1_TLS13_SHA512";
171
172 case RSA_PSS_SHA256:
173 return "RSA_PSS_SHA256";
174 case RSA_PSS_SHA384:
175 return "RSA_PSS_SHA384";
176 case RSA_PSS_SHA512:
177 return "RSA_PSS_SHA512";
178
179 case EDDSA_25519:
180 return "EDDSA_25519";
181 case EDDSA_448:
182 return "EDDSA_448";
183
184 default:
185 return "Unknown signature scheme: " + std::to_string(m_code);
186 }
187}

References ECDSA_BRAINPOOL256R1_TLS13_SHA256, ECDSA_BRAINPOOL384R1_TLS13_SHA384, ECDSA_BRAINPOOL512R1_TLS13_SHA512, ECDSA_SECP256R1_TLS13_SHA256, ECDSA_SECP384R1_TLS13_SHA384, ECDSA_SECP521R1_TLS13_SHA512, ECDSA_SHA1, EDDSA_25519, EDDSA_448, RSA_PKCS1_SHA1, RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, RSA_PKCS1_SHA512, RSA_PSS_SHA256, RSA_PSS_SHA384, and RSA_PSS_SHA512.

Referenced by Botan::TLS::Handshake_State::parse_sig_format().

◆ wire_code()

Signature_Scheme::Code Botan::TLS::Signature_Scheme::wire_code ( ) const
inlinenoexcept

Definition at line 104 of file tls_signature_scheme.h.

104{ return m_code; }

Referenced by from_string(), Signature_Scheme(), and Signature_Scheme().


The documentation for this class was generated from the following files: