2020-07-31 07:17:42 +01:00
|
|
|
#ifndef PQCLEAN_KYBER102490S_CLEAN_PARAMS_H
|
|
|
|
#define PQCLEAN_KYBER102490S_CLEAN_PARAMS_H
|
2019-09-17 13:02:01 +01:00
|
|
|
|
2020-10-27 00:05:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-17 13:02:01 +01:00
|
|
|
#define KYBER_N 256
|
|
|
|
#define KYBER_Q 3329
|
|
|
|
|
|
|
|
#define KYBER_SYMBYTES 32 /* size in bytes of hashes, and seeds */
|
|
|
|
#define KYBER_SSBYTES 32 /* size in bytes of shared key */
|
|
|
|
|
2020-07-31 07:17:42 +01:00
|
|
|
#define KYBER_POLYBYTES 384
|
|
|
|
#define KYBER_POLYVECBYTES (KYBER_K * KYBER_POLYBYTES)
|
2019-09-17 13:02:01 +01:00
|
|
|
|
|
|
|
#define KYBER_K 4
|
2020-10-27 13:48:42 +00:00
|
|
|
#define KYBER_ETA1 2
|
2019-09-17 13:02:01 +01:00
|
|
|
#define KYBER_POLYCOMPRESSEDBYTES 160
|
|
|
|
#define KYBER_POLYVECCOMPRESSEDBYTES (KYBER_K * 352)
|
|
|
|
|
2020-10-27 13:48:42 +00:00
|
|
|
#define KYBER_ETA2 2
|
|
|
|
|
|
|
|
#define KYBER_INDCPA_MSGBYTES (KYBER_SYMBYTES)
|
2019-09-17 13:02:01 +01:00
|
|
|
#define KYBER_INDCPA_PUBLICKEYBYTES (KYBER_POLYVECBYTES + KYBER_SYMBYTES)
|
|
|
|
#define KYBER_INDCPA_SECRETKEYBYTES (KYBER_POLYVECBYTES)
|
2020-10-27 13:48:42 +00:00
|
|
|
#define KYBER_INDCPA_BYTES (KYBER_POLYVECCOMPRESSEDBYTES + KYBER_POLYCOMPRESSEDBYTES)
|
2019-09-17 13:02:01 +01:00
|
|
|
|
|
|
|
#define KYBER_PUBLICKEYBYTES (KYBER_INDCPA_PUBLICKEYBYTES)
|
2020-07-31 07:17:42 +01:00
|
|
|
/* 32 bytes of additional space to save H(pk) */
|
2020-10-27 13:48:42 +00:00
|
|
|
#define KYBER_SECRETKEYBYTES (KYBER_INDCPA_SECRETKEYBYTES + KYBER_INDCPA_PUBLICKEYBYTES + 2*KYBER_SYMBYTES)
|
|
|
|
#define KYBER_CIPHERTEXTBYTES (KYBER_INDCPA_BYTES)
|
2019-09-17 13:02:01 +01:00
|
|
|
|
|
|
|
#endif
|