SSCP · Domain 5
Cryptography
About 9% of the exam
What cryptography provides
- Confidentiality
- encryption hides the content
- Integrity
- hashing detects any change
- Authenticity
- a signature proves the origin
- Non-repudiation
- the signer cannot deny it
- Obfuscation
- hides but does not protect
- Plaintext
- the readable original
- Ciphertext
- the encrypted result
- Key
- the secret that makes it work
Symmetric cryptography
- AES
- 128 bit blocks, keys to 256
- ChaCha20
- stream cipher, fast in software
- 3DES
- legacy, slow, being retired
- Block cipher
- fixed size blocks with padding
- Stream cipher
- a bit or byte at a time
- ECB mode
- never use, patterns survive
- CBC and CTR
- chaining or counter modes
- GCM
- encryption and authentication together
Asymmetric cryptography
- RSA
- 2048 bits minimum today
- ECC
- shorter keys, equal strength
- Diffie-Hellman
- agrees a key, encrypts nothing
- Ephemeral variants
- deliver perfect forward secrecy
- Public key
- encrypts to you, verifies signatures
- Private key
- decrypts and signs, never shared
- Hybrid use
- asymmetric agrees, symmetric carries
Hashing and integrity
- SHA-256
- the general purpose choice
- SHA-3
- different construction, same purpose
- MD5 and SHA-1
- broken by practical collisions
- Collision
- two inputs, one digest
- Salt
- unique per stored password
- HMAC
- a keyed hash for authenticity
- Key stretching
- bcrypt, scrypt, PBKDF2, Argon2
- Digital signature
- hash signed with the private key
Public key infrastructure
Roles
- Certificate authority signs and vouches
- Registration authority verifies the requester
- Subject holds the private key
- Relying party checks the chain
- The root stays offline
Validation
- Check signature, dates and chain
- A CRL is a periodic list
- OCSP asks about one certificate
- Stapling saves the client a lookup
- Pinning ties a service to a key
Lifecycle
- Generate the key, submit a request
- Issue, install, then monitor expiry
- Renew before it expires
- Revoke on compromise or role change
- Archive keys still needed for decryption
A certificate binds a public key to an identity; trust comes from the chain, not from the padlock icon
Secure protocols
- TLS
- protects most application traffic
- IPSec
- tunnels at the network layer
- SSH
- encrypted administrative access
- S/MIME
- signed and encrypted email
- DNSSEC
- signs DNS records
- SFTP and FTPS
- encrypted file transfer
- WPA3
- modern wireless key establishment
- Code signing
- proves publisher and integrity
Key management
- Generate
- Distribute
- Store
- Use
- Rotate
- Revoke and destroy
- Generate keys with strong randomness
- Store private keys in hardware
- Separate duties for key custodians
- Rotate on schedule and on compromise
- Escrow only where recovery is required
- Destroy retired keys securely
- Never hard code keys in source
Cryptographic attacks
- Brute force
- try every possible key
- Dictionary
- guess from likely passwords
- Rainbow table
- precomputed hashes, beaten by salt
- Birthday attack
- collisions arrive sooner than expected
- Downgrade
- force a weaker protocol version
- Replay
- resend a captured message
- Side-channel
- timing, power or cache leakage
- Harvest now
- store today, decrypt later
Where it gets used
- Data at rest
- full disk or database encryption
- Data in transit
- TLS or an IPSec tunnel
- Data in use
- enclaves or homomorphic processing
- Authentication
- certificates instead of passwords
- Integrity checks
- hash the file and compare
- Non-repudiation
- signed contracts and signed code
- Privacy
- reduce linkage to a person
Quantum and agility
- Quantum threatens current asymmetric algorithms
- Symmetric keys need doubling, not replacing
- Post-quantum standards are being adopted
- Inventory where cryptography is used
- Cryptographic agility eases the migration
- Long lived secrets are already at risk
Key numbers
- AES keys
- 128, 192 and 256 bits
- AES block
- always 128 bits
- RSA
- 2048 minimum, 3072 preferred
- ECC 256
- comparable to RSA 3072
- SHA-2
- 256, 384 and 512
- TLS
- 1.2 acceptable, 1.3 preferred
- Kerberos skew
- five minutes
Reference strip: primitives, PKI, protocols, attacks
Primitives
- AES, ChaCha20, legacy 3DES
- RSA, ECC, Diffie-Hellman
- SHA-2, SHA-3, HMAC
- bcrypt, scrypt, PBKDF2, Argon2
Modes and properties
- ECB weak, CBC, CTR, GCM
- Confusion and diffusion
- Perfect forward secrecy
- Authenticated encryption with associated data
PKI
- CA, RA, subject, relying party
- CSR, chain of trust, root offline
- CRL, OCSP, stapling, pinning
- Wildcard and subject alternative names
Protocols
- TLS, IPSec, SSH, S/MIME
- DNSSEC, SFTP, FTPS
- WPA3 and code signing
- Certificate based authentication
Attacks
- Brute force, dictionary, rainbow table
- Collision, birthday, downgrade, replay
- Side-channel and implementation flaws
- Harvest now, decrypt later
Quick exam traps
- Trap: Encoding data such as Base64 is a form of encryption
- Trap: Hashing can be reversed if you know the algorithm
- Trap: A longer key fixes a broken algorithm
- Trap: Perfect forward secrecy protects data already stolen
- Trap: The private key must be shared to verify a signature
- Trap: A valid certificate means the site is trustworthy
- Trap: Quantum computing breaks symmetric encryption outright
cybercertprep.com · original revision sheet written from the public body of knowledge