# About, Methodology & Threat Model

Source: https://passwordgeneratorlab.com/about/

> How Password Generator Lab creates passwords: Web Crypto randomness, rejection sampling, exact entropy counting, our threat model, and open-source credits.

## Why we built this

Generating a password should be simple, private, and correct. Many generators are buried under ads and trackers, or quietly use weak randomness. Password Generator Lab is a small set of focused tools that run entirely in your browser, explain their math, and make no claims they can't back up.

Password Generator Lab is a [YDesigns](https://ydesigns.in/) project. YDesigns (YDesigns Finlabs Private Limited) is a startup studio and tech agency in New Delhi, India, founded in 2015. It builds, maintains and is responsible for this site. Questions or corrections? [Contact us](https://passwordgeneratorlab.com/contact/).

## Methodology

### Randomness

All secrets come from the Web Crypto API's `crypto.getRandomValues()`, which your browser backs with the operating system's cryptographically secure random number generator. We never use `Math.random()`.

### Unbiased selection

To pick one of *n* items from a random 32-bit number, a naive `value % n` slightly favors some items. We use **rejection sampling** instead: random values from the uneven tail of the range are discarded and redrawn, so every item is exactly equally likely.

### Requiring every character type

A common shortcut is to insert one character of each type and shuffle. That makes passwords with exactly one digit or symbol more likely than they should be. Instead, we draw the **whole password** uniformly and redraw it if a required type is missing. The result is uniform over every password that meets your settings. Even in the most restrictive setting about 1 in 160 draws succeeds, so this is still instant.

### Entropy

Entropy is log₂ of the number of possible outputs. For random passwords we count that number exactly, using the inclusion–exclusion principle to subtract passwords missing a required type. For passphrases it is words × log₂(7,776), plus log₂(10) for an added digit and log₂(12) for an added symbol. For PINs it is log₂(10^n), or log₂(10 × 9^(n−1)) when repeated adjacent digits are excluded. Entropy describes the generator, not a password a person chose — that's what the [strength checker](https://passwordgeneratorlab.com/password-strength-checker/) is for.

### Character sets

- Uppercase A–Z, lowercase a–z, digits 0–9.
- All symbols (32): `` !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ``
- Compatible symbols (12): `!#$%&*+-=?@_`
- Ambiguous characters (optional exclusion): `` O0oIl1|`'" ``

### Where secrets live

Passwords exist only in the page's memory. They are never sent over the network, written to cookies, local storage or the URL, or included in the pre-built HTML (generation starts only after the page loads in your browser). JavaScript can't reliably wipe memory, so closing the tab is the best way to discard a password you no longer need.

### Works offline

After your first visit, a service worker keeps a copy of the site's pages and code in your browser, so every generator keeps working with no connection at all. (The strength checker downloads its word lists the first time you use it, then works offline too.) That's also the easiest way to confirm nothing is being sent: turn off Wi-Fi and keep generating.

## Threat model

Generating passwords in your browser protects against a lot — but not everything.

**What it protects against:** your password being transmitted to, logged by, or stored on our servers or any third party; weak or biased randomness. The one feature that contacts an outside service — the strength checker's opt-in leak check — sends only a 5-character prefix of the password's SHA-1 hash (k-anonymity), so Have I Been Pwned never learns the password.

**What it can't protect against:**

- **A compromised device or browser.** Malware or a malicious browser extension can read anything on the page. No website can defend against that.
- **AI assistants and browser agents.** An AI browser, sidebar assistant or agent that reads the page can see a password shown on it and may send the page to its provider. Generate secrets with such tools switched off, or hide the password before they read the page.
- **Clipboard exposure.** Clipboard managers, cloud clipboard sync and other apps can read what you copy. We can't clear your clipboard afterwards.
- **Shoulder surfing and screen sharing.** Use the Hide button when others can see your screen.
- **Downloaded files.** Bulk exports are plain text and persist until you delete them.
- **Supply-chain risk.** If our code or a dependency were tampered with, it could behave differently. We keep dependencies minimal and serve a strict Content Security Policy. The only third-party code is Google Analytics, for page traffic: you can decline it, and in Europe it waits for your consent.

You can check the "nothing is sent" claim yourself: load a generator, disconnect from the internet, and keep generating — or move to another tool; the site works fully offline. Your browser's developer tools (Network tab) will also show no requests when you generate or copy.

## Editorial standards

Our guides and tool pages follow a few rules:

- **Primary sources.** Claims about standards and vendor rules link to the original document — NIST, OWASP, Microsoft, AWS, Google or the PCI Security Standards Council — and policy presets show the date we last checked them.
- **Numbers come from the code.** Entropy and time-to-guess figures are calculated with the same functions the tools use, so the guides and the tools always agree.
- **Dated reviews.** Every page shows when it was last reviewed. We re-check standards when they change and update the date only after a real review.
- **No sponsored recommendations.** We don't accept payment to recommend products. If that ever changes, it will be clearly disclosed on the page.
- **Corrections.** Spotted a mistake? [Tell us](https://passwordgeneratorlab.com/contact/) — we fix errors promptly and note significant changes.

## Credits and licenses

- Passphrases use the [EFF Large Wordlist](https://www.eff.org/dice) by the Electronic Frontier Foundation, licensed under [CC BY 3.0 US](https://creativecommons.org/licenses/by/3.0/us/). We use it unmodified.
- Strength estimates use [zxcvbn-ts](https://github.com/zxcvbn-ts/zxcvbn) (MIT License), a TypeScript port of Dropbox's zxcvbn.
- Icons by [Lucide](https://lucide.dev) (ISC License).

## Sources

- [MDN: Crypto.getRandomValues()](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)
- [NIST SP 800-63B-4, Digital Identity Guidelines: Authentication and Authenticator Management (2025)](https://pages.nist.gov/800-63-4/sp800-63b.html)
- [OWASP Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)
- [EFF Dice-Generated Passphrases](https://www.eff.org/dice)
