Botan 3.6.1
Crypto and TLS for C&
|
#include <frodo_matrix.h>
Public Types | |
using | Dimensions = std::tuple<size_t, size_t> |
Public Member Functions | |
constexpr void | _const_time_poison () const |
constexpr void | _const_time_unpoison () const |
CT::Mask< uint8_t > | constant_time_compare (const FrodoMatrix &other) const |
FrodoPlaintext | decode (const FrodoKEMConstants &constants) const |
Dimensions | dimensions () const |
size_t | element_count () const |
uint16_t | elements_at (size_t i) const |
FrodoMatrix (Dimensions dims) | |
FrodoPackedMatrix | pack (const FrodoKEMConstants &constants) const |
void | pack (const FrodoKEMConstants &constants, StrongSpan< FrodoPackedMatrix > out) const |
size_t | packed_size (const FrodoKEMConstants &constants) const |
void | reduce (const FrodoKEMConstants &constants) |
FrodoSerializedMatrix | serialize () const |
Definition at line 27 of file frodo_matrix.h.
using Botan::FrodoMatrix::Dimensions = std::tuple<size_t, size_t> |
Definition at line 29 of file frodo_matrix.h.
|
explicit |
Definition at line 110 of file frodo_matrix.cpp.
Referenced by add(), deserialize(), encode(), mul_add_as_plus_e(), mul_add_sa_plus_e(), mul_add_sb_plus_e(), mul_bs(), sample(), sub(), and unpack().
|
inlineconstexpr |
Definition at line 130 of file frodo_matrix.h.
References Botan::CT::poison().
|
inlineconstexpr |
Definition at line 132 of file frodo_matrix.h.
References Botan::CT::unpoison().
|
static |
Definition at line 282 of file frodo_matrix.cpp.
References Botan::b, BOTAN_ASSERT_NOMSG, dimensions(), elements_at(), FrodoMatrix(), and Botan::FrodoKEMConstants::n_bar().
CT::Mask< uint8_t > Botan::FrodoMatrix::constant_time_compare | ( | const FrodoMatrix & | other | ) | const |
Definition at line 312 of file frodo_matrix.cpp.
References BOTAN_ASSERT_NOMSG, dimensions(), and Botan::CT::is_equal().
FrodoPlaintext Botan::FrodoMatrix::decode | ( | const FrodoKEMConstants & | constants | ) | const |
Definition at line 399 of file frodo_matrix.cpp.
References Botan::FrodoKEMConstants::b(), Botan::FrodoKEMConstants::d(), and Botan::FrodoKEMConstants::n_bar().
|
static |
Definition at line 481 of file frodo_matrix.cpp.
References BOTAN_ASSERT_NOMSG, Botan::StrongSpan< T >::data(), dimensions(), FrodoMatrix(), Botan::load_le(), and Botan::StrongSpan< T >::size().
Referenced by Botan::FrodoKEM_PrivateKey::FrodoKEM_PrivateKey().
|
inline |
Definition at line 122 of file frodo_matrix.h.
Referenced by add(), constant_time_compare(), deserialize(), encode(), make_sample_generator(), mul_add_as_plus_e(), mul_add_sa_plus_e(), mul_add_sb_plus_e(), mul_bs(), sample(), sub(), and unpack().
|
inline |
Definition at line 126 of file frodo_matrix.h.
Referenced by pack(), and packed_size().
|
inline |
Definition at line 33 of file frodo_matrix.h.
Referenced by add(), mul_add_as_plus_e(), mul_add_sa_plus_e(), mul_add_sb_plus_e(), mul_bs(), and sub().
|
static |
Definition at line 259 of file frodo_matrix.cpp.
References Botan::FrodoKEMConstants::b(), BOTAN_ASSERT_NOMSG, Botan::FrodoKEMConstants::d(), dimensions(), FrodoMatrix(), Botan::FrodoKEMConstants::n_bar(), and Botan::StrongSpan< T >::size().
|
static |
Definition at line 101 of file frodo_matrix.cpp.
References dimensions(), Botan::XOF::output(), and sample().
Referenced by Botan::FrodoKEM_PrivateKey::FrodoKEM_PrivateKey().
|
static |
Definition at line 113 of file frodo_matrix.cpp.
References BOTAN_ASSERT, dimensions(), elements_at(), FrodoMatrix(), Botan::load_le(), Botan::FrodoKEMConstants::n(), and Botan::FrodoKEMConstants::n_bar().
Referenced by Botan::FrodoKEM_PrivateKey::FrodoKEM_PrivateKey().
|
static |
Definition at line 173 of file frodo_matrix.cpp.
References BOTAN_ASSERT, dimensions(), elements_at(), FrodoMatrix(), Botan::load_le(), Botan::FrodoKEMConstants::n(), and Botan::FrodoKEMConstants::n_bar().
|
static |
Definition at line 231 of file frodo_matrix.cpp.
References Botan::b, BOTAN_ASSERT, dimensions(), elements_at(), FrodoMatrix(), Botan::FrodoKEMConstants::n(), and Botan::FrodoKEMConstants::n_bar().
|
static |
Definition at line 320 of file frodo_matrix.cpp.
References Botan::b, dimensions(), elements_at(), FrodoMatrix(), Botan::FrodoKEMConstants::n(), and Botan::FrodoKEMConstants::n_bar().
|
inline |
Definition at line 42 of file frodo_matrix.h.
References pack(), and packed_size().
Referenced by pack().
void Botan::FrodoMatrix::pack | ( | const FrodoKEMConstants & | constants, |
StrongSpan< FrodoPackedMatrix > | out ) const |
Definition at line 343 of file frodo_matrix.cpp.
References Botan::b, BOTAN_ASSERT_NOMSG, Botan::FrodoKEMConstants::d(), element_count(), packed_size(), and Botan::StrongSpan< T >::size().
|
inline |
Definition at line 35 of file frodo_matrix.h.
References BOTAN_ASSERT_NOMSG, Botan::FrodoKEMConstants::d(), and element_count().
void Botan::FrodoMatrix::reduce | ( | const FrodoKEMConstants & | constants | ) |
Definition at line 488 of file frodo_matrix.cpp.
References Botan::FrodoKEMConstants::d().
|
static |
Definition at line 70 of file frodo_matrix.cpp.
References BOTAN_ASSERT_NOMSG, Botan::FrodoKEMConstants::cdf_table_at(), Botan::FrodoKEMConstants::cdf_table_len(), Botan::StrongSpan< T >::data(), dimensions(), Botan::CT::Mask< T >::expand_bit(), FrodoMatrix(), Botan::CT::Mask< T >::is_lt(), Botan::load_le(), sample(), Botan::StrongSpan< T >::size(), and Botan::CT::value_barrier().
Referenced by make_sample_generator(), and sample().
FrodoSerializedMatrix Botan::FrodoMatrix::serialize | ( | ) | const |
Definition at line 389 of file frodo_matrix.cpp.
References Botan::detail::Strong_Adapter< T >::data(), and Botan::store_le().
|
static |
Definition at line 297 of file frodo_matrix.cpp.
References Botan::b, BOTAN_ASSERT_NOMSG, dimensions(), elements_at(), FrodoMatrix(), and Botan::FrodoKEMConstants::n_bar().
|
static |
Definition at line 424 of file frodo_matrix.cpp.
References Botan::b, BOTAN_ASSERT_NOMSG, Botan::ceil_tobytes(), Botan::FrodoKEMConstants::d(), dimensions(), FrodoMatrix(), and Botan::StrongSpan< T >::size().
Referenced by Botan::FrodoKEM_PrivateKey::FrodoKEM_PrivateKey(), and Botan::FrodoKEM_PublicKey::FrodoKEM_PublicKey().