Research Article

Random Secure Comparator Selection Based Privacy-Preserving MAX/MIN Query Processing in Two-Tiered Sensor Networks

Algorithm 1

rsc_compare.
Input: secure comparators and
Output: if , 1 is returned, if ,
   is returned, and , 0 is resturned,
Procedures:
If , then return 0;
If , then
If , then return 1;     //means ;
Else, return ;        //means ;
Else
If , then return ;     //means ;
Else, return 1;           //means ;