Go to the source code of this file.
|
int | BPU_mecsQcmdpcEncode (BPU_T_GF2_Vector *out, const BPU_T_GF2_Vector *in, const struct _BPU_T_Code_Ctx *ctx) |
|
int | BPU_mecsQcmdpcDecrypt (BPU_T_GF2_Vector *out, const BPU_T_GF2_Vector *in, const struct _BPU_T_Code_Ctx *ctx) |
|
int | BPU_mecsQcmdpcDecode1 (BPU_T_GF2_Vector *error_vec, const BPU_T_GF2_Vector *cipher_text, int delta, const struct _BPU_T_Code_Ctx *ctx) |
|
int | BPU_mecsQcmdpcDecode2 (BPU_T_GF2_Vector *error_vec, const BPU_T_GF2_Vector *cipher_text, const struct _BPU_T_Code_Ctx *ctx) |
|
void | BPU_mecsQcmdpcCalcSyndrom (BPU_T_GF2_Vector *syndrom, const BPU_T_GF2_Vector *cipher_text, const struct _BPU_T_Code_Ctx *ctx) |
|
int | BPU_mecsQcmdpcTestGHmatrices (const BPU_T_GF2_QC_Matrix *G, const BPU_T_GF2_Sparse_Qc_Matrix *H) |
|
int | BPU_mecsQcmdpcGenKeys (BPU_T_Code_Ctx *ctx) |
|
#define BPU_QCMDPC_MAX_B_VALUES 5 |
count of precalculated values for decode2 algorithm
Definition at line 40 of file qcmdpc.h.
#define BPU_QCMDPC_PARAM_DELTA 5 |
starting param delta (threshold) for decode1 algorithm
Definition at line 36 of file qcmdpc.h.
#define BPU_QCMDPC_PARAM_DELTA_B 0 |
threshold for decode2
Definition at line 39 of file qcmdpc.h.
#define BPU_QCMDPC_PARAM_MAX_ITER 10 |
maximum count of iterations in decoding
Definition at line 33 of file qcmdpc.h.
Calc syndrom of cipher_text.
- Parameters
-
syndrom | output computed syndrom of cipher text |
cipher_text | cipher text |
ctx | QC-MDPC McEliece context |
Definition at line 231 of file qcmdpc.c.
Decoding algorithm 1 for QC-MDPC codes capable of correct param_t errors. It has non-zero probability of DECODING FAUILURE RATE (=<0.00000%). Slower than algorithm 2. Better DFR than algorithm 2. Can be parametrized by param_max_iter, param_delta (threshold tolerance value).
- Parameters
-
error_vec | output error vector |
cipher_text | input cipher text |
delta | param delta (threshold tolerance parameter) |
ctx | QC-MDPC McEliece context |
- Returns
- 0 if OK, else error
Definition at line 110 of file qcmdpc.c.
Decoding algorithm 2 for QC-MDPC codes capable of correct param_t errors. It has non-zero probability of DECODING FAUILURE RATE (=<0.00009%). Faster than algorithm 1. Worse DFR than algorithm 1. Can be parametrized by param_max_iter, param_delta_B (precomputed threshold values).
- Parameters
-
error_vec | output error vector |
cipher_text | input cipher text |
ctx | QC-MDPC McEliece context |
- Returns
- 0 if OK, else error
Definition at line 175 of file qcmdpc.c.
McEliece QC-MDPC decrypt
- Parameters
-
out | message |
in | cipher text |
ctx | QC-MDPC McEliece context |
- Returns
- 0 if OK, else error
Definition at line 65 of file qcmdpc.c.
McEliece QC-MDPC encode
- Parameters
-
out | cipher text |
in | message |
ctx | QC-MDPC McEliece context |
- Returns
- 0 if OK, else error
Definition at line 23 of file qcmdpc.c.
Generate key pair of QC-MDPC code for McEliece cryptosystem. Generator matrix G is not sparse. Its public key. Parity-check matrix H is in sparse form. Its private key. Params of code are set as global constants in crypto.h header file.
- Parameters
-
ctx | QC-MDPC McEliece context |
- Returns
- 0 if OK, else error
Definition at line 247 of file qcmdpc.c.
Test if generated matrices G x H^T = 0
- Parameters
-
G | generator matrix of code |
H | parity-check matrix of code |
- Returns
- 0 if OK, 1 if error
Definition at line 413 of file qcmdpc.c.