A dictionary attack is an attack in which an attacker takes a large list of passwords, possibly ordered by probability / probability, and applies an algorithm for each of them, checking the result.
In the case of a salty password, such an attack is still possible (and not significantly more expensive) if the attacker has salt (which is usually assumed): just enter the salt in your algorithm.
What protects the salt is a rainbow table. A rainbow table is a table containing plaintext pairs (e.g. passwords) and corresponding hashes sorted by hash. Such a table allows a simple password search, given the hash.
Creating a rainbow table is an expensive step (depending on the size of the dictionary used as input), but then you can use it at no cost later to find as many passwords as possible.
How salt protects against this, since now you will need a separate table for each salt. Even with a simple 2-letter Unix crypt salt, this is already a 3844 factor. Modern password hashing algorithms use a much larger salt (for example, bcrypt uses a 128-bit salt, which gives a factor of 2 128. )
To protect against dictionary attacks, you will also use the slow hash algorithm instead of the fast, for example, simple MD5 or SHA1 / SHA2. Bcrypt is such an algorithm (with a configurable work coefficient), and the same author later proposed scrypt (which not only takes a lot of time, but also requires a large amount of memory, attackers are often not as much as computing power).
Paŭlo Ebermann
source share