Browse Source

Add missing FIELD_LITERAL for RISTRETTO_FACTOR

master
Olivier Chéron 7 years ago
parent
commit
c811f7809a
3 changed files with 6 additions and 6 deletions
  1. +2
    -2
      src/GENERATED/c/curve25519/decaf.c
  2. +2
    -2
      src/GENERATED/c/ed448goldilocks/decaf.c
  3. +2
    -2
      src/per_curve/decaf.tmpl.c

+ 2
- 2
src/GENERATED/c/curve25519/decaf.c View File

@@ -49,9 +49,9 @@ static const scalar_t point_scalarmul_adjustment = {{{
const uint8_t decaf_x25519_base_point[DECAF_X25519_PUBLIC_BYTES] = { 0x09 };

#define RISTRETTO_FACTOR DECAF_255_RISTRETTO_FACTOR
const gf RISTRETTO_FACTOR = {{{
const gf RISTRETTO_FACTOR = {FIELD_LITERAL(
0x702557fa2bf03, 0x514b7d1a82cc6, 0x7f89efd8b43a7, 0x1aef49ec23700, 0x079376fa30500
}}};
)};

#if IMAGINE_TWIST
#define TWISTED_D (-(EDWARDS_D))


+ 2
- 2
src/GENERATED/c/ed448goldilocks/decaf.c View File

@@ -49,9 +49,9 @@ static const scalar_t point_scalarmul_adjustment = {{{
const uint8_t decaf_x448_base_point[DECAF_X448_PUBLIC_BYTES] = { 0x05 };

#define RISTRETTO_FACTOR DECAF_448_RISTRETTO_FACTOR
const gf RISTRETTO_FACTOR = {{{
const gf RISTRETTO_FACTOR = {FIELD_LITERAL(
0x42ef0f45572736, 0x7bf6aa20ce5296, 0xf4fd6eded26033, 0x968c14ba839a66, 0xb8d54b64a2d780, 0x6aa0a1f1a7b8a5, 0x683bf68d722fa2, 0x22d962fbeb24f7
}}};
)};

#if IMAGINE_TWIST
#define TWISTED_D (-(EDWARDS_D))


+ 2
- 2
src/per_curve/decaf.tmpl.c View File

@@ -38,9 +38,9 @@ static const scalar_t point_scalarmul_adjustment = {{{
const uint8_t decaf_x$(gf_shortname)_base_point[DECAF_X$(gf_shortname)_PUBLIC_BYTES] = { $(ser(mont_base,8)) };

#define RISTRETTO_FACTOR $(C_NS)_RISTRETTO_FACTOR
const gf RISTRETTO_FACTOR = {{{
const gf RISTRETTO_FACTOR = {FIELD_LITERAL(
$(ser(msqrt(d-1 if imagine_twist else -d,modulus,hi_bit_clear=True),gf_lit_limb_bits))
}}};
)};

#if IMAGINE_TWIST
#define TWISTED_D (-(EDWARDS_D))


Loading…
Cancel
Save