-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] add test cases for zero window MSM operations
- Loading branch information
Showing
3 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
tests/math_elliptic_curves/t_ec_msm_zero_windows_sanity.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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/named/algebras, | ||
constantine/math/ec_shortweierstrass, | ||
constantine/math/arithmetic, | ||
# Test utilities | ||
./t_ec_template | ||
|
||
run_EC_multi_scalar_mul_zero_windows_sanity( | ||
ec = EC_ShortW_Jac[Fp[BN254_Snarks], G1], | ||
moduleName = "test_msm_zero_windows_sanity" & $BN254_Snarks | ||
) | ||
|
||
run_EC_multi_scalar_mul_zero_windows_sanity( | ||
ec = EC_ShortW_Jac[Fp[BLS12_381], G1], | ||
moduleName = "test_msm_zero_windows_sanity" & $BLS12_381 | ||
) |
29 changes: 29 additions & 0 deletions
29
tests/math_elliptic_curves/t_ec_shortw_jac_g1_msm_zero_windows_comparison.nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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/named/algebras, | ||
constantine/math/ec_shortweierstrass, | ||
constantine/math/arithmetic, | ||
# Test utilities | ||
./t_ec_template | ||
|
||
const numPoints = [1, 2, 8, 16, 32, 64, 128, 1024, 2048, 4096] # 32768, 262144, 1048576] | ||
|
||
run_EC_multi_scalar_mul_different_zero_windows( | ||
ec = EC_ShortW_Jac[Fp[BN254_Snarks], G1], | ||
numPoints = numPoints, | ||
moduleName = "test_ec_shortweierstrass_jacobian_multi_scalar_mul_different_zero_windows_" & $BN254_Snarks | ||
) | ||
|
||
run_EC_multi_scalar_mul_different_zero_windows( | ||
ec = EC_ShortW_Jac[Fp[BLS12_381], G1], | ||
numPoints = numPoints, | ||
moduleName = "test_ec_shortweierstrass_jacobian_multi_scalar_mul_different_zero_windows_" & $BLS12_381 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters