Mastering Cryptography in Python: Best Practices and Myth-Busting
summary
Shows concrete Python code using the cryptography library to encrypt an image and demonstrates why AES-256 alone is meaningless: ECB preserves image patterns, CBC needs padding and leaks silent corruption after tampering, and GCM provides authenticity but suffers catastrophic failures on GCM nonce reuse (two ciphertexts XOR to reveal data). Recommends using Fernet (one-liner encryption, built-in auth, AES-128/CBC+HMAC) and links a GitHub repo with examples; reports LLM-generated crypto had ~4% success in cited research.
AI-written summary · about
chapters (7)
- 0:00Introduction and myth busting
- 2:21The AES-256 misconception
- 5:21Naive block cipher usage
- 9:16CBC mode and its limitations
- 13:54GCM mode and nonce security
- 17:29Best practices for encryption
- 24:56Q&A and closing remarks
related talks
42mEverything I always wanted to know about crypto
34mPython bad cryptography habits
28mModern Cryptography
36mUse Cryptography; Don't Learn It
45m“An Overview on Encryption in C++"
01h 04m Cryptography For Newcomers - The hitchhiker's guide to cipher in devs
47mPractical Security Foundations
42mBreak Crypto like a Pro!
