TeamPass icon indicating copy to clipboard operation
TeamPass copied to clipboard

Randomness of passwords?

Open mjcocat opened this issue 12 years ago • 15 comments

Every time I generate a password via teampass I get that feeling I've seen the password before. I recognize similar patterns and a lot of a's, e's and o's. As a test I generated 8 character passwords using numbers and letters then analyzed them to count the occurrences of each character. Here are my results:

0 - 4 1 - 4 2 - 8 3 - 8 4 - 7 5 - 7 6 - 6 7 - 8 8 - 8 9 - 8 A - 6 B - 1 C - 4 D - 4 E - 6 F - 3 G - 5 H - 1 I - 4 J - 3 K - 4 L - 2 M - 1 N - 3 O - 7 P - 3 R - 1 S - 6 T - 9 U - 2 V - 2 W - 2 X - 2 Z - 2 a - 42 <<<<<<<<< b - 6 c - 3 d - 3 e - 63 <<<<<<<<< f - 8 g - 13 h - 50 <<<<<<<<< i - 36 <<<<<<<<< j - 4 k - 4 m - 8 n - 7 o - 30 <<<<<<<<< p - 3 r - 3 s - 4 t - 5 u - 20 <<<<<<<<< v - 2 w - 4 x - 3 y - 3 z - 5

mjcocat avatar Jan 14 '14 17:01 mjcocat

Interesting study !

I'm using a standard library for creating the password ... I will give a look.

nilsteampassnet avatar Jan 14 '14 20:01 nilsteampassnet

The randomness isn't broken, rather it favors certain things because of the diphthongs and vowels to make the password more pronounceable according to rules of the English lang.

if you click the secure button right next to the password length generation then it is random.

secure button off (more pronounceable) this will favor vowels and diphthongs because of the frequency of use in words in the english lang 99499 a 25250 b 25043 c 24967 d 100319 e 24811 f 25357 g 25085 h 99977 i 24721 j 24854 k 25013 l 24913 m 24926 n 100114 o 24960 p 25193 r 24986 s 25317 t 99520 u 25048 v 25006 w 24850 x 25173 y 25098 z

secure button on (ignores rules for english lang) 39984 a 39807 b 39935 c 39699 d 40130 e 39971 f 39873 g 39777 h 40040 i 40094 j 40048 k 40208 l 40133 m 39985 n 40074 o 40031 p 40334 r 39690 s 39962 t 40296 u 39805 v 39760 w 40136 x 40349 y 39879 z

slimm609 avatar Jan 15 '14 13:01 slimm609

Would you mind sharing how you were able to generate passwords via a script (I am assuming you did atleast). I just manually generated and then did a copy and paste. I was looking for a better way.

If you choose the secure option, it will add non alphanumeric characters. Is there another library that doesn't favor vowels? For use in a password the desire to make it more pronounceable is useless and counter productive.

mjcocat avatar Jan 15 '14 14:01 mjcocat

setLength('5'); $pwgen->setSecure(true); $pwgen->setSymbols(false); for($i=0; $i < 100000; $i++) { $password = $pwgen->generate(); echo "$password\n"; } ?>

It should be pretty easy to add an option to use symbols or not use symbols

setSymbols(true) 4mmd1e[F ht[E{]31 ^.uL}<(3 %YS+'89N q!6z48|R <Z^p=0mF e0A<Yq[U v_?5hW9; m '@6N. vsL:O1+0 x@{5hE~B 1Y+u9ST6 Noc1bk)E 0a!~rI|M C4)UY}*d

setSymbols(false)

2GBpEI09 HsA35gzp eIaNxRg4 LvlvpG22 L8RgbZ0x 9LuMviCX 7qCfUOQR dCDnDo9U

if you want something like that I can see about adding it in a patch

slimm609 avatar Jan 15 '14 14:01 slimm609

I just committed a patch so that the default for secure is no symbols but if you check the symbols and secure it uses symbols.

slimm609 avatar Jan 15 '14 14:01 slimm609

Can we just have it so secure is always on? I don't think there would ever be a need to use a bin secure mode.

On Jan 15, 2014, at 8:53 AM, slimm609 [email protected] wrote:

I just committed a patch so that the default for secure is no symbols but if you check the symbols and secure it uses symbols.

— Reply to this email directly or view it on GitHub.

mjcocat avatar Jan 15 '14 15:01 mjcocat

its set to secure by default in the patch and you have to toggle to turn it off

slimm609 avatar Jan 15 '14 15:01 slimm609

Thank you!

On Jan 15, 2014, at 9:59 AM, slimm609 [email protected] wrote:

its set to secure by default in the patch and you have to toggle to turn it off

— Reply to this email directly or view it on GitHub.

mjcocat avatar Jan 15 '14 16:01 mjcocat

I don't really understand in fact because in the Item edition/creation dialogbox, you have several buttons that permits you to select to add numeric, symbols and secure in the generated passwords. The user is free to give the complexity he wants to the passwords he wants to generate. So I don't really see the point.

Or perhaps do you talk about passwords generation in other pages?

nilsteampassnet avatar Jan 16 '14 07:01 nilsteampassnet

The secure button is not like any other button. There is settings that automatically change when the secure button is checked. Without secure checked there is also favoritism towards certain letters which removes the randomness of the password. Personally I think the secure button should be checked by default. This is a password manager. The security standard needs to be set pretty high. If a password manager fails, everything fails because now they have the keys to the kingdom. For a password manager, it needs to be secure by default and if someone wants to make it less secure then they have that option but shouldn't need to turn on security. This is the holy grail for attackers. take over one system and gain access to everything... what more could you want?

slimm609 avatar Jan 16 '14 13:01 slimm609

I agree with what slimm609 stated. My favorite part of teampass is now I don't have to remember passwords, I am able to copy and paste them into a password field without ever seeing the password. If others use teampass the same way, why would we want to use a password that is more predictable than a password that is closer to truly random.

Currently there is no way to generate a random alphanumeric password that doesn't favor vowels. If we choose the "secure" option then it will include non alphanumeric characters as well.

I am all in favor of just removing the secure button, and force it to always be on. Unless someone can justify a reason for keeping these more predictable passwords.

mjcocat avatar Jan 16 '14 14:01 mjcocat

There is a wide user base for password storage so i don't say remove it because someone for some reason may want a "random" password that is "easier" to remember. But if its secure by default and they have to make the decision to make it less secure then that is on them, the default should be "most secure" and if they lower it that is their choice.

slimm609 avatar Jan 16 '14 15:01 slimm609

I could understand that, but there should definitely be a disclaimer of the ramifications of turning off the secure option.

On Thu, Jan 16, 2014 at 9:14 AM, slimm609 [email protected] wrote:

There is a wide user base for password storage so i don't say remove it because someone for some reason may want a "random" password that is "easier" to remember. But if its secure by default and they have to make the decision to make it less secure then that is on them, the default should be "most secure" and if they lower it that is their choice.

— Reply to this email directly or view it on GitHubhttps://github.com/nilsteampassnet/TeamPass/issues/474#issuecomment-32477035 .

mjcocat avatar Jan 16 '14 15:01 mjcocat

Ok I understand the point and will take this into account.

For sure, I believe you are right when saying that teampass should propose by default "secured" passwords. I will improve this part.

Thank you for very interesting study and position.

nilsteampassnet avatar Jan 16 '14 17:01 nilsteampassnet

I concur the password generator on any setting but "Secure" produces too many vowels, double letters and a solitary capital and number in a predictable pattern to be highly secure, but on "Secure" introduces a number of special characters, some of which are commonly rejected by form validation scripts.

I haven't been using the PW generator feature as a result, but if it's under review, I like the UI options for selecting numeric, alpha, special characters, and they should all be "secure" by default, and if someone wants a phonetic password, that should be an overriding option like the "Secure" option is now (or they can type it).

The following website has a great write-up on how they apply maximum entropy to generate ultra-high-security passwords with a high degree of pseudo-randomness, which might be of interest to this discussion thread: https://www.grc.com/passwords.htm

uucom avatar Jan 18 '14 05:01 uucom