Undo the INTRINSIC changes from David Leon Gil. Turn precomputed keys back on by default. Change #ifdef to #if for checking sigs.master
@@ -17,6 +17,11 @@ | |||||
#define GOLDI_IMPLEMENT_PRECOMPUTED_KEYS 1 | #define GOLDI_IMPLEMENT_PRECOMPUTED_KEYS 1 | ||||
#endif | #endif | ||||
#ifndef GOLDI_IMPLEMENT_SIGNATURES | |||||
/** If nonzero, implement signatures. */ | |||||
#define GOLDI_IMPLEMENT_SIGNATURES 1 | |||||
#endif | |||||
/** The size of the Goldilocks field, in bits. */ | /** The size of the Goldilocks field, in bits. */ | ||||
#define GOLDI_FIELD_BITS 448 | #define GOLDI_FIELD_BITS 448 | ||||
@@ -207,7 +212,7 @@ goldilocks_shared_secret ( | |||||
const struct goldilocks_public_key_t *your_pubkey | const struct goldilocks_public_key_t *your_pubkey | ||||
) __attribute__((warn_unused_result,nonnull(1,2,3),visibility ("default"))); | ) __attribute__((warn_unused_result,nonnull(1,2,3),visibility ("default"))); | ||||
#ifdef GOLDI_IMPLEMENT_SIGNATURES | |||||
#if GOLDI_IMPLEMENT_SIGNATURES | |||||
/** | /** | ||||
* @brief Sign a message. | * @brief Sign a message. | ||||
* | * | ||||
@@ -306,7 +306,7 @@ goldilocks_shared_secret ( | |||||
); | ); | ||||
} | } | ||||
#ifdef GOLDI_IMPLEMENT_SIGNATURES | |||||
#if GOLDI_IMPLEMENT_SIGNATURES | |||||
static void | static void | ||||
goldilocks_derive_challenge( | goldilocks_derive_challenge( | ||||
word_t challenge[GOLDI_FIELD_WORDS], | word_t challenge[GOLDI_FIELD_WORDS], | ||||
@@ -65,7 +65,7 @@ | |||||
* @brief Whether or not to define and implement functions | * @brief Whether or not to define and implement functions | ||||
* working with pre-computed keys. | * working with pre-computed keys. | ||||
*/ | */ | ||||
#define GOLDI_IMPLEMENT_PRECOMPUTED_KEYS 0 | |||||
#define GOLDI_IMPLEMENT_PRECOMPUTED_KEYS 1 | |||||
/** | /** | ||||
* @brief ECDH adds public keys into the hash, to prevent | * @brief ECDH adds public keys into the hash, to prevent | ||||
@@ -19,7 +19,7 @@ | |||||
/** @brief Macro to make a function static, forcibly inlined and possibly unused. */ | /** @brief Macro to make a function static, forcibly inlined and possibly unused. */ | ||||
#define INTRINSIC \ | #define INTRINSIC \ | ||||
static inline __attribute__((__gnu_inline__, __always_inline__)) | |||||
static __inline__ __attribute__((__gnu_inline__, __always_inline__, unused)) | |||||
#define GEN 1 /**< @brief Intrinsics field has been generated. */ | #define GEN 1 /**< @brief Intrinsics field has been generated. */ | ||||
#define SSE2 2 /**< @brief Machine supports SSE2 */ | #define SSE2 2 /**< @brief Machine supports SSE2 */ | ||||