1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-23 16:08:59 +00:00
pqcrypto/crypto_kem/ledakemlt12/clean/qc_ldpc_parameters.h
2019-05-24 18:38:54 +02:00

28 lines
746 B
C

#ifndef QC_LDPC_PARAMETERS_H
#define QC_LDPC_PARAMETERS_H
#include "fips202.h"
#define TRNG_BYTE_LENGTH (24)
#define HASH_BYTE_LENGTH (32)
#define HASH_FUNCTION sha3_256
#define N0 (2)
#define P (52147) // modulus(x) = x^P-1
#define DV (9) // odd number
#define M (9)
#define M0 (5)
#define M1 (4)
#define NUM_ERRORS_T (136)
// Derived parameters, they are useful for QC-LDPC algorithms
#define HASH_BIT_LENGTH (HASH_BYTE_LENGTH << 3)
#define K ((N0-1)*P)
#define N (N0*P)
#define DC (N0*DV)
#define Q_BLOCK_WEIGHTS {{M0,M1},{M1,M0}}
static const unsigned char qBlockWeights[N0][N0] = Q_BLOCK_WEIGHTS;
#endif