diff options
author | wukong <rebirthmonkey@gmail.com> | 2015-11-23 17:48:48 +0100 |
---|---|---|
committer | wukong <rebirthmonkey@gmail.com> | 2015-11-23 17:48:48 +0100 |
commit | fca74d4bc3569506a6659880a89aa009dc11f552 (patch) | |
tree | 4cefd06af989608ea8ebd3bc6306889e2a1ad175 /moon-abe/pbc-0.5.14/pbc/g2_test.pbc | |
parent | 840ac3ebca7af381132bf7e93c1e4c0430d6b16a (diff) |
moon-abe cleanup
Change-Id: Ie1259856db03f0b9e80de3e967ec6bd1f03191b3
Diffstat (limited to 'moon-abe/pbc-0.5.14/pbc/g2_test.pbc')
-rw-r--r-- | moon-abe/pbc-0.5.14/pbc/g2_test.pbc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/moon-abe/pbc-0.5.14/pbc/g2_test.pbc b/moon-abe/pbc-0.5.14/pbc/g2_test.pbc deleted file mode 100644 index 892660f9..00000000 --- a/moon-abe/pbc-0.5.14/pbc/g2_test.pbc +++ /dev/null @@ -1,37 +0,0 @@ -# Exercises a bug found by Zhang Ye. - -define test_cmp_0(initfn) { - initfn(); - CHECK(random(G2) != G2(0)); - CHECK(G2(0) != random(G2)); - CHECK(G2(0) == G2(0)); - CHECK(random(G1) != G1(0)); - CHECK(G1(0) != random(G1)); - CHECK(G1(0) == G1(0)); -} - -test_cmp_0(init_pairing_a); -test_cmp_0(init_pairing_d); -test_cmp_0(init_pairing_e); -test_cmp_0(init_pairing_f); -test_cmp_0(init_pairing_g); -test_cmp_0(init_pairing_i); - -# Exercises a bug found by Mario Di Raimondo. - -define test_g2_cmp(initfn) { - initfn(); - a := rnd(G2); - m := rnd(Zr); - n := rnd(Zr); - CHECK((a^m)^n == a^(m*n)); - CHECK(a != a^m); - CHECK(a != a^n); -} - -test_g2_cmp(init_pairing_a); -test_g2_cmp(init_pairing_d); -test_g2_cmp(init_pairing_e); -test_g2_cmp(init_pairing_f); -test_g2_cmp(init_pairing_g); -test_g2_cmp(init_pairing_i); |