Research Article

Preserving Differential Privacy for Similarity Measurement in Smart Environments

Algorithm 1

Requestor’s computation phases.
Computation phases for Alice (Requestor)
Input: ,
Output:
/*Phase 1*/
Initialise: ;
Randomly selects a prime numbers ;
for     to     do
   if     then
     ;
   else
    ;
   end if
Encrypts with (e.g., ;
end for
Encrypts with (e.g., ;
Let ;
Sends to ;
Sends and to Bob;