Project

General

Profile

Feature #7002

Hint user about passphrase strength when creating a persistent volume

Added by tmc almost 6 years ago. Updated 16 days ago.

Status:
In Progress
Priority:
Low
Assignee:
Category:
Persistence
Target version:
Start date:
03/31/2014
Due date:
% Done:

0%

Feature Branch:
https://salsa.debian.org/touss-guest/persistence-setup/tree/feature/7002-hint-user-about-passphrase-strength-when-creating-persistence
Type of work:
Code
Blueprint:
Starter:
Yes
Affected tool:

Description

The GUI bits should be stolen from existing, well-thought solutions to the same problem, e.g. GNOME Disks.

The (Modern Perl) code lives at https://git-tails.immerda.ch/persistence-setup/.

Feel free to ask details to intrigeri if you want to tackle this, or are lost in the code.

@sajolida wants to track this :)

image1.png View (81.2 KB) touss, 11/28/2019 02:00 AM

image2.png View (88.7 KB) touss, 11/28/2019 02:00 AM

libpwquality_strenght_distribution.png View - libpwquality checker strength distribuition (27.4 KB) touss, 01/06/2020 02:55 AM

top500combined.png View - top 500 combined (18 KB) touss, 01/06/2020 02:55 AM


Related issues

Related to Tails - Feature #7001: Hint user about the strength of their administration password Confirmed 03/31/2014
Related to Tails - Feature #10647: Integrate information about persistence to persistence assistant Confirmed 11/24/2015
Duplicated by Tails - Feature #15027: Passphrase Strength Meter for Persistence Wizard Duplicate 12/08/2017

History

#1 Updated by intrigeri almost 6 years ago

  • Subject changed from Password quality monitor for Tails persistent volume assistant UI to Hint user about passphrase strength when creating a persistent volume
  • Description updated (diff)
  • Category set to Persistence
  • Status changed from New to Confirmed
  • Type of work changed from User interface design to Code
  • Starter changed from No to Yes

#2 Updated by intrigeri almost 6 years ago

  • Related to Feature #7001: Hint user about the strength of their administration password added

#3 Updated by u over 2 years ago

  • Related to Feature #10647: Integrate information about persistence to persistence assistant added

#4 Updated by intrigeri about 2 years ago

  • Duplicated by Feature #15027: Passphrase Strength Meter for Persistence Wizard added

#5 Updated by touss 3 months ago

  • Assignee set to touss

#6 Updated by touss 2 months ago

  • Status changed from Confirmed to In Progress
  • Target version set to Tails_4.1
  • Feature Branch set to https://salsa.debian.org/touss-guest/persistence-setup/tree/feature/7002-hint-user-about-passphrase-strength-when-creating-persistence

#7 Updated by touss about 2 months ago

Hi @intrigeri,i would appreciate some advice on this:
I tried to make the GUI as similar as possible with to that of the GNOME Disks.It uses Data::Password::zxcvbn to estimate the given passphrase strength (is this ok or should we use another module?).I'm not sure of the position of the warning label; would it be better to align it with the level bar? I also added an extra commit to make mouse clicks not grab focus in Show passphrase button.

#8 Updated by touss about 2 months ago

  • Status changed from In Progress to Needs Validation
  • Assignee deleted (touss)

#9 Updated by segfault about 2 months ago

Hi,

thanks for working on this!

touss wrote:

I'm not sure of the position of the warning label; would it be better to align it with the level bar?

It would be helpful if you could add a screenshot of that, and then we can ask @sajolida for his opinion.

#10 Updated by touss about 2 months ago

Hi, @segfault thanks for replying.
This feature is currently implemented like image1. I suggested aligning the warning area like image2; Or would it be better to change the position of the level bar?

#11 Updated by sajolida about 2 months ago

Cool! I'm not worried so much about the alignments of the different elements but I prefer image2.png.

I'm a bit more worried about the quality of the indication itself.

Password, password strength, and password policies are a really hot topic in usable security.

Just to give one example: https://blog.fleetsmith.com/password-security-guide/.

  • I like the fact that the algorithm seems to detect weak l33t-speak and not pretend than "p4ssw0rd" is stronger than "password".
  • I like the fact that the algorithm doesn't force the use of numbers or special characters, for example for diceware passwords.
  • I'm a bit concerned by the strength levels. For example "password1234" gives me "Good" in GNOME Disks and "password1234!" gives me "Strong", cf. "“I Added ‘!’ at the End to Make It Secure” :) (https://www.usenix.org/system/files/conference/soups2015/soups15-paper-ur.pdf)

Could we higher the bar to "Good" and "Strong"?

#12 Updated by intrigeri about 2 months ago

Hi touss & others!

First, thanks a lot for working on this!

Wrt. how much we like the passphrase length checking algorithm, I'm glad we have sajolida's input here. touss, see the previous comments on this ticket (you were not on the list of watchers so you did not get notified of sajolida's questions).

A few notes from me:

  • Depending on how much we feel this feature is important, some tools are readily available to us, while some others require more work (e.g. packaging new stuff for Debian). Of course, they won't yield the same feedback for a given passphrase.
  • At first glance, I would be tempted to favor consistency over security. That is, it would feel weird to me to have the same password give different feedback here than in GNOME Disks.
  • I'd like us to keep in mind that we currently have no passphrase check at all. Arguably, even the worst passphrase checker will provide better educated info than what our average user would guess by themselves: at least it'll warn against lots of obviously bad ideas. IMO this outweigh the risk for giving a false sense of security, but I may be wrong.
  • GNOME Disks uses libpwquality. I don't know how good it is, but if we want to be consistent with GNOME Disks, I have a few question for touss:
    • Are there Perl bindings available for libpwquality?
    • Failing that, does libpwquality provide gobject-introspection data? If it does, we can use Gobject-Introspection to use this library.
    • Failing all of the above, I see Buster has libpwquality-tools, which ships a pwscore CLI. I optimistically assume we could use it to provide feedback similar to GNOME Disks'.

It uses Data::Password::zxcvbn to estimate the given passphrase strength (is this ok or should we use another module?).

I did not evaluate the quality of the feedback provided by this library; I'm inclined to trust sajolida's input on this.

Upstream seems adequately maintained and the code looks sane.

The only problem I see is that this module is not in Debian, which is a requirement before we can use it; all the dependencies seem to be there though (at first glance). I'm a Debian developer myself and a member of the Debian Perl Group, so adding this module to Debian should not take more than a couple hours to me, if we decide 1. that's really the module we want; 2. it's worth this sort of effort. Then, maintenance is done collectively over there; putting a few hours/year into it would be the minimum; sky is the limit wrt. the maximum :) I'm fine with doing this work myself but I'd rather mentor touss to join the Debian Perl Group and do it themselves. It's a very nice group of people and the most active ones are very Tails-friendly. touss, what do you think?

I see libcrypt-cracklib-perl is in Buster already. Would it do the job?

Perhaps you could explain us why you picked this module specifically?

#13 Updated by intrigeri about 2 months ago

  • Status changed from Needs Validation to In Progress
  • Assignee set to touss
  • Target version changed from Tails_4.1 to Tails_4.2

Now that this Pandora's box has been opened, it appears that it raises too many questions for this branch to make it into 4.1 ⇒ postponing. Still, I'm confident we'll manage to avoid the best becoming the enemy of the good :)

#14 Updated by sajolida about 2 months ago

  • At first glance, I would be tempted to favor consistency over security. That is, it would feel weird to me to have the same password give different feedback here than in GNOME Disks.

From our VeraCrypt survey, 41% of our users in 2018 didn't even know
what GNOME Disks was:

https://tails.boum.org/blueprint/veracrypt/

I'm tempted to think that a lot of the ones who did know what GNOME
Disks was came from the 45% of Linux users in our user base.

As we make Tails easier to use for Windows and macOS users, I expect
only a minority of our target user base to be ever confronted with GNOME
Disks years from now.

Another consistency that we should be worried about is between the
advice that we give in our doc and what the software tells people.
We're currently saying in /install/win/usb#create-persistence:

« We recommend choosing a long passphrase made of five to seven random
words. »

Which is probably the shortest good advice that we can give. It also
matched the NIST guidelines, referenced from the fleetsmith.com article
linked above.

  • I'd like us to keep in mind that we currently have no passphrase check at all. Arguably, even the worst passphrase checker will provide better educated info than what our average user would guess by themselves: at least it'll warn against lots of obviously bad ideas. IMO this outweigh the risk for giving a false sense of security, but I may be wrong.

I'm not so sure. Right now, when someone types in "password1234" we
don't tell them anything. With the meter from GNOME Disks, we would
explicitly tell them that it's a good password.

I think that it's not a good password in the context of Tails and we
should probably not advocate for any simple combination of any 2 of the
Top 500 passwords:

https://www.symantec.com/connect/blogs/top-500-worst-passwords-all-time

  • GNOME Disks uses libpwquality. I don't know how good it is,

I couldn't find any information about the algorithm used by libpwquality
in their GitHub repo, though I didn't read the code.

I could find an article comparing the password meter from different
online services and the Dropbox algorithm seems to be among the
strictest ones:

https://www.ndss-symposium.org/wp-content/uploads/2017/09/06_3_1.pdf

I tried zxcvbn (what a name!!!) from the python3-zxcvbn package and it
tells me that "password1234" is "a very common password". I like that.

Sooooo, I would propose to:

  • Do some more tests with zxcvbn, see how it compares to libpwquality,
    and whether we think that its results make sense in the context of
    Tails.
  • If so, advocate for using zxcvbn in GNOME Disks as well. I haven't
    checked thoroughly but I would guess that this password meter is used
    only on the passphrase of encrypted volumes. Then it would make sense
    for GNOME Disks to be a bit more strict. I see several bindings for it
    in Debian and we might even consider writing a patch to GNOME Disks
    upstream. Until then, the meters in Tails and GNOME Disks might be
    inconsistent but I would prefer that to advocating for "password1234".
  • If not, maybe we should give up on having a meter in the first place
    and instead move our advice from our doc to the Persistence creation
    app.

I hope that I'm not being too much of a downer here @touss. It's so cool
to see you working on the Persistence app, it's one of our key software
and we could improve it so much!

#15 Updated by sajolida about 2 months ago

  • Description updated (diff)

#16 Updated by touss 18 days ago

Hi @intrigeri and @sajolida,thanks for all the questions/information provided and sorry for the late reply.

Could we higher the bar to "Good" and "Strong"?

You mean make the bar green for Good and Strong?

  • Are there Perl bindings available for libpwquality?

I didn't find any perl bindings available for lipwquality.

  • Failing that, does libpwquality provide gobject-introspection data? If it does, we can use Gobject-Introspection to use this library.

Cool, i was not aware of this possibility, but it doesn't provide.

  • Failing all of the above, I see Buster has libpwquality-tools, which ships a pwscore CLI. I optimistically assume we could use it to provide feedback similar to GNOME Disks'.

I made some tests and i think that's possible to use.

I'm fine with doing this work myself but I'd rather mentor touss to join the Debian Perl Group and do it themselves. It's a very nice group of people and the most active ones are very Tails-friendly. touss, what do you think?

This would be awesome!I would love to work on this

I see libcrypt-cracklib-perl is in Buster already. Would it do the job?

The problem is that this library Doesn't have a function that returns a password score like libpwquality and zxcvbn has. This won't help to implement the strenght bar.

Perhaps you could explain us why you picked this module specifically?

Because I couldn' find any Perl bindings for libpwquality, i started to look for a Perl module that could replace libpwquality.Then i came across with the David Farrel article about zxcvbn, that led me to the Daniel Wheller paper and a few other documents that suggested me that it could be worth the try at least for testing purposes(the password_strenght function in zxcvbn returns a score key that made it easier to implement the strength bar).

I couldn't find any information about the algorithm used by libpwquality in their GitHub repo, though I didn't read the code.

I took a look at the source code and found that Gnome Disks uses the default values provide by libpwquality that resulted in the following checks:
1 check if the password is palindrome
2 check if the password has minlen 8
3 whether the password (with possible modifications) matches a word in a dictionary. Currently the dictionary check is performed using the cracklib library.
then it calculates the password score if it passes in these tests: https://github.com/libpwquality/libpwquality/blob/master/src/check.c#L592 although i didnt figure out exactly how it works

I could find an article comparing the password meter from different online services and the Dropbox algorithm seems to be among the strictest ones: https://www.ndss-symposium.org/wp-content/uploads/2017/09/06_3_1.pdf

To compare the results obtained by zxcvbn in this paper i wrote a script to see the strenght label that Gnome Disks would assign for some of the dictionaries tested in this paper:
libpwquality checker strength distribuition
I also tested what strenght label we would get for every 2 of the top 500 passwords combined for libpwquality,zxcbn and got the following result:

top 500 combined

Sooooo, I would propose to:

  • Do some more tests with zxcvbn, see how it compares to libpwquality,
    and whether we think that its results make sense in the context of Tails.

What more tests we can do?

I hope that I'm not being too much of a downer here @touss. It's so cool
to see you working on the Persistence app, it's one of our key software
and we could improve it so much!

Far from it, i'm learning a lot and it's been very exciting.
Thanks for sharing your knowledge!

#17 Updated by touss 17 days ago

I also tested what strenght label we would get for every 2 of the top 500 passwords combined for libpwquality,zxcbn

Here is the list that i used:
https://salsa.debian.org/touss-guest/pwcheck/raw/master/500-worst-passwords-combined.txt

#18 Updated by CyrilBrulebois 16 days ago

  • Target version changed from Tails_4.2 to Tails_4.3

Also available in: Atom PDF