Background:
As of Desktop and Web Vault version 2024.11.0 (as well as version 2024.11.999 of the redesigned browser extension), the password generator raises the lower limit for passphrase length from 3 words to 6 words (see PR 11675) — corresponding to 78 bits of entropy. Furthermore, for the generation of passwords (random character strings), there currently is a hard limit of 5 characters — corresponding to 15–29 bits of entropy (depending on the character sets included).
Proposed Changes:
This Feature Request proposes two related changes:
-
The hard lower bound for generated passphrases and passwords shall be either eliminated or significantly lowered (e.g., to 2 words and 4 characters, respectively).
-
If any hard length restrictions for generation of random secrets are enforced (especially any lower bounds that are more restrictive than those suggested in Item #1 above), then those restrictions shall be consistent for generation of passwords and passphrases (i.e., the minimum and maximum entropies shall match).
Use-Cases:
There are very legitimate scenarios under which a passphrase shorter than 6 words (or a password shorter than 5 characters) provides proper security for the application at hand. For example, the Bitwarden vault master password itself does not need to have more than 50 bits of entropy to provide sufficient protection against plausible brute-force attack scenarios (and PINs used for unlocking should have even lower entropy — perhaps as low as 30 bits). Another example is PINs used for user verification on Yubikeys — as illustrated here, even a 13-bit PIN provides reasonable protection against a brute-force attack, and anything higher than 43 bits seems to be overkill.
There are similar use-cases in which passphrases with entropy lower than 78 bits are perfectly suited for the application. In addition, 6-word passphrases are more difficult to memorize, take longer to type, and are much more likely to run afoul of websites’ maximum password length restrictions (on average, a 6-word passphrase will consist of 47 characters).
Discussion:
The range of allowed passphrase lengths is now 6–20 words, corresponding to an entropy range 78–266 bits. At the same time, the password length restrictions are 5–128 characters, which corresponds to an entropy range 15–785 bits. In my opinion, it makes absolutely no sense why the allowed entropy range for generated passwords should be 4 times larger than the allowed entropy range for generated passphrases.
My recommendation would be to not impose any hard minimum length restrictions in the generators, giving users the flexibility to generate random secrets for any purpose. Instead of hard limits, it would be more appropriate to implement default length settings (e.g., 12 characters and 6 words, respectively) to guide users towards making more secure choices.
As a final thought, although this Feature Request focuses primarily on the lower bounds, some consideration could also be given to the upper bounds of the password/passphrase lengths produced by the generator. For services that hash passwords into a 256-bit hash, it could be argued that the maximum reasonable length for the generator should be 20 words in generated passphrases or 86 characters in generated passwords. However, it is better to give the users flexibility, because it is not a given that the generated secret will be stored as a 256-bit hash (or used in 256-bit encryption); it should be noted that the password generator currently allows up to 128 characters, corresponding to 384–785 bits of entropy (clearly far beyond 256 bits). The password fields in Bitwarden login items can store approximately 3500 characters; this would be able to accommodate passphrases as long as 437 words (5660 bits of entropy if a number is included) — a password with matching entropy would have 923–1887 characters.