Example #1
0
def verify_data_payload(data_payload, data_pubkey, sigb64):
    """
    Given a payload, verify that the signature covers
    its netstring representation (i.e. 'len(data_payload):data_payload,')
    """
    data_txt = serialize_data_payload(data_payload)
    res = verify_raw_data(data_txt, data_pubkey, sigb64)
    return res
Example #2
0
def verify_data_tombstone(signed_tombstone, data_pubkey):
    """
    Verify the authenticity of a data tombstone
    """
    parts = signed_tombstone.rsplit(":", 1)
    if len(parts) != 2:
        return False

    tombstone_data, sigb64 = parts[0], parts[1]
    return verify_raw_data(tombstone_data, data_pubkey, sigb64)