16

There are two password generators on ss64.com:

How they work

I made standalone versions of them, plus copy of the original HTML/Javascript versions, if you want to study them, but here is how they work:

This section explains how the passwords generator work, such that it is possible to roll out a standalone version that does not depend on relying on a third party web site.

  • You have a master password, let's say foo

  • You generate a password for a specific site or service, let's say stackexchange

  • You compute the SHA1 sum (standard version) or SHA256 sum (strong version) of the string foo:stackexchange.

     $ echo -n "foo:stackexchange" | sha1sum      #standard version
     b99341502484edbc43ec35a5f94be8e5de7ca53a *-
    

    $ echo -n "foo:stackexchange" | sha256sum #strong version c6ac66fdb639821bcc322f186fb1214d241f35ba2a91cb660daf0a284ac19a47 *-

  • You apply Base64-transformation on the sequence of bytes of which the hexadecimal representation is the previously generated checksum:

     $ printf "\xb9\x93\x41\x50\x24\x84\xed\xbc\x43\xec\x35\xa5\xf9\x4b\xe8\xe5\xde\x7c\xa5\x3a" | base64
     uZNBUCSE7bxD7DWl+Uvo5d58pTo=
    

    $ printf "\xc6\xac\x66\xfd\xb6\x39\x82\x1b\xcc\x32\x2f\x18\x6f\xb1\x21\x4d\x24\x1f\x35\xba\x2a\x91\xcb\x66\x0d\xaf\x0a\x28\x4a\xc1\x9a\x47" | base64 xqxm/bY5ghvMMi8Yb7EhTSQfNboqkctmDa8KKErBmkc=

  • (strong version) you replace + with E and / with a, and take first 20 characters

  • (standard version) you take first 8 characters and then add 1a at the end of the password to ensure there is at least one digit and one letter

Therefore, with master password foo, and for specific site stackexchange, the standard generated password is uZNBACSE1a and the strong generated password is xqxmabY5ghvMMi8Yb7Eh.

Now the questions

  • Is the strong version really stronger than the standard version? Would it still be stronger if the standard version also used SHA256?
  • provided that I choose a good master key (not foo, rather more than 10 random characters), am I rather safe with these generated passwords?
  • What can be other drawbacks of this approach towards creating passwords?
SS64
  • 253
  • 1
  • 5
Benoit
  • 513
  • 1
  • 5
  • 11
  • Entering your password on an untrusted website is risky 2) Their hash-function is probably too fast. It's preferable to use an iterated scheme 3) Appending 1a is plain silly. 4) Using the username as salt would be a good idea as well, to prevent multi-target attacks.
  • – CodesInChaos Oct 24 '13 at 08:51
  • @CodesInChaos: to answer this: 1) that's why I tried to understand what the js code does – 2) could you expand on that in an answer? 3) yes it is, so is replacing +/ with Ea, but this is provided by the script in order to generate passwords that are compatible with password policies of most web sites. When you've 8 random characters among the base64 set, there are chances there is no single digit for example. But appending characters does not make passwords less secure. 4) Could you expand on that in an answer? Thanks. – Benoit Oct 24 '13 at 09:55
  • 1
    Those passwords will fail on those sites that require at least one symbol. The Base64 will only represent a-z, A-Z and numbers, since the + and / will be replaced by E and a. – woliveirajr Oct 24 '13 at 11:44