Python-ELMO is a Python library which offers an encapsulation of the binary tool ELMO, in order to manipulate it easily in Python and SageMath script.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef PARAMS_H
  2. #define PARAMS_H
  3. #ifndef KYBER_K
  4. #define KYBER_K 2 /* Change this for different security strengths */
  5. #endif
  6. /* Don't change parameters below this line */
  7. #define KYBER_N 256
  8. #define KYBER_Q 3329
  9. #define KYBER_ETA 2
  10. #define KYBER_SYMBYTES 32 /* size in bytes of hashes, and seeds */
  11. #define KYBER_SSBYTES 32 /* size in bytes of shared key */
  12. #define KYBER_POLYBYTES 384
  13. #define KYBER_POLYVECBYTES (KYBER_K * KYBER_POLYBYTES)
  14. #if KYBER_K == 2
  15. #define KYBER_POLYCOMPRESSEDBYTES 96
  16. #define KYBER_POLYVECCOMPRESSEDBYTES (KYBER_K * 320)
  17. #elif KYBER_K == 3
  18. #define KYBER_POLYCOMPRESSEDBYTES 128
  19. #define KYBER_POLYVECCOMPRESSEDBYTES (KYBER_K * 320)
  20. #elif KYBER_K == 4
  21. #define KYBER_POLYCOMPRESSEDBYTES 160
  22. #define KYBER_POLYVECCOMPRESSEDBYTES (KYBER_K * 352)
  23. #endif
  24. #define KYBER_INDCPA_MSGBYTES KYBER_SYMBYTES
  25. #define KYBER_INDCPA_PUBLICKEYBYTES (KYBER_POLYVECBYTES + KYBER_SYMBYTES)
  26. #define KYBER_INDCPA_SECRETKEYBYTES (KYBER_POLYVECBYTES)
  27. #define KYBER_INDCPA_BYTES (KYBER_POLYVECCOMPRESSEDBYTES + KYBER_POLYCOMPRESSEDBYTES)
  28. #define KYBER_PUBLICKEYBYTES (KYBER_INDCPA_PUBLICKEYBYTES)
  29. #define KYBER_SECRETKEYBYTES (KYBER_INDCPA_SECRETKEYBYTES + KYBER_INDCPA_PUBLICKEYBYTES + 2*KYBER_SYMBYTES) /* 32 bytes of additional space to save H(pk) */
  30. #define KYBER_CIPHERTEXTBYTES KYBER_INDCPA_BYTES
  31. #endif