Is it secure to expose a salted bcrypt hash (minimum 14 cost) if the used password is 72 characters (maximum) byte long, randomly generated letters, numbers, and special characters using secure generator?

Is it secure against offline brute force attacks?

1 Answer 1


It always helps to do the math.

If you assume an extremely wild upper bound of hashing capability of the attacker - say, a trillion hashes per second, which is unlikely for even a fast hash like MD5, let alone bcrypt cost 14 - then even just 12 truly random characters would take:

(95^12) / 1000000000000*60*60*24*365 = 1.7x10^19 years

So 72 random characters protected by bcrypt cost 14 isn't just secure - it's dramatically oversized for any conceivable threat model (unless, perhaps, the RNG was determined to be trivially broken - but then you have other problems).

  • 1
    While I agree the math is sound AT THAT SPEED, I would definitely say that a trillion hashes a second for MD5 is absolutely within bounds; even back in 2017 a single machine with 8 NVIDIA 1080Ti's broke 300 billion MD5 hashes per second. Four of those is over a trillion; and if you imagine a professional cryptocurrency mining operation of many many machines suddenly at a loss for something to do being used... Further, we can safely assume that in 20 years, the machines will be cracking far far faster than today. gist.github.com/epixoip/ace60d09981be09544fdd35005051505/… Nov 30, 2022 at 4:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .