A passphrase is a sequence of random words that provides high entropy while remaining easy to type and remember. To create a strong passphrase, select four to six random words from a large wordlist, ensuring each word adds roughly 11 to 13 bits of entropy. This method typically yields 44 to 77 bits of security, which is significantly more robust and memorable than short, complex random strings.
Why Passphrases Beat Random Strings
Traditional advice often suggests mixing uppercase letters, lowercase letters, numbers, and symbols into a short string. While this increases the theoretical possibilities for a fixed length, it often results in passwords that are difficult to type quickly and easy to forget. Passphrases leverage the human brain’s ability to remember meaningful sequences of words rather than abstract character combinations.
A passphrase composed of four common words generally provides sufficient entropy for most personal accounts. Because the words are distinct and spaced, they are easier to read back from a clipboard or read aloud for recovery. This balance between security strength and usability makes passphrases the preferred standard for modern credential management.
Understanding Entropy in Bits
Entropy measures the unpredictability of a password, expressed in bits. Higher entropy means an attacker needs to try more combinations to guess the password. For random character passwords, entropy is calculated using the size of the character set and the length of the password. For passphrases, entropy depends on the size of the wordlist and the number of words chosen.
The formula for passphrase entropy is logarithmic. If you choose $N$ words from a wordlist of $W$ words, the entropy is $\log_2(W^N)$. This simplifies to $N \times \log_2(W)$. A standard EFF wordlist contains 7,776 words. Each word therefore contributes approximately $\log_2(7,776) \approx 12.9$ bits of entropy. Four words provide about 51 bits, while six words provide about 77 bits. This calculation ensures you know exactly how strong your credential is, rather than relying on vague descriptions like "strong."
Using Crypto-Secure RNGs vs Math.random
The quality of your passphrase depends heavily on the random number generator (RNG) used to select words. JavaScript’s built-in Math.random() function is not cryptographically secure. It uses a deterministic algorithm that can be predicted if the state is known, which weakens the entropy of your passphrase.
For security-critical tasks, use crypto.getRandomValues() to generate unpredictable values. This API leverages the browser’s cryptographic random number generator, ensuring high entropy for passwords and tokens. PasswordForge uses this standard automatically to handle the complexity for you.
function getRandomInt(max) {
// Use crypto.getRandomValues for better entropy distribution
const array = new Uint32Array(1);
window.crypto.getRandomValues(array);
return array[0] % max;
}
This approach ensures that each word selection is truly independent and unpredictable, maximizing the entropy calculated from your wordlist size.
Step-by-Step: Generating a Diceware Passphrase
Diceware is a method of generating passphrases by rolling dice to select words from a predefined list. The EFF wordlist is a popular choice because it contains common English words that are easy to read and spell. Here is how to generate a strong passphrase using this method.
- Select your wordlist: Use the EFF large wordlist, which contains 7,776 words. This size provides optimal entropy per word.
- Choose word count: Decide how many words you need. Four words offer good security for low-risk accounts. Six words offer high security for important accounts.
- Generate random indices: Use a cryptographic RNG to pick integers between 1 and 7,776. Each integer corresponds to a word in the list.
- Combine the words: Join the selected words with spaces. Do not capitalize the first word or add punctuation unless required by the system accepting the password.
Using PasswordForge’s Diceware mode automates this process. It selects words from the EFF wordlist and displays the exact entropy in bits for your chosen length. This transparency helps you decide if four words are enough or if you need six.
Bulk Generation for Credential Rotation
When managing multiple accounts, you may need to rotate passwords across dozens or hundreds of devices. Generating these one by one is inefficient. Bulk generation allows you to create a set of passphrases simultaneously.
This is particularly useful for setting up new devices, configuring service accounts, or resetting passwords after a breach. You can generate between 1 and 1,000 passwords at once. After generation, you can export the list as CSV, JSON, or plain text to import into your password manager or deployment script.
Bulk generation ensures consistency. All passwords in the batch will have the same number of words and thus the same entropy level. This uniformity simplifies auditing and ensures that no account is left with a weaker credential than intended.
Verifying Strength with Offline Breach Checks
Even a random passphrase can be weak if it consists of common phrases like "correct horse battery staple." These combinations appear frequently in public datasets and may be compromised. To verify strength, check if your passphrase appears in known breach databases.
PasswordForge performs this check locally in your browser. It hashes your passphrase using SHA-1 and sends only the first five characters of that hash to a breach database. This method, known as k-anonymity, protects your privacy while confirming the uniqueness of your credential. If the passphrase is not found, it is likely strong and unique. If it is found, regenerate it. This process ensures your passphrase is not only mathematically strong but also practically unique in the wild.
By combining high entropy from the EFF wordlist with a breach check, you create a passphrase that is both hard to guess and unlikely to be shared with other users. This two-step verification provides confidence that your credential will remain secure.