Does revealing part of your hash give an attacker advantage when attacking your password?

TL;DR: The answer depends on the hash algorithm, what part of the hash is revealed and the strength of the password.

Assuming that the hash algorithm is known the knowledge of a specific part of the hash might make brute force attacks easier: The attacker might now run most brute force tests offline and also in parallel and is thus not restricted by rate limiting or even account locking after failed attempts which is (hopefully) in place to deter massive brute forcing.

How much easier the attack gets depends on the hash and on the strength of the password though. If the hash algorithm is slow (as recommended) then brute forcing will be slow too. If the password is weak enough such offline brute forcing will still likely be successful too. In contrast: if the site implements a wait time after each failed login attempt or maybe even locks the account then online brute force attacks will often fail even for weaker passwords.

How much easier it gets depends also a lot on the type of hash and which parts are revealed. If the attacker does not know the salt which was used in hashing (and which is commonly stored as part of the hash) then brute forcing is nearly impossible - provided that the salt is chosen from a large enough random pool.


There is quite no case when it's not easier for the adversary. The only case is if the password is salted (with large random) and the salt is not displayed.

The main concern is to know how much easier it is for the adversary.

In the worst case, he can perform offline dictionary/bruteforce attack and due to the dispersion of the hashing function, he will have few false positives.
For example, if the website display 6 hex characters, you can assume that a bruteforce attack will statistically match a hash with the same heading 6 characters every 16^6 attempt (so one false positive every 16 millions attempt). It's a big advantage.

As previously mentioned, if the hash algorithm is bcrypt, scrypt, and so one, the speed of an offline attack will not be very interesting comparing to the online attack.
BUT !!!
With abilities to perform an offline attack you can avoid account lockout due to passwords attempt threshold. So there is some cases where displaying part of the hash will permit to bypass an account lockout functionnality even if the offline attack speed is not huge (10 attemps per sec is still better than 10 attemps and then blocked).
It is also a way to stay quiet relatively to the SIEM and other intrusion detection mechanisms.

Note that having a huge randomly generated password will not be enough to ignore the risk. If the password is not salted and the hash algorithm is weak, a collide could occur with a shorter password attempt.