Research Article

Preserving Differential Privacy for Similarity Measurement in Smart Environments

Algorithm 2

Supporter’s computation phases.
Computation phases for Bob (Supporter)
Input: ,
Output:
/*Phase 2*/
Receives and from Alice (from Phase 1);
for     to     do
   if      then
     ;
   else
     ;
   end if
   Encrypts with (e.g., ;
end for
Let ;
/*Phase 3*/
// homomorphic multiplicative property
for     to     do
   // computation of
   Computes ;
end for
Let ;
Shuffles such that ;
Sends to ;