diff options
Diffstat (limited to 'src/Specific/montgomery64_2e171m19_3limbs')
26 files changed, 0 insertions, 444 deletions
diff --git a/src/Specific/montgomery64_2e171m19_3limbs/CurveParameters.v b/src/Specific/montgomery64_2e171m19_3limbs/CurveParameters.v deleted file mode 100644 index 776c36f1e..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/CurveParameters.v +++ /dev/null @@ -1,39 +0,0 @@ -Require Import Crypto.Specific.Framework.RawCurveParameters. -Require Import Crypto.Util.LetIn. - -(*** -Modulus : 2^171 - 19 -Base: 64 -***) - -Definition curve : CurveParameters := - {| - sz := 3%nat; - base := 64; - bitwidth := 64; - s := 2^171; - c := [(1, 19)]; - 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/montgomery64_2e171m19_3limbs/Synthesis.v b/src/Specific/montgomery64_2e171m19_3limbs/Synthesis.v deleted file mode 100644 index 78cf8e037..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/Synthesis.v +++ /dev/null @@ -1,9 +0,0 @@ -Require Import Crypto.Specific.Framework.SynthesisFramework. -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.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/montgomery64_2e171m19_3limbs/compiler.sh b/src/Specific/montgomery64_2e171m19_3limbs/compiler.sh deleted file mode 100755 index 713ccab40..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/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,0x30,0x39}' -Dbitwidth='64' -Dlimb_weight_gaps_array='{64,64,64}' -Dmodulus_array='{0x07,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xed}' -Dmodulus_bytes_val='22' -Dmodulus_limbs='3' -Dq_mpz='(1_mpz<<171) - 19' "$@" diff --git a/src/Specific/montgomery64_2e171m19_3limbs/compilerxx.sh b/src/Specific/montgomery64_2e171m19_3limbs/compilerxx.sh deleted file mode 100755 index 7b5702392..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/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,0x30,0x39}' -Dbitwidth='64' -Dlimb_weight_gaps_array='{64,64,64}' -Dmodulus_array='{0x07,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xed}' -Dmodulus_bytes_val='22' -Dmodulus_limbs='3' -Dq_mpz='(1_mpz<<171) - 19' "$@" diff --git a/src/Specific/montgomery64_2e171m19_3limbs/feadd.c b/src/Specific/montgomery64_2e171m19_3limbs/feadd.c deleted file mode 100644 index cfc2a28d9..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/feadd.c +++ /dev/null @@ -1,22 +0,0 @@ -static void feadd(uint64_t out[3], const uint64_t in1[3], const uint64_t in2[3]) { - { const uint64_t x6 = in1[2]; - { const uint64_t x7 = in1[1]; - { const uint64_t x5 = in1[0]; - { const uint64_t x10 = in2[2]; - { const uint64_t x11 = in2[1]; - { const uint64_t x9 = in2[0]; - { uint64_t x13; uint8_t x14 = _addcarryx_u64(0x0, x5, x9, &x13); - { uint64_t x16; uint8_t x17 = _addcarryx_u64(x14, x7, x11, &x16); - { uint64_t x19; uint8_t x20 = _addcarryx_u64(x17, x6, x10, &x19); - { uint64_t x22; uint8_t x23 = _subborrow_u64(0x0, x13, 0xffffffffffffffedL, &x22); - { uint64_t x25; uint8_t x26 = _subborrow_u64(x23, x16, 0xffffffffffffffffL, &x25); - { uint64_t x28; uint8_t x29 = _subborrow_u64(x26, x19, 0x7ffffffffff, &x28); - { uint64_t _; uint8_t x32 = _subborrow_u64(x29, x20, 0x0, &_); - { uint64_t x33 = cmovznz64(x32, x28, x19); - { uint64_t x34 = cmovznz64(x32, x25, x16); - { uint64_t x35 = cmovznz64(x32, x22, x13); - out[0] = x35; - out[1] = x34; - out[2] = x33; - }}}}}}}}}}}}}}}} -} diff --git a/src/Specific/montgomery64_2e171m19_3limbs/feadd.v b/src/Specific/montgomery64_2e171m19_3limbs/feadd.v deleted file mode 100644 index 2b8f9218b..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/feadd.v +++ /dev/null @@ -1,14 +0,0 @@ -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.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/montgomery64_2e171m19_3limbs/feaddDisplay.log b/src/Specific/montgomery64_2e171m19_3limbs/feaddDisplay.log deleted file mode 100644 index e1dee8a70..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/feaddDisplay.log +++ /dev/null @@ -1,17 +0,0 @@ -λ x x0 : word64 * word64 * word64, -Interp-η -(λ var : Syntax.base_type → Type, - λ '(x6, x7, x5, (x10, x11, x9))%core, - uint64_t x13, uint8_t x14 = addcarryx_u64(0x0, x5, x9); - uint64_t x16, uint8_t x17 = addcarryx_u64(x14, x7, x11); - uint64_t x19, uint8_t x20 = addcarryx_u64(x17, x6, x10); - uint64_t x22, uint8_t x23 = subborrow_u64(0x0, x13, 0xffffffffffffffedL); - uint64_t x25, uint8_t x26 = subborrow_u64(x23, x16, 0xffffffffffffffffL); - uint64_t x28, uint8_t x29 = subborrow_u64(x26, x19, 0x7ffffffffff); - uint64_t _, uint8_t x32 = subborrow_u64(x29, x20, 0x0); - uint64_t x33 = cmovznz64(x32, x28, x19); - uint64_t x34 = cmovznz64(x32, x25, x16); - uint64_t x35 = cmovznz64(x32, x22, x13); - return (x33, x34, x35)) -(x, x0)%core - : word64 * word64 * word64 → word64 * word64 * word64 → ReturnType (uint64_t * uint64_t * uint64_t) diff --git a/src/Specific/montgomery64_2e171m19_3limbs/feaddDisplay.v b/src/Specific/montgomery64_2e171m19_3limbs/feaddDisplay.v deleted file mode 100644 index bcbd06ffc..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/feaddDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.feadd. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display add. diff --git a/src/Specific/montgomery64_2e171m19_3limbs/femul.c b/src/Specific/montgomery64_2e171m19_3limbs/femul.c deleted file mode 100644 index f48dbe98d..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/femul.c +++ /dev/null @@ -1,80 +0,0 @@ -static void femul(uint64_t out[3], const uint64_t in1[3], const uint64_t in2[3]) { - { const uint64_t x6 = in1[2]; - { const uint64_t x7 = in1[1]; - { const uint64_t x5 = in1[0]; - { const uint64_t x10 = in2[2]; - { const uint64_t x11 = in2[1]; - { const uint64_t x9 = in2[0]; - { uint64_t x14; uint64_t x13 = _mulx_u64(x5, x9, &x14); - { uint64_t x17; uint64_t x16 = _mulx_u64(x5, x11, &x17); - { uint64_t x20; uint64_t x19 = _mulx_u64(x5, x10, &x20); - { uint64_t x22; uint8_t x23 = _addcarryx_u64(0x0, x14, x16, &x22); - { uint64_t x25; uint8_t x26 = _addcarryx_u64(x23, x17, x19, &x25); - { uint64_t x28; uint8_t _ = _addcarryx_u64(0x0, x26, x20, &x28); - { uint64_t _; uint64_t x31 = _mulx_u64(x13, 0x86bca1af286bca1bL, &_); - { uint64_t x35; uint64_t x34 = _mulx_u64(x31, 0xffffffffffffffedL, &x35); - { uint64_t x38; uint64_t x37 = _mulx_u64(x31, 0xffffffffffffffffL, &x38); - { uint64_t x41; uint64_t x40 = _mulx_u64(x31, 0x7ffffffffff, &x41); - { uint64_t x43; uint8_t x44 = _addcarryx_u64(0x0, x35, x37, &x43); - { uint64_t x46; uint8_t x47 = _addcarryx_u64(x44, x38, x40, &x46); - { uint64_t x49; uint8_t _ = _addcarryx_u64(0x0, x47, x41, &x49); - { uint64_t _; uint8_t x53 = _addcarryx_u64(0x0, x13, x34, &_); - { uint64_t x55; uint8_t x56 = _addcarryx_u64(x53, x22, x43, &x55); - { uint64_t x58; uint8_t x59 = _addcarryx_u64(x56, x25, x46, &x58); - { uint64_t x61; uint8_t x62 = _addcarryx_u64(x59, x28, x49, &x61); - { uint64_t x65; uint64_t x64 = _mulx_u64(x7, x9, &x65); - { uint64_t x68; uint64_t x67 = _mulx_u64(x7, x11, &x68); - { uint64_t x71; uint64_t x70 = _mulx_u64(x7, x10, &x71); - { uint64_t x73; uint8_t x74 = _addcarryx_u64(0x0, x65, x67, &x73); - { uint64_t x76; uint8_t x77 = _addcarryx_u64(x74, x68, x70, &x76); - { uint64_t x79; uint8_t _ = _addcarryx_u64(0x0, x77, x71, &x79); - { uint64_t x82; uint8_t x83 = _addcarryx_u64(0x0, x55, x64, &x82); - { uint64_t x85; uint8_t x86 = _addcarryx_u64(x83, x58, x73, &x85); - { uint64_t x88; uint8_t x89 = _addcarryx_u64(x86, x61, x76, &x88); - { uint64_t x91; uint8_t x92 = _addcarryx_u64(x89, x62, x79, &x91); - { uint64_t _; uint64_t x94 = _mulx_u64(x82, 0x86bca1af286bca1bL, &_); - { uint64_t x98; uint64_t x97 = _mulx_u64(x94, 0xffffffffffffffedL, &x98); - { uint64_t x101; uint64_t x100 = _mulx_u64(x94, 0xffffffffffffffffL, &x101); - { uint64_t x104; uint64_t x103 = _mulx_u64(x94, 0x7ffffffffff, &x104); - { uint64_t x106; uint8_t x107 = _addcarryx_u64(0x0, x98, x100, &x106); - { uint64_t x109; uint8_t x110 = _addcarryx_u64(x107, x101, x103, &x109); - { uint64_t x112; uint8_t _ = _addcarryx_u64(0x0, x110, x104, &x112); - { uint64_t _; uint8_t x116 = _addcarryx_u64(0x0, x82, x97, &_); - { uint64_t x118; uint8_t x119 = _addcarryx_u64(x116, x85, x106, &x118); - { uint64_t x121; uint8_t x122 = _addcarryx_u64(x119, x88, x109, &x121); - { uint64_t x124; uint8_t x125 = _addcarryx_u64(x122, x91, x112, &x124); - { uint8_t x126 = (x125 + x92); - { uint64_t x129; uint64_t x128 = _mulx_u64(x6, x9, &x129); - { uint64_t x132; uint64_t x131 = _mulx_u64(x6, x11, &x132); - { uint64_t x135; uint64_t x134 = _mulx_u64(x6, x10, &x135); - { uint64_t x137; uint8_t x138 = _addcarryx_u64(0x0, x129, x131, &x137); - { uint64_t x140; uint8_t x141 = _addcarryx_u64(x138, x132, x134, &x140); - { uint64_t x143; uint8_t _ = _addcarryx_u64(0x0, x141, x135, &x143); - { uint64_t x146; uint8_t x147 = _addcarryx_u64(0x0, x118, x128, &x146); - { uint64_t x149; uint8_t x150 = _addcarryx_u64(x147, x121, x137, &x149); - { uint64_t x152; uint8_t x153 = _addcarryx_u64(x150, x124, x140, &x152); - { uint64_t x155; uint8_t x156 = _addcarryx_u64(x153, x126, x143, &x155); - { uint64_t _; uint64_t x158 = _mulx_u64(x146, 0x86bca1af286bca1bL, &_); - { uint64_t x162; uint64_t x161 = _mulx_u64(x158, 0xffffffffffffffedL, &x162); - { uint64_t x165; uint64_t x164 = _mulx_u64(x158, 0xffffffffffffffffL, &x165); - { uint64_t x168; uint64_t x167 = _mulx_u64(x158, 0x7ffffffffff, &x168); - { uint64_t x170; uint8_t x171 = _addcarryx_u64(0x0, x162, x164, &x170); - { uint64_t x173; uint8_t x174 = _addcarryx_u64(x171, x165, x167, &x173); - { uint64_t x176; uint8_t _ = _addcarryx_u64(0x0, x174, x168, &x176); - { uint64_t _; uint8_t x180 = _addcarryx_u64(0x0, x146, x161, &_); - { uint64_t x182; uint8_t x183 = _addcarryx_u64(x180, x149, x170, &x182); - { uint64_t x185; uint8_t x186 = _addcarryx_u64(x183, x152, x173, &x185); - { uint64_t x188; uint8_t x189 = _addcarryx_u64(x186, x155, x176, &x188); - { uint8_t x190 = (x189 + x156); - { uint64_t x192; uint8_t x193 = _subborrow_u64(0x0, x182, 0xffffffffffffffedL, &x192); - { uint64_t x195; uint8_t x196 = _subborrow_u64(x193, x185, 0xffffffffffffffffL, &x195); - { uint64_t x198; uint8_t x199 = _subborrow_u64(x196, x188, 0x7ffffffffff, &x198); - { uint64_t _; uint8_t x202 = _subborrow_u64(x199, x190, 0x0, &_); - { uint64_t x203 = cmovznz64(x202, x198, x188); - { uint64_t x204 = cmovznz64(x202, x195, x185); - { uint64_t x205 = cmovznz64(x202, x192, x182); - out[0] = x205; - out[1] = x204; - out[2] = x203; - }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} -} diff --git a/src/Specific/montgomery64_2e171m19_3limbs/femul.v b/src/Specific/montgomery64_2e171m19_3limbs/femul.v deleted file mode 100644 index d7e8f70d2..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/femul.v +++ /dev/null @@ -1,14 +0,0 @@ -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.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/montgomery64_2e171m19_3limbs/femulDisplay.log b/src/Specific/montgomery64_2e171m19_3limbs/femulDisplay.log deleted file mode 100644 index 1025fdd76..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/femulDisplay.log +++ /dev/null @@ -1,75 +0,0 @@ -λ x x0 : word64 * word64 * word64, -Interp-η -(λ var : Syntax.base_type → Type, - λ '(x6, x7, x5, (x10, x11, x9))%core, - uint64_t x13, uint64_t x14 = mulx_u64(x5, x9); - uint64_t x16, uint64_t x17 = mulx_u64(x5, x11); - uint64_t x19, uint64_t x20 = mulx_u64(x5, x10); - uint64_t x22, uint8_t x23 = addcarryx_u64(0x0, x14, x16); - uint64_t x25, uint8_t x26 = addcarryx_u64(x23, x17, x19); - uint64_t x28, uint8_t _ = addcarryx_u64(0x0, x26, x20); - uint64_t x31, uint64_t _ = mulx_u64(x13, 0x86bca1af286bca1bL); - uint64_t x34, uint64_t x35 = mulx_u64(x31, 0xffffffffffffffedL); - uint64_t x37, uint64_t x38 = mulx_u64(x31, 0xffffffffffffffffL); - uint64_t x40, uint64_t x41 = mulx_u64(x31, 0x7ffffffffff); - uint64_t x43, uint8_t x44 = addcarryx_u64(0x0, x35, x37); - uint64_t x46, uint8_t x47 = addcarryx_u64(x44, x38, x40); - uint64_t x49, uint8_t _ = addcarryx_u64(0x0, x47, x41); - uint64_t _, uint8_t x53 = addcarryx_u64(0x0, x13, x34); - uint64_t x55, uint8_t x56 = addcarryx_u64(x53, x22, x43); - uint64_t x58, uint8_t x59 = addcarryx_u64(x56, x25, x46); - uint64_t x61, uint8_t x62 = addcarryx_u64(x59, x28, x49); - uint64_t x64, uint64_t x65 = mulx_u64(x7, x9); - uint64_t x67, uint64_t x68 = mulx_u64(x7, x11); - uint64_t x70, uint64_t x71 = mulx_u64(x7, x10); - uint64_t x73, uint8_t x74 = addcarryx_u64(0x0, x65, x67); - uint64_t x76, uint8_t x77 = addcarryx_u64(x74, x68, x70); - uint64_t x79, uint8_t _ = addcarryx_u64(0x0, x77, x71); - uint64_t x82, uint8_t x83 = addcarryx_u64(0x0, x55, x64); - uint64_t x85, uint8_t x86 = addcarryx_u64(x83, x58, x73); - uint64_t x88, uint8_t x89 = addcarryx_u64(x86, x61, x76); - uint64_t x91, uint8_t x92 = addcarryx_u64(x89, x62, x79); - uint64_t x94, uint64_t _ = mulx_u64(x82, 0x86bca1af286bca1bL); - uint64_t x97, uint64_t x98 = mulx_u64(x94, 0xffffffffffffffedL); - uint64_t x100, uint64_t x101 = mulx_u64(x94, 0xffffffffffffffffL); - uint64_t x103, uint64_t x104 = mulx_u64(x94, 0x7ffffffffff); - uint64_t x106, uint8_t x107 = addcarryx_u64(0x0, x98, x100); - uint64_t x109, uint8_t x110 = addcarryx_u64(x107, x101, x103); - uint64_t x112, uint8_t _ = addcarryx_u64(0x0, x110, x104); - uint64_t _, uint8_t x116 = addcarryx_u64(0x0, x82, x97); - uint64_t x118, uint8_t x119 = addcarryx_u64(x116, x85, x106); - uint64_t x121, uint8_t x122 = addcarryx_u64(x119, x88, x109); - uint64_t x124, uint8_t x125 = addcarryx_u64(x122, x91, x112); - uint8_t x126 = (x125 + x92); - uint64_t x128, uint64_t x129 = mulx_u64(x6, x9); - uint64_t x131, uint64_t x132 = mulx_u64(x6, x11); - uint64_t x134, uint64_t x135 = mulx_u64(x6, x10); - uint64_t x137, uint8_t x138 = addcarryx_u64(0x0, x129, x131); - uint64_t x140, uint8_t x141 = addcarryx_u64(x138, x132, x134); - uint64_t x143, uint8_t _ = addcarryx_u64(0x0, x141, x135); - uint64_t x146, uint8_t x147 = addcarryx_u64(0x0, x118, x128); - uint64_t x149, uint8_t x150 = addcarryx_u64(x147, x121, x137); - uint64_t x152, uint8_t x153 = addcarryx_u64(x150, x124, x140); - uint64_t x155, uint8_t x156 = addcarryx_u64(x153, x126, x143); - uint64_t x158, uint64_t _ = mulx_u64(x146, 0x86bca1af286bca1bL); - uint64_t x161, uint64_t x162 = mulx_u64(x158, 0xffffffffffffffedL); - uint64_t x164, uint64_t x165 = mulx_u64(x158, 0xffffffffffffffffL); - uint64_t x167, uint64_t x168 = mulx_u64(x158, 0x7ffffffffff); - uint64_t x170, uint8_t x171 = addcarryx_u64(0x0, x162, x164); - uint64_t x173, uint8_t x174 = addcarryx_u64(x171, x165, x167); - uint64_t x176, uint8_t _ = addcarryx_u64(0x0, x174, x168); - uint64_t _, uint8_t x180 = addcarryx_u64(0x0, x146, x161); - uint64_t x182, uint8_t x183 = addcarryx_u64(x180, x149, x170); - uint64_t x185, uint8_t x186 = addcarryx_u64(x183, x152, x173); - uint64_t x188, uint8_t x189 = addcarryx_u64(x186, x155, x176); - uint8_t x190 = (x189 + x156); - uint64_t x192, uint8_t x193 = subborrow_u64(0x0, x182, 0xffffffffffffffedL); - uint64_t x195, uint8_t x196 = subborrow_u64(x193, x185, 0xffffffffffffffffL); - uint64_t x198, uint8_t x199 = subborrow_u64(x196, x188, 0x7ffffffffff); - uint64_t _, uint8_t x202 = subborrow_u64(x199, x190, 0x0); - uint64_t x203 = cmovznz64(x202, x198, x188); - uint64_t x204 = cmovznz64(x202, x195, x185); - uint64_t x205 = cmovznz64(x202, x192, x182); - return (x203, x204, x205)) -(x, x0)%core - : word64 * word64 * word64 → word64 * word64 * word64 → ReturnType (uint64_t * uint64_t * uint64_t) diff --git a/src/Specific/montgomery64_2e171m19_3limbs/femulDisplay.v b/src/Specific/montgomery64_2e171m19_3limbs/femulDisplay.v deleted file mode 100644 index 8155241f7..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/femulDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.femul. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display mul. diff --git a/src/Specific/montgomery64_2e171m19_3limbs/fenz.c b/src/Specific/montgomery64_2e171m19_3limbs/fenz.c deleted file mode 100644 index 2632a2866..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fenz.c +++ /dev/null @@ -1,9 +0,0 @@ -static void fenz(ReturnType uint64_t out[1], const uint64_t in1[3]) { - { const uint64_t x3 = in1[2]; - { const uint64_t x4 = in1[1]; - { const uint64_t x2 = in1[0]; - { uint64_t x5 = (x4 | x3); - { uint64_t x6 = (x2 | x5); - out[0] = x6; - }}}}} -} diff --git a/src/Specific/montgomery64_2e171m19_3limbs/fenz.v b/src/Specific/montgomery64_2e171m19_3limbs/fenz.v deleted file mode 100644 index d10741407..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fenz.v +++ /dev/null @@ -1,16 +0,0 @@ -Require Import Coq.ZArith.ZArith. -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.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/montgomery64_2e171m19_3limbs/fenzDisplay.log b/src/Specific/montgomery64_2e171m19_3limbs/fenzDisplay.log deleted file mode 100644 index 680322e0f..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fenzDisplay.log +++ /dev/null @@ -1,9 +0,0 @@ -λ x : word64 * word64 * word64, -Interp-η -(λ var : Syntax.base_type → Type, - λ '(x3, x4, x2)%core, - uint64_t x5 = (x4 | x3); - uint64_t x6 = (x2 | x5); - return x6) -x - : word64 * word64 * word64 → ReturnType uint64_t diff --git a/src/Specific/montgomery64_2e171m19_3limbs/fenzDisplay.v b/src/Specific/montgomery64_2e171m19_3limbs/fenzDisplay.v deleted file mode 100644 index e2b2b174c..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fenzDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.fenz. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display nonzero. diff --git a/src/Specific/montgomery64_2e171m19_3limbs/feopp.c b/src/Specific/montgomery64_2e171m19_3limbs/feopp.c deleted file mode 100644 index e62a4e9b6..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/feopp.c +++ /dev/null @@ -1,19 +0,0 @@ -static void feopp(uint64_t out[3], const uint64_t in1[3]) { - { const uint64_t x3 = in1[2]; - { const uint64_t x4 = in1[1]; - { const uint64_t x2 = in1[0]; - { uint64_t x6; uint8_t x7 = _subborrow_u64(0x0, 0x0, x2, &x6); - { uint64_t x9; uint8_t x10 = _subborrow_u64(x7, 0x0, x4, &x9); - { uint64_t x12; uint8_t x13 = _subborrow_u64(x10, 0x0, x3, &x12); - { uint64_t x14 = cmovznz64(x13, 0x0, 0xffffffffffffffffL); - { uint64_t x15 = (x14 & 0xffffffffffffffedL); - { uint64_t x17; uint8_t x18 = _addcarryx_u64(0x0, x6, x15, &x17); - { uint64_t x19 = (x14 & 0xffffffffffffffffL); - { uint64_t x21; uint8_t x22 = _addcarryx_u64(x18, x9, x19, &x21); - { uint64_t x23 = (x14 & 0x7ffffffffff); - { uint64_t x25; uint8_t _ = _addcarryx_u64(x22, x12, x23, &x25); - out[0] = x17; - out[1] = x21; - out[2] = x25; - }}}}}}}}}}}}} -} diff --git a/src/Specific/montgomery64_2e171m19_3limbs/feopp.v b/src/Specific/montgomery64_2e171m19_3limbs/feopp.v deleted file mode 100644 index 846d7a13e..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/feopp.v +++ /dev/null @@ -1,14 +0,0 @@ -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.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/montgomery64_2e171m19_3limbs/feoppDisplay.log b/src/Specific/montgomery64_2e171m19_3limbs/feoppDisplay.log deleted file mode 100644 index 4c3fc354d..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/feoppDisplay.log +++ /dev/null @@ -1,17 +0,0 @@ -λ x : word64 * word64 * word64, -Interp-η -(λ var : Syntax.base_type → Type, - λ '(x3, x4, x2)%core, - uint64_t x6, uint8_t x7 = subborrow_u64(0x0, 0x0, x2); - uint64_t x9, uint8_t x10 = subborrow_u64(x7, 0x0, x4); - uint64_t x12, uint8_t x13 = subborrow_u64(x10, 0x0, x3); - uint64_t x14 = cmovznz64(x13, 0x0, 0xffffffffffffffffL); - uint64_t x15 = (x14 & 0xffffffffffffffedL); - uint64_t x17, uint8_t x18 = addcarryx_u64(0x0, x6, x15); - uint64_t x19 = (x14 & 0xffffffffffffffffL); - uint64_t x21, uint8_t x22 = addcarryx_u64(x18, x9, x19); - uint64_t x23 = (x14 & 0x7ffffffffff); - uint64_t x25, uint8_t _ = addcarryx_u64(x22, x12, x23); - (Return x25, Return x21, Return x17)) -x - : word64 * word64 * word64 → ReturnType (uint64_t * uint64_t * uint64_t) diff --git a/src/Specific/montgomery64_2e171m19_3limbs/feoppDisplay.v b/src/Specific/montgomery64_2e171m19_3limbs/feoppDisplay.v deleted file mode 100644 index 9952d5190..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/feoppDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.feopp. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display opp. diff --git a/src/Specific/montgomery64_2e171m19_3limbs/fesquare.c b/src/Specific/montgomery64_2e171m19_3limbs/fesquare.c deleted file mode 100644 index 7bd8db166..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fesquare.c +++ /dev/null @@ -1,5 +0,0 @@ -/* WARNING: This file was copied from Specific/CurveParameters/montgomery64/fesquare.c. - If you edit it here, changes will be erased the next time remake_curves.sh is run. */ -static void fesquare(uint64_t *out, const uint64_t *in) { - femul(out, in, in); -} diff --git a/src/Specific/montgomery64_2e171m19_3limbs/fesub.c b/src/Specific/montgomery64_2e171m19_3limbs/fesub.c deleted file mode 100644 index dc95081fa..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fesub.c +++ /dev/null @@ -1,22 +0,0 @@ -static void fesub(uint64_t out[3], const uint64_t in1[3], const uint64_t in2[3]) { - { const uint64_t x6 = in1[2]; - { const uint64_t x7 = in1[1]; - { const uint64_t x5 = in1[0]; - { const uint64_t x10 = in2[2]; - { const uint64_t x11 = in2[1]; - { const uint64_t x9 = in2[0]; - { uint64_t x13; uint8_t x14 = _subborrow_u64(0x0, x5, x9, &x13); - { uint64_t x16; uint8_t x17 = _subborrow_u64(x14, x7, x11, &x16); - { uint64_t x19; uint8_t x20 = _subborrow_u64(x17, x6, x10, &x19); - { uint64_t x21 = cmovznz64(x20, 0x0, 0xffffffffffffffffL); - { uint64_t x22 = (x21 & 0xffffffffffffffedL); - { uint64_t x24; uint8_t x25 = _addcarryx_u64(0x0, x13, x22, &x24); - { uint64_t x26 = (x21 & 0xffffffffffffffffL); - { uint64_t x28; uint8_t x29 = _addcarryx_u64(x25, x16, x26, &x28); - { uint64_t x30 = (x21 & 0x7ffffffffff); - { uint64_t x32; uint8_t _ = _addcarryx_u64(x29, x19, x30, &x32); - out[0] = x24; - out[1] = x28; - out[2] = x32; - }}}}}}}}}}}}}}}} -} diff --git a/src/Specific/montgomery64_2e171m19_3limbs/fesub.v b/src/Specific/montgomery64_2e171m19_3limbs/fesub.v deleted file mode 100644 index a1a1c0f5c..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fesub.v +++ /dev/null @@ -1,14 +0,0 @@ -Require Import Crypto.Arithmetic.PrimeFieldTheorems. -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.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/montgomery64_2e171m19_3limbs/fesubDisplay.log b/src/Specific/montgomery64_2e171m19_3limbs/fesubDisplay.log deleted file mode 100644 index aa902b08f..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fesubDisplay.log +++ /dev/null @@ -1,17 +0,0 @@ -λ x x0 : word64 * word64 * word64, -Interp-η -(λ var : Syntax.base_type → Type, - λ '(x6, x7, x5, (x10, x11, x9))%core, - uint64_t x13, uint8_t x14 = subborrow_u64(0x0, x5, x9); - uint64_t x16, uint8_t x17 = subborrow_u64(x14, x7, x11); - uint64_t x19, uint8_t x20 = subborrow_u64(x17, x6, x10); - uint64_t x21 = cmovznz64(x20, 0x0, 0xffffffffffffffffL); - uint64_t x22 = (x21 & 0xffffffffffffffedL); - uint64_t x24, uint8_t x25 = addcarryx_u64(0x0, x13, x22); - uint64_t x26 = (x21 & 0xffffffffffffffffL); - uint64_t x28, uint8_t x29 = addcarryx_u64(x25, x16, x26); - uint64_t x30 = (x21 & 0x7ffffffffff); - uint64_t x32, uint8_t _ = addcarryx_u64(x29, x19, x30); - (Return x32, Return x28, Return x24)) -(x, x0)%core - : word64 * word64 * word64 → word64 * word64 * word64 → ReturnType (uint64_t * uint64_t * uint64_t) diff --git a/src/Specific/montgomery64_2e171m19_3limbs/fesubDisplay.v b/src/Specific/montgomery64_2e171m19_3limbs/fesubDisplay.v deleted file mode 100644 index f3039138f..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/fesubDisplay.v +++ /dev/null @@ -1,4 +0,0 @@ -Require Import Crypto.Specific.montgomery64_2e171m19_3limbs.fesub. -Require Import Crypto.Specific.Framework.IntegrationTestDisplayCommon. - -Check display sub. diff --git a/src/Specific/montgomery64_2e171m19_3limbs/py_interpreter.sh b/src/Specific/montgomery64_2e171m19_3limbs/py_interpreter.sh deleted file mode 100755 index 0fe99a0e3..000000000 --- a/src/Specific/montgomery64_2e171m19_3limbs/py_interpreter.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -set -eu - -/usr/bin/env python3 "$@" -Dq='2**171 - 19' -Dmodulus_bytes='64' -Da24='121665' |