|
Botan 3.14.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 80 of file cmce_poly.h.
|
inlineexplicit |
Definition at line 82 of file cmce_poly.h.
References Botan::Classic_McEliece_Polynomial::Classic_McEliece_Polynomial(), and Botan::Classic_McEliece_Polynomial::coef().
Referenced by from_bytes().
|
inlineinherited |
Definition at line 67 of file cmce_poly.h.
References Botan::CT::poison().
|
inlineinherited |
Definition at line 69 of file cmce_poly.h.
References Botan::CT::unpoison().
|
inlineinherited |
Get the entire coefficients vector of the polynomial.
Definition at line 58 of file cmce_poly.h.
Referenced by Botan::Classic_McEliece_Minimal_Polynomial::Classic_McEliece_Minimal_Polynomial(), Classic_McEliece_Polynomial(), and Botan::Classic_McEliece_Minimal_Polynomial::serialize().
|
inlineinherited |
Get the coefficient of the i-th monomial as a reference (from low to high degree).
Definition at line 48 of file cmce_poly.h.
Referenced by Botan::Classic_McEliece_Polynomial_Ring::multiply(), and operator()().
|
inlineinherited |
Get the coefficient of the i-th monomial (from low to high degree).
Definition at line 53 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 65 of file cmce_poly.h.
|
static |
Create a polynomial from bytes according to ISO Section 9.2.9.
Definition at line 147 of file cmce_poly.cpp.
References BOTAN_ASSERT_NOMSG, Classic_McEliece_Minimal_Polynomial(), Botan::CT::Mask< T >::is_lte(), Botan::load_le(), Botan::Classic_McEliece_GF::log_q_from_mod(), and Botan::CT::Mask< T >::set().
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 22 of file cmce_poly.cpp.
References BOTAN_DEBUG_ASSERT, 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 133 of file cmce_poly.cpp.
References BOTAN_ASSERT_NOMSG, Botan::Classic_McEliece_Polynomial::coef(), Botan::BufferStuffer::full(), Botan::BufferStuffer::next(), and Botan::store_le().