def prover_state1(self): print("PROVER 1: ") (g, V) = Sigma.get(self, ['g', 'V']) r = self.group.random(G2) a1 = pair(g, r) a2 = pair(V, r) print("send r =>", r) print("send a1 =>", a1) print("send a2 =>", a2) pk = Sigma.get(self, ['g', 'V', 'H'], dict) Sigma.store(self, ('r', r)) Sigma.setState(self, 3) return {'a1': a1, 'a2': a2, 'pk': pk}
def prover_state1(self): print("PROVER 1: ") (g, V) = Sigma.get(self, ['g', 'V']) r = self.group.random(G2) a1 = pair(g, r) a2 = pair(V, r) print("send r =>", r) print("send a1 =>", a1) print("send a2 =>", a2) pk = Sigma.get(self, ['g','V','H'], dict) Sigma.store(self, ('r',r) ) Sigma.setState(self, 3) return { 'a1':a1, 'a2':a2, 'pk':pk }
def prover_state1(self): print("PROVER 1: ") (g, V) = Sigma.get(self, ['g', 'V']) r1, r2 = self.group.random(ZR, 2) a = (pair(V, g)**-r1) * (pair(g, g)**r2) print("send g =>", g) print("send V =>", V) print("send r1 =>", r1) print("send r2 =>", r2) print("send a =>", a) pk = Sigma.get(self, ['g', 'V', 'y'], dict) Sigma.store(self, ('r1', r1), ('r2', r2)) Sigma.setState(self, 3) return {'a': a, 'pk': pk}
def prover_state1(self): print("PROVER 1: ") (g, V) = Sigma.get(self, ['g', 'V']) r1, r2 = self.group.random(ZR, 2) a = (pair(V, g) ** -r1) * (pair(g, g) ** r2) print("send g =>", g) print("send V =>", V) print("send r1 =>", r1) print("send r2 =>", r2) print("send a =>", a) pk = Sigma.get(self, ['g','V','y'], dict) Sigma.store(self, ('r1',r1), ('r2',r2) ) Sigma.setState(self, 3) return { 'a':a, 'pk':pk }