-1

I'm working on an app that will focus on P2P communication via WebRTC. Part of the app's functionality is discovering other devices in an x mile radius and then being able to initiate communication with them. The most straightforward way to do this is to send the raw locations of all the clients to a server and then returning a response with a list of close devices. However, is there a way to do this that preserves the privacy of the user and avoids having to expose their location to a server?

udbhavs
  • 25
  • 2

1 Answers1

0

As soon as a device communicates with a server, there is a risk for the privacy of its location, through a combination of techniques. Depending on the techniques that are usable (starting with IP geolocation; there are many apis available for this), the reliability of this geolocation can be more or less accurate.

You may use an intermediary (trusted server, vpn,…) to protect your device from this risk. But this works for the original server: in exchange you have a new risk (perhaps lower) related to the intermediary (which could be malicious or a target of malicious actors).

In your case, it’s worse, since the idea is to query a server for neighbours. This can only work if the server knows the approximate location of the device.

You may let the app tell the location on a voluntary base, encrypt it via a way that only the members of a user group can decrypt it (the way Signal and. w Whatsapp ensure end-to-end communication in a group). The server could still use other techniques to track the device. Of course, if you own the server you could make promises about not geolocating the devices, but it’s just a promise that is worth the trust that your customers give you. Not a technical guarantee.

The technical guarantee can only be given using local communication that is logged on individual devices, and less subject. to central surveillance, like bluetooth. During the pandemics, some serverless protocols have been developed using bluetooth. But this applies only to neighbours in a range up to a few of meters.

Christophe
  • 74,672
  • 10
  • 115
  • 187