24 #define BPU_GF2_POLY_DEG_5 0x3b
25 #define BPU_GF2_POLY_DEG_6 0x43
26 #define BPU_GF2_POLY_DEG_10 0x71d
27 #define BPU_GF2_POLY_DEG_11 0x805
57 #endif // BPU_MATHCTX_H
BPU_T_GF2_16x * exp_table
there are all elements referenced by i, so at i-th index is g^i element, g - generator ...
BPU_T_GF2_16x mod
polynomial modulus
int BPU_mathInitCtx(BPU_T_Math_Ctx **ctx, const BPU_T_GF2_16x g, const BPU_T_GF2_16x mod)
Precalculate logaritmic and exponencial tables and initialize structure Aritmetic_Data.
BPU_T_GF2_16x * log_table
there are all indexes referenced by element, so alpha elemnet (g^i) -> i
void BPU_mathFreeCtx(BPU_T_Math_Ctx **ctx)
Free dynamiccaly or statically allocated Aritmetic_Data structure.
struct _BPU_T_Math_Ctx BPU_T_Math_Ctx
int ord
group ord, number of elements
uint8_t mod_deg
modulo degree, galois finite field GF(2^m)