diff options
author | 2017-10-06 04:26:12 -0400 | |
---|---|---|
committer | 2017-10-18 23:01:29 -0400 | |
commit | d6703ded104fc9085474bfe68b7e897b35cfbe0a (patch) | |
tree | 8ff0d10a98a1b4da3ec1c9ff4e5962cbf29d909b /src/Specific/X25519/C32/CurveParameters.v | |
parent | 28359fcb5be530da65d5049846927a84a880b919 (diff) |
Fold Karatsuba into json format and synthesis
The json format now takes an additional, optional "goldilocks" boolean /
boolean-string key determining if we're doing karatsuba.
Diffstat (limited to 'src/Specific/X25519/C32/CurveParameters.v')
-rw-r--r-- | src/Specific/X25519/C32/CurveParameters.v | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Specific/X25519/C32/CurveParameters.v b/src/Specific/X25519/C32/CurveParameters.v index c8c7cb04f..e8a46ea9e 100644 --- a/src/Specific/X25519/C32/CurveParameters.v +++ b/src/Specific/X25519/C32/CurveParameters.v @@ -11,12 +11,13 @@ Module Curve <: CurveParameters. Definition bitwidth : Z := 32. Definition s : Z := 2^255. Definition c : list limb := [(1, 19)]. - Definition carry_chain1 : option (list nat) := Eval vm_compute in Some (seq 0 (pred sz)). - Definition carry_chain2 : option (list nat) := Eval vm_compute in Some [0; 1]%nat. + Definition carry_chains : option (list (list nat)) := Eval vm_compute in Some [seq 0 (pred sz); [0; 1]]%nat. - Definition a24 : Z := 121665. + Definition a24 : option Z := Some 121665. Definition coef_div_modulus : nat := 2%nat. (* add 2*modulus before subtracting *) + Definition goldilocks : bool := false. + Definition mul_code : option (Z^sz -> Z^sz -> Z^sz) := Some (fun a b => (* Micro-optimized form from curve25519-donna by Adam Langley (Google) and Daniel Bernstein. See <https://github.com/agl/curve25519-donna/blob/master/LICENSE.md>. *) |