def key_verify(expected_hash, signature, key):
    """Verify that the signature data matches the calculated digest of
    the data being signed using the key that made the signature.
    """
    return key.verify(signature, expected_hash)
