9#ifndef BOTAN_CMCE_FIELD_ORDERING_H_
10#define BOTAN_CMCE_FIELD_ORDERING_H_
12#include <botan/internal/cmce_parameters.h>
13#include <botan/internal/cmce_types.h>
54 std::vector<Classic_McEliece_GF>
alphas(
size_t n)
const;
110 CmcePermutation m_pi;
#define BOTAN_ARG_CHECK(expr, msg)
Represents a field ordering for the Classic McEliece cryptosystem.
CT::Mask< uint16_t > ct_is_equal(const Classic_McEliece_Field_Ordering &other) const
Constant time comparison of two field orderings.
static std::optional< Classic_McEliece_Field_Ordering > create_field_ordering(const Classic_McEliece_Parameters ¶ms, StrongSpan< const CmceOrderingBits > random_bits)
Creates a field ordering from a random bit sequence. Corresponds to the algorithm described in Classi...
const CmcePermutation & pi_ref() const
The pi values representing the field ordering.
static Classic_McEliece_Field_Ordering create_from_control_bits(const Classic_McEliece_Parameters ¶ms, const secure_bitvector &control_bits)
Create the field ordering from the control bits of a benes network.
secure_bitvector alphas_control_bits() const
Generates the control bits of the benes network corresponding to the field ordering.
CmcePermutation & pi_ref()
The pi values representing the field ordering.
void _const_time_poison() const
void _const_time_unpoison() const
std::vector< Classic_McEliece_GF > alphas(size_t n) const
Returns the field ordering as a vector of all alphas from alpha_0 to alpha_{n-1}.
size_type size() const noexcept(noexcept(this->get().size()))
decltype(auto) data() noexcept(noexcept(this->get().data()))
constexpr CT::Mask< T > is_equal(const T x[], const T y[], size_t len)
constexpr void unpoison(const T *p, size_t n)
constexpr void poison(const T *p, size_t n)
Strong< uint16_t, struct CmceGfMod_ > CmceGfMod
Represents a GF(q) modulus.
bitvector_base< secure_allocator > secure_bitvector
Strong< secure_bitvector, struct CmceColumnSelection_ > CmceColumnSelection
Represents c of private key.
Strong< secure_vector< uint16_t >, struct CmcePermutation_ > CmcePermutation
Represents a permutation (pi in spec). Used in field ordering creation.