Hacker News new | ask | show | jobs
by kccqzy 2307 days ago
That's actually pretty similar to how Google's safe browsing (used by Chrome, Firefox, Safari but not Edge) works. Instead of sending Google your full URL (although that's an option), you can make some transformations, SHA-256 the result and send the first few bytes. The server then replies with the full hashes matching these prefixes. Then you can check whether your URL is on the list. Very similar.
1 comments

The core trick (and difference) of Safe Browsing is that you don't send stuff most of the time. Safe Browsing clients all download the same summary information which tells them which prefixes might have unsafe hashes. Most sites you visit will not match any unsafe prefix and so your browser doesn't call Google at all.

Pwned Passwords chooses prefixes short enough that any password you wonder about will cause a prefix to be looked up that has lots of Pwned Passwords in it. Was one of them yours? Only you know, this is k-Anonymity.

Safe Browsing chooses prefixes long enough that many sites you look at won't match anything at all. There is still arguably k-Anonymity because the total number of possible URLs is so vast, but that's not their main goal.