CAS-002 · Question #833
A storage as a service company implements both encryption at rest as well as encryption in transit of customers' data. The security administrator is concerned with the overall security of the…
The correct answer is A. key = NULL ; for (int i=0; i<5000; i++) { key = sha(key + password) }. Key stretching via iterative hashing forces an attacker to perform thousands of hash computations per password guess, dramatically increasing the time required for offline brute-force attacks.
Question
A storage as a service company implements both encryption at rest as well as encryption in transit of customers' data. The security administrator is concerned with the overall security of the encrypted customer data stored by the company servers and wants the development team to implement a solution that will strengthen the customer's encryption key. Which of the following, if implemented, will MOST increase the time an offline password attack against the customers' data would take?
Options
- Akey = NULL ; for (int i=0; i<5000; i++) { key = sha(key + password) }
- Bpassword = NULL ; for (int i=0; i<10000; i++) { password = sha256(key) }
- Cpassword = password + sha(password+salt) + aes256(password+salt)
- Dkey = aes128(sha256(password), password))
How the community answered
(36 responses)- A81% (29)
- B11% (4)
- C6% (2)
- D3% (1)
Why each option
Key stretching via iterative hashing forces an attacker to perform thousands of hash computations per password guess, dramatically increasing the time required for offline brute-force attacks.
This algorithm applies SHA hashing 5000 times iteratively while incorporating the password in each round, implementing key stretching similar to PBKDF2, which multiplies the per-guess computational cost by 5000x. This means an attacker performing an offline dictionary or brute-force attack must execute 5000 hash operations for every single candidate password tested, making large-scale attacks computationally prohibitive.
This loop hashes only the key without incorporating the password in each iteration, breaking the password-based key derivation chain and producing a result that does not strengthen password-based encryption.
This performs a single-pass concatenation of hashed and encrypted values rather than iterative processing, so it does not multiply the computational cost per password guess and provides no key stretching benefit.
This applies a single AES-128 encryption over a single SHA-256 hash of the password - just one hash and one encryption operation per guess - providing no iterative cost amplification against offline attacks.
Concept tested: Key stretching via iterative hashing to resist offline attacks
Source: https://csrc.nist.gov/publications/detail/sp/800-132/final
Topics
Community Discussion
No community discussion yet for this question.