BitPunch McEliece  v0.0.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
codectx.h File Reference

Go to the source code of this file.

Data Structures

union  _BPU_T_UN_Code_Spec
 Code specifics union type. More...
 
union  _BPU_T_UN_Code_Params
 
struct  _BPU_T_Code_Ctx
 

Typedefs

typedef enum _BPU_T_EN_Code_Types BPU_T_EN_Code_Types
 Possible types of codes. More...
 
typedef union _BPU_T_UN_Code_Spec BPU_T_UN_Code_Spec
 Code specifics union type. More...
 
typedef union _BPU_T_UN_Code_Params BPU_T_UN_Code_Params
 
typedef struct _BPU_T_Code_Ctx BPU_T_Code_Ctx
 

Enumerations

enum  _BPU_T_EN_Code_Types { BPU_EN_CODE_GOPPA, BPU_EN_CODE_QCMDPC }
 Possible types of codes. More...
 

Functions

int BPU_codeInitCtx (BPU_T_Code_Ctx **ctx, const BPU_T_UN_Code_Params *params, const BPU_T_EN_Code_Types type)
 BPU_codeInitCtx Initialize (register) code functions encode, decode and code spec structure based on code type. More...
 
int BPU_codeInitMathCtx (BPU_T_Math_Ctx **ctx, const uint16_t m, const uint16_t t, const BPU_T_GF2_16x mod)
 BPU_codeInitMathCtx. More...
 
void BPU_codeFreeCtx (BPU_T_Code_Ctx **ctx)
 BPU_codeFreeCtx. More...
 
int BPU_codeInitParamsGoppa (BPU_T_UN_Code_Params *params, const uint16_t m, const uint16_t t, const BPU_T_GF2_16x mod)
 BPU_codeInitParamsGoppa. More...
 
void BPU_codeFreeParamsGoppa (BPU_T_UN_Code_Params *params)
 BPU_codeFreeParamsGoppa. More...
 
int BPU_codeInitParamsQcmdpc (BPU_T_UN_Code_Params *params, const uint16_t m, const uint16_t n0, const uint16_t w, const uint16_t t)
 
void BPU_codeFreeParamsQcmdpc (BPU_T_UN_Code_Params *params)
 

Typedef Documentation

Possible types of codes.

Code specifics union type.

Enumeration Type Documentation

Possible types of codes.

Enumerator
BPU_EN_CODE_GOPPA 
BPU_EN_CODE_QCMDPC 

Definition at line 34 of file codectx.h.

Function Documentation

void BPU_codeFreeCtx ( BPU_T_Code_Ctx **  ctx)

BPU_codeFreeCtx.

Parameters
ctx

Definition at line 161 of file codectx.c.

void BPU_codeFreeParamsGoppa ( BPU_T_UN_Code_Params params)

BPU_codeFreeParamsGoppa.

Parameters
params

Definition at line 191 of file codectx.c.

void BPU_codeFreeParamsQcmdpc ( BPU_T_UN_Code_Params params)

Free memory for params.

Parameters
paramspointer to structure

Definition at line 199 of file codectx.c.

int BPU_codeInitCtx ( BPU_T_Code_Ctx **  ctx,
const BPU_T_UN_Code_Params params,
const BPU_T_EN_Code_Types  type 
)

BPU_codeInitCtx Initialize (register) code functions encode, decode and code spec structure based on code type.

Parameters
ctx
params
type
Returns

Definition at line 31 of file codectx.c.

int BPU_codeInitMathCtx ( BPU_T_Math_Ctx **  ctx,
const uint16_t  m,
const uint16_t  t,
const BPU_T_GF2_16x  mod 
)

BPU_codeInitMathCtx.

Parameters
ctx
m
t
mod
Returns

Definition at line 126 of file codectx.c.

int BPU_codeInitParamsGoppa ( BPU_T_UN_Code_Params params,
const uint16_t  m,
const uint16_t  t,
const BPU_T_GF2_16x  mod 
)

BPU_codeInitParamsGoppa.

Parameters
params
m
t
mod
Returns

Definition at line 187 of file codectx.c.

int BPU_codeInitParamsQcmdpc ( BPU_T_UN_Code_Params params,
const uint16_t  m,
const uint16_t  n0,
const uint16_t  w,
const uint16_t  t 
)

Wrapper for param initialization. After work you have to free memory using call BPU_codeFreeParamsQcmdpc

Parameters
paramspointer to structure
msize of cyclic matrix
n0number of cyclic matrices
wweight of parity-check matrix row
tcount of errors
Returns
[description]

Definition at line 195 of file codectx.c.