pqc/crypto_kem/ntruhrss701/clean/params.h
John Schanck 4ea4b478ba
Update NTRU (#311)
* Update NTRU

version: https://github.com/jschanck/ntru/tree/485dde03

* Fixed ntruhrss701/clean/Makefile.Microsoft_nmake
2020-08-15 14:26:25 -04:00

35 lines
1022 B
C

#ifndef PARAMS_H
#define PARAMS_H
#define NTRU_HRSS
#define NTRU_N 701
#define NTRU_LOGQ 13
/* Do not modify below this line */
#define PAD32(X) ((((X) + 31)/32)*32)
#define NTRU_Q (1 << NTRU_LOGQ)
#define NTRU_SEEDBYTES 32
#define NTRU_PRFKEYBYTES 32
#define NTRU_SHAREDKEYBYTES 32
#define NTRU_SAMPLE_IID_BYTES (NTRU_N-1)
#define NTRU_SAMPLE_FG_BYTES (2*NTRU_SAMPLE_IID_BYTES)
#define NTRU_SAMPLE_RM_BYTES (2*NTRU_SAMPLE_IID_BYTES)
#define NTRU_PACK_DEG (NTRU_N-1)
#define NTRU_PACK_TRINARY_BYTES ((NTRU_PACK_DEG+4)/5)
#define NTRU_OWCPA_MSGBYTES (2*NTRU_PACK_TRINARY_BYTES)
#define NTRU_OWCPA_PUBLICKEYBYTES ((NTRU_LOGQ*NTRU_PACK_DEG+7)/8)
#define NTRU_OWCPA_SECRETKEYBYTES (2*NTRU_PACK_TRINARY_BYTES + NTRU_OWCPA_PUBLICKEYBYTES)
#define NTRU_OWCPA_BYTES ((NTRU_LOGQ*NTRU_PACK_DEG+7)/8)
#define NTRU_PUBLICKEYBYTES (NTRU_OWCPA_PUBLICKEYBYTES)
#define NTRU_SECRETKEYBYTES (NTRU_OWCPA_SECRETKEYBYTES + NTRU_PRFKEYBYTES)
#define NTRU_CIPHERTEXTBYTES (NTRU_OWCPA_BYTES)
#endif