gf.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include "gf.h"

Include dependency graph for gf.c:

Go to the source code of this file.

Defines

#define MAX_EXT_DEG   16

Functions

void gf_init_exp ()
void gf_init_log ()
int gf_init (int extdeg)
gf_t gf_pow (gf_t x, int i)
gf_t gf_rand (int(*u8rnd)())

Variables

static unsigned prim_poly [MAX_EXT_DEG+1]
int init_done = 0


Define Documentation

#define MAX_EXT_DEG   16

Definition at line 26 of file gf.c.

Referenced by gf_init().


Function Documentation

int gf_init ( int  extdeg  ) 

Definition at line 83 of file gf.c.

References gf_cardinality, gf_exp, gf_extension_degree, gf_init_exp(), gf_init_log(), gf_log, gf_multiplicative_order, init_done, and MAX_EXT_DEG.

Referenced by decode(), and keypair().

Here is the call graph for this function:

void gf_init_exp (  ) 

Definition at line 54 of file gf.c.

References gf_exp, gf_extd, gf_ord, and prim_poly.

Referenced by gf_init().

void gf_init_log (  ) 

Definition at line 70 of file gf.c.

References gf_exp, gf_extd, gf_log, and gf_ord.

Referenced by gf_init().

gf_t gf_pow ( gf_t  x,
int  i 
)

Definition at line 105 of file gf.c.

References gf_exp, gf_extd, gf_log, and gf_ord.

gf_t gf_rand ( int(*)()  u8rnd  ) 

Definition at line 122 of file gf.c.

References gf_ord, and u8rnd().

Referenced by poly_randgen_irred().

Here is the call graph for this function:


Variable Documentation

int init_done = 0

Definition at line 81 of file gf.c.

Referenced by gf_init().

unsigned prim_poly[MAX_EXT_DEG+1] [static]

Initial value:

 {
    01,         
    03,         
    07,                 
    013,                
    023,                
    045,                
    0103,               
    0203,               
    0435,               
    01041,              
    02011,              
    04005,              
    010123,             
    020033,             
    042103,             
    0100003,            
    0210013             

}

Definition at line 28 of file gf.c.

Referenced by gf_init_exp().


This work was partially suported by Europian Network of Excellence, ECRYPT; ECRYPT