News for hackers. Stuff that matters.
Re:Password Algorithms by fredley on Wednesday October 25, 2017 @10:39AM (#15550477)

  * Your password must be between 7 and 20 characters
  * Your password must contain  
    * At least one number
    * At least one upper-case letter  
    * At least one symbol from this list (!@#$%*)  
  * Your password must be changed every 30 days
Plus this: https://blog.mamota.net/resources/img/wat_2.gif
Re:Password Algorithms by Klathmon on Wednesday October 25, 2017 @11:25AM (#15550884)
The "must be changed every 30 days" always annoys me to no end.

A system I use not only has that requirement (along with a very insane set of requirements like "no patterns like 123 or ABC"), but they also NEVER let you reuse a password.

Which means they have a database of every password I've ever used on a machine somewhere, hashed or otherwise.

So the annoying workaround is to append year+month on the end of each password (which I was basically told to do when first setting up my account). So combined with a "maximum 10 characters" leaves 6 for my actual password...

Re:Password Algorithms by iak8god on Wednesday October 25, 2017 @12:27PM (#15551525)
> So the annoying workaround is to append year+month on the end of each password (which I was basically told to do when first setting up my account). So combined with a "maximum 10 characters" leaves 6 for my actual password...

Or do <password>, <password>1, <password>2, ...

Re:Password Algorithms by fapjacks on Wednesday October 25, 2017 @01:02PM (#15551847)
Ah, but nowadays there are sites that won't let you set a new password "if it is too similar to previous passwords". In particular, the US military won't let you set a password that is similar to the last ten of your passwords. What constitutes "too similar"? It seems that your new password can't have more than a three-character substring from your old passwords.
Re:Password Algorithms by iak8god on Wednesday October 25, 2017 @01:33PM (#15552135)
> Ah, but nowadays there are sites that won't let you set a new password "if it is too similar to previous passwords".

(╯°□°)╯︵ ┻━┻

I don't know how people who don't use password managers are able to deal with this kind of crap at all.

Re:Password Algorithms by bjpbakker on Wednesday October 25, 2017 @03:32PM (#15553336)
If a website warns me about this, I immediately remove my account. Because if they can tell how similar my new password is to my old password, it means they store information about my password.

I do use a password manager however, so I don’t really notice.

Re:Password Algorithms by ajr0 on Wednesday October 25, 2017 @02:08PM (#15552527)

  ┬─┬ノ(º_ºノ) calm down, take it easy.  
they do not deal with it, they reuse passwords increasing the degree if the problem
Re:Password Algorithms by JeanMarcS on Wednesday October 25, 2017 @01:44PM (#15552250)
So how do they know it's similar ? Is there a distance that could be calculated between 2 hashes and tell if they are similar ?

I don't think so... So are your old passwords stored in plain text somewhere so they can compare ?

Scary...

Re:Password Algorithms by iak8god on Wednesday October 25, 2017 @06:10PM (#15554750)
> Is there a distance that could be calculated between 2 hashes and tell if they are similar ?

Yes, maybe: https://en.wikipedia.org/wiki/Locality-preserving_hashing

> So are your old passwords stored in plain text somewhere so they can compare?

You betcha!

Re:Password Algorithms by JeanMarcS on Wednesday October 25, 2017 @11:19PM (#15556114)
Thanks for your answers :)
Re:Password Algorithms by seuss1969 on Wednesday October 25, 2017 @02:37PM (#15552850)
That is not always feasible. There are also requirements like your passwords should be different in atleast 3 places.
Re:Password Algorithms by yellowapple on Wednesday October 25, 2017 @10:43PM (#15555956)
If they're able to detect that, then it's basically guaranteed that they're not hashing their passwords.
Re:Password Algorithms by theophrastus on Wednesday October 25, 2017 @12:31PM (#15551561)
And: "Must be four characters different than your last password" (this from a particular state's health insurance system). What does this mean? That four characters from the previous password must not appear in the new one at all, or only not in the same position? (fans of the little game Mastermind suffer deja-vu) What if the previous password contained all of the must have set of alternate symbols, then you've got a direct contradiction.
Re:Password Algorithms by gregmac on Wednesday October 25, 2017 @12:42PM (#15551661)
I can't think of a way to do that without actually storing the plain text password. If it is in fact plain text, the irony is that by enforcing such "strong" password requirements, they've actually made the overall system less secure.
Re:Password Algorithms by lederhosen on Wednesday October 25, 2017 @01:02PM (#15551845)
You can permutate all possible character positions for combinations of four changed characters, and for _each_ permutation permutate all four characters and then compare the hash, and if the hash is the same you do not accept the password (even though of course you could have false positives with hashes). It is of course much slower than the change of one character which is only 256 iterations if you mutate the underlying bytes and not Unicode characters.

But I would guess they use plain text :-(

Re:Password Algorithms by KMag on Wednesday October 25, 2017 @02:03PM (#15552457)
Password change dialogs generally have entries for:

    Previous Password:
    New Password:
    Confirm New Password:
They don't need to store the plaintext password, as you're giving the old password plaintext to them in the same dialog. Now, if such rules were against "any of your last 4 passwords" instead of just the last password, then that's much more difficult to do. (Obviously nobody is going to cooperate with a form requiring the person to submit their last 4 passwords as part of the password change dialog.)
Re:Password Algorithms by 4e1a on Wednesday October 25, 2017 @03:07PM (#15553145)
Give each user a random salt. Hash each subsection of the password with their salt and store that. No need for plaintext.
Re:Password Algorithms by setr on Wednesday October 25, 2017 @12:46PM (#15551695)
N choose 4 permutations of hashes could do it
Re:Password Algorithms by lederhosen on Wednesday October 25, 2017 @01:07PM (#15551884)
Nah, that is only the character position sets to change, you also have to permutate the characters (which would be 2^(4*8) if we consider byte characters)

Or did I misunderstand you?

Re:Password Algorithms by setr on Wednesday October 25, 2017 @05:11PM (#15554308)
I was counting the number of hashes to store; im not sure why the size of each character would matter?

But now that Im writing it out, I was clearly wrong anyways

I thinking something along the lines of taking every substring of 4 characters, and then for all permutations of those 4-tuples, plug it back into the string hash and store. Assuming the goal is to not share any 4-substring with the new string

So I think (N-4) + 1 gives you the number of 4-character windows

4! for the number of permutations of that 4-char window

So 4!*(n-3) total hashes

Which I guess is actually the same work you'd have to do anyways if you stored the plaintext; just without storing each variant

Re:Password Algorithms by gambiting on Wednesday October 25, 2017 @10:45AM (#15550547)
Heh, our HR system had a following requirement:

- password must be between 7 and 8 characters long

- has to include one number

- has to include one of the following: $#!*, no other special characters are allowed

It was so horrendously bad it's not even funny.

Re:Password Algorithms by abainbridge on Wednesday October 25, 2017 @10:56AM (#15550633)
I hope you chose pa$sw0rd.

The NHS online booking system my GP uses has rules like this. Pretty much guaranteed to prevent old people from being able to login.

Re:Password Algorithms by genpfault on Wednesday October 25, 2017 @11:08AM (#15550729)
> password must be between 7 and 8 characters long

How do you enter a fractional character?

Re:Password Algorithms by pixl97 on Wednesday October 25, 2017 @11:19AM (#15550836)
If there is a way, UTF-8 probably does it, incorrectly.
Re:Password Algorithms by gruez on Wednesday October 25, 2017 @11:11AM (#15550768)
ranges in english (and probably other human languages) are usually inclusive on both sides.