@jb55 https://pypi.org/project/proximityhash/ geohashes are one form of proximity hash scheme, there probably is others
i think if you look closely at this you may find a way whereby you can get a close match that massively thins down from a set of publicly visible hashes that are partially generated from phone numbers, such that they don't facilitate reverse indexing but enable those with the number to find them
there is probably a heap of papers you can find and maybe someone has already posed the question of how to make a forward matching phone number search resistant to reverse matching
it's a problem that is very old, i remember in the old days when there started to be reverse phone number databases, which is the problem you are trying to solve, so probably someone has already got a scheme that is data-type-specific
I was trying to google this, I would be surprised if this hasn’t been thought of before.
i hope you find a way to do it because it would be a boon for nostr onboarding
as a side note, it might be a feasible mechanism to create giftwraps that can be searched for, btw, eliminating the key problem with sender-only-identified DMs (giftwraps)
*receiver only identified