2020-06-15 22:58:56 +02:00
|
|
|
# Constantine
|
|
|
|
# Copyright (c) 2018-2019 Status Research & Development GmbH
|
|
|
|
# Copyright (c) 2020-Present Mamy André-Ratsimbazafy
|
|
|
|
# Licensed and distributed under either of
|
|
|
|
# * MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT).
|
|
|
|
# * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
|
|
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
|
|
|
|
import
|
|
|
|
# Internals
|
2021-01-22 00:09:52 +01:00
|
|
|
../constantine/config/[type_ff, curves],
|
2020-10-02 00:01:09 +02:00
|
|
|
../constantine/elliptic/ec_shortweierstrass_jacobian,
|
2020-06-15 22:58:56 +02:00
|
|
|
# Test utilities
|
2020-06-15 23:15:01 +02:00
|
|
|
./t_ec_template
|
2020-06-15 22:58:56 +02:00
|
|
|
|
|
|
|
const
|
2020-09-21 23:24:00 +02:00
|
|
|
Iters = 12
|
2020-06-15 22:58:56 +02:00
|
|
|
ItersMul = Iters div 4
|
|
|
|
|
|
|
|
run_EC_mul_distributive_tests(
|
2022-01-01 19:17:04 +01:00
|
|
|
ec = ECP_ShortW_Jac[Fp[BN254_Snarks], G1],
|
2020-06-15 22:58:56 +02:00
|
|
|
ItersMul = ItersMul,
|
2020-10-02 00:01:09 +02:00
|
|
|
moduleName = "test_ec_shortweierstrass_jacobian_g1_mul_distributive_" & $BN254_Snarks
|
2020-06-15 22:58:56 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
run_EC_mul_distributive_tests(
|
2022-01-01 19:17:04 +01:00
|
|
|
ec = ECP_ShortW_Jac[Fp[BLS12_381], G1],
|
2020-06-15 22:58:56 +02:00
|
|
|
ItersMul = ItersMul,
|
2020-10-02 00:01:09 +02:00
|
|
|
moduleName = "test_ec_shortweierstrass_jacobian_g1_mul_distributive_" & $BLS12_381
|
2020-06-15 22:58:56 +02:00
|
|
|
)
|
2020-09-27 09:15:14 +02:00
|
|
|
|
|
|
|
run_EC_mul_distributive_tests(
|
2022-01-01 19:17:04 +01:00
|
|
|
ec = ECP_ShortW_Jac[Fp[BLS12_377], G1],
|
2020-10-09 07:51:47 +02:00
|
|
|
ItersMul = ItersMul,
|
|
|
|
moduleName = "test_ec_shortweierstrass_jacobian_g1_mul_distributive_" & $BLS12_377
|
|
|
|
)
|
|
|
|
|
|
|
|
run_EC_mul_distributive_tests(
|
2022-01-01 19:17:04 +01:00
|
|
|
ec = ECP_ShortW_Jac[Fp[BW6_761], G1],
|
2020-09-27 09:15:14 +02:00
|
|
|
ItersMul = ItersMul,
|
2020-10-02 00:01:09 +02:00
|
|
|
moduleName = "test_ec_shortweierstrass_jacobian_g1_mul_distributive_" & $BLS12_377
|
2020-09-27 09:15:14 +02:00
|
|
|
)
|