

def test_unblind():
    params = POUF_setup()
    (G, g, o) = params
    k = POUF_keyGen(params)
    (ai, yi) = POUF_blind(params, [b'1', b'2'])
    zi = POUF_mac(params, k, yi)
    fi = POUF_unblind(params, ai, zi)
    hi = [G.hash_to_point(m) for m in [b'1', b'2']]
    assert (fi == [(k * h) for h in hi])

dataset/ETHPy150Open gdanezis/petlib/examples/pouf.py test_unblind/original