[Paper Review] Password Cracking: The Effect of Bias on the Average Guesswork of Hash Functions.
This paper analyzes how password bias and hash function design affect average guesswork in password cracking, showing that biased passwords and adaptive hash functions significantly increase guesswork. It derives tight bounds on guesswork growth under offline and online attacks, revealing that the number of users has a far worse impact than password bias, and introduces a backdoor mechanism to enhance security without increasing guesswork.
In this work we analyze the average guesswork for the problem of hashed passwords cracking (i.e., finding a password that has the same hash value as the actual password). We focus on the following two cases: Averaging over all strategies of guessing passwords one by one for any hash function that has effective distribution (i.e., the fraction of mappings to any bin) which is i.i.d. Bernoulli(p), and averaging over all hash functions whose effective distribution is i.i.d. Bernoulli(p) for any strategy of guessing passwords one by one. For the case where the hash function is adaptively modified based on the passwords of the users we first find the average guesswork across users when the number of bins is 2 and the number of users equals ⌊2H(s)·m−1⌋, where 1/2 ≤ s ≤ 1 and m ≫ 1. It turns out that the average guesswork increases (as a function of m) at rate that is equal to H (s)+D (s||p) when (1− p) ≤ s ≤ 1, and 2 ·H (p)+D (1− p||p)−H (s) when 1/2 ≤ s ≤ (1− p). We then show that the average guesswork of guessing a password that is mapped to any of the assigned bins (an offline attack) grows like 2. We also analyze the effect of choosing biased passwords on the average guesswork and characterize the region in which the average guesswork is dominated by the guesswork of a password as well as the region in which the average guesswork is dominated by the above results. Moreover, we provide a concentration result that shows that the probability mass function of the guesswork is concentrated around its mean value. We also analyze the more prevalent case in which hash functions can not be modified based on the passwords of the users (i.e., users are mapped to bins randomly). We derive a lower and an upper bounds for the average guesswork both under offline and online attacks and show that the rate at which it increases under offline attacks is upper bounded by D (s||p), and lower bounded by D (1− s||p) when 1− p ≤ s ≤ 1 as well as 0 for 1/2 ≤ s ≤ 1− p, whereas under an online attack the rate is upper bounded by H (s) + D (s||p) when (1− p) ≤ s ≤ 1, and 2 · H (p) + D (1− p||p) − H (s) when 1/2 ≤ s ≤ (1− p), and lower bounded by H (s) + D (1− s||p). In addition, we show that the most likely average guesswork when passwords are drawn uniformly increases at rate H (p) − H (s) under an offline attack and at rate H (p) when cracking the password of any user. These results give quantifiable bounds for the effect of bias as well as the number of users on the average guesswork of a hash function, and show that increasing the number of users has a far worse effect than bias in terms of the average guesswork. Furthermore, we show that under online attacks the average guesswork is upper bounded by H (s) +D (s||p) when (1− p) ≤ s ≤ 1, and 2 · H (p) + D (1− p||p) − H (s) when 1/2 ≤ s ≤ (1− p), and lower bounded by H (s) +D (1− s||p) For keyed hash functions (i.e., strongly universal sets of hash functions) we show that when the number of users is ⌊2m−1⌋ and the hash function is adaptively modified based on the passwords of the users, the size of a uniform key required to achieve an average guesswork 2, α > 1, is α times larger than the size of a key that is drawn Bernoulli(p0) that achieves the same average guesswork, where p0 satisfies the equality 1+D (1/2||p0) = α. Finally, we present a “backdoor” procedure that enables to modify a hash function efficiently without compromising the average guesswork. This work relies on the observation that when the mappings (or the key) of a hash function are biased, and the passwords of the users are mapped to the least likely bins, the average guesswork increases significantly.
Motivation & Objective
- To quantify how password bias and hash function design influence the average guesswork in password cracking.
- To model the impact of adaptive hash functions—modified based on user passwords—on guesswork under varying user counts.
- To establish theoretical bounds on average guesswork for both offline and online attacks, distinguishing between uniform and biased password distributions.
- To explore the role of keyed hash functions (strongly universal sets) in controlling guesswork and derive key size requirements for desired security levels.
- To develop a backdoor mechanism that enhances guesswork without compromising security, leveraging biased mappings to least-likely bins.
Proposed method
- Uses i.i.d. Bernoulli(p) distributions to model effective hash function behavior and analyze average guesswork across strategies.
- Applies information-theoretic tools, including relative entropy D(·||·) and entropy H(·), to derive bounds on guesswork growth rates.
- Analyzes two attack models: offline (adversary has full access to hash values) and online (adversary queries one password at a time).
- Derives concentration results showing guesswork probability mass function is tightly concentrated around its mean.
- Introduces a 'backdoor' procedure that modifies hash functions efficiently by mapping passwords to least-likely bins, increasing guesswork without altering key size.
- Uses uniform and biased key distributions to compare required key sizes for achieving target guesswork levels, showing a multiplicative factor α for desired security.
Experimental results
Research questions
- RQ1How does password bias affect the average guesswork in password cracking under offline and online attack models?
- RQ2What is the rate of increase in average guesswork when the number of users grows, and how does it compare to the effect of password bias?
- RQ3How do adaptive hash functions—modified based on user passwords—affect average guesswork, especially when users are mapped to least-likely bins?
- RQ4What are the tight upper and lower bounds on average guesswork for keyed hash functions under different attack models?
- RQ5Can a backdoor mechanism be designed to increase guesswork without increasing key size or compromising security?
Key findings
- Under offline attacks, the average guesswork grows at a rate upper bounded by D(s||p) and lower bounded by D(1−s||p) when 1−p ≤ s ≤ 1, and 0 when 1/2 ≤ s ≤ 1−p.
- Under online attacks, the average guesswork grows at a rate upper bounded by H(s) + D(s||p) when 1−p ≤ s ≤ 1, and 2·H(p) + D(1−p||p) − H(s) when 1/2 ≤ s ≤ 1−p.
- The most likely average guesswork for uniformly drawn passwords increases at rate H(p) − H(s) under offline attacks and at rate H(p) when cracking any user’s password.
- When the number of users is ⌊2H(s)·m−1⌋, the average guesswork increases at rate H(s) + D(s||p) for 1−p ≤ s ≤ 1, and 2·H(p) + D(1−p||p) − H(s) for 1/2 ≤ s ≤ 1−p.
- For keyed hash functions with ⌊2m−1⌋ users, a key drawn from Bernoulli(p₀) with 1 + D(1/2||p₀) = α achieves the same average guesswork as a uniform key of size α times larger.
- The backdoor procedure efficiently increases guesswork by mapping passwords to least-likely bins, leveraging bias in hash mappings without altering the key or increasing guesswork.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.