Research Article

Preserving Differential Privacy for Similarity Measurement in Smart Environments

Algorithm 3

Anonymizer’s computation phases.
Computation phases for Anonymizer  
Input: Computation request
Output:
/*Phase 4*/
Initialise: , , and ;
Receives from Alice (from Phase 1);
Receives from Bob (from Phase 3);
// decryption operation to obtain
Computes ;
for     to     do
   // decryption operation to obtain
   Computes ;
  if     then
   Increases by 1;
  else if     then
   Increases by 1;
  else if     then
   Increases by 1;
  else if     then
   Increases by 1;
  else
   stop (error)
  end if
end for
/*Phase  5*/
for each   do
  Computes ;
  Generates Laplacian noise ;
  Returns ;
end for