★ Starred in your notes: RC4 (stream) & stream vs. block ciphers · SHA-2 / SHA-1 / MD5 · transport encryption (VPN, TLS/SSL, IPsec) · key escrow (external) vs. recovery agent (internal).
Memory strings — 3 2 B R A I D S and D E E R Q (32BRAIDS / DEERQ)
| String | Spells | Type |
|---|---|---|
| 3 2 B R A I D S | 3DES · 2(Two)fish · Blowfish · RC4/5/6 · AES · IDEA · DES · Serpent | Symmetric — one shared key |
| D E E R Q | Diffie-Hellman · ECC · ElGamal · RSA · Quantum (+ PKI, PGP, GPG built on them) | Asymmetric — key pair |
Full colored table with key sizes and what's obsolete: Cheat sheets → Crypto algorithms.
From class (Chapter 4 Cryptography):
- Symmetric — same key encrypts and decrypts; large amounts of data. Algorithms listed (★ 32BRAIDS): 3DES, Twofish, Blowfish, RC4 (★ stream cipher — one bit at a time; used by WEP/TKIP), AES, IDEA, DES, Serpent; ★ stream vs. block ciphers (Salsa20/ChaCha20 are stream). TPM chip holds the key (so a stolen drive alone is useless); "OOB / out of band (TPM)".
- Asymmetric (★ DEERQ) — Diffie-Hellman (key exchange), public and private key: public key = the certificate key, shared; private key = "key in your pocket," kept safe. Algorithms: DH, ECC, ElGamal (basis of DSA digital signatures), RSA, PGP/GPG, "quantum" (post-quantum coming). Digital signature → uses the sender's public key to decrypt the hash and verify. Key strength → longer key = better. Homomorphic encryption → compute on data without decrypting it first.
- Hashing — SHA-3, SHA-2 (use), SHA-1 and MD5 (broken — collisions), Poly1305 (MAC). Password storage: NTLM (weak), bcrypt (good). Small hash = checksum. Rainbow table = precomputed hashes; salt and pepper defeat it (changes the hash); pass-the-hash attack reuses a captured hash; hybrid attack = dictionary + numbers/symbols; key stretching = PBKDF2/bcrypt. Legacy LM hash: 14-char max, split into two 7-char uppercase halves hashed separately → trivially cracked. VirusTotal = check a file hash.
- Where encryption applies: transport (VPN, TLS/SSL, IPsec) · storage (data at rest) · memory (data in use, RAM) · cryptographic obfuscation. Cold boot attack → extract keys from RAM. BitLocker (whole drive), EFS (files), HSM (e.g., the CAC smart-card reader/crypto module), SED, secure enclave. IPsec: AH = integrity, ESP = confidentiality.
- Certificates: trust models — self-signed, PKI (CA hierarchy), web of trust (PGP); transitive trust ("you trust me, you trust her"). Revocation → CRL; key archival and recovery; key escrow (external party keeps the private key) vs. recovery agent (internal). Steganography → hide a message inside something else (modify the least significant bits; can be used to exfiltrate data — "competitor got our info; how? steganography").
Breakdown 1 — Symmetric vs. asymmetric
| Symmetric | Asymmetric | |
|---|---|---|
| Keys | One shared secret key | Key pair: public (share freely) + private (never share) |
| Speed | Fast — bulk data | Slow — small data (keys, signatures) |
| Main problem | How do you share the key safely? (key exchange) | Performance; needs PKI to trust public keys |
| Algorithms | AES (128/192/256), 3DES (legacy), ChaCha20, Blowfish/Twofish, RC4 (broken) | RSA, ECC/ECDSA, Diffie-Hellman (DH/DHE/ECDHE), ElGamal |
| Used for | Encrypting files, disks, VPN traffic, TLS session data | Key exchange, digital signatures, certificates |
Hybrid in practice (TLS): asymmetric crypto (ECDHE) agrees on a session key, then symmetric AES encrypts the actual traffic. Know this pattern.
Rules of the key pair:
- Encrypt with the recipient's public key → only their private key decrypts (confidentiality).
- Sign with your private key → anyone verifies with your public key (integrity + authenticity + non-repudiation).
Key exchange: Diffie-Hellman lets two parties derive a shared secret over an untrusted channel. Ephemeral variants (DHE, ECDHE) create a new key per session → perfect forward secrecy (a stolen long-term key can't decrypt past sessions).
Key length: longer = stronger but slower. ECC gives equivalent strength with much shorter keys (ECC 256 ≈ RSA 3072). AES-256 is the common "strong" symmetric answer.
Breakdown 2 — Encryption levels and where it applies
| Level | Protects | Example | Note |
|---|---|---|---|
| Full-disk (FDE) | Whole drive | BitLocker, FileVault, LUKS, SED drives | Protects data at rest if the device is stolen; useless once the OS is booted and unlocked |
| Partition | One partition | Encrypted /home | Granular FDE |
| Volume | A logical volume/container | VeraCrypt container | Portable encrypted blob |
| File | Individual files | EFS, GPG, encrypted ZIP | Survives copying to another disk |
| Database | Entire DB at rest | TDE (transparent data encryption) | DB admins may still see plaintext through the DBMS |
| Record / column | Specific fields | Encrypting SSN column only | Least performance impact; protects the sensitive bits |
| Transport / communication | Data in transit | TLS, IPsec, SSH, WPA3 | Data at rest is separate — encrypt both |
Breakdown 3 — Hardware and key-management tools
| Tool | What it is | Typical use |
|---|---|---|
| TPM (Trusted Platform Module) | Chip on the motherboard that stores keys, measures boot integrity | BitLocker keys, secure/measured boot, device attestation |
| HSM (Hardware Security Module) | Dedicated tamper-resistant appliance/card for generating, storing, and using keys at scale | CA private keys, payment systems, cloud KMS backends |
| Key management system (KMS) | Software/service to create, rotate, distribute, revoke, and audit keys | Cloud KMS (AWS KMS, Azure Key Vault); enforces key lifecycle |
| Secure enclave | Isolated processor region (Apple Secure Enclave, Intel SGX, ARM TrustZone) that runs code and holds secrets separate from the main OS | Biometric templates, mobile payment keys, data-in-use protection |
| Key escrow | A trusted third party (or the org) holds a copy of the key | Recover data if the user loses the key; lawful access; recovery agent in EFS |
Breakdown 4 — Hashing, salting, key stretching, signatures
- Hashing — one-way fixed-length fingerprint. Integrity check, password storage. Algorithms: SHA-256/SHA-3 (good), MD5/SHA-1 (broken — collisions). A collision = two inputs, same hash.
- Salting — random value added to each password before hashing so identical passwords hash differently and rainbow tables fail.
- Key stretching — run the hash thousands of times to slow brute force: PBKDF2, bcrypt, scrypt, Argon2.
- HMAC — hash + shared secret key = integrity and authenticity (but not non-repudiation).
- Digital signature — hash the message, encrypt the hash with the sender's private key. Receiver decrypts with the public key and compares hashes. Gives integrity, authenticity, non-repudiation. Algorithms: RSA, DSA, ECDSA.
Breakdown 5 — Obfuscation (hiding, not encrypting)
| Technique | What it does | Example |
|---|---|---|
| Steganography | Hides data inside other data (image, audio, video, whitespace) so nobody knows it's there | Secret message in the low bits of a PNG |
| Tokenization | Replaces sensitive value with a random token; real value kept in a secure vault; token has no mathematical relation to the original | Credit card numbers in payment systems (PCI DSS scope reduction) |
| Data masking | Shows only part of the value or a substituted value | ****-****-****-1234 on a receipt; test databases with fake names |
Encryption is reversible with a key; hashing is one-way; tokenization is reversible only via the vault; masking is usually irreversible on the displayed copy.
Breakdown 6 — Blockchain and open public ledger
A blockchain is a chain of blocks where each block contains the hash of the previous block; altering an old block changes every hash after it, so tampering is evident. An open public ledger is a blockchain anyone can read and (via consensus) append to — Bitcoin, Ethereum. Security uses: integrity of records, supply-chain provenance, non-repudiation of transactions. Not a general-purpose "make it secure" answer.
Breakdown 7 — Certificates and PKI
PKI = the roles, policies, and systems that bind public keys to identities using certificates.
| Term | Meaning |
|---|---|
| Certificate authority (CA) | Issues and signs certificates. Root CA (offline, top of the chain) → intermediate CAs (do the daily signing) |
| Registration authority (RA) | Verifies the requester's identity before the CA issues |
| Root of trust | The trusted anchor everything chains back to — the root CA cert in the OS/browser trust store; also hardware (TPM) as the root of trust for boot |
| CSR (certificate signing request) | You generate a key pair, put the public key + identity info in a CSR, send it to the CA; the private key never leaves you |
| Self-signed | Signed by its own key — no external trust; fine for internal/test, browsers warn |
| Third-party | Signed by a public CA (DigiCert, Let's Encrypt) — trusted by default |
| Wildcard | *.example.com covers all first-level subdomains with one cert; convenient, but one compromised key affects them all |
| SAN (subject alternative name) | Lists multiple specific hostnames in one cert |
| CRL (certificate revocation list) | CA-published list of revoked serial numbers; clients download periodically — can be stale/large |
| OCSP | Client asks the CA "is this cert still valid?" in real time; OCSP stapling has the server attach a fresh signed OCSP response to the TLS handshake (faster, more private) |
Certificate fields to recognize: subject, issuer, validity dates, public key, serial number, SAN, key usage, signature. Common formats: PEM (Base64 text, -----BEGIN CERTIFICATE-----), DER (binary), PKCS#12 / .pfx / .p12 (cert + private key, password-protected), PKCS#7 / .p7b (cert chain, no private key).
Exam tip: "Which should be kept offline?" → root CA. "How do you check revocation quickly?" → OCSP. "Need one cert for many subdomains" → wildcard (or SAN for specific names). "Who verifies identity before issuance?" → RA. "Private key lost; need to decrypt old files" → key escrow / recovery agent.
Quick self-check
- Which key encrypts for confidentiality? (Recipient's public.) Which key signs? (Sender's private.)
- What gives perfect forward secrecy? (Ephemeral DH — DHE/ECDHE.)
- Salt vs. key stretching? (Salt defeats rainbow tables; stretching slows brute force.)
- TPM vs. HSM? (TPM = on-board chip for one device; HSM = dedicated appliance for many keys / a CA.)
- Tokenization vs. encryption? (Token has no mathematical link to the data; encryption is key-reversible.)
Sources: 20260917_173153.jpg, 20260917_173312.jpg, 20260917_173318.jpg, 20260917_173324.jpg, 20260917_173343.jpg, 20260917_173350.jpg, 20260917_182527.jpg