4

After reading this question, I realize I do not understand the aspect of cost of encryption hashing.

Can anyone shed some light on that aspect please?

1 Answer 1

4

This is a parameter used in password hashing, not for reversible encryption.

Passwords typically have low entropy. If an attacker has your corpus of hashed passwords, they can simply try hashing the most common passwords with each user's salt to quickly find login credentials. A GPU, FPGA, or ASIC can hash hundreds of millions (or more) of attempts in parallel.

Therefore, newer password hashing functions have a cost parameter. As this number grows, the amount of work (typically CPU time or memory) necessary to compute the hash increases exponentially. A typical cost factor might increase the number of operations necessary to compute a password hash by a factor of 100,000 or more. The idea being that this doesn't significantly increase the cost of verifying a hash for authentic use-cases (with, say, >50% of attempts being successful), but is a dramatic penalty for someone who guesses incorrectly virtually all of the time.

2
  • Is 'cost' the same thing as the number of rounds hashing the password (I'm specifically talking about Brypt)? I assume I'm wrong if I say that "if the cost in Brypt is '10' then the password will be re-encrypted 10 times and therefore make the cracking more difficult".
    – Andres
    Commented Jan 9, 2018 at 13:45
  • 1
    Password hashing is not encryption — it's really important to get the terminology right so as to not confuse concepts. Second, the parameter for bcrypt specifically is the power-of-two number of rounds of bcrypt applied. A cost of 10 implies 1,024 rounds of hashing. Commented Jan 9, 2018 at 22:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .