2020-06-04 18:37:29 +00: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-21 23:09:52 +00:00
|
|
|
../constantine/config/[type_ff, curves],
|
2020-06-18 20:00:31 +00:00
|
|
|
../constantine/towers,
|
2020-10-10 14:19:23 +00:00
|
|
|
../constantine/elliptic/ec_shortweierstrass_jacobian,
|
|
|
|
../constantine/elliptic/ec_shortweierstrass_projective,
|
2020-06-04 18:37:29 +00:00
|
|
|
# Test utilities
|
2020-10-10 14:19:23 +00:00
|
|
|
./t_ec_sage_template
|
|
|
|
|
|
|
|
run_scalar_mul_test_vs_sage(
|
2021-02-06 15:29:53 +00:00
|
|
|
ECP_ShortW_Prj[Fp[BLS12_381], NotOnTwist],
|
2020-10-10 14:19:23 +00:00
|
|
|
"t_ec_sage_bls12_381_g1_projective"
|
|
|
|
)
|
|
|
|
|
|
|
|
run_scalar_mul_test_vs_sage(
|
|
|
|
ECP_ShortW_Jac[Fp[BLS12_381], NotOnTwist],
|
|
|
|
"t_ec_sage_bls12_381_g1_jacobian"
|
|
|
|
)
|
|
|
|
|
|
|
|
run_scalar_mul_test_vs_sage(
|
2021-02-06 15:29:53 +00:00
|
|
|
ECP_ShortW_Prj[Fp2[BLS12_381], OnTwist],
|
2020-10-10 14:19:23 +00:00
|
|
|
"t_ec_sage_bls12_381_g2_projective"
|
|
|
|
)
|
|
|
|
|
|
|
|
run_scalar_mul_test_vs_sage(
|
|
|
|
ECP_ShortW_Jac[Fp2[BLS12_381], OnTwist],
|
|
|
|
"t_ec_sage_bls12_381_g2_jacobian"
|
|
|
|
)
|