12#ifndef BOTAN_GF2M_SMALL_M_H_
13#define BOTAN_GF2M_SMALL_M_H_
15#include <botan/types.h>
73 gf2m gf_sqrt(
gf2m x)
const {
return ((x) ? gf_exp(_gf_modq_1(gf_log(x) << (get_extension_degree() - 1))) : 0); }
99 gf2m gf_ord()
const {
return m_gf_multiplicative_order; }
106 gf2m _gf_modq_1(int32_t d)
const {
112 return static_cast<gf2m>(((d)&gf_ord()) + ((d) >> get_extension_degree()));
115 const size_t m_gf_extension_degree;
116 const gf2m m_gf_multiplicative_order;
117 const std::vector<gf2m>& m_gf_log_table;
118 const std::vector<gf2m>& m_gf_exp_table;
gf2m gf_mul_lnn(gf2m x, gf2m y) const
gf2m gf_square_rr(gf2m a) const
gf2m gf_mul_zrz(gf2m a, gf2m y) const
gf2m gf_l_from_n(gf2m x) const
gf2m gf_mul(gf2m x, gf2m y) const
gf2m gf_square_ln(gf2m x) const
gf2m gf_mul_rrr(gf2m a, gf2m b) const
gf2m gf_exp(gf2m i) const
gf2m gf_mul_rnn(gf2m x, gf2m y) const
gf2m square_rr(gf2m x) const
gf2m gf_mul_nrn(gf2m a, gf2m y) const
gf2m gf_div_rnr(gf2m x, gf2m b) const
gf2m gf_mul_rrn(gf2m a, gf2m y) const
gf2m gf_div_zzr(gf2m x, gf2m b) const
gf2m gf_div_rnn(gf2m x, gf2m y) const
gf2m gf_inv(gf2m x) const
gf2m gf_square(gf2m x) const
gf2m gf_sqrt(gf2m x) const
gf2m gf_mul_fast(gf2m x, gf2m y) const
gf2m gf_div_nrr(gf2m a, gf2m b) const
gf2m gf_inv_rn(gf2m x) const
gf2m get_cardinality() const
gf2m gf_mul_nnr(gf2m y, gf2m a) const
gf2m gf_mul_lll(gf2m a, gf2m b) const
gf2m gf_mul_nrr(gf2m a, gf2m b) const
gf2m gf_log(gf2m i) const
size_t get_extension_degree() const
gf2m gf_mul_rnr(gf2m y, gf2m a) const
gf2m gf_mul_zzr(gf2m a, gf2m y) const
gf2m decode_gf2m(const uint8_t *mem)
uint32_t encode_gf2m(gf2m to_enc, uint8_t *mem)