def test_dlne_non_interactive_2(group): g = group.generator() x = Secret(value=3) y = 3 * g y2 = 397474 * g g2 = 1397 * g p1 = DLNotEqual([y, g], [y2, g2], x, bind=True) tr = p1.prove() p2 = DLNotEqual([y, g], [y2, g2], Secret(), bind=True) assert p2.verify(tr)
def test_dlne_non_interactive_1(group): g = group.generator() x = Secret() y = 3 * g y2 = 397474 * g g2 = 1397 * g p1 = DLNotEqual([y, g], [y2, g2], x, bind=True) secret_dict = {x: 3} tr = p1.prove(secret_dict) p2 = DLNotEqual([y, g], [y2, g2], x, bind=True) assert p2.verify(tr)