![]() |
BitPunch McEliece
v0.0.4
|
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | _BPU_T_GF2_16x_Vector |
| struct | _BPU_T_GF2_16x_Matrix |
| struct | _BPU_T_GF2_16x_Poly |
Macros | |
| #define | BPU_gf2xPolyNull(d_pointer) |
| Copy Polynomial. More... | |
Typedefs | |
| typedef uint16_t | BPU_T_GF2_16x |
| typedef uint32_t | BPU_T_GF2_32x |
| typedef struct _BPU_T_GF2_16x_Vector | BPU_T_GF2_16x_Vector |
| typedef struct _BPU_T_GF2_16x_Matrix | BPU_T_GF2_16x_Matrix |
| typedef struct _BPU_T_GF2_16x_Poly | BPU_T_GF2_16x_Poly |
Functions | |
| void | BPU_gf2xMatNull (BPU_T_GF2_16x_Matrix *mat) |
| int | BPU_gf2xMatMalloc (BPU_T_GF2_16x_Matrix **m, int rows, int cols) |
| Allocate memory for matrix. More... | |
| int | BPU_gf2xVecMalloc (BPU_T_GF2_16x_Vector **vec, int size) |
| BPU_gf2xVecMalloc Malloc vector structure. More... | |
| void | BPU_gf2xVecFree (BPU_T_GF2_16x_Vector **vec) |
| BPU_gf2xVecFree Free vector structure. More... | |
| void | BPU_gf2xMatFree (BPU_T_GF2_16x_Matrix **m) |
| Free dynamically or statically allocated matrix. More... | |
| int | BPU_gf2xPolyMalloc (BPU_T_GF2_16x_Poly **p, int16_t max_deg) |
| int | BPU_gf2xPolyResize (BPU_T_GF2_16x_Poly *p, int16_t max_deg) |
| BPU_gf2xPolyResize Resize polynomial, increase max deg. More... | |
| int | BPU_gf2xPolyMallocCoef (BPU_T_GF2_16x_Poly *p, int16_t max_deg) |
| BPU_gf2xPolyMallocCoef Malloc internal coeficients for polynomial. More... | |
| void | BPU_gf2xPolyFree (BPU_T_GF2_16x_Poly **p) |
| #define BPU_gf2xPolyNull | ( | d_pointer | ) |
Copy Polynomial.
Set Polynomial values to 0.
| d_pointer[out] | pointer to GF2_16x polynomial |
Definition at line 64 of file gf2xtypes.h.
| typedef uint16_t BPU_T_GF2_16x |
Polynomial representation over GF2, max deg f < 16
Definition at line 26 of file gf2xtypes.h.
| typedef struct _BPU_T_GF2_16x_Matrix BPU_T_GF2_16x_Matrix |
Matrix representation over GF2_16x.
| typedef struct _BPU_T_GF2_16x_Poly BPU_T_GF2_16x_Poly |
Representation of polynomial.
| typedef struct _BPU_T_GF2_16x_Vector BPU_T_GF2_16x_Vector |
GF2_16x Vector representation
| typedef uint32_t BPU_T_GF2_32x |
Polynomial representation over GF2, max deg f < 32
Definition at line 31 of file gf2xtypes.h.
| void BPU_gf2xMatFree | ( | BPU_T_GF2_16x_Matrix ** | m | ) |
Free dynamically or statically allocated matrix.
Free dynamically or statically allocated matrix.
| [out] | *m | address of matrix object |
Definition at line 86 of file gf2xtypes.c.
| int BPU_gf2xMatMalloc | ( | BPU_T_GF2_16x_Matrix ** | m, |
| int | rows, | ||
| int | cols | ||
| ) |
Allocate memory for matrix.
Allocate memory for matrix. After work you have to free memory using call BPU_freeMat.
| [out] | m | matrix to be allocated |
| [in] | rows | rows |
| [in] | cols | cols |
Definition at line 28 of file gf2xtypes.c.
| void BPU_gf2xMatNull | ( | BPU_T_GF2_16x_Matrix * | mat | ) |
Definition at line 148 of file gf2xtypes.c.
| void BPU_gf2xPolyFree | ( | BPU_T_GF2_16x_Poly ** | p | ) |
| int BPU_gf2xPolyMalloc | ( | BPU_T_GF2_16x_Poly ** | p, |
| int16_t | max_deg | ||
| ) |
Malloc memory for polynomial and zero-initialize
| p | representation of polynomial (every element is one coeficient) |
| max_deg | max degree of polynomial |
Definition at line 111 of file gf2xtypes.c.
| int BPU_gf2xPolyMallocCoef | ( | BPU_T_GF2_16x_Poly * | p, |
| int16_t | max_deg | ||
| ) |
BPU_gf2xPolyMallocCoef Malloc internal coeficients for polynomial.
| p | |
| max_deg |
Definition at line 128 of file gf2xtypes.c.
| int BPU_gf2xPolyResize | ( | BPU_T_GF2_16x_Poly * | p, |
| int16_t | max_deg | ||
| ) |
BPU_gf2xPolyResize Resize polynomial, increase max deg.
| p | |
| max_deg |
Definition at line 121 of file gf2xtypes.c.
| void BPU_gf2xVecFree | ( | BPU_T_GF2_16x_Vector ** | vec | ) |
| int BPU_gf2xVecMalloc | ( | BPU_T_GF2_16x_Vector ** | vec, |
| int | size | ||
| ) |
BPU_gf2xVecMalloc Malloc vector structure.
| vec | |
| size |
Definition at line 60 of file gf2xtypes.c.