nerdexam
CompTIA

CAS-003 · Question #183

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) }. Option A implements key stretching (also known as key derivation iteration), the same principle behind PBKDF2, bcrypt, and scrypt. By iteratively applying SHA 5,000 times-feeding the previous output plus the password back in each cycle-an attacker must perform 5,000 hash…

Technical Integration of Enterprise Security

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

(13 responses)
  • A
    62% (8)
  • B
    23% (3)
  • C
    8% (1)
  • D
    8% (1)

Explanation

Option A implements key stretching (also known as key derivation iteration), the same principle behind PBKDF2, bcrypt, and scrypt. By iteratively applying SHA 5,000 times-feeding the previous output plus the password back in each cycle-an attacker must perform 5,000 hash operations for every single password guess during an offline brute-force attack. This multiplicatively increases the cost and time of cracking. Option B has a logic error (it hashes only 'key', discarding 'password' after the first round, producing a constant). Option C performs only one computation regardless of complexity. Option D is a single AES/SHA operation with no iteration, offering no stretching benefit.

Topics

#key derivation#password hashing#cryptographic strength#offline attack resistance

Community Discussion

No community discussion yet for this question.

Full CAS-003 Practice