aboutsummaryrefslogtreecommitdiff
path: root/src/Specific/solinas64_2e152m17
diff options
context:
space:
mode:
Diffstat (limited to 'src/Specific/solinas64_2e152m17')
-rwxr-xr-xsrc/Specific/solinas64_2e152m17/compiler.sh2
-rwxr-xr-xsrc/Specific/solinas64_2e152m17/compilerxx.sh2
-rw-r--r--src/Specific/solinas64_2e152m17/feadd.v14
-rw-r--r--src/Specific/solinas64_2e152m17/feaddDisplay.v4
-rw-r--r--src/Specific/solinas64_2e152m17/fesub.v14
-rw-r--r--src/Specific/solinas64_2e152m17/fesubDisplay.v4
6 files changed, 38 insertions, 2 deletions
diff --git a/src/Specific/solinas64_2e152m17/compiler.sh b/src/Specific/solinas64_2e152m17/compiler.sh
index 77ae53903..f4360de18 100755
--- a/src/Specific/solinas64_2e152m17/compiler.sh
+++ b/src/Specific/solinas64_2e152m17/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='4' -Dmodulus_bytes_val='38' -Dlimb_t=uint64_t -Dlimb_weight_gaps_array='{38,38,38,38}' -Dmodulus_array='{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef}' -Dq_mpz='(1_mpz<<152) - 17' "$@"
+gcc -march=native -mtune=native -std=gnu11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Dmodulus_bytes_val='38' -Dlimb_t=uint64_t -Dq_mpz='(1_mpz<<152) - 17' -Dmodulus_limbs='4' -Dlimb_weight_gaps_array='{38,38,38,38}' -Dmodulus_array='{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef}' "$@"
diff --git a/src/Specific/solinas64_2e152m17/compilerxx.sh b/src/Specific/solinas64_2e152m17/compilerxx.sh
index 24defe89d..0ca6cb609 100755
--- a/src/Specific/solinas64_2e152m17/compilerxx.sh
+++ b/src/Specific/solinas64_2e152m17/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='4' -Dmodulus_bytes_val='38' -Dlimb_t=uint64_t -Dlimb_weight_gaps_array='{38,38,38,38}' -Dmodulus_array='{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef}' -Dq_mpz='(1_mpz<<152) - 17' "$@"
+g++ -march=native -mtune=native -std=gnu++11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Dmodulus_bytes_val='38' -Dlimb_t=uint64_t -Dq_mpz='(1_mpz<<152) - 17' -Dmodulus_limbs='4' -Dlimb_weight_gaps_array='{38,38,38,38}' -Dmodulus_array='{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xef}' "$@"
diff --git a/src/Specific/solinas64_2e152m17/feadd.v b/src/Specific/solinas64_2e152m17/feadd.v
new file mode 100644
index 000000000..de16d04fd
--- /dev/null
+++ b/src/Specific/solinas64_2e152m17/feadd.v
@@ -0,0 +1,14 @@
+Require Import Crypto.Arithmetic.PrimeFieldTheorems.
+Require Import Crypto.Specific.solinas64_2e152m17.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/solinas64_2e152m17/feaddDisplay.v b/src/Specific/solinas64_2e152m17/feaddDisplay.v
new file mode 100644
index 000000000..0e118ac7c
--- /dev/null
+++ b/src/Specific/solinas64_2e152m17/feaddDisplay.v
@@ -0,0 +1,4 @@
+Require Import Crypto.Specific.solinas64_2e152m17.feadd.
+Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon.
+
+Check display add.
diff --git a/src/Specific/solinas64_2e152m17/fesub.v b/src/Specific/solinas64_2e152m17/fesub.v
new file mode 100644
index 000000000..7903d659a
--- /dev/null
+++ b/src/Specific/solinas64_2e152m17/fesub.v
@@ -0,0 +1,14 @@
+Require Import Crypto.Arithmetic.PrimeFieldTheorems.
+Require Import Crypto.Specific.solinas64_2e152m17.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/solinas64_2e152m17/fesubDisplay.v b/src/Specific/solinas64_2e152m17/fesubDisplay.v
new file mode 100644
index 000000000..03ca43e26
--- /dev/null
+++ b/src/Specific/solinas64_2e152m17/fesubDisplay.v
@@ -0,0 +1,4 @@
+Require Import Crypto.Specific.solinas64_2e152m17.fesub.
+Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon.
+
+Check display sub.