Exemplo n.º 1
0
 def test_vec_mul_E_is_correct_2(self):
     s, k, prover_id = 3, 0, 1
     c = [None] * s
     zk = ZKProof(s, prover_id, k, RuntimeStub(), c)
     zk.e = [0, 1, 1]
     x = [2, -3, 0]
     x_mul_E = zk._vec_mul_E(x)
     self.assertEquals([v for v in [0, 2, -1, -3, 0]], x_mul_E)
Exemplo n.º 2
0
 def test_vec_mul_E_is_correct_2(self):
     s, k, prover_id = 3, 0, 1
     c = [None] * s
     zk = ZKProof(s, prover_id, k, RuntimeStub(), c)
     zk.e = [0, 1, 1]
     x = [2, -3, 0]
     x_mul_E = zk._vec_mul_E(x)
     self.assertEquals([v for v in [0, 2, -1, -3, 0]], x_mul_E)
Exemplo n.º 3
0
 def test_vec_mul_E_is_correct(self):
     s, prover_id, k, Zn = 5, 1, 0, GF(17)
     c = [None] * s
     y = [Zn(i) for i in range(1, 6)]
     zk = ZKProof(s, prover_id, k, RuntimeStub(), c)
     zk.e = [1, 0, 1, 1, 0]
     x = [1, 2, 0, 1, 0]
     x_mul_E = zk._vec_mul_E(x)
     self.assertEquals([v for v in [1, 2, 1, 4, 2, 1, 1, 0, 0]], x_mul_E)
Exemplo n.º 4
0
 def test_vec_mul_E_is_correct(self):
     s, prover_id, k, Zn = 5, 1, 0, GF(17)
     c = [None] * s
     y = [Zn(i) for i in range(1, 6)]
     zk = ZKProof(s, prover_id, k, RuntimeStub(), c)
     zk.e = [1, 0, 1, 1, 0]
     x = [1, 2, 0, 1, 0]
     x_mul_E = zk._vec_mul_E(x)
     self.assertEquals([v for v in [1, 2, 1, 4, 2, 1, 1, 0, 0]], x_mul_E)