Ver a proveniência

clear an include ordering fixme

master
Michael Hamburg há 8 anos
ascendente
cometimento
36b54ca3db
4 ficheiros alterados com 8 adições e 13 eliminações
  1. +1
    -4
      src/p25519/arch_ref64/f_impl.h
  2. +1
    -7
      src/p25519/arch_x86_64/f_impl.h
  3. +3
    -2
      src/public_include/decaf/decaf_255.h
  4. +3
    -0
      src/public_include/decaf/decaf_448.h

+ 1
- 4
src/p25519/arch_ref64/f_impl.h Ver ficheiro

@@ -8,12 +8,9 @@
#include <assert.h>
#include <string.h>

#include "decaf/decaf_255.h"
#include "word.h"

typedef struct gf_25519_s {
uint64_t limb[5];
} gf_25519_s, gf_25519_t[1];

#define LBITS 51
#define FIELD_LITERAL(a,b,c,d,e) {{ a,b,c,d,e }}



+ 1
- 7
src/p25519/arch_x86_64/f_impl.h Ver ficheiro

@@ -8,15 +8,9 @@
#include <assert.h>
#include <string.h>

#include "decaf/decaf_255.h"
#include "word.h"

#ifndef __DECAF_255_H__ // HACK FIXME
#define DECAF_WORD_BITS 64
typedef struct gf_25519_s {
uint64_t limb[5];
} gf_25519_s, gf_25519_t[1];
#endif

#define LBITS 51
#define FIELD_LITERAL(a,b,c,d,e) {{ a,b,c,d,e }}



+ 3
- 2
src/public_include/decaf/decaf_255.h Ver ficheiro

@@ -21,13 +21,14 @@ extern "C" {
#define DECAF_255_SCALAR_BITS 254 // Curve25519: 253
#define DECAF_255_SCALAR_LIMBS (256/DECAF_WORD_BITS)

#ifndef __DECAF_GF_ALREADY_DEFINED__
#ifndef __DECAF_255_GF_DEFINED__
#define __DECAF_255_GF_DEFINED__ 1
/** Galois field element internal structure */
typedef struct gf_25519_s {
decaf_word_t limb[DECAF_255_LIMBS];
} gf_25519_s, gf_25519_t[1];
/** @endcond */
#endif /* __DECAF_GF_ALREADY_DEFINED__ */
#endif /* __DECAF_255_GF_DEFINED__ */

/** Number of bytes in a serialized point. */
#define DECAF_255_SER_BYTES 32


+ 3
- 0
src/public_include/decaf/decaf_448.h Ver ficheiro

@@ -22,9 +22,12 @@ extern "C" {
#define DECAF_448_SCALAR_LIMBS (448/DECAF_WORD_BITS)

/** Galois field element internal structure */
#ifndef __DECAF_448_GF_DEFINED__
#define __DECAF_448_GF_DEFINED__ 1
typedef struct gf_448_s {
decaf_word_t limb[DECAF_448_LIMBS];
} __attribute__((aligned(32))) gf_448_s, gf_448_t[1];
#endif /* __DECAF_448_GF_DEFINED__ */
/** @endcond */

/** Number of bytes in a serialized point. */


Carregando…
Cancelar
Guardar