/ tests / math_elliptic_curves / t_ec_shortw_jac_g1_mixed_add.nim
t_ec_shortw_jac_g1_mixed_add.nim
 1  # Constantine
 2  # Copyright (c) 2018-2019    Status Research & Development GmbH
 3  # Copyright (c) 2020-Present Mamy André-Ratsimbazafy
 4  # Licensed and distributed under either of
 5  #   * MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT).
 6  #   * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0).
 7  # at your option. This file may not be copied, modified, or distributed except according to those terms.
 8  
 9  import
10    # Internals
11    ../../constantine/math/config/curves,
12    ../../constantine/math/elliptic/ec_shortweierstrass_jacobian,
13    ../../constantine/math/arithmetic,
14    # Test utilities
15    ./t_ec_template
16  
17  const
18    Iters = 6
19  
20  run_EC_mixed_add_impl(
21      ec = ECP_ShortW_Jac[Fp[BN254_Snarks], G1],
22      Iters = Iters,
23      moduleName = "test_ec_shortweierstrass_jacobian_mixed_add_" & $BN254_Snarks
24    )
25  
26  run_EC_mixed_add_impl(
27      ec = ECP_ShortW_Jac[Fp[BLS12_381], G1],
28      Iters = Iters,
29      moduleName = "test_ec_shortweierstrass_jacobian_mixed_add_" & $BLS12_381
30    )
31  
32  run_EC_mixed_add_impl(
33      ec = ECP_ShortW_Jac[Fp[BLS12_377], G1],
34      Iters = Iters,
35      moduleName = "test_ec_shortweierstrass_jacobian_mixed_add_" & $BLS12_377
36    )
37  
38  run_EC_mixed_add_impl(
39      ec = ECP_ShortW_Jac[Fp[BW6_761], G1],
40      Iters = Iters,
41      moduleName = "test_ec_shortweierstrass_jacobian_mixed_add_" & $BW6_761
42    )
43  
44  run_EC_mixed_add_impl(
45      ec = ECP_ShortW_Jac[Fp[Pallas], G1],
46      Iters = Iters,
47      moduleName = "test_ec_shortweierstrass_jacobian_mixed_add_" & $Pallas
48    )
49  
50  run_EC_mixed_add_impl(
51      ec = ECP_ShortW_Jac[Fp[Vesta], G1],
52      Iters = Iters,
53      moduleName = "test_ec_shortweierstrass_jacobian_mixed_add_" & $Vesta
54    )