News for hackers. Stuff that matters.
Re:Don’t design like a programmer (2010) by ldjb on Thursday April 14, 2016 @07:42AM (#11495788)
Salting and hashing isn't going to help you much if you're prone to using one-character passwords. Unfortunately, people will use one-character passwords if they are allowed to, so systems should require strong passwords to protect users.

That's not to say there aren't problems with password restrictions, but they are mostly at the other end of the spectrum. For example, I have seen far too many systems requiring that passwords must be no longer than ten characters long, or only allowing a very small subset of characters.

Re:Don’t design like a programmer (2010) by avn2109 on Thursday April 14, 2016 @11:19AM (#11497379)
At the very least, every site should clearly explain its password policy. e.g. you must have a letter, a number, no slashes, 8-40 characters, whatever.

As I write this, I am locked out of my 401(k) plan's website because it allows you to reset your password to an illegal string, which fails when you try to log back in. Crappy corporate UX boggles the mind.

Re:Don’t design like a programmer (2010) by 1_player on Thursday April 14, 2016 @08:38AM (#11496107)
> Salting and hashing isn't going to help you much if you're prone to using one-character passwords

Why not? OK I'm no cryptographer, so I'm probably talking out of my arse but why not store a random salt PER user, and the hash of (password + salt)? To an attacker, a one character password will be as hard to crack as a complex one.

Re:Don’t design like a programmer (2010) by kecks on Thursday April 14, 2016 @09:05AM (#11496287)
> hard

A 1-char password can be guessed in as many attempts as the size of the allowed character set, and in half the guesses on average. Even less guesses are required on average if passwords aren't distributed uniformly and this distribution is known (i.e. from previously cracked password databases you know most users pick "e" for a password, so you start with that character and get into the accounts of 40% of all other users in a single guess).

More generally, the average number of attempts required to crack a password with a known length is 1/2 * charsetsize ^ length. So with alphanumeric case-sensitive 1-char passwords the number of attempts required on average is 31. That's not a lot.

The only thing that salt + hash does is make it possible to check the password without having to store the passwords on server; it only serves to protect user passwords after the password (hash) database has been stolen by attackers.

The only way to keep a semblance of security when user passwords are very short is to aggressively rate-limit password attempts, but in the case of 1 char passwords that doesn't help, you'd have to lock the user out after a single wrong password entry, and even then attackers would have a chance of 1/62 (26 lowercase letters, 26 uppercase letters and 10 numbers) chance of getting into your account.

Re:Don’t design like a programmer (2010) by mooreds on Thursday April 14, 2016 @03:11PM (#11499526)
Bravo.
Re:Don’t design like a programmer (2010) by easyd on Thursday April 14, 2016 @09:27AM (#11496452)
I think what you mean is a pepper: https://en.wikipedia.org/wiki/Pepper_(cryptography)
Re:Don’t design like a programmer (2010) by ldjb on Thursday April 14, 2016 @08:51AM (#11496195)
An attacker would still be able to brute-force the password in a split-second.

Besides, if you're using the same one-character password for multiple systems, the password can easily be deduced on a system that only uses hashing (or a weak form of salting), and an attacker can use that password to access accounts on stronger systems.

Re:Don’t design like a programmer (2010) by UK-AL on Thursday April 14, 2016 @08:57AM (#11496233)
You just try every character. A computer can do that in < 1 second.