diff options
author | Andres Erbsen <andreser@mit.edu> | 2019-01-08 04:21:38 -0500 |
---|---|---|
committer | Andres Erbsen <andreser@mit.edu> | 2019-01-09 22:49:02 -0500 |
commit | 3ca227f1137e6a3b65bc33f5689e1c230d591595 (patch) | |
tree | e1e5a2dd2a2f34f239d3276227ddbdc69eeeb667 /src/Specific/montgomery32_2e230m27_8limbs | |
parent | 3ec21c64b3682465ca8e159a187689b207c71de4 (diff) |
remove old pipeline
Diffstat (limited to 'src/Specific/montgomery32_2e230m27_8limbs')
20 files changed, 0 insertions, 274 deletions
diff --git a/src/Specific/montgomery32_2e230m27_8limbs/CurveParameters.v b/src/Specific/montgomery32_2e230m27_8limbs/CurveParameters.v deleted file mode 100644 index 180742861..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/CurveParameters.v +++ /dev/null @@ -1,39 +0,0 @@ -Require Import Crypto.Specific.Framework.RawCurveParameters. -Require Import Crypto.Util.LetIn. - -(*** -Modulus : 2^230 - 27 -Base: 32 -***) - -Definition curve : CurveParameters := - {| - sz := 8%nat; - base := 32; - bitwidth := 32; - s := 2^230; - c := [(1, 27)]; - carry_chains := None; - - a24 := None; - coef_div_modulus := None; - - goldilocks := None; - karatsuba := None; - montgomery := true; - freeze := Some false; - ladderstep := false; - - mul_code := None; - - square_code := 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 - |}. - -Ltac extra_prove_mul_eq _ := idtac. -Ltac extra_prove_square_eq _ := idtac. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/Synthesis.v b/src/Specific/montgomery32_2e230m27_8limbs/Synthesis.v deleted file mode 100644 index 773f9fe2c..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/Synthesis.v +++ /dev/null @@ -1,9 +0,0 @@ -Require Import Crypto.Specific.Framework.SynthesisFramework. -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.CurveParameters. - -Module P <: PrePackage. - Definition package : Tag.Context. - Proof. make_Synthesis_package curve extra_prove_mul_eq extra_prove_square_eq. Defined. -End P. - -Module Export S := PackageSynthesis P. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/compiler.sh b/src/Specific/montgomery32_2e230m27_8limbs/compiler.sh deleted file mode 100755 index eadd48b02..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/compiler.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -clang -fbracket-depth=999999 -march=native -mbmi2 -mtune=native -std=gnu11 -O3 -flto -fuse-ld=lld -fomit-frame-pointer -fwrapv -Wno-attributes -fno-strict-aliasing -Da24_hex='0x3039' -Da24_val='12345' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}' -Dbitwidth='32' -Dlimb_weight_gaps_array='{32,32,32,32,32,32,32,32}' -Dmodulus_array='{0x3f,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,0xe5}' -Dmodulus_bytes_val='29' -Dmodulus_limbs='8' -Dq_mpz='(1_mpz<<230) - 27' "$@" diff --git a/src/Specific/montgomery32_2e230m27_8limbs/compilerxx.sh b/src/Specific/montgomery32_2e230m27_8limbs/compilerxx.sh deleted file mode 100755 index 3d4a4edda..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/compilerxx.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -clang++ -fbracket-depth=999999 -march=native -mbmi2 -mtune=native -std=gnu++11 -O3 -flto -fuse-ld=lld -fomit-frame-pointer -fwrapv -Wno-attributes -fno-strict-aliasing -Da24_hex='0x3039' -Da24_val='12345' -Da_minus_two_over_four_array='{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x39}' -Dbitwidth='32' -Dlimb_weight_gaps_array='{32,32,32,32,32,32,32,32}' -Dmodulus_array='{0x3f,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,0xe5}' -Dmodulus_bytes_val='29' -Dmodulus_limbs='8' -Dq_mpz='(1_mpz<<230) - 27' "$@" diff --git a/src/Specific/montgomery32_2e230m27_8limbs/feadd.c b/src/Specific/montgomery32_2e230m27_8limbs/feadd.c deleted file mode 100644 index 0b93efdbf..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/feadd.c +++ /dev/null @@ -1,52 +0,0 @@ -static void feadd(uint32_t out[8], const uint32_t in1[8], const uint32_t in2[8]) { - { const uint32_t x16 = in1[7]; - { const uint32_t x17 = in1[6]; - { const uint32_t x15 = in1[5]; - { const uint32_t x13 = in1[4]; - { const uint32_t x11 = in1[3]; - { const uint32_t x9 = in1[2]; - { const uint32_t x7 = in1[1]; - { const uint32_t x5 = in1[0]; - { const uint32_t x30 = in2[7]; - { const uint32_t x31 = in2[6]; - { const uint32_t x29 = in2[5]; - { const uint32_t x27 = in2[4]; - { const uint32_t x25 = in2[3]; - { const uint32_t x23 = in2[2]; - { const uint32_t x21 = in2[1]; - { const uint32_t x19 = in2[0]; - { uint32_t x33; uint8_t x34 = _addcarryx_u32(0x0, x5, x19, &x33); - { uint32_t x36; uint8_t x37 = _addcarryx_u32(x34, x7, x21, &x36); - { uint32_t x39; uint8_t x40 = _addcarryx_u32(x37, x9, x23, &x39); - { uint32_t x42; uint8_t x43 = _addcarryx_u32(x40, x11, x25, &x42); - { uint32_t x45; uint8_t x46 = _addcarryx_u32(x43, x13, x27, &x45); - { uint32_t x48; uint8_t x49 = _addcarryx_u32(x46, x15, x29, &x48); - { uint32_t x51; uint8_t x52 = _addcarryx_u32(x49, x17, x31, &x51); - { uint32_t x54; uint8_t x55 = _addcarryx_u32(x52, x16, x30, &x54); - { uint32_t x57; uint8_t x58 = _subborrow_u32(0x0, x33, 0xffffffe5, &x57); - { uint32_t x60; uint8_t x61 = _subborrow_u32(x58, x36, 0xffffffff, &x60); - { uint32_t x63; uint8_t x64 = _subborrow_u32(x61, x39, 0xffffffff, &x63); - { uint32_t x66; uint8_t x67 = _subborrow_u32(x64, x42, 0xffffffff, &x66); - { uint32_t x69; uint8_t x70 = _subborrow_u32(x67, x45, 0xffffffff, &x69); - { uint32_t x72; uint8_t x73 = _subborrow_u32(x70, x48, 0xffffffff, &x72); - { uint32_t x75; uint8_t x76 = _subborrow_u32(x73, x51, 0xffffffff, &x75); - { uint32_t x78; uint8_t x79 = _subborrow_u32(x76, x54, 0x3f, &x78); - { uint32_t _; uint8_t x82 = _subborrow_u32(x79, x55, 0x0, &_); - { uint32_t x83 = cmovznz32(x82, x78, x54); - { uint32_t x84 = cmovznz32(x82, x75, x51); - { uint32_t x85 = cmovznz32(x82, x72, x48); - { uint32_t x86 = cmovznz32(x82, x69, x45); - { uint32_t x87 = cmovznz32(x82, x66, x42); - { uint32_t x88 = cmovznz32(x82, x63, x39); - { uint32_t x89 = cmovznz32(x82, x60, x36); - { uint32_t x90 = cmovznz32(x82, x57, x33); - out[0] = x90; - out[1] = x89; - out[2] = x88; - out[3] = x87; - out[4] = x86; - out[5] = x85; - out[6] = x84; - out[7] = x83; - }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -} diff --git a/src/Specific/montgomery32_2e230m27_8limbs/feadd.v b/src/Specific/montgomery32_2e230m27_8limbs/feadd.v deleted file mode 100644 index 491df52f6..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/feadd.v +++ /dev/null @@ -1,14 +0,0 @@ -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.Synthesis. - -(* TODO : change this to field once field isomorphism happens *) -Definition add : - { add : feBW_small -> feBW_small -> feBW_small - | forall a b, phiM_small (add a b) = F.add (phiM_small a) (phiM_small b) }. -Proof. - Set Ltac Profiling. - Time synthesize_add (). - Show Ltac Profile. -Time Defined. - -Print Assumptions add. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/feaddDisplay.log b/src/Specific/montgomery32_2e230m27_8limbs/feaddDisplay.log deleted file mode 100644 index 3b3330e0d..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/feaddDisplay.log +++ /dev/null @@ -1,32 +0,0 @@ -λ x x0 : word32 * word32 * word32 * word32 * word32 * word32 * word32 * word32, -Interp-η -(λ var : Syntax.base_type → Type, - λ '(x16, x17, x15, x13, x11, x9, x7, x5, (x30, x31, x29, x27, x25, x23, x21, x19))%core, - uint32_t x33, uint8_t x34 = addcarryx_u32(0x0, x5, x19); - uint32_t x36, uint8_t x37 = addcarryx_u32(x34, x7, x21); - uint32_t x39, uint8_t x40 = addcarryx_u32(x37, x9, x23); - uint32_t x42, uint8_t x43 = addcarryx_u32(x40, x11, x25); - uint32_t x45, uint8_t x46 = addcarryx_u32(x43, x13, x27); - uint32_t x48, uint8_t x49 = addcarryx_u32(x46, x15, x29); - uint32_t x51, uint8_t x52 = addcarryx_u32(x49, x17, x31); - uint32_t x54, uint8_t x55 = addcarryx_u32(x52, x16, x30); - uint32_t x57, uint8_t x58 = subborrow_u32(0x0, x33, 0xffffffe5); - uint32_t x60, uint8_t x61 = subborrow_u32(x58, x36, 0xffffffff); - uint32_t x63, uint8_t x64 = subborrow_u32(x61, x39, 0xffffffff); - uint32_t x66, uint8_t x67 = subborrow_u32(x64, x42, 0xffffffff); - uint32_t x69, uint8_t x70 = subborrow_u32(x67, x45, 0xffffffff); - uint32_t x72, uint8_t x73 = subborrow_u32(x70, x48, 0xffffffff); - uint32_t x75, uint8_t x76 = subborrow_u32(x73, x51, 0xffffffff); - uint32_t x78, uint8_t x79 = subborrow_u32(x76, x54, 0x3f); - uint32_t _, uint8_t x82 = subborrow_u32(x79, x55, 0x0); - uint32_t x83 = cmovznz32(x82, x78, x54); - uint32_t x84 = cmovznz32(x82, x75, x51); - uint32_t x85 = cmovznz32(x82, x72, x48); - uint32_t x86 = cmovznz32(x82, x69, x45); - uint32_t x87 = cmovznz32(x82, x66, x42); - uint32_t x88 = cmovznz32(x82, x63, x39); - uint32_t x89 = cmovznz32(x82, x60, x36); - uint32_t x90 = cmovznz32(x82, x57, x33); - return (x83, x84, x85, x86, x87, x88, x89, x90)) -(x, x0)%core - : word32 * word32 * word32 * word32 * word32 * word32 * word32 * word32 → word32 * word32 * word32 * word32 * word32 * word32 * word32 * word32 → ReturnType (uint32_t * uint32_t * uint32_t * uint32_t * uint32_t * uint32_t * uint32_t * uint32_t) diff --git a/src/Specific/montgomery32_2e230m27_8limbs/feaddDisplay.v b/src/Specific/montgomery32_2e230m27_8limbs/feaddDisplay.v deleted file mode 100644 index aabfdbfa7..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/feaddDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.feadd. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display add. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/femul.v b/src/Specific/montgomery32_2e230m27_8limbs/femul.v deleted file mode 100644 index 7ed4d0f71..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/femul.v +++ /dev/null @@ -1,14 +0,0 @@ -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.Synthesis. - -(* TODO : change this to field once field isomorphism happens *) -Definition mul : - { mul : feBW_small -> feBW_small -> feBW_small - | forall a b, phiM_small (mul a b) = F.mul (phiM_small a) (phiM_small b) }. -Proof. - Set Ltac Profiling. - Time synthesize_mul (). - Show Ltac Profile. -Time Defined. - -Print Assumptions mul. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/femulDisplay.v b/src/Specific/montgomery32_2e230m27_8limbs/femulDisplay.v deleted file mode 100644 index c16dda340..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/femulDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.femul. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display mul. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/fenz.c b/src/Specific/montgomery32_2e230m27_8limbs/fenz.c deleted file mode 100644 index 744f2aa5f..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/fenz.c +++ /dev/null @@ -1,19 +0,0 @@ -static void fenz(ReturnType uint32_t out[1], const uint32_t in1[8]) { - { const uint32_t x13 = in1[7]; - { const uint32_t x14 = in1[6]; - { const uint32_t x12 = in1[5]; - { const uint32_t x10 = in1[4]; - { const uint32_t x8 = in1[3]; - { const uint32_t x6 = in1[2]; - { const uint32_t x4 = in1[1]; - { const uint32_t x2 = in1[0]; - { uint32_t x15 = (x14 | x13); - { uint32_t x16 = (x12 | x15); - { uint32_t x17 = (x10 | x16); - { uint32_t x18 = (x8 | x17); - { uint32_t x19 = (x6 | x18); - { uint32_t x20 = (x4 | x19); - { uint32_t x21 = (x2 | x20); - out[0] = x21; - }}}}}}}}}}}}}}} -} diff --git a/src/Specific/montgomery32_2e230m27_8limbs/fenz.v b/src/Specific/montgomery32_2e230m27_8limbs/fenz.v deleted file mode 100644 index bb5977cb4..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/fenz.v +++ /dev/null @@ -1,16 +0,0 @@ -Require Import Coq.ZArith.ZArith. -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.Synthesis. -Local Open Scope Z_scope. - -(* TODO : change this to field once field isomorphism happens *) -Definition nonzero : - { nonzero : feBW_small -> BoundedWord.BoundedWord 1 adjusted_bitwidth bound1 - | forall a, (BoundedWord.BoundedWordToZ _ _ _ (nonzero a) =? 0) = (if Decidable.dec (phiM_small a = F.of_Z m 0) then true else false) }. -Proof. - Set Ltac Profiling. - Time synthesize_nonzero (). - Show Ltac Profile. -Time Defined. - -Print Assumptions nonzero. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/fenzDisplay.log b/src/Specific/montgomery32_2e230m27_8limbs/fenzDisplay.log deleted file mode 100644 index c7c1c2df1..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/fenzDisplay.log +++ /dev/null @@ -1,14 +0,0 @@ -λ x : word32 * word32 * word32 * word32 * word32 * word32 * word32 * word32, -Interp-η -(λ var : Syntax.base_type → Type, - λ '(x13, x14, x12, x10, x8, x6, x4, x2)%core, - uint32_t x15 = (x14 | x13); - uint32_t x16 = (x12 | x15); - uint32_t x17 = (x10 | x16); - uint32_t x18 = (x8 | x17); - uint32_t x19 = (x6 | x18); - uint32_t x20 = (x4 | x19); - uint32_t x21 = (x2 | x20); - return x21) -x - : word32 * word32 * word32 * word32 * word32 * word32 * word32 * word32 → ReturnType uint32_t diff --git a/src/Specific/montgomery32_2e230m27_8limbs/fenzDisplay.v b/src/Specific/montgomery32_2e230m27_8limbs/fenzDisplay.v deleted file mode 100644 index 874b4ad4e..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/fenzDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.fenz. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display nonzero. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/feopp.v b/src/Specific/montgomery32_2e230m27_8limbs/feopp.v deleted file mode 100644 index d39a90f69..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/feopp.v +++ /dev/null @@ -1,14 +0,0 @@ -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.Synthesis. - -(* TODO : change this to field once field isomorphism happens *) -Definition opp : - { opp : feBW_small -> feBW_small - | forall a, phiM_small (opp a) = F.opp (phiM_small a) }. -Proof. - Set Ltac Profiling. - Time synthesize_opp (). - Show Ltac Profile. -Time Defined. - -Print Assumptions opp. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/feoppDisplay.v b/src/Specific/montgomery32_2e230m27_8limbs/feoppDisplay.v deleted file mode 100644 index 6805ac515..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/feoppDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.feopp. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display opp. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/fesquare.c b/src/Specific/montgomery32_2e230m27_8limbs/fesquare.c deleted file mode 100644 index e3345edfe..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/fesquare.c +++ /dev/null @@ -1,5 +0,0 @@ -/* WARNING: This file was copied from Specific/CurveParameters/montgomery32/fesquare.c. - If you edit it here, changes will be erased the next time remake_curves.sh is run. */ -static void fesquare(uint32_t *out, const uint32_t *in) { - femul(out, in, in); -} diff --git a/src/Specific/montgomery32_2e230m27_8limbs/fesub.v b/src/Specific/montgomery32_2e230m27_8limbs/fesub.v deleted file mode 100644 index bddcf4200..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/fesub.v +++ /dev/null @@ -1,14 +0,0 @@ -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.Synthesis. - -(* TODO : change this to field once field isomorphism happens *) -Definition sub : - { sub : feBW_small -> feBW_small -> feBW_small - | forall a b, phiM_small (sub a b) = F.sub (phiM_small a) (phiM_small b) }. -Proof. - Set Ltac Profiling. - Time synthesize_sub (). - Show Ltac Profile. -Time Defined. - -Print Assumptions sub. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/fesubDisplay.v b/src/Specific/montgomery32_2e230m27_8limbs/fesubDisplay.v deleted file mode 100644 index 244a8404d..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/fesubDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery32_2e230m27_8limbs.fesub. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display sub. diff --git a/src/Specific/montgomery32_2e230m27_8limbs/py_interpreter.sh b/src/Specific/montgomery32_2e230m27_8limbs/py_interpreter.sh deleted file mode 100755 index fc71de448..000000000 --- a/src/Specific/montgomery32_2e230m27_8limbs/py_interpreter.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -/usr/bin/env python3 "$@" -Dq='2**230 - 27' -Dmodulus_bytes='32' -Da24='121665' |