4 ms·
Can someone bcrypt all these phone numbers & emails and make that public? Share the salt and then everyone can just test their own phone number without sending
by tonymet 6y ago
Can someone bcrypt all these phone numbers & emails and make that public? Share the salt and then everyone can just test their own phone number without sending it to some rando
- batch12 6y agoWhat's the difference in salting if the salt is shared? Edit: Replying again- sorry. Thinking about this some more-- if the person were to concatenate the number with first last or something they could distribute the list and the person's name would be the salt. So 9195551212JohnDoe becomes $hash and user just has to know all the pieces to test locally.
- tonymet 6y agoHabit. Prob right salt wouldn't be needed.
- batch12 6y agoWell, maybe you were on to something-- your thoughts inspired me to think about this a little more- we just need a unique salt only the user would know.
- tonymet 6y agostill, bcrypt's design means it'll take way too many cycles to brute-force-reverse the dataset, so it should be safe to share. One downside of a record-specific salt is nicknames e.g. john vs johnathan , or misspellings. (false negatives)
- visarga 6y agoJust off the top of my head: you can hash the text with hash-1, and send a query containing a hash id bucket computed with h1%(N/1000), get 1000 responses from the server hashed with h2 function. Then we can search for our h2 inside the 1000 results without the server knowing which one we were looking at. We also can't decode the 1000 responses we got.
- maddyboo 6y agoThis is basically how HIBP's Pwned Password API works: https://www.troyhunt.com/were-baking-have-i-been-pwned-into-firefox-and-1password/ https://www.troyhunt.com/were-baking-have-i-been-pwned-into-... https://haveibeenpwned.com/API/v2#PwnedPasswords https://haveibeenpwned.com/API/v2#PwnedPasswords https://www.troyhunt.com/introducing-306-million-freely-downloadable-pwned-passwords/ https://www.troyhunt.com/introducing-306-million-freely-down... https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/ https://www.troyhunt.com/ive-just-launched-pwned-passwords-v...
- thanksforfish 6y agoIf you bcrypt it then the site could just keep the mapping of email to hash value. Then when you do a lookup, the site would know what email you tried. https://en.m.wikipedia.org/wiki/K-anonymity https://en.m.wikipedia.org/wiki/K-anonymity is likely a better approach to prevent that, which other similar sites like https://haveibeenpwned.com/ https://haveibeenpwned.com/ are already doing for the email addresses.
- pshc 6y agobcrypting 533M phone numbers alone on my PC would take about (edit: 185) days straight by my calculations
- IncRnd 6y agoI downloaded the files for my country the other day. There are some links on an HN page that might point to pages with the files: https://news.ycombinator.com/item?id=26690044 https://news.ycombinator.com/item?id=26690044
- azinman2 6y agoYou can just iterate thru all possible phone numbers. It’s not that large, which is why anyone saying they are hashing your contacts to keep them private isn’t doing a lot of good.
- Twisell 6y agoStill maybe from a legal standpoint and depending on countries it'll be better to download and locally test against a hashed set than to download the dump. An adequately hashed set can be proved to be harmless because you can't revert to real data (as far as you know when downloading). Downloading the original set could be considered malicious by some governments (but idk/ not sure ianal).