/ tests / math_extension_fields / t_fp2_frobenius.nim
t_fp2_frobenius.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/extension_fields,
12    ../../constantine/math/config/curves,
13    # Test utilities
14    ./t_fp_tower_frobenius_template
15  
16  const TestCurves = [
17      BN254_Nogami,
18      BN254_Snarks,
19      BLS12_377,
20      BLS12_381,
21      BW6_761
22    ]
23  
24  runFrobeniusTowerTests(
25    ExtDegree = 2,
26    Iters = 2,
27    TestCurves = TestCurves,
28    moduleName = "test_fp2_frobenius",
29    testSuiteDesc = "𝔽p2 Frobenius map: Frobenius(a, k) = a^(pᵏ) (mod p²)"
30  )