def test_and_proof_non_interactive_fails_when_wrong_secrets(params, group): p1, p2, secrets = params andp = AndProofStmt(p1, p2) bad_secrets = secrets.copy() u = list(bad_secrets.keys()) bad_secrets[u[0]] = group.order().random() message = "whatever" tr = andp.prove(bad_secrets, message=message) assert not andp.verify(tr, message=message)
def test_and_proof_non_interactive(params): p1, p2, secrets = params p = AndProofStmt(p1, p2) message = "whatever" tr = p.prove(secrets, message=message) assert p.verify(tr, message=message)