BitPunch McEliece  v0.0.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
qcmdpctypes.h
Go to the documentation of this file.
1 /*
2 This file is part of BitPunch
3 Copyright (C) 2015 Frantisek Uhrecky <frantisek.uhrecky[what here]gmail.com>
4 Copyright (C) 2015 Andrej Gulyas <andrej.guly[what here]gmail.com>
5 
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 #ifndef QCMDPCTYPES_H
20 #define QCMDPCTYPES_H
21 #include <bitpunch/math/gf2types.h>
22 #include <bitpunch/debugio.h>
23 #include <stdlib.h>
24 
28 typedef struct _BPU_T_Qcmdpc_Spec {
31  uint16_t m;
32  uint16_t n0;
33  uint16_t w;
35 
39 typedef struct _BPU_T_Qcmdpc_Params {
40  uint16_t m;
41  uint16_t n0;
42  uint16_t w;
43  uint16_t t;
45 
51 
61 int BPU_qcmdpcInitParams(BPU_T_Qcmdpc_Params **params, const uint16_t m, const uint16_t n0, const uint16_t w, const uint16_t t);
62 
68 
69 #endif // QCMDPCTYPES_H
void BPU_qcmdpcFreeParams(BPU_T_Qcmdpc_Params **params)
Definition: qcmdpctypes.c:43
BPU_T_GF2_QC_Matrix G
generator matrix
Definition: qcmdpctypes.h:29
void BPU_qcmdpcFreeSpec(BPU_T_Qcmdpc_Spec *spec)
Definition: qcmdpctypes.c:21
uint16_t n0
number of cyclic matrices
Definition: qcmdpctypes.h:32
int BPU_qcmdpcInitParams(BPU_T_Qcmdpc_Params **params, const uint16_t m, const uint16_t n0, const uint16_t w, const uint16_t t)
Definition: qcmdpctypes.c:27
uint16_t w
weight of parity-check matrix row
Definition: qcmdpctypes.h:42
uint16_t m
size of cyclic matrix
Definition: qcmdpctypes.h:40
struct _BPU_T_Qcmdpc_Params BPU_T_Qcmdpc_Params
uint16_t w
weight of parity-check matrix row
Definition: qcmdpctypes.h:33
uint16_t n0
number of cyclic matrices
Definition: qcmdpctypes.h:41
uint16_t t
count of errors
Definition: qcmdpctypes.h:43
struct _BPU_T_Qcmdpc_Spec BPU_T_Qcmdpc_Spec
BPU_T_GF2_Sparse_Qc_Matrix H
parity-check matrix
Definition: qcmdpctypes.h:30
uint16_t m
size of cyclic matrix
Definition: qcmdpctypes.h:31