Why Fernet instead of AES-GCM or other modes?
Fernet is a high-level recipe from the cryptography library that bundles AES-CBC with HMAC-SHA256 for authentication, timestamp verification, and safe IV generation into a single, hard-to-misuse API. For file-at-rest encryption this is a strong fit: it prevents accidental plaintext leaks, guarantees integrity, and avoids the subtle pitfalls of hand-rolling AES-GCM nonce management.

