mediumMultiple ChoiceObjective-mapped
CISSP Practice Question: A developer is tasked with securely storing user…
A developer is tasked with securely storing user passwords in a database. Which of the following is the most secure approach?
⚠ Common exam trap
A common mix-up: candidates confuse encryption with hashing, assuming that encrypting passwords with a strong algorithm like AES is equally secure, but they fail to recognize that encryption is reversible if the key is compromised, whereas hashing is a one-way function designed for password verification.
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
✓
Hash the password with bcrypt using a unique salt per user
Bcrypt is a computationally expensive, adaptive hashing algorithm designed specifically for password storage. It incorporates a unique salt per user to prevent rainbow table attacks and its work factor can be increased over time to counter faster hardware, making it the most secure option among those listed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Do not store passwords; use federated identity
Why it's wrong here
While federated identity management (e.g., OAuth, OpenID Connect) is an excellent security practice that offloads password storage to a trusted identity provider, it does not directly address the task of securely storing user passwords within the application itself if direct authentication is required for some users or if the application serves as an identity provider. This option avoids the problem rather than solving it, and may not be universally applicable for all application architectures or user bases. Therefore, it's not the primary solution for the stated problem of storing passwords securely.
- ✓
Hash the password with bcrypt using a unique salt per user
Why this is correct
Hashing the password with bcrypt using a unique salt per user is the industry-standard best practice for secure password storage. Bcrypt is an adaptive, slow hashing algorithm specifically designed to be computationally intensive, making brute-force and rainbow table attacks extremely difficult and time-consuming, even with powerful hardware. The unique salt ensures that identical passwords result in different hashes, preventing pre-computation attacks and making dictionary attacks against multiple users impractical.
- ✗
Encrypt the password using AES and store the ciphertext
Why it's wrong here
Encrypting passwords with AES and storing the ciphertext is fundamentally insecure for password storage because encryption is a reversible process. If an attacker gains access to the encryption key, all encrypted passwords can be easily decrypted and the original plaintext passwords recovered. This approach introduces a critical single point of failure and a significant key management challenge, as the key must be accessible to the application for decryption, making it vulnerable.
- ✗
Hash the password with MD5 and store the hash
Why it's wrong here
Hashing passwords with MD5 is an outdated and highly insecure method. MD5 is a fast, cryptographic hash function not designed for password storage, making it highly susceptible to brute-force attacks, especially with modern hardware. Furthermore, without the use of a unique salt, MD5 hashes are vulnerable to pre-computed rainbow tables, which can quickly reveal original passwords for common hashes, compromising user accounts en masse.
Go deeper
Related to this question
About these practice questions
One of 747 original CISSP 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CISSP practice question is part of Courseiva's free ISC2 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 CISSP exam.