So on the radio, when they need to announce a listener who sent an SMS or won a contest, they say the whole number except for the last digit. This is inefficient, because the person will always be recognized by acquaintances, someone could just call all 10 numbers, etc.
I propose that hosts say the hash of the number - the subscriber will recognize themselves immediately, as soon as they calculate it (and they'll only have to calculate it for themselves once).
A hash is a function whose argument cannot be determined from its value. Hashes are widely used for storing passwords, digital signatures, and uniquely identifying objects, since the same argument (even a whole file) will always yield the exact same hash function value as a result. By brute-forcing all possible arguments, a hash can be cracked, but it's not easy.
In order to have mercy on the listeners and not torture them with writing down long, complex hashes and calculating them, you can use the most primitive one - for example, the middle part of the number squared.
The red digits show the hash. Knowing only this, it's impossible to calculate the number (a phone number in this case). But knowing the hash of your own phone number, you can compare it with the announced one, and make sure if it's you.
5448182^2=29682687105124
Naturally, the hash will be the same for several numbers, not just this one. For listeners, the probability of a collision is small, since not many of them call in, but in other places hash functions with better algorithms are used: sha, md5.
Hashes are an effective and the only correct way to store passwords. A program, by comparing the hash of the entered password with the hash it has stored, can authenticate the user. But malicious actors who have learned the hash won't be able to find out and use the password.
That's why I hate sites that store my passwords as text and even send it to my email upon request - this way the password can be learned by both the site administrators and the admins of all the computers the password passes through when sent over the internet.
P.S. I wrote all this from memory, so there might be mistakes. And also today I wanted to write this post all day at work, but just kept working and working until it was time to stomp off home.
A little bit about hashes
2006-10-13