Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

28 строки
746 B

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