Cryptography & PKI
CISSP CISSP · Security Architecture and Engineering
What cryptography provides
Cryptography is the mathematics of protecting information, and Domain 3 tests it more deeply than any other technical topic on the CISSP. The services cryptography provides map directly to the security properties you already know: confidentiality (encryption hides content from unauthorised readers), integrity (hashing and message authentication detect modification), authentication (proving who sent a message), and non-repudiation (proving the sender cannot later deny sending it). The exam's central theme is choosing the right tool: encryption gives confidentiality but not integrity; hashing gives integrity but not confidentiality; digital signatures give authentication, integrity and non-repudiation but not confidentiality. Questions that ask for the best control for a requirement expect you to match the service to the need.
Symmetric cryptography: one shared key
In symmetric cryptography, the same key encrypts and decrypts. It is fast and efficient, which is why it protects bulk data — but both parties must share the key securely in advance, which is the key distribution problem. The standard symmetric algorithm is the Advanced Encryption Standard (AES), a block cipher with key sizes of 128, 192 or 256 bits and a 128-bit block size; AES-256 is the usual choice for sensitive data. Older algorithms appear on the exam mainly as things to avoid: DES (56-bit key, broken by brute force), 3DES (DES applied three times, deprecated and slow), and RC4 (a stream cipher with known vulnerabilities, no longer acceptable). Block ciphers encrypt fixed-size blocks of data and need a mode of operation — ECB (each block encrypted independently, which leaks patterns and should be avoided), CBC (each block chained to the previous one, requiring an initialisation vector), CTR (turns a block cipher into a stream cipher, parallelisable), and GCM (an authenticated encryption mode that provides both confidentiality and integrity, and the modern default). Stream ciphers encrypt data bit by bit and suit real-time communication. The exam also tests key length as a security factor: symmetric keys are short (128–256 bits) because brute-forcing a 128-bit key is computationally infeasible.
Asymmetric cryptography: key pairs
In asymmetric cryptography, each party has a key pair: a public key shared freely and a private key kept secret. Data encrypted with the public key can only be decrypted with the private key (giving confidentiality), and data encrypted with the private key can be verified with the public key (giving authentication and non-repudiation). Asymmetric cryptography is much slower than symmetric, so in practice it is used to exchange symmetric keys and to sign data, not to encrypt bulk data. The main algorithms are RSA (based on the difficulty of factoring large numbers; 2048-bit keys are the current minimum, 3072-bit recommended for long-term protection), Diffie-Hellman (for securely agreeing on a shared secret over an insecure channel — it provides key exchange, not encryption or authentication by itself), Elliptic Curve Cryptography (ECC) (equivalent security to RSA with much shorter keys — a 256-bit ECC key is roughly equivalent to a 3072-bit RSA key, making it ideal for constrained devices), and ElGamal and DSA (primarily for digital signatures). The exam's key facts: asymmetric keys must be much longer than symmetric keys for equivalent security; asymmetric encryption is roughly 1,000 times slower than symmetric; and Diffie-Hellman alone is vulnerable to man-in-the-middle attacks because it does not authenticate the parties.
| Algorithm | Type | Key size | Primary use |
|---|---|---|---|
| AES | Symmetric block cipher | 128 / 192 / 256 bits | Bulk encryption |
| RSA | Asymmetric | 2048+ bits | Encryption, digital signatures, key exchange |
| ECC | Asymmetric | 256+ bits | Same as RSA with shorter keys; mobile and IoT |
| Diffie-Hellman | Asymmetric (key agreement) | 2048+ bits | Agreeing a shared secret |
| SHA-256 | Hash | 256-bit digest | Integrity verification |
| DES / 3DES / RC4 | Symmetric (legacy) | 56 / 168 / variable | Deprecated — do not use |
Hashing and message authentication
A hash function takes input of any size and produces a fixed-size output (a digest or hash value). A good cryptographic hash is one-way (you cannot recover the input from the output), deterministic (the same input always gives the same output), and collision-resistant (it is infeasible to find two different inputs with the same output). Hashes provide integrity: if the data changes, the hash changes. The standard is the SHA-2 family (SHA-256 and SHA-512); SHA-3 is the newer standard. MD5 and SHA-1 are broken for collision resistance and must not be used for security purposes. A plain hash does not authenticate the sender — anyone can compute the hash of modified data — so for authentication you need an HMAC (Hash-based Message Authentication Code), which combines the hash with a shared secret key. An HMAC provides both integrity and authentication, but not non-repudiation, because either party holding the shared key could have produced it.
Digital signatures and non-repudiation
A digital signature is created by hashing a message and then encrypting the hash with the sender's private key. Anyone can verify it with the sender's public key: if the decrypted hash matches a freshly computed hash of the message, the message is unaltered and it came from the holder of the private key. Digital signatures provide authentication, integrity and non-repudiation — the three services that make them the answer whenever a question asks how to prove a sender cannot deny sending a message. Note the contrast with encryption for confidentiality (encrypt with the recipient's public key) and with HMAC (which provides authentication but not non-repudiation, because the shared key means either party could have created it). The exam frequently tests this distinction: if the requirement includes non-repudiation, only a digital signature will do.
PKI: certificates and trust
Public Key Infrastructure (PKI) solves the problem of trusting that a public key really belongs to the person or system that claims it. A Certificate Authority (CA) verifies an entity's identity and issues a digital certificate binding that identity to a public key. Certificates follow the X.509 standard and contain the subject's identity, the public key, the issuer, a validity period, and the CA's digital signature. When a certificate is compromised or no longer valid before its expiry, it must be revoked: the CA publishes a Certificate Revocation List (CRL), or clients check status in real time via the Online Certificate Status Protocol (OCSP). OCSP is more current than a CRL but requires the responder to be available; OCSP stapling lets the server present a recent OCSP response itself, improving both privacy and reliability. The chain of trust runs from a root CA (self-signed, kept offline and heavily protected) through intermediate CAs to end-entity certificates. If a root CA is compromised, every certificate in the chain is untrustworthy — which is why root keys are protected with hardware security modules and strict ceremony. Registration Authorities (RAs) verify identities on behalf of the CA but do not issue certificates.
Key management lifecycle
Cryptography is only as strong as its key management, and the exam tests the full lifecycle: generation (keys must be generated from a strong random source — weak randomness is a classic failure), distribution (keys must reach their users securely, which is the problem asymmetric cryptography and key exchange protocols solve), storage (keys must be protected, ideally in a hardware security module or a managed key service, never hard-coded in source code), rotation (keys should be changed periodically and immediately after suspected compromise), escrow and recovery (copies held so that data is not lost if a key is lost — essential for encryption keys, but never for signing keys, since a recovered signing key would destroy non-repudiation), and destruction (keys must be securely destroyed when retired). The exam's favourite trap is key escrow for signing keys: escrowing a signing key means someone else can sign in your name, which defeats non-repudiation entirely.
Cryptanalytic attacks
The exam expects you to recognise the main attacks on cryptographic systems. Brute force tries every possible key; its feasibility depends on key length. A dictionary attack tries likely passwords from a list. A rainbow table is a precomputed table of hash values used to reverse password hashes quickly — the countermeasure is salting, adding unique random data to each password before hashing so that precomputed tables are useless. A birthday attack exploits the mathematics of collisions: finding any two inputs with the same hash takes far fewer attempts than finding a specific one (roughly the square root of the hash space), which is why hash outputs must be long. A known-plaintext attack uses pairs of plaintext and ciphertext to derive the key. A chosen-plaintext attack lets the attacker choose plaintexts to be encrypted. A man-in-the-middle attack intercepts and alters communications between two parties — the countermeasure is mutual authentication, which is why unauthenticated Diffie-Hellman is vulnerable. A replay attack reuses a captured valid message; the countermeasures are timestamps and nonces (numbers used once). Side-channel attacks exploit physical leakage such as timing or power consumption rather than the mathematics.
Exam mindset for cryptography
Cryptography questions reward matching the tool to the requirement. Need confidentiality? Encryption. Need integrity? Hashing or HMAC. Need to prove who sent it and prevent denial? Digital signature. Need to exchange a key? Diffie-Hellman or RSA key transport — with authentication to prevent man-in-the-middle. And when a question mentions a specific algorithm, ask whether it is current or deprecated: DES, 3DES, RC4, MD5 and SHA-1 are all answers that mean "do not use this".
Exam traps to watch for
- Using encryption when the requirement is integrity or non-repudiation — encryption provides confidentiality only; hashing gives integrity, digital signatures give non-repudiation.
- Confusing HMAC with a digital signature: HMAC provides authentication and integrity but NOT non-repudiation, because both parties share the key.
- Escrowing signing keys: key escrow is appropriate for encryption keys (so data is not lost) but destroys non-repudiation for signing keys.
- Recommending deprecated algorithms: DES, 3DES, RC4, MD5 and SHA-1 are all broken or deprecated — the exam uses them as wrong answers.
Practice questions
Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.
Q1.A company needs to ensure that purchase orders sent to suppliers cannot be altered in transit and that the supplier can prove the order came from the company, even if the company later denies sending it. Which mechanism meets ALL of these requirements?
Explanation: A digital signature provides all three required services: integrity (the hash detects alteration), authentication (only the private key holder could have signed it), and non-repudiation (the company cannot credibly deny signing). AES encryption provides confidentiality only — it says nothing about who sent the message or whether it was altered. An HMAC provides integrity and authentication but not non-repudiation, because the supplier also holds the shared key and could have produced the HMAC. A plain hash provides integrity only and authenticates nobody.
Exam objective: CISSP Domain 3: Understand cryptographic concepts (digital signatures, non-repudiation)
Q2.Two parties need to agree on a shared symmetric key over an insecure network, but they have no prior shared secret and no PKI. Which protocol is designed for this, and what is its main weakness in this situation?
Explanation: Diffie-Hellman is designed exactly for agreeing a shared secret over an insecure channel with no prior secret. Its weakness is that, without authentication of the parties, an attacker can sit in the middle, complete a separate exchange with each side, and read all traffic. RSA can transport keys but is not a key-agreement protocol, and its speed is irrelevant here. There is no "AES key exchange" — AES is a symmetric cipher that needs a key, not a way to agree one. SHA-256 is a hash function, not a key exchange mechanism.
Exam objective: CISSP Domain 3: Understand cryptographic concepts (key exchange)
Q3.A web application stores user passwords as unsalted MD5 hashes. An attacker who steals the database can quickly recover most passwords using precomputed tables. Which TWO changes BEST fix this vulnerability?
Explanation: Salting defeats precomputed rainbow tables because each password hashes differently, and a slow password-hashing algorithm such as bcrypt or Argon2 makes brute-force attacks expensive — both changes address the actual vulnerabilities (MD5 is broken and fast; unsalted hashes are reversible by table lookup). Encrypting the hashes adds a layer but leaves the weak MD5 underneath and creates a key management problem. Double-hashing with MD5 does not fix MD5's weaknesses or the lack of salt. SHA-256 without salt is still vulnerable to rainbow tables and is too fast for password storage.
Exam objective: CISSP Domain 3: Understand cryptographic concepts (hashing, password storage)
Q4.A certificate authority’s private key is suspected to have been compromised. What is the MOST critical immediate action?
Explanation: A compromised CA private key means an attacker can issue fraudulent certificates that relying parties will trust, so the CA certificate itself must be revoked and all relying parties notified — the entire chain of trust below it is broken. Issuing new certificates is necessary afterwards but cannot happen until a new, trustworthy CA is established. Shortening validity periods and changing hash algorithms are good practices but do nothing about the active compromise.
Exam objective: CISSP Domain 3: Understand PKI and certificate management
Q5.An organisation encrypts its database backups with AES-256. The encryption key is stored in a file on the same backup server, protected only by file permissions. What is the MOST significant weakness in this design?
Explanation: Encryption is only as strong as key protection: a key stored next to the ciphertext it protects is available to anyone who steals the backup, making the encryption worthless. AES-256 is more than strong enough for this purpose. RSA is far too slow for bulk backup encryption and is not the right tool. Rotating keys per backup is unnecessary and would create an unmanageable key inventory; the problem is key storage, not rotation frequency.
Exam objective: CISSP Domain 3: Understand key management lifecycle
Q6.A mobile device manufacturer needs public-key cryptography but has very limited processing power and battery life. Which algorithm is the BEST choice?
Explanation: ECC provides security equivalent to RSA with far shorter keys (a 256-bit ECC key is roughly equivalent to a 3072-bit RSA key), which means less computation, less power and less bandwidth — exactly what a constrained device needs. RSA-4096 would be secure but computationally expensive on a small device. Diffie-Hellman is a key-agreement protocol, not a general public-key encryption algorithm, and is not faster than ECC. 3DES is a deprecated symmetric cipher, not a public-key algorithm at all.
Exam objective: CISSP Domain 3: Understand cryptographic concepts (asymmetric algorithms)
Q7.An attacker captures a valid authentication message and replays it later to gain access. Which countermeasure BEST prevents this attack?
Explanation: A replay attack reuses a legitimate message, so the defence is to make each message unique and time-limited: a nonce ensures a captured message cannot be reused, and a timestamp ensures it expires. Encryption does not help, because the attacker replays the encrypted message exactly as captured — it is still valid. Hashing provides integrity, not freshness. A longer key strengthens the encryption but does not change the fact that the captured message remains valid.
Exam objective: CISSP Domain 3: Understand cryptographic attacks (replay)
Q8.A company is designing a system that must detect whether stored records have been altered, but does not need to keep the records confidential. Which is the SIMPLEST appropriate control?
Explanation: A plain hash provides exactly what is required — integrity detection — with no key management overhead. AES-GCM provides confidentiality the requirement does not need, adding complexity and key management. Digital signatures provide non-repudiation, which is not required and needs a PKI. An HMAC provides authentication as well as integrity, which is more than needed and requires managing a shared secret key.
Exam objective: CISSP Domain 3: Understand cryptographic concepts (hashing for integrity)