M4RIE  0.20111004
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
gf2e.h File Reference

\(\mathbb{F}_{2^e}\) More...

#include <m4ri/m4ri.h>
#include <m4rie/gf2x.h>

Go to the source code of this file.

Data Structures

struct  gf2e_struct
 \(\mathbb{F}_{2^e}\) More...
 

Macros

#define M4RIE_MAX_DEGREE   16
 maximal supported degree
 

Typedefs

typedef struct gf2e_struct gf2e
 \(\mathbb{F}_{2^e}\)
 

Functions

gf2egf2e_init (const word minpoly)
 
void gf2e_free (gf2e *ff)
 
static word gf2e_inv (const gf2e *ff, word a)
 a^(-1) % minpoly
 
static word _gf2e_mul_table (const gf2e *ff, const word a, const word b)
 a*b in \(\mathbb{F}_{2^e}\) using a table lookups.
 
static word _gf2e_mul_arith (const gf2e *ff, const word a, const word b)
 a*b in \(\mathbb{F}_{2^e}\) using a gf2x_mul() lookups.
 
static word gf2e_mul (const gf2e *ff, const word a, const word b)
 a*b in \(\mathbb{F}_{2^e}\).
 
static size_t gf2e_degree_to_w (const gf2e *ff)
 
static word * gf2e_t16_init (const gf2e *ff, const word a)
 
static void gf2e_t16_free (word *mul)
 Free multiplication table. More...
 

Variables

const word * irreducible_polynomials [17]
 all Irreducible polynomials over GF(2) up to degree 16.
 

Detailed Description

\(\mathbb{F}_{2^e}\)

Author
Martin Albrecht marti.nosp@m.nral.nosp@m.brech.nosp@m.t@go.nosp@m.oglem.nosp@m.ail..nosp@m.com

Function Documentation

static size_t gf2e_degree_to_w ( const gf2e ff)
inlinestatic

Return the width used for storing elements of ff

Parameters
ffFinite field.
void gf2e_free ( gf2e ff)

Free ff

Parameters
ffFinite field.
Examples:
tests/test_multiplication.c.
gf2e* gf2e_init ( const word  minpoly)

Create finite field from minimal polynomial

Parameters
minpolyPolynomial represented as series of bits.

red

pow_gen: X^i

mul tables

Examples:
tests/test_multiplication.c.
static void gf2e_t16_free ( word *  mul)
inlinestatic

Free multiplication table.

Parameters
mulMultiplication table
static word* gf2e_t16_init ( const gf2e ff,
const word  a 
)
inlinestatic

Compute all multiples by a of vectors fitting into 16 bits.

Parameters
ffFinite field.
aFinite field element.
Todo:
: this is a bit of overkill, we could do better