Botan 3.7.1
Crypto and TLS for C&
|
Representation of a minimal polynomial in GF(q)[y]. More...
#include <cmce_poly.h>
Public Member Functions | |
void | _const_time_poison () const |
void | _const_time_unpoison () const |
Classic_McEliece_Minimal_Polynomial (std::vector< Classic_McEliece_GF > coef) | |
const std::vector< Classic_McEliece_GF > & | coef () const |
Get the entire coefficients vector of the polynomial. | |
Classic_McEliece_GF & | coef_at (size_t i) |
Get the coefficient of the i-th monomial as a reference (from low to high degree). | |
const Classic_McEliece_GF & | coef_at (size_t i) const |
Get the coefficient of the i-th monomial (from low to high degree). | |
size_t | degree () const |
Get the degree of the polynomial. | |
Classic_McEliece_GF | operator() (Classic_McEliece_GF a) const |
Evaluate the polynomial P(x) at a given point a, i.e., compute P(a). | |
secure_vector< uint8_t > | serialize () const |
Serialize the polynomial to bytes according to ISO Section 9.2.9. | |
Static Public Member Functions | |
static Classic_McEliece_Minimal_Polynomial | from_bytes (std::span< const uint8_t > bytes, CmceGfMod poly_f) |
Create a polynomial from bytes according to ISO Section 9.2.9. | |
Representation of a minimal polynomial in GF(q)[y].
It represents the monic irreducible degree-t polynomial of the goppa code.
Definition at line 81 of file cmce_poly.h.
|
inline |
Definition at line 83 of file cmce_poly.h.
Referenced by from_bytes().
|
inlineinherited |
Definition at line 68 of file cmce_poly.h.
|
inlineinherited |
Definition at line 70 of file cmce_poly.h.
|
inlineinherited |
Get the entire coefficients vector of the polynomial.
Definition at line 59 of file cmce_poly.h.
Referenced by serialize().
|
inlineinherited |
Get the coefficient of the i-th monomial as a reference (from low to high degree).
Definition at line 49 of file cmce_poly.h.
Referenced by Botan::Classic_McEliece_PrivateKeyInternal::check_key(), Botan::Classic_McEliece_Polynomial_Ring::multiply(), and Botan::Classic_McEliece_Polynomial::operator()().
|
inlineinherited |
Get the coefficient of the i-th monomial (from low to high degree).
Definition at line 54 of file cmce_poly.h.
|
inlineinherited |
Get the degree of the polynomial.
Note that the degree is given by the size of the coefficient vector, even if the leading coefficient is zero.
Definition at line 66 of file cmce_poly.h.
Referenced by Botan::Classic_McEliece_PrivateKeyInternal::check_key().
|
static |
Create a polynomial from bytes according to ISO Section 9.2.9.
Definition at line 141 of file cmce_poly.cpp.
References BOTAN_ASSERT_NOMSG, Classic_McEliece_Minimal_Polynomial(), and Botan::load_le().
Referenced by Botan::Classic_McEliece_PrivateKeyInternal::from_bytes().
|
inherited |
Evaluate the polynomial P(x) at a given point a, i.e., compute P(a).
Definition at line 18 of file cmce_poly.cpp.
References BOTAN_DEBUG_ASSERT, Botan::Classic_McEliece_Polynomial::coef_at(), and Botan::Classic_McEliece_GF::modulus().
secure_vector< uint8_t > Botan::Classic_McEliece_Minimal_Polynomial::serialize | ( | ) | const |
Serialize the polynomial to bytes according to ISO Section 9.2.9.
Definition at line 127 of file cmce_poly.cpp.
References BOTAN_ASSERT_NOMSG, Botan::Classic_McEliece_Polynomial::coef(), Botan::BufferStuffer::full(), Botan::BufferStuffer::next(), and Botan::store_le().
Referenced by Botan::Classic_McEliece_PrivateKeyInternal::serialize().