Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conformance tests for BLS scalar mulitplication periodicity
- Loading branch information
Showing
53 changed files
with
222 additions
and
18 deletions.
There are no files selected for viewing
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
...s/uplc/evaluation/builtin/semantics/bls12_381_G1_scalarMul/mulperiodic1/mulperiodic1.uplc
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,13 @@ | ||
-- Scalar multiplication by the group size should give you the zero element of the group. | ||
(program 1.0.0 | ||
[ | ||
[ (builtin bls12_381_G1_equal) | ||
[ | ||
(builtin bls12_381_G1_scalarMul) | ||
(con integer 52435875175126190479447740508185965837690552500527637822603658699938581184513 ) | ||
(con bls12_381_G1_element 0xabd61864f519748032551e42e0ac417fd828f079454e3e3c9891c5c29ed7f10bdecc046854e3931cb7002779bd76d71f) | ||
] | ||
] | ||
(con bls12_381_G1_element 0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) | ||
] | ||
) |
1 change: 1 addition & 0 deletions
1
...aluation/builtin/semantics/bls12_381_G1_scalarMul/mulperiodic1/mulperiodic1.uplc.expected
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 @@ | ||
(program 1.0.0 (con bool True)) |
23 changes: 23 additions & 0 deletions
23
...s/uplc/evaluation/builtin/semantics/bls12_381_G1_scalarMul/mulperiodic2/mulperiodic2.uplc
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,23 @@ | ||
-- Scalar multiplication should be periodic modulo the group size | ||
(program 1.0.0 | ||
[ | ||
[ | ||
(builtin bls12_381_G1_equal) | ||
[ | ||
[ | ||
(builtin bls12_381_G1_scalarMul) | ||
[ | ||
[ (builtin addInteger) (con integer 123) ] | ||
(con integer 52435875175126190479447740508185965837690552500527637822603658699938581184513) | ||
] | ||
] | ||
(con bls12_381_G1_element 0xabd61864f519748032551e42e0ac417fd828f079454e3e3c9891c5c29ed7f10bdecc046854e3931cb7002779bd76d71f) | ||
] | ||
] | ||
[ | ||
[ (builtin bls12_381_G1_scalarMul) (con integer 123) ] | ||
(con bls12_381_G1_element 0xabd61864f519748032551e42e0ac417fd828f079454e3e3c9891c5c29ed7f10bdecc046854e3931cb7002779bd76d71f) | ||
] | ||
] | ||
) | ||
|
1 change: 1 addition & 0 deletions
1
...aluation/builtin/semantics/bls12_381_G1_scalarMul/mulperiodic2/mulperiodic2.uplc.expected
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 @@ | ||
(program 1.0.0 (con bool True)) |
27 changes: 27 additions & 0 deletions
27
...s/uplc/evaluation/builtin/semantics/bls12_381_G1_scalarMul/mulperiodic3/mulperiodic3.uplc
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,27 @@ | ||
-- Scalar multiplication should be periodic modulo the group size | ||
(program | ||
1.0.0 | ||
[ | ||
[ | ||
(builtin bls12_381_G1_equal) | ||
[ | ||
[ | ||
(builtin bls12_381_G1_scalarMul) | ||
[ | ||
[ (builtin addInteger) (con integer 123) ] | ||
[ | ||
[ (builtin multiplyInteger) (con integer 987654321) ] | ||
(con integer 52435875175126190479447740508185965837690552500527637822603658699938581184513) | ||
] | ||
] | ||
] | ||
(con bls12_381_G1_element 0xabd61864f519748032551e42e0ac417fd828f079454e3e3c9891c5c29ed7f10bdecc046854e3931cb7002779bd76d71f) | ||
] | ||
] | ||
[ | ||
[ (builtin bls12_381_G1_scalarMul) (con integer 123) ] | ||
(con bls12_381_G1_element 0xabd61864f519748032551e42e0ac417fd828f079454e3e3c9891c5c29ed7f10bdecc046854e3931cb7002779bd76d71f) | ||
] | ||
] | ||
) | ||
|
1 change: 1 addition & 0 deletions
1
...aluation/builtin/semantics/bls12_381_G1_scalarMul/mulperiodic3/mulperiodic3.uplc.expected
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 @@ | ||
(program 1.0.0 (con bool True)) |
27 changes: 27 additions & 0 deletions
27
...s/uplc/evaluation/builtin/semantics/bls12_381_G1_scalarMul/mulperiodic4/mulperiodic4.uplc
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,27 @@ | ||
-- Scalar multiplication should be periodic modulo the group size | ||
(program | ||
1.0.0 | ||
[ | ||
[ | ||
(builtin bls12_381_G1_equal) | ||
[ | ||
[ | ||
(builtin bls12_381_G1_scalarMul) | ||
[ | ||
[ (builtin addInteger) (con integer 123) ] | ||
[ | ||
[ (builtin multiplyInteger) (con integer -987654321) ] | ||
(con integer 52435875175126190479447740508185965837690552500527637822603658699938581184513) | ||
] | ||
] | ||
] | ||
(con bls12_381_G1_element 0xabd61864f519748032551e42e0ac417fd828f079454e3e3c9891c5c29ed7f10bdecc046854e3931cb7002779bd76d71f) | ||
] | ||
] | ||
[ | ||
[ (builtin bls12_381_G1_scalarMul) (con integer 123) ] | ||
(con bls12_381_G1_element 0xabd61864f519748032551e42e0ac417fd828f079454e3e3c9891c5c29ed7f10bdecc046854e3931cb7002779bd76d71f) | ||
] | ||
] | ||
) | ||
|
1 change: 1 addition & 0 deletions
1
...aluation/builtin/semantics/bls12_381_G1_scalarMul/mulperiodic4/mulperiodic4.uplc.expected
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 @@ | ||
(program 1.0.0 (con bool True)) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
...s/uplc/evaluation/builtin/semantics/bls12_381_G2_scalarMul/mulperiodic1/mulperiodic1.uplc
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,14 @@ | ||
-- Scalar multiplication by the group size should give you the zero element of the group. | ||
(program 1.0.0 | ||
[ | ||
[ (builtin bls12_381_G2_equal) | ||
[ | ||
(builtin bls12_381_G2_scalarMul) | ||
(con integer 52435875175126190479447740508185965837690552500527637822603658699938581184513 ) | ||
(con bls12_381_G2_element 0xb0629fa1158c2d23a10413fe91d381a84d25e31d041cd0377d25828498fd02011b35893938ced97535395e4815201e67108bcd4665e0db25d602d76fa791fab706c54abf5e1a9e44b4ac1e6badf3d2ac0328f5e30be341677c8bac5dda7682f1) | ||
] | ||
] | ||
(con bls12_381_G2_element | ||
0xc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) | ||
] | ||
) |
1 change: 1 addition & 0 deletions
1
...aluation/builtin/semantics/bls12_381_G2_scalarMul/mulperiodic1/mulperiodic1.uplc.expected
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 @@ | ||
(program 1.0.0 (con bool True)) |
26 changes: 26 additions & 0 deletions
26
...s/uplc/evaluation/builtin/semantics/bls12_381_G2_scalarMul/mulperiodic2/mulperiodic2.uplc
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,26 @@ | ||
-- Scalar multiplication should be periodic modulo the group size | ||
(program | ||
1.0.0 | ||
[ | ||
[ | ||
(builtin bls12_381_G2_equal) | ||
[ | ||
[ | ||
(builtin bls12_381_G2_scalarMul) | ||
[ | ||
[ (builtin addInteger) (con integer 123) ] | ||
(con integer 52435875175126190479447740508185965837690552500527637822603658699938581184513) | ||
] | ||
] | ||
(con bls12_381_G2_element | ||
0xb0629fa1158c2d23a10413fe91d381a84d25e31d041cd0377d25828498fd02011b35893938ced97535395e4815201e67108bcd4665e0db25d602d76fa791fab706c54abf5e1a9e44b4ac1e6badf3d2ac0328f5e30be341677c8bac5dda7682f1) | ||
] | ||
] | ||
[ | ||
[ (builtin bls12_381_G2_scalarMul) (con integer 123) ] | ||
(con bls12_381_G2_element | ||
0xb0629fa1158c2d23a10413fe91d381a84d25e31d041cd0377d25828498fd02011b35893938ced97535395e4815201e67108bcd4665e0db25d602d76fa791fab706c54abf5e1a9e44b4ac1e6badf3d2ac0328f5e30be341677c8bac5dda7682f1) | ||
] | ||
] | ||
) | ||
|
1 change: 1 addition & 0 deletions
1
...aluation/builtin/semantics/bls12_381_G2_scalarMul/mulperiodic2/mulperiodic2.uplc.expected
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 @@ | ||
(program 1.0.0 (con bool True)) |
29 changes: 29 additions & 0 deletions
29
...s/uplc/evaluation/builtin/semantics/bls12_381_G2_scalarMul/mulperiodic3/mulperiodic3.uplc
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 @@ | ||
-- Scalar multiplication should be periodic modulo the group size | ||
(program | ||
1.0.0 | ||
[ | ||
[ | ||
(builtin bls12_381_G2_equal) | ||
[ | ||
[ | ||
(builtin bls12_381_G2_scalarMul) | ||
[ | ||
[ (builtin addInteger) (con integer 123) ] | ||
[ | ||
[ (builtin multiplyInteger) (con integer 987654321) ] | ||
(con integer 52435875175126190479447740508185965837690552500527637822603658699938581184513) | ||
] | ||
] | ||
] | ||
(con bls12_381_G2_element | ||
0xb0629fa1158c2d23a10413fe91d381a84d25e31d041cd0377d25828498fd02011b35893938ced97535395e4815201e67108bcd4665e0db25d602d76fa791fab706c54abf5e1a9e44b4ac1e6badf3d2ac0328f5e30be341677c8bac5dda7682f1) | ||
] | ||
] | ||
[ | ||
[ (builtin bls12_381_G2_scalarMul) (con integer 123) ] | ||
(con bls12_381_G2_element | ||
0xb0629fa1158c2d23a10413fe91d381a84d25e31d041cd0377d25828498fd02011b35893938ced97535395e4815201e67108bcd4665e0db25d602d76fa791fab706c54abf5e1a9e44b4ac1e6badf3d2ac0328f5e30be341677c8bac5dda7682f1) | ||
] | ||
] | ||
) | ||
|
1 change: 1 addition & 0 deletions
1
...aluation/builtin/semantics/bls12_381_G2_scalarMul/mulperiodic3/mulperiodic3.uplc.expected
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 @@ | ||
(program 1.0.0 (con bool True)) |
29 changes: 29 additions & 0 deletions
29
...s/uplc/evaluation/builtin/semantics/bls12_381_G2_scalarMul/mulperiodic4/mulperiodic4.uplc
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 @@ | ||
-- Scalar multiplication should be periodic modulo the group size | ||
(program | ||
1.0.0 | ||
[ | ||
[ | ||
(builtin bls12_381_G2_equal) | ||
[ | ||
[ | ||
(builtin bls12_381_G2_scalarMul) | ||
[ | ||
[ (builtin addInteger) (con integer 123) ] | ||
[ | ||
[ (builtin multiplyInteger) (con integer -987654321) ] | ||
(con integer 52435875175126190479447740508185965837690552500527637822603658699938581184513) | ||
] | ||
] | ||
] | ||
(con bls12_381_G2_element | ||
0xb0629fa1158c2d23a10413fe91d381a84d25e31d041cd0377d25828498fd02011b35893938ced97535395e4815201e67108bcd4665e0db25d602d76fa791fab706c54abf5e1a9e44b4ac1e6badf3d2ac0328f5e30be341677c8bac5dda7682f1) | ||
] | ||
] | ||
[ | ||
[ (builtin bls12_381_G2_scalarMul) (con integer 123) ] | ||
(con bls12_381_G2_element | ||
0xb0629fa1158c2d23a10413fe91d381a84d25e31d041cd0377d25828498fd02011b35893938ced97535395e4815201e67108bcd4665e0db25d602d76fa791fab706c54abf5e1a9e44b4ac1e6badf3d2ac0328f5e30be341677c8bac5dda7682f1) | ||
] | ||
] | ||
) | ||
|
1 change: 1 addition & 0 deletions
1
...aluation/builtin/semantics/bls12_381_G2_scalarMul/mulperiodic4/mulperiodic4.uplc.expected
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 @@ | ||
(program 1.0.0 (con bool True)) |