aboutsummaryrefslogtreecommitdiff
path: root/src/Specific/solinas64_2e216m2e108m1
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-10-21 23:43:59 -0400
committerGravatar Jason Gross <jasongross9@gmail.com>2017-10-22 00:20:52 -0400
commit102904674d12d1791f55a55cb66a334e5c21715a (patch)
treefec67713e46239561cd6386b15508c393ef5aa33 /src/Specific/solinas64_2e216m2e108m1
parent6c779ae1c2a2f4c798606ce3f7718768387f47a6 (diff)
Add tight and loose bounds, no carry in add, sub
Following Andres' suggestions to allow making ladderstep from other synthesis things. It went though mostly without a hitch, though there were a number of boilerplate changes needed.
Diffstat (limited to 'src/Specific/solinas64_2e216m2e108m1')
-rw-r--r--src/Specific/solinas64_2e216m2e108m1/CurveParameters.v3
-rw-r--r--src/Specific/solinas64_2e216m2e108m1/femul.v4
-rw-r--r--src/Specific/solinas64_2e216m2e108m1/fesquare.v4
-rw-r--r--src/Specific/solinas64_2e216m2e108m1/freeze.v4
4 files changed, 8 insertions, 7 deletions
diff --git a/src/Specific/solinas64_2e216m2e108m1/CurveParameters.v b/src/Specific/solinas64_2e216m2e108m1/CurveParameters.v
index fc0f08e45..9bd95fba4 100644
--- a/src/Specific/solinas64_2e216m2e108m1/CurveParameters.v
+++ b/src/Specific/solinas64_2e216m2e108m1/CurveParameters.v
@@ -27,7 +27,8 @@ Definition curve : CurveParameters :=
square_code := None;
- upper_bound_of_exponent := None;
+ upper_bound_of_exponent_loose := None;
+ upper_bound_of_exponent_tight := None;
allowable_bit_widths := None;
freeze_extra_allowable_bit_widths := None;
modinv_fuel := None
diff --git a/src/Specific/solinas64_2e216m2e108m1/femul.v b/src/Specific/solinas64_2e216m2e108m1/femul.v
index ee74263f8..103102556 100644
--- a/src/Specific/solinas64_2e216m2e108m1/femul.v
+++ b/src/Specific/solinas64_2e216m2e108m1/femul.v
@@ -3,8 +3,8 @@ Require Import Crypto.Specific.solinas64_2e216m2e108m1.Synthesis.
(* TODO : change this to field once field isomorphism happens *)
Definition mul :
- { mul : feBW -> feBW -> feBW
- | forall a b, phiBW (mul a b) = F.mul (phiBW a) (phiBW b) }.
+ { mul : feBW_loose -> feBW_loose -> feBW_tight
+ | forall a b, phiBW_tight (mul a b) = F.mul (phiBW_loose a) (phiBW_loose b) }.
Proof.
Set Ltac Profiling.
Time synthesize_mul ().
diff --git a/src/Specific/solinas64_2e216m2e108m1/fesquare.v b/src/Specific/solinas64_2e216m2e108m1/fesquare.v
index 824b92f04..f813b25fb 100644
--- a/src/Specific/solinas64_2e216m2e108m1/fesquare.v
+++ b/src/Specific/solinas64_2e216m2e108m1/fesquare.v
@@ -3,8 +3,8 @@ Require Import Crypto.Specific.solinas64_2e216m2e108m1.Synthesis.
(* TODO : change this to field once field isomorphism happens *)
Definition square :
- { square : feBW -> feBW
- | forall a, phiBW (square a) = F.mul (phiBW a) (phiBW a) }.
+ { square : feBW_loose -> feBW_tight
+ | forall a, phiBW_tight (square a) = F.mul (phiBW_loose a) (phiBW_loose a) }.
Proof.
Set Ltac Profiling.
Time synthesize_square ().
diff --git a/src/Specific/solinas64_2e216m2e108m1/freeze.v b/src/Specific/solinas64_2e216m2e108m1/freeze.v
index d8d9008c9..90e0205ac 100644
--- a/src/Specific/solinas64_2e216m2e108m1/freeze.v
+++ b/src/Specific/solinas64_2e216m2e108m1/freeze.v
@@ -3,8 +3,8 @@ Require Import Crypto.Specific.solinas64_2e216m2e108m1.Synthesis.
(* TODO : change this to field once field isomorphism happens *)
Definition freeze :
- { freeze : feBW -> feBW
- | forall a, phiBW (freeze a) = phiBW a }.
+ { freeze : feBW_tight -> feBW_limbwidths
+ | forall a, phiBW_limbwidths (freeze a) = phiBW_tight a }.
Proof.
Set Ltac Profiling.
Time synthesize_freeze ().