Cryptography & Privacy

What Is k-Anonymity? Definition, Architecture & Defense

Quick Definition: k-Anonymity is a privacy property where a lookup or record cannot be distinguished from at least k-1 other items in the same set, allowing breach checks without revealing the secret queried.

How k-Anonymity Works in Practice

In password breach checking (such as the Have I Been Pwned range API and the OopsMyPassword Breach Check), your browser hashes your password locally with SHA-1 and sends only the first 5 hexadecimal characters (20 bits) to the server. Because 16^5 = 1,048,576 possible prefixes share billions of password hashes, the server returns roughly 500–1,000 matching hash suffixes. Your browser checks locally whether your full 40-character hash is in that list, so the server never learns which password you tested.

Defensive Mitigation & Hardening Checklist

Always prefer k-anonymity range APIs over services that ask you to submit your full email/password in cleartext. Combine client-side hashing with HTTPS so network observers cannot inspect the response list.

Hands-On Tool & Cheat Sheet


Related Security Glossary Terms