Generate a zero-knowledge proof that DL(Q*kw) = DL(beta*kw) where
    <Q> = G1.

def prove(x,beta,kw,y):
    """
    Generate a zero-knowledge proof that DL(Q*kw) = DL(beta*kw) where
    <Q> = G1.
    """
    # Verify types
    assertScalarType(kw)
    assertType(beta, G1Element)
    assertType(y, G1Element)

    # Compute the proof.
    Q = generatorG1()
    p = Q*kw
    v = randomZ(orderG1())
    t1 = Q*v
    t2 = beta*v

    t1.normalize()
    t2.normalize()

    c = hashZ(Q,p,beta,y,t1,t2)
    u = (v-(c*kw)) % orderG1()
    return (p,c,u)