Module 02

Cryptographic Verification

Cryptographic verification provides mathematical proof that content has not been tampered with. This module covers hash functions, digital signatures, and chain-of-custody verification.

Hash-Based Integrity Checking

A cryptographic hash function takes any input and produces a fixed-length fingerprint. Change a single bit of the input and the hash changes completely. This property makes hashes ideal for verifying that content has not been modified.

// SHA-256 hash verification example import hashlib def verify_integrity(file_path, expected_hash): """Verify file has not been modified""" sha256 = hashlib.sha256() with open(file_path, 'rb') as f: for chunk in iter(lambda: f.read(8192), b''): sha256.update(chunk) actual = sha256.hexdigest() return actual == expected_hash # Usage is_valid = verify_integrity( 'evidence_photo.jpg', 'a7ffc6f8bf1ed766...' # known-good hash )

Digital Signatures

While hashes verify integrity, digital signatures verify both integrity and authenticity. A signature proves who created or approved the content and that it has not changed since signing.

Signing

The author hashes the content, then encrypts the hash with their private key. The encrypted hash is the digital signature, attached to the content.

Verification

Anyone can decrypt the signature using the author's public key, then compare the result against a fresh hash of the content. Match means authentic and unmodified.

Certificate Chains of Trust

Digital signatures depend on trusting the public key. Certificate authorities (CAs) create chains of trust — a CA vouches for an organization, which vouches for individual signers. The same infrastructure that secures HTTPS secures content provenance.

AlgorithmKey SizeUse CaseStatus
RSA2048-4096 bitDocument signing, S/MIMEWidely Used
ECDSA256-384 bitC2PA, mobile signingRecommended
Ed25519256 bitGit commits, SSHRecommended

This module provides the cryptographic foundation for C2PA Standards and connects to the metadata analysis techniques in Metadata & Provenance Analysis.