2019-06-18 15:37:25 +01:00
|
|
|
#ifndef PARAMS_H
|
|
|
|
#define PARAMS_H
|
|
|
|
|
|
|
|
|
2020-10-16 01:00:04 +01:00
|
|
|
/* Change this for different security strengths */
|
|
|
|
|
|
|
|
/* Don't change anything below this line */
|
|
|
|
#define SABER_L 4
|
2019-06-18 15:37:25 +01:00
|
|
|
#define SABER_MU 6
|
|
|
|
#define SABER_ET 6
|
|
|
|
|
|
|
|
#define SABER_EQ 13
|
|
|
|
#define SABER_EP 10
|
|
|
|
#define SABER_N 256
|
|
|
|
|
2020-10-16 01:00:04 +01:00
|
|
|
#define SABER_SEEDBYTES 32
|
|
|
|
#define SABER_NOISE_SEEDBYTES 32
|
|
|
|
#define SABER_KEYBYTES 32
|
|
|
|
#define SABER_HASHBYTES 32
|
2019-06-18 15:37:25 +01:00
|
|
|
|
2020-10-16 01:00:04 +01:00
|
|
|
#define SABER_POLYCOINBYTES (SABER_MU * SABER_N / 8)
|
2019-06-18 15:37:25 +01:00
|
|
|
|
2020-10-16 01:00:04 +01:00
|
|
|
#define SABER_POLYBYTES (SABER_EQ * SABER_N / 8)
|
|
|
|
#define SABER_POLYVECBYTES (SABER_L * SABER_POLYBYTES)
|
2019-06-18 15:37:25 +01:00
|
|
|
|
2020-10-16 01:00:04 +01:00
|
|
|
#define SABER_POLYCOMPRESSEDBYTES (SABER_EP * SABER_N / 8)
|
|
|
|
#define SABER_POLYVECCOMPRESSEDBYTES (SABER_L * SABER_POLYCOMPRESSEDBYTES)
|
2019-06-18 15:37:25 +01:00
|
|
|
|
2020-10-16 01:00:04 +01:00
|
|
|
#define SABER_SCALEBYTES_KEM (SABER_ET * SABER_N / 8)
|
2019-06-18 15:37:25 +01:00
|
|
|
|
|
|
|
#define SABER_INDCPA_PUBLICKEYBYTES (SABER_POLYVECCOMPRESSEDBYTES + SABER_SEEDBYTES)
|
|
|
|
#define SABER_INDCPA_SECRETKEYBYTES (SABER_POLYVECBYTES)
|
|
|
|
|
|
|
|
#define SABER_PUBLICKEYBYTES (SABER_INDCPA_PUBLICKEYBYTES)
|
2020-10-16 01:00:04 +01:00
|
|
|
#define SABER_SECRETKEYBYTES (SABER_INDCPA_SECRETKEYBYTES + SABER_INDCPA_PUBLICKEYBYTES + SABER_HASHBYTES + SABER_KEYBYTES)
|
2019-06-18 15:37:25 +01:00
|
|
|
|
2020-10-16 01:00:04 +01:00
|
|
|
#define SABER_BYTES_CCA_DEC (SABER_POLYVECCOMPRESSEDBYTES + SABER_SCALEBYTES_KEM)
|
2019-06-18 15:37:25 +01:00
|
|
|
|
|
|
|
#endif
|