Botan 3.5.0
Crypto and TLS for C&
|
#include <kyber_constants.h>
Public Member Functions | |
size_t | encapsulated_key_length () const |
size_t | estimated_strength () const |
uint8_t | eta1 () const |
uint8_t | eta2 () const |
uint8_t | k () const |
KyberConstants (const KyberConstants &other) | |
KyberConstants (KyberConstants &&other)=default | |
KyberConstants (KyberMode mode) | |
KyberMode | mode () const |
KyberConstants & | operator= (const KyberConstants &other)=delete |
KyberConstants & | operator= (KyberConstants &&other)=default |
size_t | polynomial_compressed_bytes () const |
size_t | polynomial_vector_byte_length () const |
size_t | polynomial_vector_compressed_bytes () const |
size_t | private_key_byte_length () const |
size_t | public_key_byte_length () const |
size_t | shared_key_length () const |
Kyber_Symmetric_Primitives & | symmetric_primitives () const |
~KyberConstants () | |
Static Public Attributes | |
static constexpr size_t | kPublicKeyHashLength = 32 |
static constexpr size_t | kSeedLength = kSymBytes |
static constexpr size_t | kSerializedPolynomialByteLength = N / 2 * 3 |
static constexpr size_t | kSymBytes = 32 |
static constexpr size_t | kZLength = kSymBytes |
static constexpr size_t | N = 256 |
static constexpr size_t | Q = 3329 |
static constexpr size_t | Q_Inv = 62209 |
static constexpr int16_t | zetas [128] |
static constexpr int16_t | zetas_inv [128] |
Definition at line 23 of file kyber_constants.h.
Botan::KyberConstants::KyberConstants | ( | KyberMode | mode | ) |
Definition at line 24 of file kyber_constants.cpp.
References BOTAN_ASSERT_UNREACHABLE, Botan::KyberMode::is_90s(), Botan::KyberMode::is_kyber_round3(), Botan::KyberMode::is_modern(), Botan::KyberMode::Kyber1024_90s, Botan::KyberMode::Kyber1024_R3, Botan::KyberMode::Kyber512_90s, Botan::KyberMode::Kyber512_R3, Botan::KyberMode::Kyber768_90s, Botan::KyberMode::Kyber768_R3, mode(), and Botan::KyberMode::mode().
|
default |
|
inline |
Definition at line 60 of file kyber_constants.h.
|
default |
|
inline |
Definition at line 84 of file kyber_constants.h.
References polynomial_compressed_bytes(), and polynomial_vector_compressed_bytes().
Referenced by Botan::Kyber_KEM_Decryptor_Base::encapsulated_key_length(), Botan::Kyber_KEM_Encryptor_Base::encapsulated_key_length(), and Botan::Ciphertext::to_bytes().
|
inline |
Definition at line 68 of file kyber_constants.h.
|
inline |
Definition at line 72 of file kyber_constants.h.
Referenced by Botan::Polynomial::getnoise_eta1().
|
inline |
Definition at line 74 of file kyber_constants.h.
Referenced by Botan::Polynomial::getnoise_eta2().
|
inline |
Definition at line 70 of file kyber_constants.h.
Referenced by Botan::PolynomialVector::from_bytes(), Botan::PolynomialMatrix::generate(), Botan::PolynomialVector::getnoise_eta1(), Botan::PolynomialVector::getnoise_eta2(), Botan::Kyber_PublicKeyInternal::indcpa_encrypt(), and polynomial_vector_byte_length().
|
inline |
Definition at line 66 of file kyber_constants.h.
Referenced by KyberConstants().
|
delete |
|
default |
|
inline |
Definition at line 80 of file kyber_constants.h.
Referenced by encapsulated_key_length(), Botan::Ciphertext::from_bytes(), and Botan::Ciphertext::to_bytes().
|
inline |
Definition at line 76 of file kyber_constants.h.
References k(), and kSerializedPolynomialByteLength.
Referenced by Botan::PolynomialVector::from_bytes(), private_key_byte_length(), and public_key_byte_length().
|
inline |
Definition at line 78 of file kyber_constants.h.
Referenced by encapsulated_key_length(), Botan::Ciphertext::from_bytes(), and Botan::Ciphertext::to_bytes().
|
inline |
Definition at line 90 of file kyber_constants.h.
References kPublicKeyHashLength, kZLength, polynomial_vector_byte_length(), and public_key_byte_length().
|
inline |
Definition at line 82 of file kyber_constants.h.
References kSeedLength, and polynomial_vector_byte_length().
Referenced by private_key_byte_length().
|
inline |
Definition at line 88 of file kyber_constants.h.
Referenced by Botan::Kyber_KEM_Decryptor_Base::raw_kem_shared_key_length(), and Botan::Kyber_KEM_Encryptor_Base::raw_kem_shared_key_length().
|
inline |
Definition at line 94 of file kyber_constants.h.
Referenced by Botan::PolynomialMatrix::generate(), Botan::Polynomial::getnoise_eta1(), and Botan::Polynomial::getnoise_eta2().
|
staticconstexpr |
Definition at line 52 of file kyber_constants.h.
Referenced by Botan::Kyber_PrivateKey::Kyber_PrivateKey(), and private_key_byte_length().
|
staticconstexpr |
Definition at line 50 of file kyber_constants.h.
Referenced by Botan::Kyber_PublicKey::initialize_from_encoding(), and public_key_byte_length().
|
staticconstexpr |
Definition at line 51 of file kyber_constants.h.
Referenced by Botan::PolynomialVector::from_bytes(), polynomial_vector_byte_length(), and Botan::PolynomialVector::to_bytes().
|
staticconstexpr |
Definition at line 49 of file kyber_constants.h.
Referenced by Botan::Kyber_KEM_Decryptor::decapsulate(), Botan::Kyber_KEM_Encryptor::encapsulate(), Botan::PolynomialMatrix::generate(), and Botan::Kyber_PrivateKey::Kyber_PrivateKey().
|
staticconstexpr |
Definition at line 53 of file kyber_constants.h.
Referenced by Botan::Kyber_PrivateKey::Kyber_PrivateKey(), Botan::Kyber_PrivateKey::Kyber_PrivateKey(), and private_key_byte_length().
|
staticconstexpr |
Definition at line 25 of file kyber_constants.h.
Referenced by Botan::Polynomial::from_message(), Botan::Polynomial::getnoise_eta1(), and Botan::Polynomial::getnoise_eta2().
|
staticconstexpr |
Definition at line 26 of file kyber_constants.h.
Referenced by Botan::Polynomial::csubq(), Botan::Polynomial::from_message(), Botan::Polynomial::sample_rej_uniform(), Botan::Polynomial::to_message(), and Botan::Polynomial::tomont().
|
staticconstexpr |
Definition at line 27 of file kyber_constants.h.
|
staticconstexpr |
Definition at line 29 of file kyber_constants.h.
Referenced by Botan::Polynomial::basemul_montgomery(), and Botan::Polynomial::ntt().
|
staticconstexpr |
Definition at line 39 of file kyber_constants.h.
Referenced by Botan::Polynomial::invntt_tomont().