Research Article

En-Route Message Authentication Scheme for Filtering False Data in WSNs

Algorithm 1

Processing of a report on its nonspecified receiver (e.g., ).
/∗When hears the report R sent by to ∗/
if ( is a common neighbor of and )
 Add the report transmission record {, , IDcos, C} to the local list RTLT;
if ( is the CoS node in R) {
 if ( is an endorsing node in R || is a common neighbor of and an endorsing node in R){
  Search the local list ETLT for the record of sending its endorsement of the event to .
  If not found, set flg0 = false, otherwise set flg0 = true;
  if (flg0 = false && count_i0 <s)
   //count_i0 is the number of 0-type ALERT messages for .
    sends a 0-type ALERT message for to ;
 }
}
else {
 if ( is the node prev in R || is a common neighbor of and the node prev in R){
  Search the local list RTLT for the record of the node prev sending report R to .
  If not found, set flg1 = false, otherwise set flg1 = true;
  if (flg1 = false && count_i1 <s)
   //count_i1 is the number of 1-type ALERT messages for .
    sends a 1-type ALERT message for to ;
  }
}