0
$\begingroup$

What i am trying to achieve ?

I am developing a carpooling solution powered by Blockchain and IOT. This one is supposed to be technically convenient and without compromising on the privacy part. Driver should be able to share his location on runtime. In order to remove the privacy issue i was wondering if this is possible :-

  1. Driver has his private key on device and shares the location in encrypted format
  2. Passenger requests for ride and queries server with its own encrypted location
  3. Now we have list of active rides encrypted locations and one passenger encrypted location
  4. Server performs haversine geolocation calculation over list of available active rides and figures out the best possible match along with the distance

I want to know if this is possible and if there is any efficient library available Any other options to achieve the desired results are also welcome

Thanks in advance

$\endgroup$
  • $\begingroup$ Not sure I grasp your privacy threat model. Which part of “privacy” exactly are you trying to cover? I mean, it’s obvious that when Driver and Passenger physically meet after matching up, privacy is rendered futile. The rest of your description says all data is secured with the server as a fixpoint and matchmaker… which boils down to less of a “privacy” thing, but more of a “secure server” scenario to think about. $\endgroup$ – e-sushi May 23 '18 at 15:32
1
$\begingroup$

No, that can't be done. There is no way that "Server performs haversine geolocation calculation over list of available active rides and figures out the best possible match along with the distance" but can't find driver's locations.

Worse, even if the server is trusted to internally know the location data, if it puts no limit to creating fake users and telling them what's the closest user, that allows to extract the location of any real user with arbitrary precision, by dichotomic search. That argument can be used to derive a rigorous proof of the above impossibility (sketch: there's nothing to stop a rogue server to use whatever computation it can make without implementing the necessary limitations).

Additionally, there is a possible inconsistency in "Driver has his private key on device and shares the location in encrypted format": the two things have no clear relationship. Fact is, it is never useful to encrypt with one's own asymmetric key, for only self could decipher. Remotely similar possibilities making sense include

  • Driver signs his/her location using his/her private key; that does not make the location confidential.
  • Driver encrypts his/her location with the server's public key.
  • Driver encrypts his/her location with public keys of some other users.

Note: variants of the last two involve establishing a symmetric key using the driver's asymmetric key, and using the symmetric key for encryption (perhaps authenticated), but that makes no functional change.


In the trusted server scenario, it is possible that users sign their location data with their private key and encrypt it with the server's public key; that keeps the location data from directly leaking to other users, and makes it necessary to use complicity of registered users to find a user's location. Further, the ability of a registered user to submit wildly different locations in a short period of time can be limited by the server. That's clearly feasible, including replacing the server by some secure "black box"; an HSM could do that.

Using Fully Homomorphic Encryption, it is theoretically possible that a non-trusted entity performs the distance calculation (including haversine), and I'm ready to admit it is possible to find the identity of the closest neighbor in encrypted form. But I see little point in that, for in the end deciphering distance and identity requires a trusted party / private key. Also, I'm afraid that, if security is required, the best FHE has to offer now would make computations slow (unbearably so for the encrypted identity).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.