| # | Aspect | RBAC | ABAC |
| 1 | Decision basis | User's role only | Attributes of subject, object, action, environment |
| 2 | Decision time | At role-assignment time (static) | At request time (dynamic evaluation) |
| 3 | Context awareness | None — same role always same access | Time, location, device posture factored in |
| 4 | Granularity | Coarse (whole role) | Fine-grained (single attribute combinations) |
| 5 | Scalability problem | Role explosion when rules get fine-grained | Avoids it — policies compose via Boolean logic |
| 6 | Audit question | Easy: "who has role X?" | Hard: must simulate policies over attribute space |
| 7 | Policy language | Role→permission matrix | XACML / Rego / Cedar attribute expressions |
| 8 | Change handling | Re-assign roles manually | Automatic — attribute change flips decisions instantly |
| 9 | Example | "Editors can publish" | "Doctors read own-dept records, weekdays 07–19" |
| 10 | Relation | RBAC is a special case of ABAC where the only attribute is "role" |
| # | Aspect | MAC | DAC |
| 1 | Who decides | The system (central policy) | The resource owner |
| 2 | Basis | Labels: clearance vs classification | Identity + ACL entries |
| 3 | Formal model | Bell–LaPadula (no-read-up, no-write-down) | Access matrix / ACLs, no lattice |
| 4 | Trojan-horse resistance | Strong — malware can't relabel | Weak — malware inherits owner's rights |
| 5 | Flexibility | Rigid, users can't override | Flexible, owner grants at will |
| 6 | Admin overhead | High (label everything, clear everyone) | Low (owners self-manage) |
| 7 | Commercial fit | Poor — built for military secrecy | Good — matches files, sharing, collaboration |
| 8 | Granting rights | Only security admin via clearance | Owner can delegate further (leakage risk) |
| 9 | Examples | SELinux enforcing, military Top Secret systems | Unix rwx bits, Google-Docs "share" button |
| 10 | Info flow | Up-only lattice (Secret → Top Secret) | Any direction the owner permits |
| # | Aspect | AES | DES |
| 1 | Block size | 128 bits | 64 bits (birthday bound at 2³² blocks) |
| 2 | Key size | 128 / 192 / 256 bits | 56 bits effective (8 parity bits) |
| 3 | Rounds | 10 / 12 / 14 by key size | 16 Feistel rounds |
| 4 | Structure | SPN (SubBytes/ShiftRows/MixColumns) | Feistel network (F need not invert) |
| 5 | S-boxes | One 8-bit S-box (inverse + affine) | Eight 6→4-bit S-boxes + E-expansion + P-box |
| 6 | Brute force | 2¹²⁸ — infeasible | 2⁵⁶ — broken 1998 (Deep Crack, ~22 h) |
| 7 | Status | Secure, NIST standard since 2001 | Withdrawn; 3DES as stopgap, now also retired |
| 8 | Speed | Fast in software + AES-NI hardware | Slower, bit-permutation heavy |
| 9 | Key schedule | RotWord/SubWord/Rcon, 44/52/60 words | PC-1 → 16 LS shifts → PC-2, 16×48-bit keys |
| 10 | Final round | Omits MixColumns (decryption symmetry) | Ends with swap + IP⁻¹ |
| # | Aspect | AES | DES | RSA |
| 1 | Family | Symmetric block | Symmetric block | Asymmetric (public-key) |
| 2 | Key sizes | 128/192/256-bit secret | 56-bit secret | 2048/3072-bit modulus |
| 3 | Hard problem | None (brute force only) | None (brute force only) | Factoring n = pq |
| 4 | Speed | Very fast (GB/s) | Moderate | ~1000× slower — bulk data impossible |
| 5 | Key distribution | Needs pre-shared secret | Same problem | Solves it: publish (e,n), keep d |
| 6 | Primary use | Bulk encryption (TLS records) | Legacy only | Key exchange, signatures, certs |
| 7 | Security status | Secure | Broken | Secure at 2048+ (classical) |
| 8 | Signatures? | No | No | Yes (swap e/d roles) |
| 9 | Padding/modes | Needs mode (GCM/CBC) + nonce | Same + Sweet32 limits | Needs OAEP/PSS — textbook RSA broken |
| 10 | Quantum outlook | Halved (Grover) — use 256-bit | Dead anyway | Killed by Shor → migrate to PQC |
| # | Aspect | RSA | Diffie-Hellman |
| 1 | Purpose | Encryption + signatures | Key agreement only — encrypts nothing itself |
| 2 | Hard problem | Factoring n = pq | Discrete log a = log_g A |
| 3 | What travels | Ciphertext c = m^e mod n | Publics A = g^a, B = g^b — secret K never sent |
| 4 | Keys | Long-term keypair (e,n)/(d,n) | Ephemeral secrets a,b + public params (p,g) |
| 5 | Authentication | Built-in via certs + signatures | None — needs STS/signatures (p.11–12) |
| 6 | Forward secrecy | RSA key-transport: no (leaked d opens past traffic) | Ephemeral DHE: yes (erase a,b) |
| 7 | Core equation | c = m^e, m = c^d, ed ≡ 1 mod φ | K = B^a = A^b = g^(ab) mod p |
| 8 | Worked anchor | (3,55)/(27,55), m=14 ↔ c=49 | p=23,g=5: A=8,B=19,K=2 |
| 9 | Typical use | Certificates, signatures, key wrap | TLS-DHE/ECDHE session keys |
| 10 | Quantum fate | Broken by Shor | Broken by Shor (discrete log too) |
| # | Aspect | Monoalphabetic | Polyalphabetic |
| 1 | Definition | One fixed substitution alphabet | Many rotating alphabets (key decides which) |
| 2 | Same-letter mapping | Always same ciphertext letter | Varies with position (A→L here, →X there) |
| 3 | Examples | Caesar, simple substitution, (Playfair is digraph-mono) | Vigenère, autokey, Enigma rotors |
| 4 | Keyspace | Caesar 25; substitution 26! ≈ 2⁸⁸ | 26^L for length-L key (grows with key) |
| 5 | Frequency analysis | Breaks directly (~25–50 letters) | Flat singles — need key length first |
| 6 | Breaking method | Count → map E/T/A → digraphs → THE | Kasiski (repeats→GCD) or Friedman (IC) → L Caesars |
| 7 | Key-length role | None (single alphabet) | Everything: L unknown = hard, L known = L easy Caesars |
| 8 | History | Broken by Arab scholars ~9th c. | "Indéchiffrable" 300 yrs, broken 1863 (Kasiski) |
| 9 | Ciphertext needed | Tens of letters | Hundreds (statistics per sub-alphabet) |
| 10 | Core lesson | Big keyspace ≠ security (26! still falls) | Periodicity is the fatal flaw (→ one-time pad needs L = message) |
| # | Aspect | Stream Cipher | Block Cipher |
| 1 | Unit | Bit/byte at a time | Fixed blocks (64/128-bit) |
| 2 | Core idea | Keystream ⊕ plaintext (like OTP approximation) | Rounds of substitution + permutation |
| 3 | Examples | ChaCha20, Trivium (RC4 retired) | AES, DES, 3DES |
| 4 | Padding | Never needed | Required (except CTR/streaming modes) |
| 5 | IV / nonce | Mandatory per message — reuse = catastrophe | IV per message in CBC/CTR/GCM modes |
| 6 | Error propagation | 1 flipped bit = 1 flipped bit (malleable!) | 1 flipped bit = whole block garbled (CBC/ECB) |
| 7 | Synchronisation | Must stay in sync (lost bit kills stream) | Self-syncing per block |
| 8 | Speed/profile | Very fast, tiny hardware, no padding overhead | AES-NI very fast; needs mode machinery |
| 9 | Typical uses | TLS ChaCha20, mobile, real-time media | Disk, TLS-AES-GCM, general encryption |
| 10 | Classic failure | Nonce/keystream reuse (two-time pad) | ECB penguin — equal blocks show patterns |
| # | Aspect | Symmetric | Asymmetric |
| 1 | Keys | One shared secret | Public + private pair |
| 2 | Speed | Fast (GB/s with AES-NI) | ~1000× slower (big-number math) |
| 3 | Key distribution | Hard — secret must pre-exist (n² keys for n users) | Easy — publish public key |
| 4 | Key sizes | 128–256-bit secret | 2048-bit+ (different security units) |
| 5 | Examples | AES, ChaCha20, DES (dead) | RSA, DH, ECDH, ECDSA |
| 6 | Authentication | No (MAC needed on top) | Yes — signatures + certs |
| 7 | Non-repudiation | Impossible (both holders can forge MACs) | Possible (only private holder signs) |
| 8 | Scaling | n users need ~n²/2 pairwise keys | n keypairs + directory of publics |
| 9 | Real-world use | Bulk data (TLS records, disk) | Handshake, signatures, PKI |
| 10 | Quantum impact | Halved strength (Grover) | Broken (Shor) — PQC migration |
| # | Aspect | Hash | MAC | Signature |
| 1 | Keyed? | No | Yes (shared secret) | Yes (private signs, public verifies) |
| 2 | Reversible? | No | No | No (verify-only with public key) |
| 3 | Provides | Integrity detection | Integrity + authenticity | Integrity + auth + non-repudiation |
| 4 | Verifier needs | Nothing (recompute) | The shared key | Signer's public key/cert |
| 5 | Examples | SHA-256, SHA-3, BLAKE2 | HMAC-SHA256, Poly1305 | RSA-PSS, ECDSA, Dilithium |
| 6 | Output | Digest (256-bit) | Tag (128–256-bit) | Signature (2048-bit RSA / 512-bit ECDSA) |
| 7 | Repudiation? | N/A | Repudiable (either key-holder forged it) | Non-repudiable (only signer holds d) |
| 8 | Broken example | MD5/SHA-1 collisions | CBC-MAC on variable lengths (no length prefix) | Textbook RSA w/o PSS, ECDSA nonce reuse |
| 9 | Speed | Fastest | Fast (2 hashes) | Slow (modular exponentiation) |
| 10 | Use when… | Checksums, commitments, Merkle trees | Two parties share a key (TLS records) | Public verifiability / legal proof needed |
| # | Aspect | Substitution | Transposition |
| 1 | What changes | Letters (A→Q) | Positions (read order shuffled) |
| 2 | Letter multiset | Changed (E becomes S) | Preserved — same letters, new order |
| 3 | Frequency profile | Mapped but intact (breakable) | Identical counts — frequencies useless |
| 4 | Examples | Caesar, monoalphabetic, Vigenère, Playfair | Rail fence, columnar, route ciphers |
| 5 | Key form | Alphabet permutation / keyword shifts | Permutation of positions / column order |
| 6 | Keyspace | 26! (mono) / 26^L (Vigenère) | w! for width-w columnar (small!) |
| 7 | Attack | Frequency analysis (mono) / Kasiski (poly) | Anagramming + digraph-position stats |
| 8 | Digraph fate | TH→?? (mapped pairs) | TH split apart but both survive |
| 9 | Modern descendant | S-boxes (SubBytes, DES S-boxes) | P-boxes (ShiftRows, DES-P, IP) |
| 10 | Combined | Product ciphers alternate both: DES/AES = substitution + transposition × rounds (confusion + diffusion) |