How long should a salt be to make it infeasible to attempt dictionary attacks?

后端 未结 6 1444
萌比男神i
萌比男神i 2021-02-07 12:52

I\'m designing an authentication system that works like the following:

  1. User enters password
  2. Salt is generated.
  3. Password is hashed with whirlpool<
6条回答
  •  后悔当初
    2021-02-07 13:19

    The salt determines how much space is required to store a pre-computed table (such as a Rainbow Table) that allows an attacker to quickly lookup a password for a given hash.

    The number of hash iterations (not the salt) is what determines the time required for an attacker try each password in his dictionary of candidates.

    Every bit of salt doubles the space required for the lookup table. So, 8 bytes (64 bits) would result in a space multiplier of 16 million terabytes—taking the total space well into the yottabyte range (and probably beyond the reach of most attackers).

提交回复
热议问题