Fundamental Cryptography Concepts and Cipher Types
Cryptography is the practice of converting plaintext into ciphertext using mathematical algorithms and keys. This protects sensitive data from unauthorized access.
Symmetric vs. Asymmetric Encryption
Symmetric encryption uses a single shared key for both encryption and decryption. It's fast and efficient for large data volumes. You must share the key securely beforehand.
Asymmetric encryption uses a public-private key pair. Data encrypted with the public key only decrypts with the private key. It solves the key distribution problem but operates more slowly.
Common Symmetric Algorithms
- AES (Advanced Encryption Standard): Uses 128, 192, or 256-bit keys. It's the modern standard and considered highly secure.
- DES (Data Encryption Standard): Now obsolete due to its weak 56-bit key size.
- 3DES (Triple DES): Applies DES encryption three times for better security than DES alone.
Common Asymmetric Algorithms
RSA is the most common asymmetric algorithm. It uses large prime numbers to create keys of 2048-bits or larger. RSA is slower than symmetric algorithms but essential for key exchange and digital signatures.
Stream vs. Block Ciphers
Stream ciphers encrypt data bit-by-bit or byte-by-byte. Block ciphers encrypt fixed-size blocks, typically 128 bits. Understanding which to use improves your exam performance.
Flashcards help you quickly recall that AES is the modern symmetric standard or that RSA requires longer keys than AES to achieve equivalent security.
Encryption Modes, Padding, and Key Management
Encryption modes determine how multiple data blocks are encrypted in sequence. They significantly affect security and performance.
Common Block Cipher Modes
- ECB (Electronic Codebook): Encrypts each block independently. Identical plaintext blocks produce identical ciphertext blocks, revealing patterns. This is insecure.
- CBC (Cipher Block Chaining): XORs each plaintext block with the previous ciphertext block before encryption. It requires an initialization vector (IV) and provides better security.
- CTR (Counter): Converts a block cipher into a stream cipher by encrypting counter values. It allows parallelization.
- GCM (Galois/Counter Mode): Combines CTR mode with authentication. It provides confidentiality and integrity in one operation.
- CFB and OFB: These modes turn block ciphers into stream ciphers with different feedback mechanisms.
Key Management Practices
Key management involves secure generation, storage, rotation, and destruction of cryptographic keys. Poor key management undermines even the strongest encryption.
Protect keys at rest using hardware security modules (HSMs) or key management services. Never store encryption keys in plaintext or with the encrypted data.
Key stretching derives stronger keys from weaker passwords. Techniques like PBKDF2 apply hash functions repeatedly, typically 10,000 or more iterations. This makes brute force attacks against passwords exponentially harder.
Perfect forward secrecy ensures that session keys remain secure even if long-term keys are stolen. Each session uses unique temporary keys that are discarded afterward.
Flashcards excel at helping you memorize which mode provides authentication (GCM) or why ECB is vulnerable to pattern analysis.
Hash Functions, Digital Signatures, and Certificates
Hash functions produce fixed-length outputs called digests from variable-length inputs. They are fundamental to data integrity and authentication.
Key Property of Hash Functions
Hashing is one-way, meaning you cannot reverse it to recover original data. This makes hashing fundamentally different from encryption.
Comparing Hash Algorithms
- MD5: Produces 128-bit hashes. Now cryptographically broken and unsuitable for further use.
- SHA-1: Generates 160-bit hashes. Being phased out due to vulnerabilities.
- SHA-2 Family: Includes SHA-256 (256-bit), SHA-384 (384-bit), and SHA-512 (512-bit). Remains widely used and secure.
- SHA-3: Adopted as the latest cryptographic hash standard in 2015.
Digital Signatures Provide Authentication
Digital signatures verify authenticity and ensure non-repudiation. To sign a message, you hash the plaintext and encrypt the hash with your private key. Recipients decrypt using your public key to verify you created the signature.
Public Key Infrastructure (PKI)
PKI manages digital certificates that bind public keys to identities. X.509 certificates contain the public key, subject information, issuer details, validity dates, and a digital signature from a Certificate Authority (CA).
Certificate chains establish trust by validating each certificate up to a trusted root CA. This enables HTTPS, secure email, and code signing.
Certificate Revocation
CRLs (Certificate Revocation Lists) and OCSP (Online Certificate Status Protocol) manage revoked certificates. These prevent compromised certificates from being trusted.
Flashcards help you distinguish when to use hashing for integrity versus when encryption is needed for confidentiality.
Cryptographic Protocols and Practical Applications
Cryptographic protocols implement the algorithms and concepts you've learned into real-world secure communications.
Web and Network Security
TLS (Transport Layer Security) and its predecessor SSL (Secure Sockets Layer) encrypt data in transit for web communications. TLS 1.2 and TLS 1.3 are current standards. TLS 1.0 and 1.1 are deprecated due to vulnerabilities.
TLS uses a handshake combining asymmetric encryption for key exchange and symmetric encryption for bulk data transfer.
IPsec provides encryption and authentication at the network layer. It supports both tunnel and transport modes and is commonly used for Virtual Private Networks (VPNs).
Remote Access and Email Security
SSH (Secure Shell) provides secure remote access using public-key cryptography for authentication. It's the standard for remote server administration.
PGP (Pretty Good Privacy) and its open-source counterpart GPG (GNU Privacy Guard) enable encrypted email and file protection. They use hybrid cryptography combining symmetric and asymmetric algorithms.
Wireless Security
WPA2 and WPA3 protect wireless networks using AES encryption. WPA3 introduces SAE (Simultaneous Authentication of Equals) to replace Pre-Shared Key (PSK) exchange. This provides stronger protection against dictionary attacks.
Perfect Forward Secrecy in Modern Protocols
Modern TLS versions implement perfect forward secrecy, ensuring session keys aren't compromised even if long-term keys are stolen. This protects historical communications.
Understanding which protocol to recommend for specific scenarios is crucial for the Security+ exam. Use TLS for web traffic, IPsec for network-layer encryption, and PGP for email. Flashcards help you quickly recall that WPA3 uses SAE or that TLS operates at the application layer while IPsec operates at the network layer.
Cryptanalysis, Attacks, and Study Strategies for Security+
Cryptanalysis involves analyzing cryptographic systems to find weaknesses without authorized access. Understanding attack methods helps you choose appropriate defenses.
Common Cryptanalysis Attacks
- Brute Force: Attempts all possible keys until finding the correct one. Key length is critical. DES with 56-bit keys is vulnerable to modern computers.
- Dictionary Attacks: Test common passwords and passphrases against cryptographic systems. Salting and key stretching defeat these attacks.
- Rainbow Tables: Pre-compute hash values for common passwords. Using random salts defeats rainbow tables.
- Collision Attacks: Find two different inputs producing the same hash output. This demonstrates why MD5 and SHA-1 are deprecated.
- Known Plaintext Attacks: Use pairs of plaintext and corresponding ciphertext to deduce the key or algorithm weaknesses.
- Side-Channel Attacks: Exploit physical implementation details like timing variations or power consumption rather than mathematical weaknesses.
Effective Flashcard Study Strategies
Memorize algorithm characteristics like AES block size (128 bits) or RSA minimum key length recommendations (2048 bits). Create cards comparing symmetric versus asymmetric encryption trade-offs.
Organize cards by topic: cipher types, modes, hash functions, protocols, and attacks. Review cards daily in varied order to strengthen neural pathways.
Focus on understanding why certain algorithms are preferred over others rather than memorizing isolated facts. Practice scenario-based questions where you select appropriate encryption methods for given situations.
This mirrors the actual exam format and builds practical decision-making skills beyond simple recall.
