Blog/Privacy

How the k-Anonymity Model Works and Why It Protects Your Privacy

·6 min read
How the k-Anonymity Model Works and Why It Protects Your Privacy

When you use SecuryBlack Breach Scanner to check if your email has been leaked, we never send your email address to our servers. How is this possible? Thanks to the k-Anonymity model. We explain how it works.

The problem

To know if your email is in a breach database, the obvious solution would be to send your email to the server and have it search. But that has a serious problem: you would be trusting your email to yet another service. If that service were compromised, your email would be exposed.

It's like asking "has my key been stolen?" by handing your key to a stranger.

The solution: k-Anonymity

The k-Anonymity model solves this elegantly:

Step 1: Hash the email

Your email is turned into a hash — an irreversible fixed-length string of characters. For example:

youremail@email.com → 5BAA61E4C9B93F3F0682250B6CF8331B

This process is one-way: from the hash the original email cannot be reconstructed.

Step 2: Only a fragment is sent

From that full hash, only the first 5 characters are sent to the server:

Full hash: 5BAA61E4C9B93F3F0682250B6CF8331B
Sent:      5BAA6

Step 3: The server responds with partial matches

The server searches for all hashes in its database that start with 5BAA6 and returns them. There can be hundreds or thousands of results.

Step 4: Comparison is done locally

Your browser (not the server) compares the full hash of your email with all the received results. If there is a match, it knows your email is in a breach. If not, you're clean.

Why is it called k-Anonymity?

Because your email "hides" among the k results returned by the server. If the server returns 500 hashes starting with 5BAA6, your email is indistinguishable from the other 499. It is anonymous within the group.

Visualization of the process

Imagine you want to know if your phone number is on a list, but you don't want to reveal it:

  1. Your number: 612 345 678
  2. You tell the operator: "Give me all numbers starting with 612"
  3. The operator gives you a list of 200 numbers starting with 612
  4. You check if yours is on the list

The operator never knew your exact number.

Is it really secure?

Yes, for several reasons:

  1. The server never sees your email — It only receives a fragment of the hash
  2. The hash is irreversible — The email cannot be reconstructed from it
  3. The fragment is ambiguous — Thousands of different emails share the same hash prefix
  4. Comparison is local — Your browser does the final work, not the server

Do other services use it?

Yes. The k-Anonymity model was popularized by Have I Been Pwned and is considered the industry standard for this type of query. SecuryBlack implements the same model.

Other applications of k-Anonymity:

  • Password managers that check if your password has been leaked
  • Browsers that check URLs against lists of malicious sites
  • Medical databases that share research data without identifying patients

SecuryBlack's commitment to your privacy

  • We don't store your email on our servers during scanning
  • We don't log queries — We don't know which emails are being checked
  • We use HTTPS — All traffic is encrypted in transit
  • We don't sell data — Never. Our business model is subscription-based, not your data

Want to check it for yourself? Try the Breach Scanner — your email never leaves your browser.