Botan 3.6.1
Crypto and TLS for C&
|
#include <kyber.h>
Public Types | |
enum | Mode { Kyber512_R3 , Kyber768_R3 , Kyber1024_R3 , Kyber512 = Kyber512_R3 , Kyber768 = Kyber768_R3 , Kyber1024 = Kyber1024_R3 , ML_KEM_512 , ML_KEM_768 , ML_KEM_1024 , Kyber512_90s , Kyber768_90s , Kyber1024_90s } |
Public Member Functions | |
bool | is_90s () const |
bool | is_available () const |
bool | is_kyber_round3 () const |
bool | is_ml_kem () const |
bool | is_modern () const |
KyberMode (const OID &oid) | |
KyberMode (Mode mode) | |
KyberMode (std::string_view str) | |
Mode | mode () const |
OID | object_identifier () const |
bool | operator!= (const KyberMode &other) const |
bool | operator== (const KyberMode &other) const |
std::string | to_string () const |
Enumerator | |
---|---|
Kyber512_R3 | |
Kyber768_R3 | |
Kyber1024_R3 | |
Kyber512 | |
Kyber768 | |
Kyber1024 | |
ML_KEM_512 | |
ML_KEM_768 | |
ML_KEM_1024 | |
Kyber512_90s | |
Kyber768_90s | |
Kyber1024_90s |
Definition at line 34 of file kyber.h.
Botan::KyberMode::KyberMode | ( | Mode | mode | ) |
|
explicit |
|
explicit |
bool Botan::KyberMode::is_90s | ( | ) | const |
Definition at line 124 of file kyber.cpp.
References Kyber1024_90s, Kyber512_90s, and Kyber768_90s.
Referenced by is_available(), is_modern(), and Botan::KyberConstants::KyberConstants().
bool Botan::KyberMode::is_available | ( | ) | const |
Definition at line 141 of file kyber.cpp.
References is_90s(), is_kyber_round3(), is_ml_kem(), and is_modern().
bool Botan::KyberMode::is_kyber_round3 | ( | ) | const |
Definition at line 136 of file kyber.cpp.
References Kyber1024_90s, Kyber1024_R3, Kyber512_90s, Kyber512_R3, Kyber768_90s, and Kyber768_R3.
Referenced by is_available(), and Botan::KyberConstants::KyberConstants().
bool Botan::KyberMode::is_ml_kem | ( | ) | const |
Definition at line 132 of file kyber.cpp.
References ML_KEM_1024, ML_KEM_512, and ML_KEM_768.
Referenced by Botan::Kyber_PublicKey::algo_name(), is_available(), and Botan::KyberConstants::KyberConstants().
bool Botan::KyberMode::is_modern | ( | ) | const |
Definition at line 128 of file kyber.cpp.
References is_90s().
Referenced by is_available(), and Botan::KyberConstants::KyberConstants().
|
inline |
Definition at line 62 of file kyber.h.
Referenced by Botan::KyberConstants::KyberConstants(), and Botan::Kyber_PublicKey::mode().
OID Botan::KyberMode::object_identifier | ( | ) | const |
Definition at line 95 of file kyber.cpp.
References Botan::OID::from_string(), and to_string().
Referenced by Botan::Kyber_PublicKey::object_identifier().
|
inline |
|
inline |
std::string Botan::KyberMode::to_string | ( | ) | const |
Definition at line 99 of file kyber.cpp.
References BOTAN_ASSERT_UNREACHABLE, Kyber1024_90s, Kyber1024_R3, Kyber512_90s, Kyber512_R3, Kyber768_90s, Kyber768_R3, ML_KEM_1024, ML_KEM_512, and ML_KEM_768.
Referenced by object_identifier().