diff options
author | 2017-11-02 04:37:37 -0400 | |
---|---|---|
committer | 2017-11-02 04:37:37 -0400 | |
commit | 631e3c7dca28f754f997f9d079d6900d76b8430e (patch) | |
tree | a587aae695cb8e27cbe63f10928c12ccf9c56799 /src/Specific/solinas32_2e266m3 | |
parent | c1a11d3b06cd984099e00a298b087f3a67855474 (diff) |
python3 generate_parameters.py primes.txt; (cd src/Specific/CurveParameters/; ./remake_curves.sh -f)
Diffstat (limited to 'src/Specific/solinas32_2e266m3')
-rwxr-xr-x | src/Specific/solinas32_2e266m3/compiler.sh | 2 | ||||
-rwxr-xr-x | src/Specific/solinas32_2e266m3/compilerxx.sh | 2 | ||||
-rw-r--r-- | src/Specific/solinas32_2e266m3/feadd.v | 14 | ||||
-rw-r--r-- | src/Specific/solinas32_2e266m3/feaddDisplay.v | 4 | ||||
-rw-r--r-- | src/Specific/solinas32_2e266m3/fesub.v | 14 | ||||
-rw-r--r-- | src/Specific/solinas32_2e266m3/fesubDisplay.v | 4 |
6 files changed, 38 insertions, 2 deletions
diff --git a/src/Specific/solinas32_2e266m3/compiler.sh b/src/Specific/solinas32_2e266m3/compiler.sh index d18701fb3..410eed563 100755 --- a/src/Specific/solinas32_2e266m3/compiler.sh +++ b/src/Specific/solinas32_2e266m3/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='12' -Dmodulus_bytes_val='22 + 1/6' -Dlimb_t=uint32_t -Dlimb_weight_gaps_array='{23,22,22,22,22,22,23,22,22,22,22,22}' -Dmodulus_array='{0x03,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,0xfd}' -Dq_mpz='(1_mpz<<266) - 3' "$@" +gcc -march=native -mtune=native -std=gnu11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Dmodulus_bytes_val='22 + 1/6' -Dlimb_t=uint32_t -Dq_mpz='(1_mpz<<266) - 3' -Dmodulus_limbs='12' -Dlimb_weight_gaps_array='{23,22,22,22,22,22,23,22,22,22,22,22}' -Dmodulus_array='{0x03,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,0xfd}' "$@" diff --git a/src/Specific/solinas32_2e266m3/compilerxx.sh b/src/Specific/solinas32_2e266m3/compilerxx.sh index 0bb65f8c8..4bfdd5b5e 100755 --- a/src/Specific/solinas32_2e266m3/compilerxx.sh +++ b/src/Specific/solinas32_2e266m3/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='12' -Dmodulus_bytes_val='22 + 1/6' -Dlimb_t=uint32_t -Dlimb_weight_gaps_array='{23,22,22,22,22,22,23,22,22,22,22,22}' -Dmodulus_array='{0x03,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,0xfd}' -Dq_mpz='(1_mpz<<266) - 3' "$@" +g++ -march=native -mtune=native -std=gnu++11 -O3 -flto -fomit-frame-pointer -fwrapv -Wno-attributes -Dmodulus_bytes_val='22 + 1/6' -Dlimb_t=uint32_t -Dq_mpz='(1_mpz<<266) - 3' -Dmodulus_limbs='12' -Dlimb_weight_gaps_array='{23,22,22,22,22,22,23,22,22,22,22,22}' -Dmodulus_array='{0x03,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,0xfd}' "$@" diff --git a/src/Specific/solinas32_2e266m3/feadd.v b/src/Specific/solinas32_2e266m3/feadd.v new file mode 100644 index 000000000..0c315c427 --- /dev/null +++ b/src/Specific/solinas32_2e266m3/feadd.v @@ -0,0 +1,14 @@ +Require Import Crypto.Arithmetic.PrimeFieldTheorems. +Require Import Crypto.Specific.solinas32_2e266m3.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_2e266m3/feaddDisplay.v b/src/Specific/solinas32_2e266m3/feaddDisplay.v new file mode 100644 index 000000000..c1edfbe41 --- /dev/null +++ b/src/Specific/solinas32_2e266m3/feaddDisplay.v @@ -0,0 +1,4 @@ +Require Import Crypto.Specific.solinas32_2e266m3.feadd. +Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. + +Check display add. diff --git a/src/Specific/solinas32_2e266m3/fesub.v b/src/Specific/solinas32_2e266m3/fesub.v new file mode 100644 index 000000000..80414860a --- /dev/null +++ b/src/Specific/solinas32_2e266m3/fesub.v @@ -0,0 +1,14 @@ +Require Import Crypto.Arithmetic.PrimeFieldTheorems. +Require Import Crypto.Specific.solinas32_2e266m3.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_2e266m3/fesubDisplay.v b/src/Specific/solinas32_2e266m3/fesubDisplay.v new file mode 100644 index 000000000..9d8c29c50 --- /dev/null +++ b/src/Specific/solinas32_2e266m3/fesubDisplay.v @@ -0,0 +1,4 @@ +Require Import Crypto.Specific.solinas32_2e266m3.fesub. +Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. + +Check display sub. |