diff options
Diffstat (limited to 'src/lib/pubkey/newhope')
-rw-r--r-- | src/lib/pubkey/newhope/newhope.cpp | 4 | ||||
-rw-r--r-- | src/lib/pubkey/newhope/newhope.h | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/pubkey/newhope/newhope.cpp b/src/lib/pubkey/newhope/newhope.cpp index fac0c13f3..d367cc982 100644 --- a/src/lib/pubkey/newhope/newhope.cpp +++ b/src/lib/pubkey/newhope/newhope.cpp @@ -19,6 +19,7 @@ typedef newhope_poly poly; // Don't change this :) #define PARAM_Q 12289 +#define PARAM_N 1024 #define NEWHOPE_POLY_BYTES 1792 #define NEWHOPE_SEED_BYTES 32 @@ -604,3 +605,6 @@ void newhope_shareda(unsigned char *sharedkey, const poly *sk, const unsigned ch } } + +#undef PARAM_N +#undef PARAM_Q diff --git a/src/lib/pubkey/newhope/newhope.h b/src/lib/pubkey/newhope/newhope.h index 541b17481..189833f8d 100644 --- a/src/lib/pubkey/newhope/newhope.h +++ b/src/lib/pubkey/newhope/newhope.h @@ -9,8 +9,8 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#ifndef NEWHOPE_H -#define NEWHOPE_H +#ifndef BOTAN_NEWHOPE_H__ +#define BOTAN_NEWHOPE_H__ #include <botan/rng.h> @@ -21,13 +21,11 @@ namespace Botan { * Currently pubkey.h does not support a 2-phase KEM scheme of * the sort NEWHOPE exports. */ -#define PARAM_N 1024 - #define NEWHOPE_SENDABYTES 1824 #define NEWHOPE_SENDBBYTES 2048 typedef struct { - uint16_t coeffs[PARAM_N]; + uint16_t coeffs[1024]; } newhope_poly __attribute__ ((aligned (32))); |