2019-01-16 10:02:32 +00:00
# ifndef PARAMS_H
# define PARAMS_H
# define KYBER_K 3
2019-05-06 13:50:27 +01:00
/* Don't change parameters below this line */
2019-01-16 10:02:32 +00:00
# define KYBER_N 256
2019-05-06 13:50:27 +01:00
# define KYBER_Q 3329
2019-01-16 10:02:32 +00:00
2019-05-06 13:50:27 +01:00
# define KYBER_ETA 2
2019-01-16 10:02:32 +00:00
2019-05-06 13:50:27 +01:00
# define KYBER_SYMBYTES 32 /* size in bytes of hashes, and seeds */
# define KYBER_SSBYTES 32 /* size in bytes of shared key */
2019-01-16 10:02:32 +00:00
2019-05-06 13:50:27 +01:00
# define KYBER_POLYBYTES 384
2019-02-13 16:45:09 +00:00
# define KYBER_POLYVECBYTES (KYBER_K * KYBER_POLYBYTES)
2019-05-06 13:50:27 +01:00
# define KYBER_POLYCOMPRESSEDBYTES 128
# define KYBER_POLYVECCOMPRESSEDBYTES (KYBER_K * 320)
2019-01-16 10:02:32 +00:00
2019-02-13 16:45:09 +00:00
# define KYBER_INDCPA_MSGBYTES KYBER_SYMBYTES
2019-05-06 13:50:27 +01:00
# define KYBER_INDCPA_PUBLICKEYBYTES (KYBER_POLYVECBYTES + KYBER_SYMBYTES)
2019-01-16 10:02:32 +00:00
# define KYBER_INDCPA_SECRETKEYBYTES (KYBER_POLYVECBYTES)
2019-02-13 16:45:09 +00:00
# define KYBER_INDCPA_BYTES (KYBER_POLYVECCOMPRESSEDBYTES + KYBER_POLYCOMPRESSEDBYTES)
# define KYBER_PUBLICKEYBYTES (KYBER_INDCPA_PUBLICKEYBYTES)
2019-05-06 13:50:27 +01:00
# define KYBER_SECRETKEYBYTES (KYBER_INDCPA_SECRETKEYBYTES + KYBER_INDCPA_PUBLICKEYBYTES + 2*KYBER_SYMBYTES) /* 32 bytes of additional space to save H(pk) */
2019-02-13 16:45:09 +00:00
# define KYBER_CIPHERTEXTBYTES KYBER_INDCPA_BYTES
2019-01-16 10:02:32 +00:00
# endif