2

Ubuntu currently recommends using APG (Automated Password Generator) to create strong yet pronounceable passwords.

I usually use it like this (see option explanations here):

apg -s -m 16 -x 16 -M SNCL

This creates passwords of length 16, containing at least one character from each of 4 classes: small letters, capital letters, numerals, and special symbols, using a manually entered seed.

However, I think I have noticed a flaw: passwords usually contain only one digit and one special symbol, and one of them is usually located in the end of the password (sometimes in the beginning). Here's an batch of 16 passwords I just generated:

TelHulp5Ot*Graj8
notDodsOwgid5ut<
EywiJudCof8drog_
DuerfigOkCif0Ov~
udBon9opyivyawl@
@2drakBanRewyooc
abAxKec0quacJej>
Sam9?Trobhecvun[
RypMycs`Frewjij5
orEs%KooHujsayt7
Dunwib1flynjead_
Hud+quonEdDairr5
Aj|oj7owojadEmp4
@Shmeeb0quicOam_
CribDip9drefBag[
LocEwCyWrarl#on9

How much this flaw decreases the password entropy? Are such passwords still secure this days? I'm mostly concerned about using them for accounts at various websites.

  • i'm going to go out on a ledge and say all the above passwords are fine. – dandavis Sep 7 '16 at 20:20
  • If the goal is to be pronounceable, then it can't have lots of digits or special chars. The big question is, "secure enough for what?" Yes, entropy is affected, but we can't know if that's a bad thing in your situation. – schroeder Sep 7 '16 at 20:41
  • @schroeder Well, for things like non-disposable website and email accounts, using 2-factor authentication where possible, except for banking - I go for 32-chars completely random there. – Neith Sep 7 '16 at 20:55
1

I used homebrew to install apg and had it generate 10,000 passwords using the same settings you had above into a file.

I then removed everything except for the passwords and ran the output through ENT. https://www.fourmilab.ch/random/

Value Char Occurrences Fraction
 33   !          339   0.002119
 34   "          330   0.002063
 35   #          336   0.002100
 36   $          335   0.002094
 37   %          320   0.002000
 38   &          285   0.001781
 39   '          309   0.001931
 40   (          301   0.001881
 41   )          363   0.002269
 42   *          359   0.002244
 43   +          307   0.001919
 44   ,          327   0.002044
 45   -          360   0.002250
 46   .          325   0.002031
 47   /          358   0.002237
 48   0         1003   0.006269
 49   1         1024   0.006400
 50   2         1058   0.006613
 51   3          987   0.006169
 52   4         1040   0.006500
 53   5          983   0.006144
 54   6         1005   0.006281
 55   7         1083   0.006769
 56   8         1051   0.006569
 57   9         1038   0.006488
 58   :          289   0.001806
 59   ;          332   0.002075
 60   <          298   0.001863
 61   =          319   0.001994
 62   >          322   0.002012
 63   ?          287   0.001794
 64   @          330   0.002063
 65   A         1544   0.009650
 66   B          810   0.005063
 67   C          896   0.005600
 68   D         1179   0.007369
 69   E         1575   0.009844
 70   F          987   0.006169
 71   G         1007   0.006294
 72   H         1090   0.006812
 73   I         1453   0.009081
 74   J          681   0.004256
 75   K          698   0.004363
 76   L          311   0.001944
 77   M          454   0.002838
 78   N          796   0.004975
 79   O         3924   0.024525
 80   P          432   0.002700
 81   Q          697   0.004356
 82   R          556   0.003475
 83   S          819   0.005119
 84   T          748   0.004675
 85   U          954   0.005962
 86   V          678   0.004237
 87   W         1009   0.006306
 90   Z           89   0.000556
 91   [          294   0.001837
 92   \          323   0.002019
 93   ]          339   0.002119
 94   ^          322   0.002012
 95   _          298   0.001863
 96   `          301   0.001881
 97   a         8126   0.050787
 98   b         3462   0.021638
 99   c         5050   0.031563
100   d         5366   0.033537
101   e         8748   0.054675
102   f         3454   0.021587
103   g         3836   0.023975
104   h         3590   0.022437
105   i         8017   0.050106
106   j         3202   0.020012
107   k         3633   0.022706
108   l         3901   0.024381
109   m         2573   0.016081
110   n         4557   0.028481
111   o         9528   0.059550
112   p         2909   0.018181
113   q          656   0.004100
114   r         6697   0.041856
115   s         4906   0.030662
116   t         5509   0.034431
117   u         6270   0.039188
118   v         3249   0.020306
119   w         3449   0.021556
120   x          336   0.002100
121   y         4678   0.029237
122   z          378   0.002363
123   {          324   0.002025
124   |          312   0.001950
125   }          308   0.001925
126   ~          309   0.001931

Total:        160000   1.000000

Entropy = 5.660150 bits per byte.

Optimum compression would reduce the size
of this 160000 byte file by 29 percent.

Chi square distribution for 160000 samples is 976494.49, and randomly
would exceed this value less than 0.01 percent of the times.

Arithmetic mean value of data bytes is 96.9483 (127.5 = random).
Monte Carlo value for Pi is 4.000000000 (error 27.32 percent).
Serial correlation coefficient is -0.006260 (totally uncorrelated = 0.0).

    Arithmetic mean value of data bytes is 96.9483 (127.5 = random). Monte Carlo value for Pi is 4.000000000 (error 27.32 percent). Serial correlation coefficient is -0.006260 (totally uncorrelated = 0.0).

Don't pay attention to the aggregate statistics too closely, its looking for all possible char values from 0-256, not just printable ones.

However, just from looking at the char count frequencies it appears that indeed lower case letters show up much more often than symbols. This is because of the rules in APG to create such passwords in pronouncible password mode.

It is true there is less entropy overall using this method as opposed to straight truly random passwords. The tradeoff is that these passwords are supposed to be much easier to remember.

  • 2
    5.6 bits X 16 chars = ~90 bits per password, which should be more than enough. for now. – dandavis Sep 7 '16 at 20:19
  • You are likely right. The "pronounceable" part of this password generation tool probably means there is a lower amount of entropy than just the deviation from the mean suggests. Looking at the source, the implementation is pretty good; it generates the words according to a large set of rules and can avoid dictionary words. Ultimately, I do not find any of the pronounceable passwords all that much easier to remember though. I didn't know that this was in pronounceable mode until just now, but I am editing my answer to reflect that info. – Anthony Lozano Sep 8 '16 at 23:39
  • Another take on entropy: Evenly distributed "a".."z" = 4.7 bit, but APG is not evenly distributed. If I am not mistaken, the distribution in the sample gives 4.4 bit, but lets say 4.0 to account for letter pair bias. Uppercase 1..3 random letters, among 14 positions, but not adjacent to each other = 10.4 bit. A digit 0-9 at one of 15 positions = 7.2 bit. 1 punctuation (of about 13) at one of 16 positions = 7.7 bit. Total 4.0*14+10.4+7.2+7.7 = ~81 bit of entropy. Quite good, I think. – David Andersson Sep 9 '16 at 3:22

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.