From c7daa6d74b6802da4b34d7888784f4a166380b04 Mon Sep 17 00:00:00 2001 From: Mike Hamburg Date: Tue, 3 Mar 2015 12:30:19 -0800 Subject: [PATCH] going to change this branch to be decaf-only, with the main branch being main-goldilocks-only. but first, remove irrelelevant sqrt(-d) --- src/include/magic.h | 5 ----- src/p448/magic.c | 19 ------------------- src/p480/magic.c | 14 +------------- src/p521/magic.c | 28 ---------------------------- 4 files changed, 1 insertion(+), 65 deletions(-) diff --git a/src/include/magic.h b/src/include/magic.h index 2c83fcc..1d186f2 100644 --- a/src/include/magic.h +++ b/src/include/magic.h @@ -47,11 +47,6 @@ */ extern const field_a_t sqrt_d_minus_1; -/** - * @brief sqrt(-d), used for point formats and twisting. - */ -extern const field_a_t sqrt_minus_d; - /** * @brief The base point for Goldilocks. */ diff --git a/src/p448/magic.c b/src/p448/magic.c index 0e632c8..74b433c 100644 --- a/src/p448/magic.c +++ b/src/p448/magic.c @@ -79,22 +79,3 @@ sqrt_d_minus_1 = {{{ U56LE(0x12fec0c0b25b7a) #endif }}}; - -const field_a_t -sqrt_minus_d = {{{ -#ifdef USE_NEON_PERM - 0x5572736,0x4a2d780,0x42ef0f4,0xb8d54b6, - 0x0ce5296,0x1a7b8a5,0x7bf6aa2,0x6aa0a1f, - 0xed26033,0xd722fa2,0xf4fd6ed,0x683bf68, - 0xa839a66,0xbeb24f7,0x968c14b,0x22d962f -#else - U56LE(0x42ef0f45572736), - U56LE(0x7bf6aa20ce5296), - U56LE(0xf4fd6eded26033), - U56LE(0x968c14ba839a66), - U56LE(0xb8d54b64a2d780), - U56LE(0x6aa0a1f1a7b8a5), - U56LE(0x683bf68d722fa2), - U56LE(0x22d962fbeb24f7) -#endif -}}}; diff --git a/src/p480/magic.c b/src/p480/magic.c index ddfe958..be209b1 100644 --- a/src/p480/magic.c +++ b/src/p480/magic.c @@ -65,16 +65,4 @@ const struct barrett_prime_t curve_prime_order = { const field_a_t sqrt_d_minus_1 = {{{ 232 /* Whoa, it comes out even. */ -}}}; - -const field_a_t -sqrt_minus_d = {{{ - U60LE(0xf098fba8d880ec0), - U60LE(0x9d6ea1b2774d3e9), - U60LE(0x1a52c44c0154b38), - U60LE(0x9a7d2310c583efd), - U60LE(0xb548ed7aec18f2d), - U60LE(0xb9d4b5edcfee721), - U60LE(0x65275d687c7215d), - U60LE(0x3458ffa5bbfdea5) -}}}; +}}}; \ No newline at end of file diff --git a/src/p521/magic.c b/src/p521/magic.c index d884f5e..4613958 100644 --- a/src/p521/magic.c +++ b/src/p521/magic.c @@ -109,31 +109,3 @@ sqrt_d_minus_1 = {{{ U58LE(0x0a9ea3ac10d6aed) #endif }}}; - -const field_a_t -sqrt_minus_d = {{{ -#ifdef USE_P521_3x3_TRANSPOSE - U58LE(0x375d668ef98910e), - U58LE(0x2e033a89e955dfc), - U58LE(0x11539170515b2da), - 0, - U58LE(0x1d88a078877dc00), - U58LE(0x38dac4db4b0312c), - U58LE(0x009993c0e8ee528), - 0, - U58LE(0x34829cd5d7c1584), - U58LE(0x2c688534aa9c317), - U58LE(0x0d07656ee612ae6), - 0 -#else - U58LE(0x375d668ef98910e), - U58LE(0x1d88a078877dc00), - U58LE(0x34829cd5d7c1584), - U58LE(0x2e033a89e955dfc), - U58LE(0x38dac4db4b0312c), - U58LE(0x2c688534aa9c317), - U58LE(0x11539170515b2da), - U58LE(0x009993c0e8ee528), - U58LE(0x0d07656ee612ae6) -#endif -}}};