def pedersenOpen(n,g,h,m,r,c):
    """Open a pedersen commit. Arguments:
       n    modulus (i.e. Z*_n)
       g    generator 1
       h    generator 2
       m    message
       r    random
       c    commit generated by pedersenCommit() to verify"""
    if c == g**m*h**r % n:
        return True
    else:
        return False