Skip to content

About

Hashes your contacts' phone numbers with Argon2 so you have no idea who's texting you.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

whowasthis

Hash your contacts' phone numbers with Argon2 and a secret key, so WhatsApp shows you an unreadable hash instead of a name. Nobody, not even you, will know who's texting until you check the table.

Why

Just adding complexity to my WhatsApp.

Setup

You need two files, both in the same directory as the binary:

secret.key — a random hex string. Generate one with:

openssl rand -hex 32 > secret.key

Don't lose it. Without it, nobody can reproduce your hashes even with the same phone number.

contacts.txt — one contact per line, this exact format:

XXXXXXXXX "Kevin"
XXXXXXXXX "Mama"

No spaces in the phone number. Name in double quotes.

Build & run

gcc main.c -o whowasthis -largon2
./whowasthis

Output:

Kevin -> 8e77e91a3f
Mama -> d760c506a1

Notes

  • Deterministic: same phone and same key = same hash gives you the same result.
  • Truncated to 5 bytes (10 hex chars) — that's ~2^40 possible values.
  • If you're planning on having more than 2^40 ≈ 10^12 contacts, per the birthday bound you'll start seeing collisions around 2^20 (~1M) of them. At that point please reconsider your life choices, or just bump HASH_LEN output loop to print more bytes. The full Argon2 hash is 32 bytes (2^256 space), which should cover you up to roughly one contact per atom in the observable universe.

About

Hashes your contacts' phone numbers with Argon2 so you have no idea who's texting you.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages