Security in Wireless Sensor Network

175
Security in Wireless Sensor Network Implementation of a Key Distribution Scheme in a Wireless Sensor Network using TOSSIM Fasih Ahmad Fakhri Haldia Institute of Technology Department of Information Technology Summer Internship at IIIT Hyderabad, 2011 Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 1 / 63

description

 

Transcript of Security in Wireless Sensor Network

Page 1: Security in Wireless Sensor Network

Security in Wireless Sensor NetworkImplementation of a Key Distribution Scheme in a Wireless Sensor

Network using TOSSIM

Fasih Ahmad Fakhri

Haldia Institute of TechnologyDepartment of Information Technology

Summer Internship at IIIT Hyderabad, 2011

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 1 / 63

Page 2: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 2 / 63

Page 3: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 2 / 63

Page 4: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 2 / 63

Page 5: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 2 / 63

Page 6: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 2 / 63

Page 7: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 2 / 63

Page 8: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 3 / 63

Page 9: Security in Wireless Sensor Network

Introduction

Advances in computing and communication technology havemade it possible to integrate sensing capabilities, wirelesscommunication interfaces, and microprocessors into tiny devicesthat allow embedding computational power in arbitraryenvironments.The specific characteristics of wireless sensor networks makethem vulnerable to attacks on their communication channels andtheir hardware. Cryptographic mechanisms can be employed toprotect against some of the possible attacks: eavesdropping onmessages is countered by encryption, and the injection ofmessages by the attacker is prevented by authentication.Thus, novel mechanisms are required that provide a sufficientlevel of security while respecting the constraints in wireless sensornetworks.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 4 / 63

Page 10: Security in Wireless Sensor Network

Introduction

Advances in computing and communication technology havemade it possible to integrate sensing capabilities, wirelesscommunication interfaces, and microprocessors into tiny devicesthat allow embedding computational power in arbitraryenvironments.The specific characteristics of wireless sensor networks makethem vulnerable to attacks on their communication channels andtheir hardware. Cryptographic mechanisms can be employed toprotect against some of the possible attacks: eavesdropping onmessages is countered by encryption, and the injection ofmessages by the attacker is prevented by authentication.Thus, novel mechanisms are required that provide a sufficientlevel of security while respecting the constraints in wireless sensornetworks.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 4 / 63

Page 11: Security in Wireless Sensor Network

Introduction

Advances in computing and communication technology havemade it possible to integrate sensing capabilities, wirelesscommunication interfaces, and microprocessors into tiny devicesthat allow embedding computational power in arbitraryenvironments.The specific characteristics of wireless sensor networks makethem vulnerable to attacks on their communication channels andtheir hardware. Cryptographic mechanisms can be employed toprotect against some of the possible attacks: eavesdropping onmessages is countered by encryption, and the injection ofmessages by the attacker is prevented by authentication.Thus, novel mechanisms are required that provide a sufficientlevel of security while respecting the constraints in wireless sensornetworks.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 4 / 63

Page 12: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 5 / 63

Page 13: Security in Wireless Sensor Network

Wireless Sensor Network

Overview:The Wireless Sensor Network is an advancement of MEMS (microelectro mechanical systems) technology, wireless communicationand digital electronics.They are capable of working in harsh conditions.They are having low manufacturing cost, consumes low powerand are capable to sense and communicate.In a sensor network, many tiny computing nodes called sensorsare scattered in an area for the purpose of sensing some data andtransmitting data to nearby base stations for further processing.A sensor node, also known as a mote, is a node in a wirelesssensor network that is capable of performing some processing,gathering sensory information and communicating with otherconnected nodes in the network. The transmission between thesensors is done by short range radio communications.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 6 / 63

Page 14: Security in Wireless Sensor Network

Wireless Sensor Network

Overview:The Wireless Sensor Network is an advancement of MEMS (microelectro mechanical systems) technology, wireless communicationand digital electronics.They are capable of working in harsh conditions.They are having low manufacturing cost, consumes low powerand are capable to sense and communicate.In a sensor network, many tiny computing nodes called sensorsare scattered in an area for the purpose of sensing some data andtransmitting data to nearby base stations for further processing.A sensor node, also known as a mote, is a node in a wirelesssensor network that is capable of performing some processing,gathering sensory information and communicating with otherconnected nodes in the network. The transmission between thesensors is done by short range radio communications.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 6 / 63

Page 15: Security in Wireless Sensor Network

Wireless Sensor Network

Overview:The Wireless Sensor Network is an advancement of MEMS (microelectro mechanical systems) technology, wireless communicationand digital electronics.They are capable of working in harsh conditions.They are having low manufacturing cost, consumes low powerand are capable to sense and communicate.In a sensor network, many tiny computing nodes called sensorsare scattered in an area for the purpose of sensing some data andtransmitting data to nearby base stations for further processing.A sensor node, also known as a mote, is a node in a wirelesssensor network that is capable of performing some processing,gathering sensory information and communicating with otherconnected nodes in the network. The transmission between thesensors is done by short range radio communications.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 6 / 63

Page 16: Security in Wireless Sensor Network

Wireless Sensor Network

Overview:The Wireless Sensor Network is an advancement of MEMS (microelectro mechanical systems) technology, wireless communicationand digital electronics.They are capable of working in harsh conditions.They are having low manufacturing cost, consumes low powerand are capable to sense and communicate.In a sensor network, many tiny computing nodes called sensorsare scattered in an area for the purpose of sensing some data andtransmitting data to nearby base stations for further processing.A sensor node, also known as a mote, is a node in a wirelesssensor network that is capable of performing some processing,gathering sensory information and communicating with otherconnected nodes in the network. The transmission between thesensors is done by short range radio communications.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 6 / 63

Page 17: Security in Wireless Sensor Network

Wireless Sensor Network

Overview:The Wireless Sensor Network is an advancement of MEMS (microelectro mechanical systems) technology, wireless communicationand digital electronics.They are capable of working in harsh conditions.They are having low manufacturing cost, consumes low powerand are capable to sense and communicate.In a sensor network, many tiny computing nodes called sensorsare scattered in an area for the purpose of sensing some data andtransmitting data to nearby base stations for further processing.A sensor node, also known as a mote, is a node in a wirelesssensor network that is capable of performing some processing,gathering sensory information and communicating with otherconnected nodes in the network. The transmission between thesensors is done by short range radio communications.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 6 / 63

Page 18: Security in Wireless Sensor Network

Wireless Sensor Network Contd..

The base station is assumed to be computationally well-equippedwhereas the sensor nodes are resource-starved.The sensor nodes are usually scattered in a sensor field (i.e.,deployment area or target field).Each of these scattered sensor nodes has the capabilities tocollect data and route data back to the base station.Sensor nodes mainly use broadcast communication paradigm.Data are routed back to the base station by a multi-hopinfrastructure-less architecture through sensor nodes.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 7 / 63

Page 19: Security in Wireless Sensor Network

Wireless Sensor Network Contd..

The base station is assumed to be computationally well-equippedwhereas the sensor nodes are resource-starved.The sensor nodes are usually scattered in a sensor field (i.e.,deployment area or target field).Each of these scattered sensor nodes has the capabilities tocollect data and route data back to the base station.Sensor nodes mainly use broadcast communication paradigm.Data are routed back to the base station by a multi-hopinfrastructure-less architecture through sensor nodes.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 7 / 63

Page 20: Security in Wireless Sensor Network

Wireless Sensor Network Contd..

The base station is assumed to be computationally well-equippedwhereas the sensor nodes are resource-starved.The sensor nodes are usually scattered in a sensor field (i.e.,deployment area or target field).Each of these scattered sensor nodes has the capabilities tocollect data and route data back to the base station.Sensor nodes mainly use broadcast communication paradigm.Data are routed back to the base station by a multi-hopinfrastructure-less architecture through sensor nodes.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 7 / 63

Page 21: Security in Wireless Sensor Network

Wireless Sensor Network Contd..

The base station is assumed to be computationally well-equippedwhereas the sensor nodes are resource-starved.The sensor nodes are usually scattered in a sensor field (i.e.,deployment area or target field).Each of these scattered sensor nodes has the capabilities tocollect data and route data back to the base station.Sensor nodes mainly use broadcast communication paradigm.Data are routed back to the base station by a multi-hopinfrastructure-less architecture through sensor nodes.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 7 / 63

Page 22: Security in Wireless Sensor Network

Wireless Sensor Network Contd..

The base station is assumed to be computationally well-equippedwhereas the sensor nodes are resource-starved.The sensor nodes are usually scattered in a sensor field (i.e.,deployment area or target field).Each of these scattered sensor nodes has the capabilities tocollect data and route data back to the base station.Sensor nodes mainly use broadcast communication paradigm.Data are routed back to the base station by a multi-hopinfrastructure-less architecture through sensor nodes.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 7 / 63

Page 23: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 8 / 63

Page 24: Security in Wireless Sensor Network

Applications of Wireless Sensor Network

Applications:Military Application

C4ISRTEnvironmental Application

Forest fire detectionBiocomplexity mapping of the environmentFlood detectionPrecision Agriculture

Health ApplicationTelemonitoring of human physiological dataTracking and monitoring patients inside a hospitalDrug administration

Home ApplicationOther Commercial Application

Environmental control in office buildingsManaging inventoryVehicle tracking and detection

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 9 / 63

Page 25: Security in Wireless Sensor Network

Applications of Wireless Sensor Network

Applications:Military Application

C4ISRTEnvironmental Application

Forest fire detectionBiocomplexity mapping of the environmentFlood detectionPrecision Agriculture

Health ApplicationTelemonitoring of human physiological dataTracking and monitoring patients inside a hospitalDrug administration

Home ApplicationOther Commercial Application

Environmental control in office buildingsManaging inventoryVehicle tracking and detection

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 9 / 63

Page 26: Security in Wireless Sensor Network

Applications of Wireless Sensor Network

Applications:Military Application

C4ISRTEnvironmental Application

Forest fire detectionBiocomplexity mapping of the environmentFlood detectionPrecision Agriculture

Health ApplicationTelemonitoring of human physiological dataTracking and monitoring patients inside a hospitalDrug administration

Home ApplicationOther Commercial Application

Environmental control in office buildingsManaging inventoryVehicle tracking and detection

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 9 / 63

Page 27: Security in Wireless Sensor Network

Applications of Wireless Sensor Network

Applications:Military Application

C4ISRTEnvironmental Application

Forest fire detectionBiocomplexity mapping of the environmentFlood detectionPrecision Agriculture

Health ApplicationTelemonitoring of human physiological dataTracking and monitoring patients inside a hospitalDrug administration

Home ApplicationOther Commercial Application

Environmental control in office buildingsManaging inventoryVehicle tracking and detection

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 9 / 63

Page 28: Security in Wireless Sensor Network

Applications of Wireless Sensor Network

Applications:Military Application

C4ISRTEnvironmental Application

Forest fire detectionBiocomplexity mapping of the environmentFlood detectionPrecision Agriculture

Health ApplicationTelemonitoring of human physiological dataTracking and monitoring patients inside a hospitalDrug administration

Home ApplicationOther Commercial Application

Environmental control in office buildingsManaging inventoryVehicle tracking and detection

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 9 / 63

Page 29: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 10 / 63

Page 30: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 31: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 32: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 33: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 34: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 35: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 36: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 37: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 38: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 39: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 40: Security in Wireless Sensor Network

Factors Influencing Sensor Network Design

Fault ToleranceScalibilityProduction CostHardware ConstraintsEnvironmentTransmission MediumPower ConsumptionSensor Network Topology

Pre deployment and Deployment PhasePost deployment PhaseRe deployment of additional phase

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 11 / 63

Page 41: Security in Wireless Sensor Network

Sensor Network Topology

Pre deployment and Deployment PhaseSensor nodes can be either thrown in mass or placed one by one inthe sensor field. They can be deployed by:

dropping from a planedelivering in an artillery shell, rocket or missilethrowing by a catapult (from a ship board, etc.)placing in factoryplacing one by one either by a human or a robot.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 12 / 63

Page 42: Security in Wireless Sensor Network

Sensor Network Topology

Post deployment PhaseAfter deployment, topology changes are due to change in sensornodes:

positionreachability (due to jamming, noise, moving obstacles, etc.)available energymalfunctioningtask details

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 13 / 63

Page 43: Security in Wireless Sensor Network

Sensor Network Topology

Re deployment of additional phaseAdditional sensor nodes can be re-deployed at any time to replace themalfunctioning nodes or due to changes in task dynamics. Addition ofnew nodes poses a need to reorganize the network. Coping withfrequent topology changes in an ad hoc network that has myriads ofnodes and very stringent power consumption constraints requiresspecial routing protocols.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 14 / 63

Page 44: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 15 / 63

Page 45: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Protocol StackApplication LayerTransport LayerNetwork LayerData Link LayerPhysical LayerPower Management PlaneMobility Management PlaneTask Management Plane

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 16 / 63

Page 46: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Protocol StackApplication LayerTransport LayerNetwork LayerData Link LayerPhysical LayerPower Management PlaneMobility Management PlaneTask Management Plane

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 16 / 63

Page 47: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Protocol StackApplication LayerTransport LayerNetwork LayerData Link LayerPhysical LayerPower Management PlaneMobility Management PlaneTask Management Plane

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 16 / 63

Page 48: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Protocol StackApplication LayerTransport LayerNetwork LayerData Link LayerPhysical LayerPower Management PlaneMobility Management PlaneTask Management Plane

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 16 / 63

Page 49: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Protocol StackApplication LayerTransport LayerNetwork LayerData Link LayerPhysical LayerPower Management PlaneMobility Management PlaneTask Management Plane

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 16 / 63

Page 50: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Protocol StackApplication LayerTransport LayerNetwork LayerData Link LayerPhysical LayerPower Management PlaneMobility Management PlaneTask Management Plane

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 16 / 63

Page 51: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Protocol StackApplication LayerTransport LayerNetwork LayerData Link LayerPhysical LayerPower Management PlaneMobility Management PlaneTask Management Plane

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 16 / 63

Page 52: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Protocol StackApplication LayerTransport LayerNetwork LayerData Link LayerPhysical LayerPower Management PlaneMobility Management PlaneTask Management Plane

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 16 / 63

Page 53: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Application LayerAlthough many application areas for sensor networks are defined andproposed, potential application layer protocols for sensor networksremains a largely unexplored region. Usually three protocols areimplemented in this layer and they are as:

Sensor management protocol(SMP)Task assignment and data advertisement protocol(TADAP)Sensor query and data dissemnation protocol(SQDDP)

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 17 / 63

Page 54: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Transport LayerThis layer is especially needed when the system is planned to beaccessed through Internet or other external networks. TCP with itscurrent transmission window mechanisms does match to the extremecharacteristics of the sensor network environment. An approach suchas TCP splitting may be needed to make sensor networks interact withother networks such as Internet. In this approach, TCP connectionsare ended at sink nodes, and a special transport layer protocol canhandle the communications between the sink node and sensor nodes.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 18 / 63

Page 55: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Network LayerFunction of this layer is to provide internetworking with externalnetworks such as other sensor networks, command and controlsystems and the Internet. The protocols used in this layer are asfollows:

Small minimum energy communication network (SMECN)FloodingGossipingSensor Protocol for Information via Negotiation (SPIN)Sequential Assignment Routing (SAR)Low-Energy Adaptive Clustering Hierarchy (LEACH)Directed Diffusion

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 19 / 63

Page 56: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Data Link LayerThe data link layer is responsible for the multiplexing of data streams,data frame detection, medium access and error control. The protocolsfollowed in this layer are:

Medium Access Control (MAC)SMACS and the EAR algorithmCSMA based medium accessHybrid TDMA/FDMA basedPower saving modes of operationError control

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 20 / 63

Page 57: Security in Wireless Sensor Network

Sensor Network Communication Architecture

Physical LayerThe physical layer is responsible for frequency selection, carrierfrequency generation, signal detection, modulation and dataencryption. It is well known that long distance wireless communicationcan be expensive, both in terms of energy and implementationcomplexity. While designing the physical layer for sensor networks,energy minimization assumes significant importance, over and abovethe decay, scattering, shadowing, reflection, diffraction, multipath andfading effect.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 21 / 63

Page 58: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 22 / 63

Page 59: Security in Wireless Sensor Network

Key Management Scheme for Distributed SensorNetworks

Distributed Sensor NetworksCollection of battery powered sensor nodes.Types of nodes:

Data collection nodes: Cache data and make it available forprocessing to application components within the network.Control nodes: Monitor the status of and broadcast simplecommands to sensor nodes Dynamic in nature.

Communication/Computation constraints:Limited power and communication rangeTypical asymmetric (public key) cryptography too expensive

Key Management Issues

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 23 / 63

Page 60: Security in Wireless Sensor Network

Key Management Scheme for Distributed SensorNetworks

Traditional Internet style key distributionImpractical due to unknown topology prior to deployment,communication range limitations, etc.

Current key management techniquesRely on key pre distributionSingle mission key

Inadequate due to security risks.Pair wise privately shared keys

Requires the storage of (n-1) keys in each sensor, n(n-1)/2 per DSNAddition, deletion, or rekeying of sensor nodes becomes verycomplexSensor nodes have onchip memory limitations

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 24 / 63

Page 61: Security in Wireless Sensor Network

Key Management Scheme for Distributed SensorNetworks

Traditional Internet style key distributionImpractical due to unknown topology prior to deployment,communication range limitations, etc.

Current key management techniquesRely on key pre distributionSingle mission key

Inadequate due to security risks.Pair wise privately shared keys

Requires the storage of (n-1) keys in each sensor, n(n-1)/2 per DSNAddition, deletion, or rekeying of sensor nodes becomes verycomplexSensor nodes have onchip memory limitations

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 24 / 63

Page 62: Security in Wireless Sensor Network

Key Management Scheme for Distributed SensorNetworks

Traditional Internet style key distributionImpractical due to unknown topology prior to deployment,communication range limitations, etc.

Current key management techniquesRely on key pre distributionSingle mission key

Inadequate due to security risks.Pair wise privately shared keys

Requires the storage of (n-1) keys in each sensor, n(n-1)/2 per DSNAddition, deletion, or rekeying of sensor nodes becomes verycomplexSensor nodes have onchip memory limitations

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 24 / 63

Page 63: Security in Wireless Sensor Network

Key Management Scheme for Distributed SensorNetworks

Traditional Internet style key distributionImpractical due to unknown topology prior to deployment,communication range limitations, etc.

Current key management techniquesRely on key pre distributionSingle mission key

Inadequate due to security risks.Pair wise privately shared keys

Requires the storage of (n-1) keys in each sensor, n(n-1)/2 per DSNAddition, deletion, or rekeying of sensor nodes becomes verycomplexSensor nodes have onchip memory limitations

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 24 / 63

Page 64: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 25 / 63

Page 65: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 66: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 67: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 68: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 69: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 70: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 71: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 72: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 73: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 74: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 75: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 76: Security in Wireless Sensor Network

Bootstrapping Protocol

The Bootstrapping Protocol: Establishes cryptographicallysecure communication links among the communicating sensornodes.Different phases:

1 Key pre distribution phase: Done in offline by the key setupserver (the base station).

2 Direct key establishment phase: Performed by each sensor nodeafter their deployment in the network.

3 Path key establishment phase: Required if nodes do notestablish direct keys during the direct key establishment phase.

RequirementsEvaluation metrics

ScalabilityStorage overheadCommunication overheadNetwork connectivityResilience against node capture

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 26 / 63

Page 77: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 27 / 63

Page 78: Security in Wireless Sensor Network

Single Network Wide Key Distribution

ProtocolThe simplest solution is the use of a single mission key for theentire network.Each node is given the same mission key before deployment inthe network.After deployment, any two neighbor nodes can communicatesecurely with each other using this key.

PropertiesProvides 100 percent network connectivity.No computational overhead.No computational overhead.Scalable.

DrawbacksIt does not allow addition of new nodes after initial deployment.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 28 / 63

Page 79: Security in Wireless Sensor Network

Single Network Wide Key Distribution

ProtocolThe simplest solution is the use of a single mission key for theentire network.Each node is given the same mission key before deployment inthe network.After deployment, any two neighbor nodes can communicatesecurely with each other using this key.

PropertiesProvides 100 percent network connectivity.No computational overhead.No computational overhead.Scalable.

DrawbacksIt does not allow addition of new nodes after initial deployment.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 28 / 63

Page 80: Security in Wireless Sensor Network

Single Network Wide Key Distribution

ProtocolThe simplest solution is the use of a single mission key for theentire network.Each node is given the same mission key before deployment inthe network.After deployment, any two neighbor nodes can communicatesecurely with each other using this key.

PropertiesProvides 100 percent network connectivity.No computational overhead.No computational overhead.Scalable.

DrawbacksIt does not allow addition of new nodes after initial deployment.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 28 / 63

Page 81: Security in Wireless Sensor Network

Single Network Wide Key Distribution

ProtocolThe simplest solution is the use of a single mission key for theentire network.Each node is given the same mission key before deployment inthe network.After deployment, any two neighbor nodes can communicatesecurely with each other using this key.

PropertiesProvides 100 percent network connectivity.No computational overhead.No computational overhead.Scalable.

DrawbacksIt does not allow addition of new nodes after initial deployment.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 28 / 63

Page 82: Security in Wireless Sensor Network

Single Network Wide Key Distribution

ProtocolThe simplest solution is the use of a single mission key for theentire network.Each node is given the same mission key before deployment inthe network.After deployment, any two neighbor nodes can communicatesecurely with each other using this key.

PropertiesProvides 100 percent network connectivity.No computational overhead.No computational overhead.Scalable.

DrawbacksIt does not allow addition of new nodes after initial deployment.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 28 / 63

Page 83: Security in Wireless Sensor Network

Single Network Wide Key Distribution

ProtocolThe simplest solution is the use of a single mission key for theentire network.Each node is given the same mission key before deployment inthe network.After deployment, any two neighbor nodes can communicatesecurely with each other using this key.

PropertiesProvides 100 percent network connectivity.No computational overhead.No computational overhead.Scalable.

DrawbacksIt does not allow addition of new nodes after initial deployment.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 28 / 63

Page 84: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 29 / 63

Page 85: Security in Wireless Sensor Network

Random Key Distribution

A probabilistic approach for key distribution in wireless sensornetwork where key is pre distributed in sensor nodes.Key Distribution

Key pre distribution phaseDirect key establishment phasePath key establishment phase

Key RevocationRe-Keying

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 30 / 63

Page 86: Security in Wireless Sensor Network

Random Key Distribution

A probabilistic approach for key distribution in wireless sensornetwork where key is pre distributed in sensor nodes.Key Distribution

Key pre distribution phaseDirect key establishment phasePath key establishment phase

Key RevocationRe-Keying

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 30 / 63

Page 87: Security in Wireless Sensor Network

Random Key Distribution

A probabilistic approach for key distribution in wireless sensornetwork where key is pre distributed in sensor nodes.Key Distribution

Key pre distribution phaseDirect key establishment phasePath key establishment phase

Key RevocationRe-Keying

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 30 / 63

Page 88: Security in Wireless Sensor Network

Random Key Distribution

A probabilistic approach for key distribution in wireless sensornetwork where key is pre distributed in sensor nodes.Key Distribution

Key pre distribution phaseDirect key establishment phasePath key establishment phase

Key RevocationRe-Keying

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 30 / 63

Page 89: Security in Wireless Sensor Network

Random Key Distribution

EG SchemeLaurent Eschenauer Virgil D. Gligor, "A key management scheme fordistributed sensor networks" in 9th ACM CCS, pp.41 47, Nov. 2002

Key pre distribution phaseDone in offline by the key setup server (base station).Each node u is assigned a unique node identifier idu.For each node u, a small subset Kui of size m is selectedrandomly without replacement from the key pool K.Each node u is pre loaded with (i) idu , and (ii) Kui.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 31 / 63

Page 90: Security in Wireless Sensor Network

Random Key Distribution

EG SchemeLaurent Eschenauer Virgil D. Gligor, "A key management scheme fordistributed sensor networks" in 9th ACM CCS, pp.41 47, Nov. 2002

Key pre distribution phaseDone in offline by the key setup server (base station).Each node u is assigned a unique node identifier idu.For each node u, a small subset Kui of size m is selectedrandomly without replacement from the key pool K.Each node u is pre loaded with (i) idu , and (ii) Kui.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 31 / 63

Page 91: Security in Wireless Sensor Network

Random Key Distribution

EG SchemeLaurent Eschenauer Virgil D. Gligor, "A key management scheme fordistributed sensor networks" in 9th ACM CCS, pp.41 47, Nov. 2002

Key pre distribution phaseDone in offline by the key setup server (base station).Each node u is assigned a unique node identifier idu.For each node u, a small subset Kui of size m is selectedrandomly without replacement from the key pool K.Each node u is pre loaded with (i) idu , and (ii) Kui.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 31 / 63

Page 92: Security in Wireless Sensor Network

Random Key Distribution

EG SchemeLaurent Eschenauer Virgil D. Gligor, "A key management scheme fordistributed sensor networks" in 9th ACM CCS, pp.41 47, Nov. 2002

Key pre distribution phaseDone in offline by the key setup server (base station).Each node u is assigned a unique node identifier idu.For each node u, a small subset Kui of size m is selectedrandomly without replacement from the key pool K.Each node u is pre loaded with (i) idu , and (ii) Kui.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 31 / 63

Page 93: Security in Wireless Sensor Network

Random Key Distribution

EG SchemeLaurent Eschenauer Virgil D. Gligor, "A key management scheme fordistributed sensor networks" in 9th ACM CCS, pp.41 47, Nov. 2002

Key pre distribution phaseDone in offline by the key setup server (base station).Each node u is assigned a unique node identifier idu.For each node u, a small subset Kui of size m is selectedrandomly without replacement from the key pool K.Each node u is pre loaded with (i) idu , and (ii) Kui.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 31 / 63

Page 94: Security in Wireless Sensor Network

Random Key Distribution

EG SchemeLaurent Eschenauer Virgil D. Gligor, "A key management scheme fordistributed sensor networks" in 9th ACM CCS, pp.41 47, Nov. 2002

Key pre distribution phaseDone in offline by the key setup server (base station).Each node u is assigned a unique node identifier idu.For each node u, a small subset Kui of size m is selectedrandomly without replacement from the key pool K.Each node u is pre loaded with (i) idu , and (ii) Kui.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 31 / 63

Page 95: Security in Wireless Sensor Network

Random Key Distribution

Direct key establishment phaseExecuted by each sensor node after deployment in the network.Each node broadcasts a HELLO message (containing its ownidentifier).Each node prepares a list of physical neighbors initscommunication range. NLu = [v1 , v2 , . . . , vd] is the list of dneighbors of a node u.Key neighborsDirect neighbors

Path key establishment phaseExecuted after direct key establishment phase by a sensor node inthe network, if required.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 32 / 63

Page 96: Security in Wireless Sensor Network

Random Key Distribution

Direct key establishment phaseExecuted by each sensor node after deployment in the network.Each node broadcasts a HELLO message (containing its ownidentifier).Each node prepares a list of physical neighbors initscommunication range. NLu = [v1 , v2 , . . . , vd] is the list of dneighbors of a node u.Key neighborsDirect neighbors

Path key establishment phaseExecuted after direct key establishment phase by a sensor node inthe network, if required.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 32 / 63

Page 97: Security in Wireless Sensor Network

Random Key Distribution

Direct key establishment phaseExecuted by each sensor node after deployment in the network.Each node broadcasts a HELLO message (containing its ownidentifier).Each node prepares a list of physical neighbors initscommunication range. NLu = [v1 , v2 , . . . , vd] is the list of dneighbors of a node u.Key neighborsDirect neighbors

Path key establishment phaseExecuted after direct key establishment phase by a sensor node inthe network, if required.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 32 / 63

Page 98: Security in Wireless Sensor Network

Random Key Distribution

Direct key establishment phaseExecuted by each sensor node after deployment in the network.Each node broadcasts a HELLO message (containing its ownidentifier).Each node prepares a list of physical neighbors initscommunication range. NLu = [v1 , v2 , . . . , vd] is the list of dneighbors of a node u.Key neighborsDirect neighbors

Path key establishment phaseExecuted after direct key establishment phase by a sensor node inthe network, if required.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 32 / 63

Page 99: Security in Wireless Sensor Network

Random Key Distribution

Direct key establishment phaseExecuted by each sensor node after deployment in the network.Each node broadcasts a HELLO message (containing its ownidentifier).Each node prepares a list of physical neighbors initscommunication range. NLu = [v1 , v2 , . . . , vd] is the list of dneighbors of a node u.Key neighborsDirect neighbors

Path key establishment phaseExecuted after direct key establishment phase by a sensor node inthe network, if required.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 32 / 63

Page 100: Security in Wireless Sensor Network

Random Key Distribution

Direct key establishment phaseExecuted by each sensor node after deployment in the network.Each node broadcasts a HELLO message (containing its ownidentifier).Each node prepares a list of physical neighbors initscommunication range. NLu = [v1 , v2 , . . . , vd] is the list of dneighbors of a node u.Key neighborsDirect neighbors

Path key establishment phaseExecuted after direct key establishment phase by a sensor node inthe network, if required.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 32 / 63

Page 101: Security in Wireless Sensor Network

Random Key Distribution

Direct key establishment phaseExecuted by each sensor node after deployment in the network.Each node broadcasts a HELLO message (containing its ownidentifier).Each node prepares a list of physical neighbors initscommunication range. NLu = [v1 , v2 , . . . , vd] is the list of dneighbors of a node u.Key neighborsDirect neighbors

Path key establishment phaseExecuted after direct key establishment phase by a sensor node inthe network, if required.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 32 / 63

Page 102: Security in Wireless Sensor Network

Random Key Distribution

Dynamic node addition phaseAssume a node u needs to be deployed in the existing sensornetwork.The key setup server assigns a unique identifier idu and selects akey ring Ku of size m from the key pool K. These information areloaded in its memory before deployment.After deployment, u establishes keys with its neighbor nodes.Path key establishment could be executed by the node u, ifnecessary.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 33 / 63

Page 103: Security in Wireless Sensor Network

Random Key Distribution

Dynamic node addition phaseAssume a node u needs to be deployed in the existing sensornetwork.The key setup server assigns a unique identifier idu and selects akey ring Ku of size m from the key pool K. These information areloaded in its memory before deployment.After deployment, u establishes keys with its neighbor nodes.Path key establishment could be executed by the node u, ifnecessary.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 33 / 63

Page 104: Security in Wireless Sensor Network

Random Key Distribution

Dynamic node addition phaseAssume a node u needs to be deployed in the existing sensornetwork.The key setup server assigns a unique identifier idu and selects akey ring Ku of size m from the key pool K. These information areloaded in its memory before deployment.After deployment, u establishes keys with its neighbor nodes.Path key establishment could be executed by the node u, ifnecessary.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 33 / 63

Page 105: Security in Wireless Sensor Network

Random Key Distribution

Dynamic node addition phaseAssume a node u needs to be deployed in the existing sensornetwork.The key setup server assigns a unique identifier idu and selects akey ring Ku of size m from the key pool K. These information areloaded in its memory before deployment.After deployment, u establishes keys with its neighbor nodes.Path key establishment could be executed by the node u, ifnecessary.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 33 / 63

Page 106: Security in Wireless Sensor Network

Random Key Distribution

Dynamic node addition phaseAssume a node u needs to be deployed in the existing sensornetwork.The key setup server assigns a unique identifier idu and selects akey ring Ku of size m from the key pool K. These information areloaded in its memory before deployment.After deployment, u establishes keys with its neighbor nodes.Path key establishment could be executed by the node u, ifnecessary.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 33 / 63

Page 107: Security in Wireless Sensor Network

Random Key Distribution

AnalysisNetwork connectivity for direct key establishment phase: Theprobability of establishing a direct pairwise key between twosensor nodes u and v is

pEG = 1− (M −m)C(m)/(M)C(m)where M is the key pool size and m the key ring size of a sensor node.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 34 / 63

Page 108: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 35 / 63

Page 109: Security in Wireless Sensor Network

TinyOS

TinyOS is an application specific operating system specificallydesigned for sensor networks which provides a component basedprogramming model, provided by the nesC language.Each TinyOS component has a frame, a structure of privatevariables that can only be referenced by that component.Components have three computational abstractions: commands,events, and tasks.A command is typically a request to a component to perform someservice, such as initiating a sensor reading.An event signals the completion of that service. Events may alsobe signaled asynchronously, for example, due to hardwareinterrupts or message arrival.A task or a function is a set of code performing mathematicalcomputations with its own set of private variables using certaincommands of other components or Interfaces. The TinyOS taskscheduler uses a non preemptive, FIFO scheduling policy.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 36 / 63

Page 110: Security in Wireless Sensor Network

TinyOS

TinyOS is an application specific operating system specificallydesigned for sensor networks which provides a component basedprogramming model, provided by the nesC language.Each TinyOS component has a frame, a structure of privatevariables that can only be referenced by that component.Components have three computational abstractions: commands,events, and tasks.A command is typically a request to a component to perform someservice, such as initiating a sensor reading.An event signals the completion of that service. Events may alsobe signaled asynchronously, for example, due to hardwareinterrupts or message arrival.A task or a function is a set of code performing mathematicalcomputations with its own set of private variables using certaincommands of other components or Interfaces. The TinyOS taskscheduler uses a non preemptive, FIFO scheduling policy.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 36 / 63

Page 111: Security in Wireless Sensor Network

TinyOS

TinyOS is an application specific operating system specificallydesigned for sensor networks which provides a component basedprogramming model, provided by the nesC language.Each TinyOS component has a frame, a structure of privatevariables that can only be referenced by that component.Components have three computational abstractions: commands,events, and tasks.A command is typically a request to a component to perform someservice, such as initiating a sensor reading.An event signals the completion of that service. Events may alsobe signaled asynchronously, for example, due to hardwareinterrupts or message arrival.A task or a function is a set of code performing mathematicalcomputations with its own set of private variables using certaincommands of other components or Interfaces. The TinyOS taskscheduler uses a non preemptive, FIFO scheduling policy.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 36 / 63

Page 112: Security in Wireless Sensor Network

TinyOS

TinyOS is an application specific operating system specificallydesigned for sensor networks which provides a component basedprogramming model, provided by the nesC language.Each TinyOS component has a frame, a structure of privatevariables that can only be referenced by that component.Components have three computational abstractions: commands,events, and tasks.A command is typically a request to a component to perform someservice, such as initiating a sensor reading.An event signals the completion of that service. Events may alsobe signaled asynchronously, for example, due to hardwareinterrupts or message arrival.A task or a function is a set of code performing mathematicalcomputations with its own set of private variables using certaincommands of other components or Interfaces. The TinyOS taskscheduler uses a non preemptive, FIFO scheduling policy.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 36 / 63

Page 113: Security in Wireless Sensor Network

TinyOS

TinyOS is an application specific operating system specificallydesigned for sensor networks which provides a component basedprogramming model, provided by the nesC language.Each TinyOS component has a frame, a structure of privatevariables that can only be referenced by that component.Components have three computational abstractions: commands,events, and tasks.A command is typically a request to a component to perform someservice, such as initiating a sensor reading.An event signals the completion of that service. Events may alsobe signaled asynchronously, for example, due to hardwareinterrupts or message arrival.A task or a function is a set of code performing mathematicalcomputations with its own set of private variables using certaincommands of other components or Interfaces. The TinyOS taskscheduler uses a non preemptive, FIFO scheduling policy.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 36 / 63

Page 114: Security in Wireless Sensor Network

TinyOS

TinyOS is an application specific operating system specificallydesigned for sensor networks which provides a component basedprogramming model, provided by the nesC language.Each TinyOS component has a frame, a structure of privatevariables that can only be referenced by that component.Components have three computational abstractions: commands,events, and tasks.A command is typically a request to a component to perform someservice, such as initiating a sensor reading.An event signals the completion of that service. Events may alsobe signaled asynchronously, for example, due to hardwareinterrupts or message arrival.A task or a function is a set of code performing mathematicalcomputations with its own set of private variables using certaincommands of other components or Interfaces. The TinyOS taskscheduler uses a non preemptive, FIFO scheduling policy.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 36 / 63

Page 115: Security in Wireless Sensor Network

TinyOS

Important concepts that are expressed in nesC.1 nesC applications are built out of components with well defined,

bidirectional interfaces.2 nesC defines a concurrency model, based on tasks and hardware

event handlers, and detects data races at compile time.

A nesC application consists of one or more components linkedtogether to form an executable. A component provides and usesinterfaces.There are two types of components in nesC: modules andconfigurations.Modules provide application code, implementing one or moreinterface. Configurations are used to assemble other componentstogether, connecting interfaces used by components to interfacesprovided by others. This is called Wiring.nesC uses the filename extension .nc for all source files:interfaces, modules, and configurations.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 37 / 63

Page 116: Security in Wireless Sensor Network

TinyOS

Important concepts that are expressed in nesC.1 nesC applications are built out of components with well defined,

bidirectional interfaces.2 nesC defines a concurrency model, based on tasks and hardware

event handlers, and detects data races at compile time.

A nesC application consists of one or more components linkedtogether to form an executable. A component provides and usesinterfaces.There are two types of components in nesC: modules andconfigurations.Modules provide application code, implementing one or moreinterface. Configurations are used to assemble other componentstogether, connecting interfaces used by components to interfacesprovided by others. This is called Wiring.nesC uses the filename extension .nc for all source files:interfaces, modules, and configurations.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 37 / 63

Page 117: Security in Wireless Sensor Network

TinyOS

Important concepts that are expressed in nesC.1 nesC applications are built out of components with well defined,

bidirectional interfaces.2 nesC defines a concurrency model, based on tasks and hardware

event handlers, and detects data races at compile time.

A nesC application consists of one or more components linkedtogether to form an executable. A component provides and usesinterfaces.There are two types of components in nesC: modules andconfigurations.Modules provide application code, implementing one or moreinterface. Configurations are used to assemble other componentstogether, connecting interfaces used by components to interfacesprovided by others. This is called Wiring.nesC uses the filename extension .nc for all source files:interfaces, modules, and configurations.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 37 / 63

Page 118: Security in Wireless Sensor Network

TinyOS

Important concepts that are expressed in nesC.1 nesC applications are built out of components with well defined,

bidirectional interfaces.2 nesC defines a concurrency model, based on tasks and hardware

event handlers, and detects data races at compile time.

A nesC application consists of one or more components linkedtogether to form an executable. A component provides and usesinterfaces.There are two types of components in nesC: modules andconfigurations.Modules provide application code, implementing one or moreinterface. Configurations are used to assemble other componentstogether, connecting interfaces used by components to interfacesprovided by others. This is called Wiring.nesC uses the filename extension .nc for all source files:interfaces, modules, and configurations.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 37 / 63

Page 119: Security in Wireless Sensor Network

TinyOS

Important concepts that are expressed in nesC.1 nesC applications are built out of components with well defined,

bidirectional interfaces.2 nesC defines a concurrency model, based on tasks and hardware

event handlers, and detects data races at compile time.

A nesC application consists of one or more components linkedtogether to form an executable. A component provides and usesinterfaces.There are two types of components in nesC: modules andconfigurations.Modules provide application code, implementing one or moreinterface. Configurations are used to assemble other componentstogether, connecting interfaces used by components to interfacesprovided by others. This is called Wiring.nesC uses the filename extension .nc for all source files:interfaces, modules, and configurations.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 37 / 63

Page 120: Security in Wireless Sensor Network

TinyOS

Important concepts that are expressed in nesC.1 nesC applications are built out of components with well defined,

bidirectional interfaces.2 nesC defines a concurrency model, based on tasks and hardware

event handlers, and detects data races at compile time.

A nesC application consists of one or more components linkedtogether to form an executable. A component provides and usesinterfaces.There are two types of components in nesC: modules andconfigurations.Modules provide application code, implementing one or moreinterface. Configurations are used to assemble other componentstogether, connecting interfaces used by components to interfacesprovided by others. This is called Wiring.nesC uses the filename extension .nc for all source files:interfaces, modules, and configurations.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 37 / 63

Page 121: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 38 / 63

Page 122: Security in Wireless Sensor Network

TOSSIM or TinyOS Simulator

TOSSIM captures the behavior and interactions of networks ofthousands of TinyOS motes at network bit granularity.The TOSSIM architecture is composed of five parts:

1 support for compiling TinyOS component graphs into thesimulation infrastructure

2 a discrete event queue3 a small number of reimplemented TinyOS hardware abstraction

Implementation of a Key Distribution Scheme in a WirelessSensor Network using TOSSIM components

4 mechanisms for extensible radio and ADC models5 communication services for external programs to interact with a

simulation

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 39 / 63

Page 123: Security in Wireless Sensor Network

TOSSIM or TinyOS Simulator

TOSSIM captures the behavior and interactions of networks ofthousands of TinyOS motes at network bit granularity.The TOSSIM architecture is composed of five parts:

1 support for compiling TinyOS component graphs into thesimulation infrastructure

2 a discrete event queue3 a small number of reimplemented TinyOS hardware abstraction

Implementation of a Key Distribution Scheme in a WirelessSensor Network using TOSSIM components

4 mechanisms for extensible radio and ADC models5 communication services for external programs to interact with a

simulation

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 39 / 63

Page 124: Security in Wireless Sensor Network

TOSSIM or TinyOS Simulator

TOSSIM captures the behavior and interactions of networks ofthousands of TinyOS motes at network bit granularity.The TOSSIM architecture is composed of five parts:

1 support for compiling TinyOS component graphs into thesimulation infrastructure

2 a discrete event queue3 a small number of reimplemented TinyOS hardware abstraction

Implementation of a Key Distribution Scheme in a WirelessSensor Network using TOSSIM components

4 mechanisms for extensible radio and ADC models5 communication services for external programs to interact with a

simulation

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 39 / 63

Page 125: Security in Wireless Sensor Network

TOSSIM or TinyOS Simulator

Using TOSSIMThe applications kept in the apps folder are compiled using makepc command from the command line.On compiling a new file in the application folder with addressbuild/pc/main.exeTo execute the application we use the command DBG asDBG = [modes] build/pc/main.exe [no. of motes]

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 40 / 63

Page 126: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 41 / 63

Page 127: Security in Wireless Sensor Network

Installation of TinyOS and TOSSIM

Two directionsPort: make PC a supported platformTOSSIM in tinyos-1.xVirtualize: simulate one of the supported platformsTOSSIM in tinyos-2.x

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 42 / 63

Page 128: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 43 / 63

Page 129: Security in Wireless Sensor Network

Implementation of Key Distribution Scheme

TinyOS is an operating system specifically designed for sensornetworks. It as a component based programming model, provided bythe nesC language, a dialect of C. In TinyOS the computationalabstraction is main of three types: commands, events and tasks. Aprogram written TOSSIM comprises of several components which arelinked with each other with the help of interfaces which may or may bebidirectional. As per my aim I have to implement the Key DistributionScheme in wireless sensor network in TOSSIM.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 44 / 63

Page 130: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 45 / 63

Page 131: Security in Wireless Sensor Network

Program Design of Key Distribution Scheme

Program Design: As per a programmers point of view we divide thewhole process in five different segments and they are:

Generation of Key Ring from the Key Pool for each note: Inthis phase the Base Station will take a set of keys from a Key Poolrandomly and assign it to each note of the network. These set ofkeys is known as Key Ring for each note.Broadcasting HELLO message to all its neighbours: Thisphase mainly focuses on keeping an account of counting totalnumbers of neighbour for each note and store it locally. In thisphase each node will broadcast a small message (say HELLO) toits surrounding area, then all the nodes in its broadcasting areareceive this message. On receiving this message the keep anaccount that the source note is their neighbour.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 46 / 63

Page 132: Security in Wireless Sensor Network

Program Design of Key Distribution Scheme

Program Design: As per a programmers point of view we divide thewhole process in five different segments and they are:

Generation of Key Ring from the Key Pool for each note: Inthis phase the Base Station will take a set of keys from a Key Poolrandomly and assign it to each note of the network. These set ofkeys is known as Key Ring for each note.Broadcasting HELLO message to all its neighbours: Thisphase mainly focuses on keeping an account of counting totalnumbers of neighbour for each note and store it locally. In thisphase each node will broadcast a small message (say HELLO) toits surrounding area, then all the nodes in its broadcasting areareceive this message. On receiving this message the keep anaccount that the source note is their neighbour.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 46 / 63

Page 133: Security in Wireless Sensor Network

Program Design of Key Distribution Scheme

Program Design: As per a programmers point of view we divide thewhole process in five different segments and they are:

Generation of Key Ring from the Key Pool for each note: Inthis phase the Base Station will take a set of keys from a Key Poolrandomly and assign it to each note of the network. These set ofkeys is known as Key Ring for each note.Broadcasting HELLO message to all its neighbours: Thisphase mainly focuses on keeping an account of counting totalnumbers of neighbour for each note and store it locally. In thisphase each node will broadcast a small message (say HELLO) toits surrounding area, then all the nodes in its broadcasting areareceive this message. On receiving this message the keep anaccount that the source note is their neighbour.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 46 / 63

Page 134: Security in Wireless Sensor Network

Program Design of Key Distribution Scheme Cont..

Sending Key Ring to its entire neighbour: The Key Ring isdistributed to all the neighbours of the node. On receiving the KeyRing the receiving mote will compare its local Key Ring and if anykey is found to be similar is made as the secure link between thesource mote and the destination mote.Sending Accounts back to Base Station: Once all the securelinks are established between all possible mote pairs then theaccount of total number links and total number of secure links issend back to the Base Station by each mote.Processing Accounts received by Source: After all theaccounts are received from each mote the source sum of all theedges and the secure links to find the percentage of secure link inthe wireless network.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 47 / 63

Page 135: Security in Wireless Sensor Network

Program Design of Key Distribution Scheme Cont..

Sending Key Ring to its entire neighbour: The Key Ring isdistributed to all the neighbours of the node. On receiving the KeyRing the receiving mote will compare its local Key Ring and if anykey is found to be similar is made as the secure link between thesource mote and the destination mote.Sending Accounts back to Base Station: Once all the securelinks are established between all possible mote pairs then theaccount of total number links and total number of secure links issend back to the Base Station by each mote.Processing Accounts received by Source: After all theaccounts are received from each mote the source sum of all theedges and the secure links to find the percentage of secure link inthe wireless network.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 47 / 63

Page 136: Security in Wireless Sensor Network

Program Design of Key Distribution Scheme Cont..

Sending Key Ring to its entire neighbour: The Key Ring isdistributed to all the neighbours of the node. On receiving the KeyRing the receiving mote will compare its local Key Ring and if anykey is found to be similar is made as the secure link between thesource mote and the destination mote.Sending Accounts back to Base Station: Once all the securelinks are established between all possible mote pairs then theaccount of total number links and total number of secure links issend back to the Base Station by each mote.Processing Accounts received by Source: After all theaccounts are received from each mote the source sum of all theedges and the secure links to find the percentage of secure link inthe wireless network.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 47 / 63

Page 137: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 48 / 63

Page 138: Security in Wireless Sensor Network

Configuration Design of Key Distribution Scheme

The components used are:MainMyAppMMLCGGenericCommRandomMLCGLedsCSimpleTimer

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 49 / 63

Page 139: Security in Wireless Sensor Network

Configuration Design of Key Distribution Scheme

Here MLCG refers to the pseudo random generation algorithmMultplicative Linear Congruential Generator which is used in theapplication to generate the random number. The interface wiring thecomponents as:Main.StdControl -> SimpleTime.StdControl;

Main.StdControl -> MyAppMMLCG.StdControl;Main.StdControl -> Comm.Control;MyAppMMLCG.SendMsg -> Comm.SendMsg[AMRANDMSG];MyAppMMLCG.ReceiveMsg -> Comm.ReceiveMsg[AMRANDMSG];MyAppMMLCG.Random -> RandomMLCG.Random;MyAppMMLCG.Timer -> SimpleTime.Timer[unique(Timer)];MyAppMMLCG.Leds -> LedsC;Each interface used by the application are having certain commandsand events which are used in the application.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 50 / 63

Page 140: Security in Wireless Sensor Network

Configuration Design of Key Distribution Scheme

Here MLCG refers to the pseudo random generation algorithmMultplicative Linear Congruential Generator which is used in theapplication to generate the random number. The interface wiring thecomponents as:Main.StdControl -> SimpleTime.StdControl;

Main.StdControl -> MyAppMMLCG.StdControl;Main.StdControl -> Comm.Control;MyAppMMLCG.SendMsg -> Comm.SendMsg[AMRANDMSG];MyAppMMLCG.ReceiveMsg -> Comm.ReceiveMsg[AMRANDMSG];MyAppMMLCG.Random -> RandomMLCG.Random;MyAppMMLCG.Timer -> SimpleTime.Timer[unique(Timer)];MyAppMMLCG.Leds -> LedsC;Each interface used by the application are having certain commandsand events which are used in the application.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 50 / 63

Page 141: Security in Wireless Sensor Network

Configuration Design of Key Distribution Scheme

Here MLCG refers to the pseudo random generation algorithmMultplicative Linear Congruential Generator which is used in theapplication to generate the random number. The interface wiring thecomponents as:Main.StdControl -> SimpleTime.StdControl;

Main.StdControl -> MyAppMMLCG.StdControl;Main.StdControl -> Comm.Control;MyAppMMLCG.SendMsg -> Comm.SendMsg[AMRANDMSG];MyAppMMLCG.ReceiveMsg -> Comm.ReceiveMsg[AMRANDMSG];MyAppMMLCG.Random -> RandomMLCG.Random;MyAppMMLCG.Timer -> SimpleTime.Timer[unique(Timer)];MyAppMMLCG.Leds -> LedsC;Each interface used by the application are having certain commandsand events which are used in the application.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 50 / 63

Page 142: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 51 / 63

Page 143: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme

The interface uses certain commands and events which are defined inthe module body of application (i.e. MyAppMMLCG.nc). The interfacethat the module provides is StdControl while it uses SendMsg,ReceiveMsg, Timer and Leds to their respective interface providers.The commands defined in the modules and their works are:

StdControl.init: The init command is used by the application toinitialize various local variables, data structures and seed valuerequired by the Random interface. The commands are called atleast once in all application that provides the StdControl interfacewhich is the indication that the application is loaded in the physicalmemory.StdControl.start: The start command is used to start the timerinterface with the value of the clock pulse in virtual secondsconsidering 1/1024th of a real second to be 1 virtual second. Herewe have used 100 which specify that the Timer.fired event iscalled after every 100 ms. The parameter TIMER REPEATspecifies of repeated firing.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 52 / 63

Page 144: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme

The interface uses certain commands and events which are defined inthe module body of application (i.e. MyAppMMLCG.nc). The interfacethat the module provides is StdControl while it uses SendMsg,ReceiveMsg, Timer and Leds to their respective interface providers.The commands defined in the modules and their works are:

StdControl.init: The init command is used by the application toinitialize various local variables, data structures and seed valuerequired by the Random interface. The commands are called atleast once in all application that provides the StdControl interfacewhich is the indication that the application is loaded in the physicalmemory.StdControl.start: The start command is used to start the timerinterface with the value of the clock pulse in virtual secondsconsidering 1/1024th of a real second to be 1 virtual second. Herewe have used 100 which specify that the Timer.fired event iscalled after every 100 ms. The parameter TIMER REPEATspecifies of repeated firing.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 52 / 63

Page 145: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme

The interface uses certain commands and events which are defined inthe module body of application (i.e. MyAppMMLCG.nc). The interfacethat the module provides is StdControl while it uses SendMsg,ReceiveMsg, Timer and Leds to their respective interface providers.The commands defined in the modules and their works are:

StdControl.init: The init command is used by the application toinitialize various local variables, data structures and seed valuerequired by the Random interface. The commands are called atleast once in all application that provides the StdControl interfacewhich is the indication that the application is loaded in the physicalmemory.StdControl.start: The start command is used to start the timerinterface with the value of the clock pulse in virtual secondsconsidering 1/1024th of a real second to be 1 virtual second. Herewe have used 100 which specify that the Timer.fired event iscalled after every 100 ms. The parameter TIMER REPEATspecifies of repeated firing.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 52 / 63

Page 146: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

StdControl.stop: The stop command is simply used to stop theTimer interface as well as the StdControl also.There are two events used by the applications and they are as:SendMsg.sendDone: The sendDone event occurs after amessage is successfully send from a given node and as anindication it turns off the red led. The event has two parameter oftype msg (of type TOSMsgPtr) and success(of type resultt) whileretruns resultt variable. The first parameter holds the address ofthe message buffer send while the second one just contains annumeric value.ReceiveMsg.receive: The receive event occurs whenever anymessage is received by any mode. The event takes a pointer asparameter of type TOSMsgPtr which points to the memory blockwhich contains the received message. After receiving themessage the message is checked for which purpose has it arrivedand then the corresponding task is posted.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 53 / 63

Page 147: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

StdControl.stop: The stop command is simply used to stop theTimer interface as well as the StdControl also.There are two events used by the applications and they are as:SendMsg.sendDone: The sendDone event occurs after amessage is successfully send from a given node and as anindication it turns off the red led. The event has two parameter oftype msg (of type TOSMsgPtr) and success(of type resultt) whileretruns resultt variable. The first parameter holds the address ofthe message buffer send while the second one just contains annumeric value.ReceiveMsg.receive: The receive event occurs whenever anymessage is received by any mode. The event takes a pointer asparameter of type TOSMsgPtr which points to the memory blockwhich contains the received message. After receiving themessage the message is checked for which purpose has it arrivedand then the corresponding task is posted.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 53 / 63

Page 148: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

StdControl.stop: The stop command is simply used to stop theTimer interface as well as the StdControl also.There are two events used by the applications and they are as:SendMsg.sendDone: The sendDone event occurs after amessage is successfully send from a given node and as anindication it turns off the red led. The event has two parameter oftype msg (of type TOSMsgPtr) and success(of type resultt) whileretruns resultt variable. The first parameter holds the address ofthe message buffer send while the second one just contains annumeric value.ReceiveMsg.receive: The receive event occurs whenever anymessage is received by any mode. The event takes a pointer asparameter of type TOSMsgPtr which points to the memory blockwhich contains the received message. After receiving themessage the message is checked for which purpose has it arrivedand then the corresponding task is posted.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 53 / 63

Page 149: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

StdControl.stop: The stop command is simply used to stop theTimer interface as well as the StdControl also.There are two events used by the applications and they are as:SendMsg.sendDone: The sendDone event occurs after amessage is successfully send from a given node and as anindication it turns off the red led. The event has two parameter oftype msg (of type TOSMsgPtr) and success(of type resultt) whileretruns resultt variable. The first parameter holds the address ofthe message buffer send while the second one just contains annumeric value.ReceiveMsg.receive: The receive event occurs whenever anymessage is received by any mode. The event takes a pointer asparameter of type TOSMsgPtr which points to the memory blockwhich contains the received message. After receiving themessage the message is checked for which purpose has it arrivedand then the corresponding task is posted.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 53 / 63

Page 150: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

Timer.fired: The fired event occurs whenever the clock cycle ofthe Timer interface expires. The event increments a counter afterevery firing and on the value of the counter as well as the localaddress different tasks are posted which are used for sendingmessages from different motes for different purpose.

The module uses various purpose defining constants which is used tofill the purpose field of the message structure used in the application:define KEYDISTRIBUTION 1define HELLO 2define KEYRING 3define NEIGHBOR 4define SECURELINK 5

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 54 / 63

Page 151: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

Timer.fired: The fired event occurs whenever the clock cycle ofthe Timer interface expires. The event increments a counter afterevery firing and on the value of the counter as well as the localaddress different tasks are posted which are used for sendingmessages from different motes for different purpose.

The module uses various purpose defining constants which is used tofill the purpose field of the message structure used in the application:define KEYDISTRIBUTION 1define HELLO 2define KEYRING 3define NEIGHBOR 4define SECURELINK 5

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 54 / 63

Page 152: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

The message structure used in GenericComm component is of typeTOSMsg. The data part of the structure is designed with the structuredefined in module known as FPSrand. The variables of this structureare moteid, purpose and keyring. The first variable is used to store thesource mote id, the second one is used to store the purpose for whichthe message is sent while the last one is used for storing the data tobe sent. There are several tasks that are used for the module. Theyare as:

sendfromsource: The sendfromsource task is used to send thekey ring from a pool of keys. The source for the task is the Basestation while the destination addresses are the motes. Thepurpose value is KEYDISTRIBUTION.sendtoall: The sendtoall task is used to broadcast a smallmessage to its surrounding to know who the motes that are itsneighbor. The sources for the task are the motes while thedestination is also motes. The pupose value is HELLO.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 55 / 63

Page 153: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

The message structure used in GenericComm component is of typeTOSMsg. The data part of the structure is designed with the structuredefined in module known as FPSrand. The variables of this structureare moteid, purpose and keyring. The first variable is used to store thesource mote id, the second one is used to store the purpose for whichthe message is sent while the last one is used for storing the data tobe sent. There are several tasks that are used for the module. Theyare as:

sendfromsource: The sendfromsource task is used to send thekey ring from a pool of keys. The source for the task is the Basestation while the destination addresses are the motes. Thepurpose value is KEYDISTRIBUTION.sendtoall: The sendtoall task is used to broadcast a smallmessage to its surrounding to know who the motes that are itsneighbor. The sources for the task are the motes while thedestination is also motes. The pupose value is HELLO.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 55 / 63

Page 154: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

The message structure used in GenericComm component is of typeTOSMsg. The data part of the structure is designed with the structuredefined in module known as FPSrand. The variables of this structureare moteid, purpose and keyring. The first variable is used to store thesource mote id, the second one is used to store the purpose for whichthe message is sent while the last one is used for storing the data tobe sent. There are several tasks that are used for the module. Theyare as:

sendfromsource: The sendfromsource task is used to send thekey ring from a pool of keys. The source for the task is the Basestation while the destination addresses are the motes. Thepurpose value is KEYDISTRIBUTION.sendtoall: The sendtoall task is used to broadcast a smallmessage to its surrounding to know who the motes that are itsneighbor. The sources for the task are the motes while thedestination is also motes. The pupose value is HELLO.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 55 / 63

Page 155: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

sendtoneighbor: The sendtoneighbor task is used to send thekey ring of the source mote to its entire neighbour where it is usedto find the secure link between them. The source for the task isthe motes while destination are the motes. The purpose value isKEYRING.sendtosourceneighbor: The sendtosourceneighbor is used tosend the numbers of neighbour each mote has back to the BaseStation. The purpose value is NEIGHBOR.sendtosourcelink: The sendtosourcelink is used to send thenumbers of secure links each mote has back to the Base Station.The purpose value is SECURELINK.receivefromsource: The task receivefromsource is posted whenthe received message has purpose value as KEYDISTRIBUTIONand it is used to extract the key ring from the received messagesend from the Base Station to the local address of the mote.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 56 / 63

Page 156: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

sendtoneighbor: The sendtoneighbor task is used to send thekey ring of the source mote to its entire neighbour where it is usedto find the secure link between them. The source for the task isthe motes while destination are the motes. The purpose value isKEYRING.sendtosourceneighbor: The sendtosourceneighbor is used tosend the numbers of neighbour each mote has back to the BaseStation. The purpose value is NEIGHBOR.sendtosourcelink: The sendtosourcelink is used to send thenumbers of secure links each mote has back to the Base Station.The purpose value is SECURELINK.receivefromsource: The task receivefromsource is posted whenthe received message has purpose value as KEYDISTRIBUTIONand it is used to extract the key ring from the received messagesend from the Base Station to the local address of the mote.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 56 / 63

Page 157: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

sendtoneighbor: The sendtoneighbor task is used to send thekey ring of the source mote to its entire neighbour where it is usedto find the secure link between them. The source for the task isthe motes while destination are the motes. The purpose value isKEYRING.sendtosourceneighbor: The sendtosourceneighbor is used tosend the numbers of neighbour each mote has back to the BaseStation. The purpose value is NEIGHBOR.sendtosourcelink: The sendtosourcelink is used to send thenumbers of secure links each mote has back to the Base Station.The purpose value is SECURELINK.receivefromsource: The task receivefromsource is posted whenthe received message has purpose value as KEYDISTRIBUTIONand it is used to extract the key ring from the received messagesend from the Base Station to the local address of the mote.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 56 / 63

Page 158: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

sendtoneighbor: The sendtoneighbor task is used to send thekey ring of the source mote to its entire neighbour where it is usedto find the secure link between them. The source for the task isthe motes while destination are the motes. The purpose value isKEYRING.sendtosourceneighbor: The sendtosourceneighbor is used tosend the numbers of neighbour each mote has back to the BaseStation. The purpose value is NEIGHBOR.sendtosourcelink: The sendtosourcelink is used to send thenumbers of secure links each mote has back to the Base Station.The purpose value is SECURELINK.receivefromsource: The task receivefromsource is posted whenthe received message has purpose value as KEYDISTRIBUTIONand it is used to extract the key ring from the received messagesend from the Base Station to the local address of the mote.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 56 / 63

Page 159: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

receivefromall: The receivefromall is posted when the motereceives the small broadcast message from a mote from a nearbymote. On receiving the senders address it add them into itsneighbour list in its local address.receivefromneighbor: The receivefromneighbor task is postedwhen the key ring is received from the neighbouring motes. Thetask compares the received key ring from itâs own and wheneverthere is any common key between them then it becomes a securelink between them.receivebysourceneighbor: The receivebysourceneighbor task isonly posted in the Base Station of the network which receives thenumber of neighbor of each mote and keeps the account of totalnumber of edges.receivebysourcelink: The receivebysourcelink task is onlyposted in the Base Station of the network which receives thenumber of secure link for each mote and keeps the account oftotal number of secure links.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 57 / 63

Page 160: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

receivefromall: The receivefromall is posted when the motereceives the small broadcast message from a mote from a nearbymote. On receiving the senders address it add them into itsneighbour list in its local address.receivefromneighbor: The receivefromneighbor task is postedwhen the key ring is received from the neighbouring motes. Thetask compares the received key ring from itâs own and wheneverthere is any common key between them then it becomes a securelink between them.receivebysourceneighbor: The receivebysourceneighbor task isonly posted in the Base Station of the network which receives thenumber of neighbor of each mote and keeps the account of totalnumber of edges.receivebysourcelink: The receivebysourcelink task is onlyposted in the Base Station of the network which receives thenumber of secure link for each mote and keeps the account oftotal number of secure links.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 57 / 63

Page 161: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

receivefromall: The receivefromall is posted when the motereceives the small broadcast message from a mote from a nearbymote. On receiving the senders address it add them into itsneighbour list in its local address.receivefromneighbor: The receivefromneighbor task is postedwhen the key ring is received from the neighbouring motes. Thetask compares the received key ring from itâs own and wheneverthere is any common key between them then it becomes a securelink between them.receivebysourceneighbor: The receivebysourceneighbor task isonly posted in the Base Station of the network which receives thenumber of neighbor of each mote and keeps the account of totalnumber of edges.receivebysourcelink: The receivebysourcelink task is onlyposted in the Base Station of the network which receives thenumber of secure link for each mote and keeps the account oftotal number of secure links.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 57 / 63

Page 162: Security in Wireless Sensor Network

Module Design of Key Distribution Scheme Cont..

receivefromall: The receivefromall is posted when the motereceives the small broadcast message from a mote from a nearbymote. On receiving the senders address it add them into itsneighbour list in its local address.receivefromneighbor: The receivefromneighbor task is postedwhen the key ring is received from the neighbouring motes. Thetask compares the received key ring from itâs own and wheneverthere is any common key between them then it becomes a securelink between them.receivebysourceneighbor: The receivebysourceneighbor task isonly posted in the Base Station of the network which receives thenumber of neighbor of each mote and keeps the account of totalnumber of edges.receivebysourcelink: The receivebysourcelink task is onlyposted in the Base Station of the network which receives thenumber of secure link for each mote and keeps the account oftotal number of secure links.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 57 / 63

Page 163: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 58 / 63

Page 164: Security in Wireless Sensor Network

Output and Simulation Result of Key DistributionScheme

Output:User Type User Mode(DBG) Expected OutputEnd User usr 2 No. of edges, secure link

Super User usr 1 Also received dataSimulation Result:

Simulation Parameters: The Simulation Parameters on which theprograms are tested are as follows:

Distance Scaling Factor : 1Complete neighbour graphField Width(cm): 2000Field Height(cm): 2000Maximum Distance(cm): 300Maximum error(cm): 30Initial Delay(ms): 0

Methodology: On displaying the output of the application we findthat there are lines as (for seed value: 254 and key ring size: 10 )

0: The number of edges:360: The number of secure links:11

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 59 / 63

Page 165: Security in Wireless Sensor Network

Output and Simulation Result of Key DistributionScheme

Output:User Type User Mode(DBG) Expected OutputEnd User usr 2 No. of edges, secure link

Super User usr 1 Also received dataSimulation Result:

Simulation Parameters: The Simulation Parameters on which theprograms are tested are as follows:

Distance Scaling Factor : 1Complete neighbour graphField Width(cm): 2000Field Height(cm): 2000Maximum Distance(cm): 300Maximum error(cm): 30Initial Delay(ms): 0

Methodology: On displaying the output of the application we findthat there are lines as (for seed value: 254 and key ring size: 10 )

0: The number of edges:360: The number of secure links:11

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 59 / 63

Page 166: Security in Wireless Sensor Network

Output and Simulation Result of Key DistributionScheme

Output:User Type User Mode(DBG) Expected OutputEnd User usr 2 No. of edges, secure link

Super User usr 1 Also received dataSimulation Result:

Simulation Parameters: The Simulation Parameters on which theprograms are tested are as follows:

Distance Scaling Factor : 1Complete neighbour graphField Width(cm): 2000Field Height(cm): 2000Maximum Distance(cm): 300Maximum error(cm): 30Initial Delay(ms): 0

Methodology: On displaying the output of the application we findthat there are lines as (for seed value: 254 and key ring size: 10 )

0: The number of edges:360: The number of secure links:11

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 59 / 63

Page 167: Security in Wireless Sensor Network

Output and Simulation Result of Key DistributionScheme

Output:User Type User Mode(DBG) Expected OutputEnd User usr 2 No. of edges, secure link

Super User usr 1 Also received dataSimulation Result:

Simulation Parameters: The Simulation Parameters on which theprograms are tested are as follows:

Distance Scaling Factor : 1Complete neighbour graphField Width(cm): 2000Field Height(cm): 2000Maximum Distance(cm): 300Maximum error(cm): 30Initial Delay(ms): 0

Methodology: On displaying the output of the application we findthat there are lines as (for seed value: 254 and key ring size: 10 )

0: The number of edges:360: The number of secure links:11

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 59 / 63

Page 168: Security in Wireless Sensor Network

Output and Simulation Result of Key DistributionScheme

Output:User Type User Mode(DBG) Expected OutputEnd User usr 2 No. of edges, secure link

Super User usr 1 Also received dataSimulation Result:

Simulation Parameters: The Simulation Parameters on which theprograms are tested are as follows:

Distance Scaling Factor : 1Complete neighbour graphField Width(cm): 2000Field Height(cm): 2000Maximum Distance(cm): 300Maximum error(cm): 30Initial Delay(ms): 0

Methodology: On displaying the output of the application we findthat there are lines as (for seed value: 254 and key ring size: 10 )

0: The number of edges:360: The number of secure links:11

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 59 / 63

Page 169: Security in Wireless Sensor Network

Output and Simulation Result of Key DistributionScheme Cont..

The first lines states the number of total edges in the graph while thesecond line states the number of secured links in that graph.The Network Connectivity of the graph is calculated as:Network Connectivity= (number of secure links/number of edges)*100

Simulation Result:Result for Network Connectivity Graph:

Nodes Key Pool Size Key Ring Size Network Connectivity10 256 10 32.7810 256 15 61.1110 256 20 80.20

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 60 / 63

Page 170: Security in Wireless Sensor Network

Output and Simulation Result of Key DistributionScheme Cont..

The first lines states the number of total edges in the graph while thesecond line states the number of secured links in that graph.The Network Connectivity of the graph is calculated as:Network Connectivity= (number of secure links/number of edges)*100

Simulation Result:Result for Network Connectivity Graph:

Nodes Key Pool Size Key Ring Size Network Connectivity10 256 10 32.7810 256 15 61.1110 256 20 80.20

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 60 / 63

Page 171: Security in Wireless Sensor Network

1 Introduction2 Wireless Sensor Network

ApplicationsFactorsArchitechture

3 Key Management Scheme for DSNBootstrapping ProtocolSingle Network Wide Key DistributionRandom Key Distribution

4 TinyOSTOSSIMInstallation

5 ImplementationProgram DesignConfiguration DesignModule DesignOutput and Simulation Result

6 ConclusionFasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 61 / 63

Page 172: Security in Wireless Sensor Network

Conclusion

With the uses deployment knowledge, each node only needs tocarry a fraction of the keys required by the other key predistribution schemes while achieving the same level ofconnectivity.After working on TOSSIM 1.1.0 we found that whenever we dealwith large number of motes and when we want perform our activitytotally on software then there occurs an initial delay for each moteto get deployed in the field. Thus we must synchronize the moteson the basis of the real time scenarios.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 62 / 63

Page 173: Security in Wireless Sensor Network

Conclusion

With the uses deployment knowledge, each node only needs tocarry a fraction of the keys required by the other key predistribution schemes while achieving the same level ofconnectivity.After working on TOSSIM 1.1.0 we found that whenever we dealwith large number of motes and when we want perform our activitytotally on software then there occurs an initial delay for each moteto get deployed in the field. Thus we must synchronize the moteson the basis of the real time scenarios.

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 62 / 63

Page 174: Security in Wireless Sensor Network

[WSN, 2001] I.F. Akyildiz, W. Su , Y. Sankarasubramaniam, E.CayirciWireless Sensor Networks: A Survey,20 December 2001

[EG Scheme, 2002] Laurent Eschenauer Virgil D. GligorA Key Management Scheme for Distributed Sensor Networks,9th ACM CCS, pp.41 47, Nov. 2002.

[Tiny OS, 2003] Philip Levis , Nelson Lee , Matt Welsh , and DavidCullerTOSSIM: Accurate and Scalable Simulation of Entire TinyOSApplicationsSING, 2003

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 63 / 63

Page 175: Security in Wireless Sensor Network

Thank You

Fasih Ahmad Fakhri (HIT Haldia) Security in Wireless Sensor Network November, 2011 63 / 63