From e18f56add80534fba83a009990eab3917a25b834 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Fri, 3 Nov 2017 12:26:42 -0400 Subject: python3 generate_parameters.py primes.txt; (cd src/Specific/CurveParameters/; ./remake_curves.sh -f) --- src/Specific/montgomery64_2e285m9/compiler.sh | 2 +- src/Specific/montgomery64_2e285m9/compilerxx.sh | 2 +- src/Specific/montgomery64_2e285m9/fesquare.c | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/Specific/montgomery64_2e285m9/fesquare.c (limited to 'src/Specific/montgomery64_2e285m9') diff --git a/src/Specific/montgomery64_2e285m9/compiler.sh b/src/Specific/montgomery64_2e285m9/compiler.sh index 343be6877..49863e565 100755 --- a/src/Specific/montgomery64_2e285m9/compiler.sh +++ b/src/Specific/montgomery64_2e285m9/compiler.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -gcc -fno-peephole2 `#GCC BUG 81300` -march=native -mtune=native -std=gnu11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Wno-incompatible-pointer-types -fno-strict-aliasing -Dlimb_weight_gaps_array='{64,64,64,64,64}' -Dq_mpz='(1_mpz<<285) - 9' -Dlimb_t=uint64_t -Dmodulus_bytes_val='36' -Dmodulus_limbs='5' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}' -Dmodulus_array='{0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7}' "$@" +gcc -fno-peephole2 `#GCC BUG 81300` -march=native -mtune=native -std=gnu11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Wno-incompatible-pointer-types -fno-strict-aliasing -Dmodulus_array='{0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7}' -Da24_val='12345' -Dlimb_weight_gaps_array='{64,64,64,64,64}' -Dq_mpz='(1_mpz<<285) - 9' -Da24_hex='0x3039' -Dlimb_t=uint64_t -Dmodulus_limbs='5' -Dmodulus_bytes_val='36' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}' "$@" diff --git a/src/Specific/montgomery64_2e285m9/compilerxx.sh b/src/Specific/montgomery64_2e285m9/compilerxx.sh index a636edb66..9ca3e4748 100755 --- a/src/Specific/montgomery64_2e285m9/compilerxx.sh +++ b/src/Specific/montgomery64_2e285m9/compilerxx.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -g++ -fno-peephole2 `#GCC BUG 81300` -march=native -mtune=native -std=gnu++11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -fno-strict-aliasing -Dlimb_weight_gaps_array='{64,64,64,64,64}' -Dq_mpz='(1_mpz<<285) - 9' -Dlimb_t=uint64_t -Dmodulus_bytes_val='36' -Dmodulus_limbs='5' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}' -Dmodulus_array='{0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7}' "$@" +g++ -fno-peephole2 `#GCC BUG 81300` -march=native -mtune=native -std=gnu++11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -fno-strict-aliasing -Dmodulus_array='{0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7}' -Da24_val='12345' -Dlimb_weight_gaps_array='{64,64,64,64,64}' -Dq_mpz='(1_mpz<<285) - 9' -Da24_hex='0x3039' -Dlimb_t=uint64_t -Dmodulus_limbs='5' -Dmodulus_bytes_val='36' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}' "$@" diff --git a/src/Specific/montgomery64_2e285m9/fesquare.c b/src/Specific/montgomery64_2e285m9/fesquare.c new file mode 100644 index 000000000..7bd8db166 --- /dev/null +++ b/src/Specific/montgomery64_2e285m9/fesquare.c @@ -0,0 +1,5 @@ +/* WARNING: This file was copied from Specific/CurveParameters/montgomery64/fesquare.c. + If you edit it here, changes will be erased the next time remake_curves.sh is run. */ +static void fesquare(uint64_t *out, const uint64_t *in) { + femul(out, in, in); +} -- cgit v1.2.3