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

Go to the source code of this file.

Functions

int BPU_mecsInitCtx (BPU_T_Mecs_Ctx **ctx, const BPU_T_UN_Mecs_Params *params, const BPU_T_EN_Mecs_Types type)
 Initialize (register) mecs functions for encryption, decryption and key gen based on type. More...
 
int BPU_mecsFreeCtx (BPU_T_Mecs_Ctx **ctx)
 
int BPU_mecsInitParamsGoppa (BPU_T_UN_Mecs_Params *params, const uint16_t m, const uint16_t t, const BPU_T_GF2_16x mod)
 
void BPU_mecsFreeParamsGoppa (BPU_T_UN_Mecs_Params *params)
 
int BPU_mecsInitParamsQcmdpc (BPU_T_UN_Mecs_Params *params, const uint16_t m, const uint16_t n0, const uint16_t w, const uint16_t t)
 
void BPU_mecsFreeParamsQcmdpc (BPU_T_UN_Mecs_Params *params)
 

Function Documentation

int BPU_mecsFreeCtx ( BPU_T_Mecs_Ctx **  ctx)

Definition at line 158 of file mecsctx.c.

void BPU_mecsFreeParamsGoppa ( BPU_T_UN_Mecs_Params params)

Definition at line 196 of file mecsctx.c.

void BPU_mecsFreeParamsQcmdpc ( BPU_T_UN_Mecs_Params params)

Free memory for params.

Parameters
paramspointer to structure

Definition at line 204 of file mecsctx.c.

int BPU_mecsInitCtx ( BPU_T_Mecs_Ctx **  ctx,
const BPU_T_UN_Mecs_Params params,
const BPU_T_EN_Mecs_Types  type 
)

Initialize (register) mecs functions for encryption, decryption and key gen based on type.

Definition at line 37 of file mecsctx.c.

int BPU_mecsInitParamsGoppa ( BPU_T_UN_Mecs_Params params,
const uint16_t  m,
const uint16_t  t,
const BPU_T_GF2_16x  mod 
)

Definition at line 192 of file mecsctx.c.

int BPU_mecsInitParamsQcmdpc ( BPU_T_UN_Mecs_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_mecsFreeParamsQcmdpc

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 200 of file mecsctx.c.