2019-12-06 15:16:41 +00:00
|
|
|
#ifndef PQCLEAN_DILITHIUM2_CLEAN_PARAMS_H
|
|
|
|
#define PQCLEAN_DILITHIUM2_CLEAN_PARAMS_H
|
|
|
|
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2021-02-01 05:32:40 +00:00
|
|
|
|
2019-06-11 10:18:05 +01:00
|
|
|
#define SEEDBYTES 32
|
2021-02-09 15:13:25 +00:00
|
|
|
#define CRHBYTES 64
|
2019-06-11 10:18:05 +01:00
|
|
|
#define N 256
|
|
|
|
#define Q 8380417
|
2021-02-01 05:32:40 +00:00
|
|
|
#define D 13
|
|
|
|
#define ROOT_OF_UNITY 1753
|
2019-06-11 10:18:05 +01:00
|
|
|
|
|
|
|
#define K 4
|
2021-02-01 05:32:40 +00:00
|
|
|
#define L 4
|
|
|
|
#define ETA 2
|
|
|
|
#define TAU 39
|
|
|
|
#define BETA 78
|
|
|
|
#define GAMMA1 (1 << 17)
|
|
|
|
#define GAMMA2 ((Q-1)/88)
|
2019-06-11 10:18:05 +01:00
|
|
|
#define OMEGA 80
|
2021-02-01 05:32:40 +00:00
|
|
|
#define PQCLEAN_DILITHIUM2_CLEAN_CRYPTO_ALGNAME "Dilithium2"
|
|
|
|
|
|
|
|
|
|
|
|
#define POLYT1_PACKEDBYTES 320
|
|
|
|
#define POLYT0_PACKEDBYTES 416
|
|
|
|
#define POLYVECH_PACKEDBYTES (OMEGA + K)
|
|
|
|
|
|
|
|
#define POLYZ_PACKEDBYTES 576
|
|
|
|
|
|
|
|
#define POLYW1_PACKEDBYTES 192
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2021-02-01 05:32:40 +00:00
|
|
|
#define POLYETA_PACKEDBYTES 96
|
2019-06-11 10:18:05 +01:00
|
|
|
|
2021-02-01 05:32:40 +00:00
|
|
|
#define PQCLEAN_DILITHIUM2_CLEAN_CRYPTO_PUBLICKEYBYTES (SEEDBYTES + K*POLYT1_PACKEDBYTES)
|
2021-02-09 15:13:25 +00:00
|
|
|
#define PQCLEAN_DILITHIUM2_CLEAN_CRYPTO_SECRETKEYBYTES (3*SEEDBYTES \
|
2021-02-01 05:32:40 +00:00
|
|
|
+ L*POLYETA_PACKEDBYTES \
|
|
|
|
+ K*POLYETA_PACKEDBYTES \
|
|
|
|
+ K*POLYT0_PACKEDBYTES)
|
|
|
|
#define PQCLEAN_DILITHIUM2_CLEAN_CRYPTO_BYTES (SEEDBYTES + L*POLYZ_PACKEDBYTES + POLYVECH_PACKEDBYTES)
|
2019-06-11 10:18:05 +01:00
|
|
|
|
|
|
|
#endif
|