The pair-wise key is a key shared between a node and its neighbouring sensor nodes. The
establishment of this key ensures protection of communication that longs for privacy or
authentication of a source. The advantage of having a pair-wise key secures transmission
because it is shared between a node and one of its immediate neighbors and therefore prevents it
from intruders. After the individual key has been set up, nodes can then identify their neighbors
by sending out a message with its ID waiting for a response from the neighbor node n. The Pairwise
(Kp) key can be fabricated by the following equation: