aboutsummaryrefslogtreecommitdiff
path: root/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-11-03 12:26:42 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-11-03 12:26:42 -0400
commite18f56add80534fba83a009990eab3917a25b834 (patch)
treed6ab6b60f0ec77837dd6bb8919bda07e9d15b680 /src/Specific/montgomery32_2e256m2e224p2e192p2e96m1
parent3023b36389d67185786cb2537dad161d9ff630d5 (diff)
python3 generate_parameters.py primes.txt; (cd src/Specific/CurveParameters/; ./remake_curves.sh -f)
Diffstat (limited to 'src/Specific/montgomery32_2e256m2e224p2e192p2e96m1')
-rwxr-xr-xsrc/Specific/montgomery32_2e256m2e224p2e192p2e96m1/compiler.sh2
-rwxr-xr-xsrc/Specific/montgomery32_2e256m2e224p2e192p2e96m1/compilerxx.sh2
-rw-r--r--src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/fesquare.c5
3 files changed, 7 insertions, 2 deletions
diff --git a/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/compiler.sh b/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/compiler.sh
index 004992809..f14cd7dde 100755
--- a/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/compiler.sh
+++ b/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/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='{32,32,32,32,32,32,32,32}' -Dq_mpz='(1_mpz<<256) - (1_mpz<<224) + (1_mpz<<192) + (1_mpz<<96) - 1 ' -Dlimb_t=uint32_t -Dmodulus_bytes_val='32' -Dmodulus_limbs='8' -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,0x30,0x39}' -Dmodulus_array='{0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}' "$@"
+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='{0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}' -Da24_val='12345' -Dlimb_weight_gaps_array='{32,32,32,32,32,32,32,32}' -Dq_mpz='(1_mpz<<256) - (1_mpz<<224) + (1_mpz<<192) + (1_mpz<<96) - 1 ' -Da24_hex='0x3039' -Dlimb_t=uint32_t -Dmodulus_limbs='8' -Dmodulus_bytes_val='32' -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,0x30,0x39}' "$@"
diff --git a/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/compilerxx.sh b/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/compilerxx.sh
index a1998da5f..40045ba8c 100755
--- a/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/compilerxx.sh
+++ b/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/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='{32,32,32,32,32,32,32,32}' -Dq_mpz='(1_mpz<<256) - (1_mpz<<224) + (1_mpz<<192) + (1_mpz<<96) - 1 ' -Dlimb_t=uint32_t -Dmodulus_bytes_val='32' -Dmodulus_limbs='8' -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,0x30,0x39}' -Dmodulus_array='{0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}' "$@"
+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='{0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}' -Da24_val='12345' -Dlimb_weight_gaps_array='{32,32,32,32,32,32,32,32}' -Dq_mpz='(1_mpz<<256) - (1_mpz<<224) + (1_mpz<<192) + (1_mpz<<96) - 1 ' -Da24_hex='0x3039' -Dlimb_t=uint32_t -Dmodulus_limbs='8' -Dmodulus_bytes_val='32' -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,0x30,0x39}' "$@"
diff --git a/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/fesquare.c b/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/fesquare.c
new file mode 100644
index 000000000..e3345edfe
--- /dev/null
+++ b/src/Specific/montgomery32_2e256m2e224p2e192p2e96m1/fesquare.c
@@ -0,0 +1,5 @@
+/* WARNING: This file was copied from Specific/CurveParameters/montgomery32/fesquare.c.
+ If you edit it here, changes will be erased the next time remake_curves.sh is run. */
+static void fesquare(uint32_t *out, const uint32_t *in) {
+ femul(out, in, in);
+}