Botan 3.6.1
Crypto and TLS for C&
|
#include <pqcrystals.h>
Public Member Functions | |
void | _const_time_poison () const |
void | _const_time_unpoison () const |
decltype(auto) | begin () |
decltype(auto) | begin () const |
ThisPolynomial | clone () const |
std::span< T, Trait::N > | coefficients () |
std::span< const T, Trait::N > | coefficients () const |
ThisPolynomial & | conditional_add_q () |
constexpr bool | ct_validate_value_range (T min, T max) const noexcept |
constexpr Domain | domain () const noexcept |
decltype(auto) | end () |
decltype(auto) | end () const |
constexpr size_t | hamming_weight () const noexcept |
decltype(auto) | operator+= (const ThisPolynomial &other) |
decltype(auto) | operator-= (const ThisPolynomial &other) |
ThisPolynomial & | operator= (const ThisPolynomial &other)=delete |
ThisPolynomial & | operator= (ThisPolynomial &&other) noexcept |
T & | operator[] (size_t i) |
T | operator[] (size_t i) const |
constexpr bool | owns_storage () const |
Polynomial () | |
Polynomial (const ThisPolynomial &other)=delete | |
Polynomial (std::span< T, Trait::N > coeffs) | |
Polynomial (ThisPolynomial &&other) noexcept | |
ThisPolynomial & | reduce () |
constexpr size_t | size () const |
~Polynomial ()=default | |
Static Public Member Functions | |
template<Domain OtherD> requires (D != OtherD) | |
static Polynomial< Trait, D > | from_domain_cast (Polynomial< Trait, OtherD > &&p) |
Friends | |
template<Domain To, template< typename, Domain > class StructureT, crystals_trait C, Domain From> requires (To != From) | |
StructureT< C, To > | detail::domain_cast (StructureT< C, From > &&) |
template<crystals_trait OtherTrait, Domain OtherD> | |
class | Polynomial |
Represents a polynomial with Trait::N coefficients of type Trait::T. The domain of the polynomial can be either Domain::Normal or Domain::NTT and this information is represented in the C++ type system.
Polynomials may either own their storage of piggy-back on external storage when they are part of a PolynomialVector.
Definition at line 211 of file pqcrystals.h.
|
inline |
Definition at line 252 of file pqcrystals.h.
References BOTAN_DEBUG_ASSERT, and Botan::CRYSTALS::Polynomial< Trait, D >::owns_storage().
|
inlineexplicit |
Definition at line 254 of file pqcrystals.h.
References BOTAN_DEBUG_ASSERT, and Botan::CRYSTALS::Polynomial< Trait, D >::owns_storage().
|
delete |
|
inlinenoexcept |
Definition at line 258 of file pqcrystals.h.
|
default |
|
inline |
Definition at line 328 of file pqcrystals.h.
References Botan::CT::poison().
|
inline |
Definition at line 330 of file pqcrystals.h.
References Botan::CT::unpoison().
|
inline |
Definition at line 308 of file pqcrystals.h.
|
inline |
Definition at line 310 of file pqcrystals.h.
|
inline |
Definition at line 278 of file pqcrystals.h.
References BOTAN_DEBUG_ASSERT, Botan::copy_mem(), and Botan::CRYSTALS::Polynomial< Trait, D >::owns_storage().
|
inline |
Definition at line 300 of file pqcrystals.h.
Referenced by Botan::CRYSTALS::Polynomial< Trait, D >::ct_validate_value_range(), Botan::CRYSTALS::operator*(), and Botan::CRYSTALS::operator*().
|
inline |
Definition at line 302 of file pqcrystals.h.
|
inline |
Definition at line 323 of file pqcrystals.h.
|
inlineconstexprnoexcept |
Definition at line 287 of file pqcrystals.h.
References Botan::CRYSTALS::Polynomial< Trait, D >::coefficients().
Referenced by Botan::Dilithium_Algos::sample_in_ball().
|
inlineconstexprnoexcept |
Definition at line 276 of file pqcrystals.h.
|
inline |
Definition at line 312 of file pqcrystals.h.
|
inline |
Definition at line 314 of file pqcrystals.h.
|
inlinestatic |
Definition at line 247 of file pqcrystals.h.
References Botan::CRYSTALS::Polynomial< Trait, D >::Polynomial.
|
inlineconstexprnoexcept |
Definition at line 292 of file pqcrystals.h.
Referenced by Botan::Dilithium_Algos::sample_in_ball().
|
inline |
Adds two polynomials element-wise. Does not perform a reduction after the addition. Therefore this operation might cause an integer overflow.
Definition at line 336 of file pqcrystals.h.
|
inline |
Subtracts two polynomials element-wise. Does not perform a reduction after the subtraction. Therefore this operation might cause an integer underflow.
Definition at line 345 of file pqcrystals.h.
|
delete |
|
inlinenoexcept |
Definition at line 263 of file pqcrystals.h.
References BOTAN_ASSERT_NOMSG, and Botan::CRYSTALS::Polynomial< Trait, D >::owns_storage().
|
inline |
Definition at line 304 of file pqcrystals.h.
|
inline |
Definition at line 306 of file pqcrystals.h.
|
inlineconstexpr |
Definition at line 316 of file pqcrystals.h.
Referenced by Botan::CRYSTALS::Polynomial< Trait, D >::clone(), Botan::CRYSTALS::Polynomial< Trait, D >::operator=(), Botan::CRYSTALS::Polynomial< Trait, D >::Polynomial(), and Botan::CRYSTALS::Polynomial< Trait, D >::Polynomial().
|
inline |
Definition at line 318 of file pqcrystals.h.
Referenced by Botan::CRYSTALS::detail::dot_product().
|
inlineconstexpr |
Definition at line 274 of file pqcrystals.h.
Referenced by Botan::CRYSTALS::pack(), Botan::Kyber_Algos::polynomial_to_message(), Botan::Dilithium_Algos::sample_in_ball(), and Botan::CRYSTALS::unpack().
|
friend |
|
friend |
Definition at line 223 of file pqcrystals.h.
Referenced by Botan::CRYSTALS::Polynomial< Trait, D >::from_domain_cast().