2020-09-26 09:16:29 +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
|
|
|
|
../constantine/config/curves,
|
2020-09-27 23:02:48 +02:00
|
|
|
../constantine/elliptic/ec_shortweierstrass_projective,
|
2020-09-26 09:16:29 +02:00
|
|
|
../constantine/arithmetic,
|
|
|
|
# Test utilities
|
|
|
|
./t_ec_template
|
|
|
|
|
|
|
|
const
|
|
|
|
Iters = 12
|
|
|
|
|
|
|
|
run_EC_mixed_add_impl(
|
2022-01-01 19:17:04 +01:00
|
|
|
ec = ECP_ShortW_Prj[Fp[BN254_Snarks], G1],
|
2020-09-26 09:16:29 +02:00
|
|
|
Iters = Iters,
|
2020-09-27 23:02:48 +02:00
|
|
|
moduleName = "test_ec_shortweierstrass_projective_mixed_add_" & $BN254_Snarks
|
2020-09-26 09:16:29 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
run_EC_mixed_add_impl(
|
2022-01-01 19:17:04 +01:00
|
|
|
ec = ECP_ShortW_Prj[Fp[BLS12_381], G1],
|
2020-09-26 09:16:29 +02:00
|
|
|
Iters = Iters,
|
2020-09-27 23:02:48 +02:00
|
|
|
moduleName = "test_ec_shortweierstrass_projective_mixed_add_" & $BLS12_381
|
2020-09-26 09:16:29 +02:00
|
|
|
)
|
2020-09-27 09:15:14 +02:00
|
|
|
|
|
|
|
run_EC_mixed_add_impl(
|
2022-01-01 19:17:04 +01:00
|
|
|
ec = ECP_ShortW_Prj[Fp[BLS12_377], G1],
|
2020-09-27 09:15:14 +02:00
|
|
|
Iters = Iters,
|
2020-09-27 23:02:48 +02:00
|
|
|
moduleName = "test_ec_shortweierstrass_projective_mixed_add_" & $BLS12_377
|
2020-09-27 09:15:14 +02:00
|
|
|
)
|
2020-10-09 07:51:47 +02:00
|
|
|
|
|
|
|
run_EC_mixed_add_impl(
|
2022-01-01 19:17:04 +01:00
|
|
|
ec = ECP_ShortW_Prj[Fp[BW6_761], G1],
|
2020-10-09 07:51:47 +02:00
|
|
|
Iters = Iters,
|
|
|
|
moduleName = "test_ec_shortweierstrass_projective_mixed_add_" & $BW6_761
|
|
|
|
)
|