CAS-004 Security Architecture Practice Question
Which cryptographic best practice ensures that a private key remains protected even if the server it is stored on is compromised?
⚠ Common exam trap
CAS-005 often tests the misconception that encrypting a key at rest (e.g., with AES) is sufficient; candidates overlook that the encryption key must also be protected, and only an HSM ensures the private key never exists in an extractable form.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Storing keys in a hardware security module (HSM)
A hardware security module (HSM) is a dedicated physical device that securely generates, stores, and manages cryptographic keys, ensuring the private key never leaves the tamper-resistant hardware. Even if the server is compromised, the attacker cannot extract the key from the HSM. This provides the strongest protection for private keys.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Storing keys in a hardware security module (HSM)
Why this is correct
An HSM performs cryptographic operations internally, so the private key never leaves the tamper-resistant hardware. Compromising the host server yields no usable key material, satisfying the requirement that the key stay protected despite server compromise.
- ✗
Encrypting keys with AES-256
Why it's wrong here
AES-256 protects the key at rest, yet the decryption key and plaintext key must exist on the same compromised server, so an attacker with access can recover them. Encryption at rest is tempting because it is standard hardening, and would suffice if the threat were disk theft rather than host compromise.
- ✗
Using short key rotation intervals
Why it's wrong here
Rotation limits the exposure window of a compromised key but does not stop an attacker who has already read it from the server's memory or disk. Rotation is tempting because it is a genuine hygiene control, and would be the right answer if the threat were long-term cryptanalysis rather than server compromise.
- ✗
Using strong key derivation functions
Why it's wrong here
Key derivation functions strengthen keys derived from passwords or shared secrets; they do not shield an already-generated private key from an attacker with server access. KDFs are tempting because they are a recognised cryptographic control, and would be correct when hardening passphrase-based key generation.
Go deeper
Related to this question
About these practice questions
One of 973 original CAS-005 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This CAS-005 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CAS-005 exam.