aboutsummaryrefslogtreecommitdiffstats
path: root/moon-abe/pbc-0.5.14/pbc/bilinear.test
diff options
context:
space:
mode:
authorwukong <rebirthmonkey@gmail.com>2015-11-23 17:48:48 +0100
committerwukong <rebirthmonkey@gmail.com>2015-11-23 17:48:48 +0100
commitfca74d4bc3569506a6659880a89aa009dc11f552 (patch)
tree4cefd06af989608ea8ebd3bc6306889e2a1ad175 /moon-abe/pbc-0.5.14/pbc/bilinear.test
parent840ac3ebca7af381132bf7e93c1e4c0430d6b16a (diff)
moon-abe cleanup
Change-Id: Ie1259856db03f0b9e80de3e967ec6bd1f03191b3
Diffstat (limited to 'moon-abe/pbc-0.5.14/pbc/bilinear.test')
-rw-r--r--moon-abe/pbc-0.5.14/pbc/bilinear.test50
1 files changed, 0 insertions, 50 deletions
diff --git a/moon-abe/pbc-0.5.14/pbc/bilinear.test b/moon-abe/pbc-0.5.14/pbc/bilinear.test
deleted file mode 100644
index 956c792e..00000000
--- a/moon-abe/pbc-0.5.14/pbc/bilinear.test
+++ /dev/null
@@ -1,50 +0,0 @@
-define test_element_order(group) {
- a := random(group);
- o := order(group);
- b := a^o;
- CHECK(b == group(0));
-}
-
-define test_group_order() {
- CHECK(order(G1) == order(G2));
- CHECK(order(G2) == order(GT));
- a := pairing(random(G1), random(G2));
- o := order(GT);
- b := a^o;
- CHECK(b == GT(0));
-}
-
-define test_pairing_with_zero() {
- CHECK(GT(0) == GT(1));
- CHECK(pairing(G1(0), random(G2)) == GT(0));
- CHECK(pairing(random(G1), G2(0)) == GT(0));
- CHECK(pairing(G1(0), G2(0)) == GT(0));
-}
-
-define test_bilinear() {
- a1 := random(G1);
- b1 := random(G2);
- x := random(Zr);
- y := random(Zr);
- CHECK(pairing(a1^x, b1) == pairing(a1, b1^x));
- CHECK(pairing(a1^x, b1) == pairing(a1, b1)^x);
- CHECK(pairing(a1, b1^x) == pairing(a1, b1)^x);
- CHECK(pairing(a1^x, b1^y) == pairing(a1, b1)^(x*y));
-}
-
-define test(initfn) {
- initfn();
- test_element_order(G1);
- test_element_order(G2);
- test_element_order(GT);
- test_group_order();
- test_pairing_with_zero();
- test_bilinear();
-}
-
-test(init_pairing_a);
-test(init_pairing_d);
-test(init_pairing_e);
-test(init_pairing_f);
-test(init_pairing_g);
-test(init_pairing_i);