|
Botan 3.14.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 26 of file frodo_matrix.h.
| using Botan::FrodoMatrix::Dimensions = std::tuple<size_t, size_t> |
Definition at line 28 of file frodo_matrix.h.
|
explicit |
Definition at line 121 of file frodo_matrix.cpp.
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().
|
inlineconstexpr |
Definition at line 129 of file frodo_matrix.h.
References Botan::CT::poison().
|
inlineconstexpr |
Definition at line 131 of file frodo_matrix.h.
References Botan::CT::unpoison().
|
static |
Definition at line 301 of file frodo_matrix.cpp.
References 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 331 of file frodo_matrix.cpp.
References BOTAN_ASSERT_NOMSG, dimensions(), FrodoMatrix(), and Botan::CT::is_equal().
| FrodoPlaintext Botan::FrodoMatrix::decode | ( | const FrodoKEMConstants & | constants | ) | const |
Definition at line 421 of file frodo_matrix.cpp.
References Botan::FrodoKEMConstants::b(), Botan::FrodoKEMConstants::d(), and Botan::FrodoKEMConstants::n_bar().
|
static |
Definition at line 503 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 121 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 125 of file frodo_matrix.h.
Referenced by pack(), and packed_size().
|
inline |
Definition at line 32 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 278 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 112 of file frodo_matrix.cpp.
References dimensions(), FrodoMatrix(), Botan::XOF::output(), and sample().
Referenced by Botan::FrodoKEM_PrivateKey::FrodoKEM_PrivateKey().
|
static |
Definition at line 124 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 192 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 250 of file frodo_matrix.cpp.
References BOTAN_ASSERT, dimensions(), elements_at(), FrodoMatrix(), Botan::FrodoKEMConstants::n(), and Botan::FrodoKEMConstants::n_bar().
|
static |
Definition at line 339 of file frodo_matrix.cpp.
References dimensions(), elements_at(), FrodoMatrix(), Botan::FrodoKEMConstants::n(), and Botan::FrodoKEMConstants::n_bar().
|
inline |
Definition at line 41 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 362 of file frodo_matrix.cpp.
References BOTAN_ASSERT_NOMSG, Botan::clear_mem(), Botan::FrodoKEMConstants::d(), element_count(), packed_size(), and Botan::StrongSpan< T >::size().
|
inline |
Definition at line 34 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 510 of file frodo_matrix.cpp.
References Botan::FrodoKEMConstants::d().
|
static |
Definition at line 74 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 411 of file frodo_matrix.cpp.
References Botan::detail::Strong_Adapter< T >::data(), and Botan::store_le().
|
static |
Definition at line 316 of file frodo_matrix.cpp.
References BOTAN_ASSERT_NOMSG, dimensions(), elements_at(), FrodoMatrix(), and Botan::FrodoKEMConstants::n_bar().
|
static |
Definition at line 446 of file frodo_matrix.cpp.
References 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().