Botan 3.9.0
Crypto and TLS for C&
cmce_parameter_set.h
Go to the documentation of this file.
1/*
2 * Classic McEliece Parameters
3 * (C) 2024 Jack Lloyd
4 * 2024 Fabian Albert, Amos Treiber - Rohde & Schwarz Cybersecurity
5 *
6 * Botan is released under the Simplified BSD License (see license.txt)
7 **/
8
9#ifndef BOTAN_CMCE_PARAMETER_SET_H_
10#define BOTAN_CMCE_PARAMETER_SET_H_
11
12#include <botan/asn1_obj.h>
13
14namespace Botan {
15
16/**
17 * All Classic McEliece parameter sets defined in the NIST Round 4
18 * submission and the Classic McEliece ISO Draft.
19 *
20 * Instances are defined in the following format:
21 * mceliece{n}{t}{[pc]}{[f]}
22 *
23 * Instance with 'pc' use plaintext confirmation as defined in the ISO Draft.
24 * Instance with 'f' use matrix reduction with the semi-systematic form.
25 */
27 public:
50
51 using enum Code;
52
53 // NOLINTNEXTLINE(*-explicit-conversions)
55
56 /**
57 * @brief Get the parameter set for a given parameter set name.
58 */
59 static Classic_McEliece_Parameter_Set from_string(std::string_view param_name);
60
61 /**
62 * @brief Get the parameter set name for a given parameter set.
63 */
64 std::string to_string() const;
65
66 /**
67 * @brief Get the parameter set for a given OID.
68 */
69 static Classic_McEliece_Parameter_Set from_oid(const OID& oid);
70
71 /**
72 * @brief Get the code for a given parameter set.
73 */
74 Code code() const { return m_code; }
75
76 bool operator==(const Classic_McEliece_Parameter_Set& other) const { return m_code == other.m_code; }
77
78 private:
79 const Code m_code;
80};
81
82} // namespace Botan
83
84#endif // BOTAN_CMCE_PARAMETER_SET_H_
#define BOTAN_PUBLIC_API(maj, min)
Definition api.h:21
Code code() const
Get the code for a given parameter set.
bool operator==(const Classic_McEliece_Parameter_Set &other) const
std::string to_string(ErrorType type)
Convert an ErrorType to string.
Definition exceptn.cpp:13