Unverified Commit d678c939 authored by Sofia Celi's avatar Sofia Celi
Browse files

Get rid of 'SIGMA_ISOGENY' and 'IMAGINE_TWIST' values #1

parent f1cb889a
......@@ -26,7 +26,6 @@
#define scalar_t API_NS(scalar_t)
#define point_t API_NS(point_t)
#define precomputed_s API_NS(precomputed_s)
#define IMAGINE_TWIST 0
#define COFACTOR 4
/* Comb config: number of combs, n, t, s. */
......@@ -37,8 +36,6 @@
#define GOLDILOCKS_WNAF_FIXED_TABLE_BITS 5
#define GOLDILOCKS_WNAF_VAR_TABLE_BITS 3
#define EDDSA_USE_SIGMA_ISOGENY 0
static const int EDWARDS_D = -39081;
static const scalar_t point_scalarmul_adjustment = {{{
SC_LIMB(0xc873d6d54a7bb0cf), SC_LIMB(0xe933d8d723a70aad), SC_LIMB(0xbb124b65129c96fd), SC_LIMB(0x00000008335dc163)
......@@ -676,20 +673,10 @@ goldilocks_bool_t API_NS(point_eq) ( const point_t p, const point_t q ) {
gf_mul ( b, q->y, p->x );
mask_t succ = gf_eq(a,b);
#if (COFACTOR == 8) && IMAGINE_TWIST
/* this should be removed too */
#if (COFACTOR == 8)
gf_mul ( a, p->y, q->y );
gf_mul ( b, q->x, p->x );
/* this is a very odd case to check */
#if !(IMAGINE_TWIST)
gf_sub ( a, ZERO, a );
#else
/* Interesting note: the 4tor would normally be rotation.
* But because of the *i twist, it's actually
* (x,y) <-> (iy,ix)
*/
/* No code, just a comment. */
#endif
succ |= gf_eq(a,b);
#endif
......
......@@ -98,9 +98,6 @@ for curve,data in curve_data.items():
if "cxx_ns" not in data:
data["cxx_ns"] = data["name"].replace("-","")
if "eddsa_sigma_iso" not in data:
data["eddsa_sigma_iso"] = 0
if "rist_base_decoded" not in data:
def xord(x):
if isinstance(x,str): return ord(x)
......
......@@ -15,7 +15,6 @@
#define scalar_t API_NS(scalar_t)
#define point_t API_NS(point_t)
#define precomputed_s API_NS(precomputed_s)
#define IMAGINE_TWIST $(imagine_twist)
#define COFACTOR $(cofactor)
/* Comb config: number of combs, n, t, s. */
......@@ -26,8 +25,6 @@
#define GOLDILOCKS_WNAF_FIXED_TABLE_BITS $(wnaf.fixed)
#define GOLDILOCKS_WNAF_VAR_TABLE_BITS $(wnaf.var)
#define EDDSA_USE_SIGMA_ISOGENY $(eddsa_sigma_iso)
static const int EDWARDS_D = $(d);
static const scalar_t point_scalarmul_adjustment = {{{
$(ser((2**(scalar_bits-1+window_bits - ((scalar_bits-1)%window_bits)) - 1) % q,64,"SC_LIMB"))
......@@ -665,20 +662,10 @@ goldilocks_bool_t API_NS(point_eq) ( const point_t p, const point_t q ) {
gf_mul ( b, q->y, p->x );
mask_t succ = gf_eq(a,b);
#if (COFACTOR == 8) && IMAGINE_TWIST
/* this should be removed too */
#if (COFACTOR == 8)
gf_mul ( a, p->y, q->y );
gf_mul ( b, q->x, p->x );
/* this is a very odd case to check */
#if !(IMAGINE_TWIST)
gf_sub ( a, ZERO, a );
#else
/* Interesting note: the 4tor would normally be rotation.
* But because of the *i twist, it's actually
* (x,y) <-> (iy,ix)
*/
/* No code, just a comment. */
#endif
succ |= gf_eq(a,b);
#endif
......
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