3

Backgound

Reading this article on BBC News dated 29th March 2018, the company in question suffered a data breach and up to 150 million accounts usernames, email addresses and passwords were potentially stolen.

The company states:

passwords were protected by strong [BCrypt] encryption

And an independant voice [Troy Hunt] was quoted as saying:

To its credit, ... [the companys] method of password storage is quite robust.

Topic

The company states also that:

The company will be requiring users to change their passwords and is urging users to do so immediately.

Question

However; if a company uses "robust" password security and password hashes; is there a security need to then change these hashes?

Notes

I realise that the call to change passwords is mostly a PR exercise and that some folks would then query/negative PR if the company didn't encourage it's users to change their passwords following a breach;
but purely from the technical security point of view I can't see that there is any need to change password as long as the encryption method is fairly strong and resilient against bruteforce attempts -- which BCRYPT seems to be.

4

However; if a company uses "robust" password security and password hashes; is there a security need to then change these hashes ... as every time the hash is generated it will be different.

Aside: The hash isn't different every time, it's different per-user. If a hash was different every time it was computed we'd have no way to compare a user's submitted password and their stored password.

Yes, there is a security need to change passwords when they are compromised - there is no way of knowing how strong user passwords were, and there is no way of knowing your attacker's password hashing capabilities. If you leak an individual salt, high difficulty bcrypt hash of the password 'password', it's still going to be cracked in minutes. Forcing users to reset their password ensures that even weak passwords won't be exposed.

Is it a good idea based on the idea some point in the future BCRYPTs may become easy to bruteforce?

No, the reason is as above - you are insulating users from their own weak password choices. Additionally, a stolen bcrypt database may become more feasible to brute force as processing power increases, but A: We're not seeing dramatic increases in processing power nearly as frequently as a few years ago and B: Ideally, the administrator is increasing the difficulty factor of the bcrypt hash as time goes on - the algorithm is designed to be easily tune-able for difficulty.

  • The hash isn't different every time I'm not agreeing with this: make a Bcrypt hash of "tree" and then make another; they will not be the same hashes as the (auto generated) salts will be different. – Martin Mar 30 '18 at 12:50
  • 1
    npmjs.com/package/bcrypt when comparing two passwords it uses the salt from the database, rather than generating a new one. When you just run bcrypt.hash() it generates a new salt each time. So, if you are creating a new password you'll generate a unique hash each time. When you are comparing existing passwords it uses the same salt each time so it can compare the same hash each time. – Adonalsium Mar 30 '18 at 12:57

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.