Stefan Kamphausen
2017-02-20 12:37:21 UTC
Hi,
Like many people before, I came across the wonderful post about the
problems of contact discovery[1] which explains very well the problems of
safe contact discovery. According to [2] this list is the place to discuss
ideas for that problem.
I take it that for many people the issue here is, that they don't want to
send the phone numbers of their contacts to a foreign server, Signal's in
this case. At least, that's how I found that post.
Now, when I want my messenger app to discover possible contacts, what I am
actually asking is not "Signal, do you know this number?" but rather
"Signal, can I establish a connection with this number?". For that to be
answered positively, the Signal server must know both numbers. So, the
discovery might as well involve both numbers.
Based on that observation, here is an idea: I use my own number as a salt
for the hashing.
On my phone, the Signal app iterates over the numbers of my contacts,
concatenates my own number and the contact's, hashes the result and sends
the hash to the Signal server to store it (possibly stripping a byte or
two). On some other device when someone else wants to connect with me,
they'd create the same concatenation and hash and ask Signal for it.
Obviously for discovery, they'd have do this for every contact.
Would the space spanned by both numbers be large enough to protect against
pre-calculated hash tables?
Would the data to be stored on the Signal server be of acceptable size?
Would it be acceptable at all if the contact graph is stored on the server,
even if in hashed form?
And finally, is there an obvious mistake in this train of thoughts?
Looking forward to seeing someone crush this idea.
Kind regards,
Stefan
[1] https://whispersystems.org/blog/contact-discovery/
[2] https://github.com/WhisperSystems/Signal-Android/
issues/4726#issuecomment-159959146
Like many people before, I came across the wonderful post about the
problems of contact discovery[1] which explains very well the problems of
safe contact discovery. According to [2] this list is the place to discuss
ideas for that problem.
I take it that for many people the issue here is, that they don't want to
send the phone numbers of their contacts to a foreign server, Signal's in
this case. At least, that's how I found that post.
Now, when I want my messenger app to discover possible contacts, what I am
actually asking is not "Signal, do you know this number?" but rather
"Signal, can I establish a connection with this number?". For that to be
answered positively, the Signal server must know both numbers. So, the
discovery might as well involve both numbers.
Based on that observation, here is an idea: I use my own number as a salt
for the hashing.
On my phone, the Signal app iterates over the numbers of my contacts,
concatenates my own number and the contact's, hashes the result and sends
the hash to the Signal server to store it (possibly stripping a byte or
two). On some other device when someone else wants to connect with me,
they'd create the same concatenation and hash and ask Signal for it.
Obviously for discovery, they'd have do this for every contact.
Would the space spanned by both numbers be large enough to protect against
pre-calculated hash tables?
Would the data to be stored on the Signal server be of acceptable size?
Would it be acceptable at all if the contact graph is stored on the server,
even if in hashed form?
And finally, is there an obvious mistake in this train of thoughts?
Looking forward to seeing someone crush this idea.
Kind regards,
Stefan
[1] https://whispersystems.org/blog/contact-discovery/
[2] https://github.com/WhisperSystems/Signal-Android/
issues/4726#issuecomment-159959146