  Several applications require computing distances between different people.
For example,this is required if we want to obtain the close contacts of people
in case of and epidemic,or when restraining orders are imposed by a judge.
However, periodically revealing location might pose a privacy threat to the
involved parties. Continuous location data may be used to infer personal
information about the owner, like behaviors, religious beliefs, buying habits,
routines, etc. In this paper, we show that it is possible to calculate distance
between two parties without disclosing their latitude and longitude data. For
this purpose, we design a secure protocol based on the ElGamal cryptosystem and
its homomorphic properties. The proposed protocol allows the calculation of
distances while preserving location privacy. The protocol is analyzed in terms
of security and performance. The security analysis shows that no involved party
can learn any information about location.
