def verifier_state4(self, input): (g, H, a, c, z) = Sigma.get(self, ['g','H','a','c','z']) if a == (pair(g,z) * (H ** c)): print("SUCCESS!!!!!!!"); result = 'OK' else: print("Failed!!!"); result = 'FAIL' Sigma.setState(self, 6) Sigma.setErrorCode(self, result) return result
def verifier_state4(self, input): print("VERIFIER 4: ") (a1, a2, c, W, z, pk) = Sigma.get(self, ['a1','a2','c','W','z','pk']) g, V, H = pk['g'], pk['V'], pk['H'] if a1 == pair(g,z) * (H ** c) and a2 == pair(V,z) * (W ** c): print("SUCCESS!!!!!!!"); result = 'OK' else: print("Failed!!!"); result = 'FAIL' Sigma.setState(self, 6) Sigma.setErrorCode(self, result) return result
def verifier_state4(self, input): print("VERIFIER 4: ") (a, c, z1, z2, pk) = Sigma.get(self, ['a','c','z1','z2','pk']) g, y, V = pk['g'], pk['y'], pk['V'] print("get a =>", a) if a == (pair(V,y) ** c) * (pair(V,g) ** -z1) * (pair(g,g) ** z2): print("SUCCESS!!!!!!!"); result = 'OK' else: print("Failed!!!"); result = 'FAIL' Sigma.setState(self, 6) Sigma.setErrorCode(self, result) return result
def prover_state5(self, input): print("PROVER 5: result =>", input) Sigma.setState(self, None) Sigma.setErrorCode(self, input) return None
def prover_state5(self, input): Sigma.setState(self, None) Sigma.setErrorCode(self, input) return None