Research Article

Silence is Golden: A Source Location Privacy Scheme for Wireless Sensor Networks Based on Silent Nodes

Algorithm 2

State transformation procedure for node n.
► Whether the direction is backwards
(1)function SINKTOSOURCE.
(2)GENERATERANDOMNUMBER.
(3)ifthen
(4)  return True
(5)end if
(6)end function
(7)functionSINKTOSOURCEANDBACK
(8)GENERATERANDOMNUMBER.
(9)if IsReverse else
(10)if then
(11)  if then
(12)   
(13)  end if
(14)  return True
(15)end if
(16)end function
(17)functionSOURCETOSINK.
(18)GENERATERANDOMNUMBER.
(19)if then
(20)  return True
(21)end if
(22)end function
(23)functionSOURCETOSINKANDBACK
(24)GENERATERANDOMNUMBER.
(25)if IsReverse else
(26)ifthen
(27)  ifthen
(28)   
(29)  end if
(30)  return True
(31)end if
(32)end function