EXERCISE 3 — Match the primitive to the job ============================================ (a) Encrypting a 4 GB video stream efficiently. PRIMITIVE: Symmetric encryption (AES), ideally an AEAD mode (AES-GCM). GUARANTEE: Confidentiality. Why: only symmetric crypto is fast enough for bulk data; asymmetric would be hopelessly slow at that volume. (b) Letting strangers send you a secret with nothing pre-shared. PRIMITIVE: Asymmetric / public-key encryption (RSA, or ECDH key exchange). GUARANTEE: enables a shared secret -> ultimately Confidentiality. Why: you publish a public key anyone can use; only your private key can unlock what they send. This is the only way to bootstrap a secret between parties who share nothing in advance. (c) Proving a downloaded file wasn't corrupted, given a TRUSTED digest. PRIMITIVE: Cryptographic hash (SHA-256). GUARANTEE: Integrity (keyless). Why: re-hash the file and compare to the published digest. Works here BECAUSE the digest is stated as trusted/untampered — no key needed for integrity alone when the reference value is trustworthy. (d) Proving a message both is intact AND came from someone sharing your key. PRIMITIVE: MAC / HMAC (hash + secret key). GUARANTEE: Integrity + sender authenticity. Why: only a key-holder can produce a valid tag, so a match proves the message wasn't altered and was produced by someone with the shared key — integrity bound to a sender, which a bare hash can't do. BIG PICTURE: No single primitive covers everything. TLS combines them: - asymmetric (b) to establish a shared key + authenticate the server, - then symmetric/AEAD (a) for fast confidential data, - with MAC/AEAD integrity (d) on every record, - and hashing (c) used throughout (in signatures, key derivation, etc.)