Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're right in the case of SHA1. However, with a suitable work factor, you can't bruteforce bcrypt AFAIK


1) bcrypt uses salts so that won't work at all

2) if you use some other computationally expensive hash you run into the problem of low powered mobile hardware. Remember you're not hashing 1 thing, but dozens or hundreds of phone numbers or email addresses.


You know, i think you're right - if we use different salts for each emails/phones, there'd be no way of ensuring that different users use the same salts, or even if we stored the salt along with the hash, it wouldn't be much use. Hmm this is a tricky problem!


I'm pretty sure the parent meant "precompute" (e.g. a rainbow table), not "brute force".


Again: you're right in the case of SHA1, but rainbow tables don't apply to bcrypt because of the varying work factor, also you can use a different salt for each person.

Crypto is actually really cool these days, there's pretty much a solution to every weakness :)


So your solution to providing a "secure" way to compare phone numbers, etc, between users is to make the hashes non-comparable? Remember, the goal is to make it so two people can come up with the same hash in order to "find" each other.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: