#1868 Let user directly choose the strength of a generated password


It would be great if the password generator, instead of making me choose the exact length of the new password, let me directly choose the strength I want. Based on that and the chosen character set, it could figure out how long the password needs to be.

The length of a randomly generated password isn't my primary concern; what I care about is its strength. Of course the two are related, for a given character set; all I'm suggesting is making strength (not length) the quantity I have direct control over, and length (not strength) the derived quantity.

Currently, to get a password of length X, but not too hugely greater than X, I have to:
- configure the character set to satisfy the particular web site's rules
- keep trying different lengths until I get a strength in the range I'm looking for

Suggested UI for the strength parameter: a draggable-slider version of the strength meter from the main entry-edit window, tied to an editable numeric field displaying the number of bits of entropy (i.e. pretty standard for bounded integer input values). Of course, the maximum should be set insanely high by today's standards, to allow for "entropy inflation" (and for individual users' paranoia levels).

Even better would be to make both length and strength directly editable; whenever the user modifies one, update the widget(s) for the other one accordingly.


  • Eric Siegerman

    Eric Siegerman - 2014-05-09

    Woops, that should be "Currently, to get a password of strength X...".

    (This is for KeePass 2.x, btw.)

  • Paul

    Paul - 2014-05-10

    Length is the best determinant because that is what web site designers inevitably tell you about. Plus a longer password is usually more secure than a shorter one.

    cheers, Paul

  • Eric Siegerman

    Eric Siegerman - 2014-05-15

    I'm a Linux/Unix user, and copy/paste on X-Windows has always been, shall we say, somewhat problematic. That means I have to hand-type some passwords. In such cases, a password that's longer than necessary is a drawback; most importantly, given that KeePass takes the problem of remembering them out of the picture: a longer password is harder to type correctly with limited visual feedback.

    So users who have to hand-type passwords are faced with a classic engineering tradeoff -- security vs. convenience -- and it basically has to be made for every darned password, taking into consideration:

    • how high-value the account is

    • the system's password-format rules, and

    • whether it's even an issue (it isn't, if cut'n'paste actually works in that particular case)

    What I'd like is for KeePass to make it easier to fine-tune that tradeoff. I believe that letting the user directly specify the desired entropy would accomplish that goal.

    Sure, site designers talk in terms of length -- but they almost always give a range. I can think of only one site that has ever insisted that my password be exactly N characters long. Only in those very rare cases, I believe, is usability enhanced by making length the (only) independent variable.

    Still, those rare cases do exist -- which is an argument for letting the user configure either the length or the strength, with KeePass working out the other variable.

  • Paul

    Paul - 2014-05-15

    When manually typing you really do have an issue. Is there no way around the copy/paste issue?

    cheers, Paul

  • wellread1

    wellread1 - 2014-05-15

    The easiest way to deal with this issue is to define 2-3 named profiles that generate passwords with the desired Password Quality (e.g. 60bit password, 80bit password, 128bit password, etc.). For each profile you would define the preferred length, character set and other characteristics that would produce convenient to use passwords of the desired quality.

    For randomly generated passwords the Password Quality is

    Quality ~ Entropy = L*log2(N)


    L = Length of the the randomly generated part of the password
    N = Character set size

    See the Wikipedia article about password strength about how to use Length & Character set size to achieve the desired Entropy in a password.

    Note: The KeePass quality estimator applies statistical analysis, pattern searching and other techniques to estimate password quality for a given password provided as input. Since it requires a password as input it can not be used as a independent variable to generate a password as output. While the equation shown above can be rearranged, it is not the method that KeePass uses to estimate password quality. Moreover, the equation above is only applicable to passwords that rigorously comply with all requirements therefore it can not be applied as a general rule. That does not prevent you from creating passwords, using the method described at the beginning of this post, for which the equation above applies.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks