Skip to main content
. 2016 Nov 25;16(12):1993. doi: 10.3390/s16121993
Algorithm 6 DistanceCompute.
Input:
  Xe: the ciphertext of a querier’s location X;
  Ye: the ciphertext of a publisher’s location Y;
Output:
  dise: the ciphertext of the distance between X and Y;
 1: Obtain m=m·Ws and x=x+Ws from the YeI ;
 2: Compute KY=m·gxmodn;
 3: Compute dise=i=13xeiyei·KY2;
    return dise;