|
Botan 3.9.0
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 213 of file pqcrystals.h.
|
inline |
Definition at line 254 of file pqcrystals.h.
|
inlineexplicit |
Definition at line 256 of file pqcrystals.h.
|
delete |
|
inlinenoexcept |
Definition at line 260 of file pqcrystals.h.
|
default |
|
inline |
Definition at line 330 of file pqcrystals.h.
|
inline |
Definition at line 332 of file pqcrystals.h.
|
inline |
Definition at line 310 of file pqcrystals.h.
|
inline |
Definition at line 312 of file pqcrystals.h.
|
inline |
Definition at line 280 of file pqcrystals.h.
|
inline |
Definition at line 302 of file pqcrystals.h.
Referenced by Botan::CRYSTALS::Polynomial< DilithiumPolyTraits, Botan::CRYSTALS::Domain::NTT >::ct_validate_value_range(), Botan::CRYSTALS::operator*(), and Botan::CRYSTALS::operator*().
|
inline |
Definition at line 304 of file pqcrystals.h.
|
inline |
Definition at line 325 of file pqcrystals.h.
|
inlineconstexprnoexcept |
Definition at line 289 of file pqcrystals.h.
Referenced by Botan::Dilithium_Algos::sample_in_ball().
|
inlineconstexprnoexcept |
Definition at line 278 of file pqcrystals.h.
|
inline |
Definition at line 314 of file pqcrystals.h.
|
inline |
Definition at line 316 of file pqcrystals.h.
|
inlinestatic |
Definition at line 249 of file pqcrystals.h.
|
inlineconstexprnoexcept |
Definition at line 294 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 338 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 347 of file pqcrystals.h.
|
delete |
|
inlinenoexcept |
Definition at line 265 of file pqcrystals.h.
|
inline |
Definition at line 306 of file pqcrystals.h.
|
inline |
Definition at line 308 of file pqcrystals.h.
|
inlineconstexpr |
Definition at line 318 of file pqcrystals.h.
Referenced by Botan::CRYSTALS::Polynomial< DilithiumPolyTraits, Botan::CRYSTALS::Domain::NTT >::clone(), Botan::CRYSTALS::Polynomial< DilithiumPolyTraits, Botan::CRYSTALS::Domain::NTT >::operator=(), Botan::CRYSTALS::Polynomial< DilithiumPolyTraits, Botan::CRYSTALS::Domain::NTT >::Polynomial(), and Botan::CRYSTALS::Polynomial< DilithiumPolyTraits, Botan::CRYSTALS::Domain::NTT >::Polynomial().
|
inline |
Definition at line 320 of file pqcrystals.h.
Referenced by Botan::CRYSTALS::detail::dot_product().
|
inlineconstexpr |
Definition at line 276 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 225 of file pqcrystals.h.