Guess count is the alphabet size raised to the length
A password drawn uniformly from an alphabet of size A and length n has A to the power n candidates, which is n times log2(A) bits. Uppercase, lowercase, digits, and the 25 symbols in this pool are 87 characters, about 6.4 bits each. Sixteen characters are about 103 bits; eight are about 52. After letters and digits are already included, a symbol class adds about half a bit per character. Going from 8 to 16 multiplies the guess count by the alphabet, eight times over. Dropping 0, O, 1, l, and I shrinks the pool a little, because those glyphs look alike when a person copies them. A password is a secret. A digest is a function of content — see hash digest. Storing a login secret wants a slow hash — see bcrypt. A UUID names a row — see UUID generator — and anyone who can see it can point at that row.
What length, the alphabet, and the draw each change
Why one extra character usually multiplies guesses more than one extra symbol class
- Bits per character are the base-2 log of the alphabet size. Eighty-seven symbols are about 6.4 bits. Digits alone are about 3.3 bits, so sixteen digits are only about 53 bits.
- Sixteen characters from those 87 symbols are about 103 bits. Eight are about 52. Doubling the length squares the number of guesses.
- Letters and digits are 62 symbols, about 6.0 bits. Adding the 25 symbols reaches 87, about half a bit more per character, roughly eight extra bits at length 16.
- A site that caps length at 8 and then demands a symbol still has a short password. The cap sets the ceiling. The extra symbol does not.
Why a “must include each class” rule shrinks the set an attacker searches
- Without the rule, every string of length n counts. The size of that set is the alphabet size to the power n.
- Requiring one character from each enabled class throws out every string that misses a class. An attacker who knows the rule skips those strings.
- The same rule still accepts short, common strings such as Password1!. Matching the rule is not the same thing as being hard to guess.
- A draw that promises one of each class picks those characters first, fills the rest from the whole pool, then shuffles. The shuffle stops the required characters from always sitting at the front. It does not enlarge the alphabet.
- NIST SP 800-63B dropped composition rules as a requirement. It looks at length, and at whether the secret already appears in a breach corpus.
Why 0, O, 1, l, and I leave some alphabets
- They are different code points with similar glyphs in many fonts. A person reading a screen or a printout mixes 0 with O, and 1 with l or I.
- A paste of the whole string does not need that filter. The code points were already distinct, so a machine does not misread them.
- Removing I and O from uppercase, l from lowercase, and 0 and 1 from digits takes this 87-character pool down to 82. That is about 0.1 bit per character.
- Pipe and quotation marks are often grouped with those lookalikes, but they are not among these 25 symbols, so the filter here moves letters and digits, not the symbol class.
- One extra character of length pays the missing tenth of a bit back. The filter is for a human reader, not a bonus added to the entropy.
Why a password, a digest, and a UUID are three different objects
- A password is a secret drawn from an alphabet. Its job is to stay unknown to everyone except the person who chose it.
- A digest is a function of content that already exists. A fast digest such as MD5, or a single SHA-256, can be tried in bulk against a stolen list.
- A stored login secret should be a slow hash: bcrypt, Argon2, or PBKDF2 with a salt and a cost. The salt makes one password produce different digests. The cost makes each guess pay time or memory.
- A UUID identifies a row. Seeing it is not a login, and it was not drawn from the password alphabet.
What a secret, a digest, and an identifier each carry
A string a password manager will store, rather than a memory
Random characters carry no words, and a manager only has to keep the string. A person who must memorize wants words. The EFF long list has 7776 words, about 12.9 bits each, so six words are about 77 bits, near twelve characters drawn from 87 symbols. Either way the strength is the log of the space, not how scrambled the text looks.
A secret that is about to be written into a user table
The table should not hold the characters. A slow hash plus a salt makes every guess pay the iteration or the memory. A UUID can be the primary key of that row. It is not the password, and reading it should not sign anyone in.