Exemplo n.º 1
0
 def test_generate_e_generates_e_of_right_length(self):
     s, prover_id, k = 9, 1, 0
     c = [1, 1, 0, 0, 1, 0, 1, 0, 1]
     zk = ZKProof(s, prover_id, k, RuntimeStub(), c)
     zk.d = [1, 0, 0, 1, 1, 0, 1, 1, 1]
     zk._generate_e()
     self.assertEquals(s, len(zk.e))
Exemplo n.º 2
0
 def test_generate_e_generates_e_of_right_length(self):
     s, prover_id, k = 9, 1, 0
     c = [1, 1, 0, 0, 1, 0, 1, 0, 1]
     zk = ZKProof(s, prover_id, k, RuntimeStub(), c)
     zk.d = [1, 0, 0, 1, 1, 0, 1, 1, 1]
     zk._generate_e()
     self.assertEquals(s, len(zk.e))
Exemplo n.º 3
0
 def test_generate_e_is_deterministic(self):
     s, prover_id, k = 9, 1, 0
     c = [1, 1, 0, 0, 1, 0, 1, 0, 1]
     zk = ZKProof(s, prover_id, k, RuntimeStub(), c)
     zk.d = [1, 0, 0, 1, 1, 0, 1, 1, 1]
     zk._generate_e()
     e1 = zk.e
     zk._generate_e()
     self.assertEquals(e1, zk.e)
Exemplo n.º 4
0
 def test_generate_e_is_deterministic(self):
     s, prover_id, k = 9, 1, 0
     c = [1, 1, 0, 0, 1, 0, 1, 0, 1]
     zk = ZKProof(s, prover_id, k, RuntimeStub(), c)
     zk.d = [1, 0, 0, 1, 1, 0, 1, 1, 1]
     zk._generate_e()
     e1 = zk.e
     zk._generate_e()
     self.assertEquals(e1, zk.e)