Commit 46c2fb4a authored by Mike Hamburg's avatar Mike Hamburg
Browse files

A few adjustments on contributed patches.

Undo the INTRINSIC changes from David Leon Gil.

Turn precomputed keys back on by default.  Change #ifdef to #if for checking sigs.
parent a941e639
......@@ -17,6 +17,11 @@
#define GOLDI_IMPLEMENT_PRECOMPUTED_KEYS 1
#endif
#ifndef GOLDI_IMPLEMENT_SIGNATURES
/** If nonzero, implement signatures. */
#define GOLDI_IMPLEMENT_SIGNATURES 1
#endif
/** The size of the Goldilocks field, in bits. */
#define GOLDI_FIELD_BITS 448
......@@ -207,7 +212,7 @@ goldilocks_shared_secret (
const struct goldilocks_public_key_t *your_pubkey
) __attribute__((warn_unused_result,nonnull(1,2,3),visibility ("default")));
#ifdef GOLDI_IMPLEMENT_SIGNATURES
#if GOLDI_IMPLEMENT_SIGNATURES
/**
* @brief Sign a message.
*
......
......@@ -306,7 +306,7 @@ goldilocks_shared_secret (
);
}
#ifdef GOLDI_IMPLEMENT_SIGNATURES
#if GOLDI_IMPLEMENT_SIGNATURES
static void
goldilocks_derive_challenge(
word_t challenge[GOLDI_FIELD_WORDS],
......
......@@ -65,7 +65,7 @@
* @brief Whether or not to define and implement functions
* 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
......
......@@ -19,7 +19,7 @@
/** @brief Macro to make a function static, forcibly inlined and possibly unused. */
#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 SSE2 2 /**< @brief Machine supports SSE2 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment