Browse Source

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.
master
Mike Hamburg 10 years ago
parent
commit
46c2fb4a4a
4 changed files with 9 additions and 4 deletions
  1. +6
    -1
      include/goldilocks.h
  2. +1
    -1
      src/goldilocks.c
  3. +1
    -1
      src/include/config.h
  4. +1
    -1
      src/include/intrinsics.h

+ 6
- 1
include/goldilocks.h View File

@@ -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.
*


+ 1
- 1
src/goldilocks.c View File

@@ -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],


+ 1
- 1
src/include/config.h View File

@@ -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


+ 1
- 1
src/include/intrinsics.h View File

@@ -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 */


Loading…
Cancel
Save