5 ms·
You're right in the case of SHA1. However, with a suitable work factor, you can't bruteforce bcrypt AFAIK
by chubs 15y ago
You're right in the case of SHA1. However, with a suitable work factor, you can't bruteforce bcrypt AFAIK
- quesera 15y agoI'm pretty sure the parent meant "precompute" (e.g. a rainbow table), not "brute force".
- chubs 15y agoAgain: 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 :)
- SoftwareMaven 15y agoSo 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.
- harryh 15y ago1) 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.
- chubs 15y agoYou 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!