12 #include <m4ri/m4ri.h>
34 void gf2e_free(
gf2e *ff);
64 m4ri_die(
"degree %d not supported.\n",ff->
degree);
77 word *mul = (word*)m4ri_mm_calloc(1<<16,
sizeof(word));
80 const word mask_w = (1<<w)-1;
81 const word *x = ff->
mul[a];
86 for(word i=0; i<1<<16; i++) {
89 mul[i] = x[(i&mask_w)] | x[((i>>2)&mask_w)]<<2 | x[((i>>4)&mask_w)]<<4 | x[((i>>6)&mask_w)]<<6;
90 mul[i] |= x[((i>>8)&mask_w)]<<8 | x[((i>>10)&mask_w)]<<10 | x[((i>>12)&mask_w)]<<12 | x[((i>>14)&mask_w)]<<14;
93 mul[i] = x[(i&mask_w)] | x[((i>>4)&mask_w)]<<4 | x[((i>>8)&mask_w)]<<8 | x[((i>>12)&mask_w)]<<12;
96 mul[i] = x[(i&mask_w)] | x[((i>>8)&mask_w)]<<8;
99 mul[i] = x[(i&mask_w)];
123 unsigned int n = 2*ff->
degree-1;
124 word *m = (word*)m4ri_mm_malloc( n *
sizeof(word));
125 for(
unsigned int i=0; i<n; i++) {
127 for(
unsigned int j=i; j>=ff->
degree; j--) {
135 #endif //M4RIE_GF2E_H