Security · Symmetric Cryptography
Block Cipher
Cheat sheet · https://pcornel.dk/topic.php?topic=4691
Answer
A block cipher encrypts fixed-size blocks, such as AES's 128 bits, and needs a mode of operation like GCM, CBC or CTR to encrypt longer data securely.
Remember
- Block ciphers encrypt fixed-size blocks.
- A mode of operation is needed for longer data.
- Prefer AEAD modes like GCM.
First checks
- Mode of operation in use — GCM/CTR/CBC/XTS
- Padding handling (CBC) — oracle risk
- Block size (128-bit) — birthday bounds
Verify in this order
block cipher + mode → ciphertext
Where it usually breaks
First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4691