What does Password Entropy and Least Privilege conclude, in numbers, about “Guessing under a Zipf Law: Why Shannon Entropy Overrates Human-Chosen Passwords”?
Answer: Chapter 3 shows in a Zipf population that a ten-guess success rate of 0.0477 is 817 times that of a uniform distribution with the same entropy; if refused users switch to predictable mutations, the hundred-guess rate under a hundred-entry blocklist, 0.1336, exceeds the 0.1087 with no blocklist.
Scope of the numbers: Its firms, accounts and probabilities are illustrative, and all calculations are generated by its programs; it is not personalised business, legal, financial or compliance advice, and its audit routine and tool never touch a real password. Chapter 6 uses minimum role covers and the recovery graph to show that the illustrative firm expects to lose 0.4972 accounts a year, and 0.1899 after hardening the main mailbox alone.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.0477, 0.1087, 10, 100, 817
| N | 1,000,000 distinct passwords, Zipf exponent s |
| s H(bits) Hmin lam10 lam100 lam1000 mu50(bits) H-mu50 | |
| 0.6 | 19.12 9.29 0.0071 0.0221 0.0602 17.44 1.68 |
| 0.8 | 17.39 6.23 0.0477 0.1087 0.2068 15.32 2.06 |
| 1.0 | 13.41 3.85 0.2035 0.3604 0.5201 9.55 3.86 |
| uniform with the same H | 17.39 bits: lam10 = 0.000058 |
| Zipf s | 0.8 lam10 is 817 times the uniform value |
Show the full program
# Chapter 3. p31: Shannon entropy versus guessing under a Zipf law.
# Human-chosen passwords follow a Zipf-like rank-frequency law (Wang et
# al. 2017: 14 data sets, 113.3 million passwords; the PDF-Zipf fit to
# popular passwords has R^2 above 0.97): p_r proportional to r^(-s).
# Here N = 1,000,000 distinct passwords and s in {0.6, 0.8, 1.0} are
# illustrative. Metrics
# (Bonneau 2012): Shannon H; min-entropy Hmin = -log2 p_1; success rate
# lambda_k of an attacker who tries the k most common passwords; mu_50,
# the guesses needed to break half the accounts, in bits. A uniform
# distribution with the same Shannon H would need 2^(H-1) guesses.
import math
N = 1_000_000
def zipf(s, n=N):
w = [r ** (-s) for r in range(1, n + 1)]
z = math.fsum(w)
return [x / z for x in w]
def guesses_for(p, target):
"""Smallest k whose top-k mass reaches target (binary search)."""
lo, hi = 1, len(p)
while lo < hi:
mid = (lo + hi) // 2
if math.fsum(p[:mid]) >= target:
hi = mid
else:
lo = mid + 1
return lo
def metrics(p):
h = -math.fsum(x * math.log2(x) for x in p)
hmin = -math.log2(p[0])
lam = {k: math.fsum(p[:k]) for k in (10, 100, 1000)}
return h, hmin, lam, guesses_for(p, 0.5)
print("N = 1,000,000 distinct passwords, Zipf exponent s")
print("s H(bits) Hmin lam10 lam100 lam1000 mu50(bits) H-mu50")
for s in (0.6, 0.8, 1.0):
h, hmin, lam, half = metrics(zipf(s))
mb = math.log2(half)
print("{:.1f} {:6.2f} {:5.2f} {:.4f} {:.4f} {:.4f} {:9.2f} {:6.2f}"
.format(s, h, hmin, lam[10], lam[100], lam[1000], mb, h - mb))
if s == 0.8:
ref = (h, lam[10])
print("uniform with the same H = {:.2f} bits: lam10 = {:.6f}".format(
ref[0], 10 / 2.0 ** ref[0]))
print("Zipf s=0.8 lam10 is {:,.0f} times the uniform value".format(
ref[1] / (10 / 2.0 ** ref[0])))Single source and citation
Fan, Y. (2026). Password Entropy and Credential Stuffing, the Forced-Rotation Paradox and Least-Privilege Accounts for One-Person Firms (Version 1.0.0), Chapter 3: Guessing under a Zipf Law: Why Shannon Entropy Overrates Human-Chosen Passwords. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-218 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026218,
author = {Fan, Yafu},
title = {Password Entropy and Credential Stuffing, the Forced-Rotation Paradox and Least-Privilege Accounts for One-Person Firms},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Forced-Rotation Paradox: Predictable Variants and an Overrated Attack Window
- Chapter 2 · The Entropy Ledger: log2(N^L), Random Long Passphrases and Complex Short Passwords
- Chapter 4 · The Credential-Stuffing Funnel: Reuse Rates, Breach Corpora and Second Factors
- Chapter 5 · Throttling, Blocklists and Hash Prefixes: the Ceiling on Online Guessing
- Chapter 6 · The Permission Graph and its Minimum Cover: a One-Person Firm's Blast Radius
- Chapter 8 · The Permission-Matrix Audit Sheet: an Empirical Loop and a Falsification Plan