From 631e3c7dca28f754f997f9d079d6900d76b8430e Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Thu, 2 Nov 2017 04:37:37 -0400 Subject: python3 generate_parameters.py primes.txt; (cd src/Specific/CurveParameters/; ./remake_curves.sh -f) --- src/Specific/solinas32_2e166m5/compiler.sh | 2 +- src/Specific/solinas32_2e166m5/compilerxx.sh | 2 +- src/Specific/solinas32_2e166m5/feadd.v | 14 ++++++++++++++ src/Specific/solinas32_2e166m5/feaddDisplay.v | 4 ++++ src/Specific/solinas32_2e166m5/fesub.v | 14 ++++++++++++++ src/Specific/solinas32_2e166m5/fesubDisplay.v | 4 ++++ 6 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 src/Specific/solinas32_2e166m5/feadd.v create mode 100644 src/Specific/solinas32_2e166m5/feaddDisplay.v create mode 100644 src/Specific/solinas32_2e166m5/fesub.v create mode 100644 src/Specific/solinas32_2e166m5/fesubDisplay.v (limited to 'src/Specific/solinas32_2e166m5') diff --git a/src/Specific/solinas32_2e166m5/compiler.sh b/src/Specific/solinas32_2e166m5/compiler.sh index f67cce41b..c5e7b153b 100755 --- a/src/Specific/solinas32_2e166m5/compiler.sh +++ b/src/Specific/solinas32_2e166m5/compiler.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -gcc -march=native -mtune=native -std=gnu11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Dmodulus_limbs='11' -Dmodulus_bytes_val='15 + 1/11' -Dlimb_t=uint32_t -Dlimb_weight_gaps_array='{16,15,15,15,15,15,15,15,15,15,15}' -Dmodulus_array='{0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb}' -Dq_mpz='(1_mpz<<166) - 5' "$@" +gcc -march=native -mtune=native -std=gnu11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Dmodulus_bytes_val='15 + 1/11' -Dlimb_t=uint32_t -Dq_mpz='(1_mpz<<166) - 5' -Dmodulus_limbs='11' -Dlimb_weight_gaps_array='{16,15,15,15,15,15,15,15,15,15,15}' -Dmodulus_array='{0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb}' "$@" diff --git a/src/Specific/solinas32_2e166m5/compilerxx.sh b/src/Specific/solinas32_2e166m5/compilerxx.sh index 8165f5b2b..012ee5dd8 100755 --- a/src/Specific/solinas32_2e166m5/compilerxx.sh +++ b/src/Specific/solinas32_2e166m5/compilerxx.sh @@ -1,4 +1,4 @@ #!/bin/sh set -eu -g++ -march=native -mtune=native -std=gnu++11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Dmodulus_limbs='11' -Dmodulus_bytes_val='15 + 1/11' -Dlimb_t=uint32_t -Dlimb_weight_gaps_array='{16,15,15,15,15,15,15,15,15,15,15}' -Dmodulus_array='{0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb}' -Dq_mpz='(1_mpz<<166) - 5' "$@" +g++ -march=native -mtune=native -std=gnu++11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Dmodulus_bytes_val='15 + 1/11' -Dlimb_t=uint32_t -Dq_mpz='(1_mpz<<166) - 5' -Dmodulus_limbs='11' -Dlimb_weight_gaps_array='{16,15,15,15,15,15,15,15,15,15,15}' -Dmodulus_array='{0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb}' "$@" diff --git a/src/Specific/solinas32_2e166m5/feadd.v b/src/Specific/solinas32_2e166m5/feadd.v new file mode 100644 index 000000000..179175820 --- /dev/null +++ b/src/Specific/solinas32_2e166m5/feadd.v @@ -0,0 +1,14 @@ +Require Import Crypto.Arithmetic.PrimeFieldTheorems. +Require Import Crypto.Specific.solinas32_2e166m5.Synthesis. + +(* TODO : change this to field once field isomorphism happens *) +Definition add : + { add : feBW_tight -> feBW_tight -> feBW_loose + | forall a b, phiBW_loose (add a b) = F.add (phiBW_tight a) (phiBW_tight b) }. +Proof. + Set Ltac Profiling. + Time synthesize_add (). + Show Ltac Profile. +Time Defined. + +Print Assumptions add. diff --git a/src/Specific/solinas32_2e166m5/feaddDisplay.v b/src/Specific/solinas32_2e166m5/feaddDisplay.v new file mode 100644 index 000000000..6c245008e --- /dev/null +++ b/src/Specific/solinas32_2e166m5/feaddDisplay.v @@ -0,0 +1,4 @@ +Require Import Crypto.Specific.solinas32_2e166m5.feadd. +Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. + +Check display add. diff --git a/src/Specific/solinas32_2e166m5/fesub.v b/src/Specific/solinas32_2e166m5/fesub.v new file mode 100644 index 000000000..16541f81c --- /dev/null +++ b/src/Specific/solinas32_2e166m5/fesub.v @@ -0,0 +1,14 @@ +Require Import Crypto.Arithmetic.PrimeFieldTheorems. +Require Import Crypto.Specific.solinas32_2e166m5.Synthesis. + +(* TODO : change this to field once field isomorphism happens *) +Definition sub : + { sub : feBW_tight -> feBW_tight -> feBW_loose + | forall a b, phiBW_loose (sub a b) = F.sub (phiBW_tight a) (phiBW_tight b) }. +Proof. + Set Ltac Profiling. + Time synthesize_sub (). + Show Ltac Profile. +Time Defined. + +Print Assumptions sub. diff --git a/src/Specific/solinas32_2e166m5/fesubDisplay.v b/src/Specific/solinas32_2e166m5/fesubDisplay.v new file mode 100644 index 000000000..64b1103f9 --- /dev/null +++ b/src/Specific/solinas32_2e166m5/fesubDisplay.v @@ -0,0 +1,4 @@ +Require Import Crypto.Specific.solinas32_2e166m5.fesub. +Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. + +Check display sub. -- cgit v1.2.3