33
Aggregation and Secure Aggregation

Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Embed Size (px)

DESCRIPTION

Prerequisites Module 7 Basic concepts of computer networks Basic concepts of network security

Citation preview

Page 1: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Aggregation and Secure Aggregation

Page 2: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Learning Objectives

• Understand why we need aggregation in WSNs

• Understand aggregation protocols in WSNs• Understand secure aggregation protocols in

WSNs

Page 3: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Prerequisites

• Module 7• Basic concepts of computer networks• Basic concepts of network security

Page 4: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

[Aggre_1] Section 1 4

Why do we need Aggregation?• Sensor networks – Event-based Systems• Example Query:

– What is the maximum temperature in area A between 10am and 11am?– Redundancy in the event data

• Individual sensor readings are of limit use• Forwarding raw information too expensive

– Scarce energy– Scarce bandwidth

• Solution– Combine the data coming from different sources

• Eliminate redundancy• Minimize the number of transmissions

• Aggregation: Summary

Page 5: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

What is Aggregation?

I

C D

B

E

HA

F

G

Base Station

JK L M

NWireless Sensor Node

Data Transmission

Legend

v1 v2

v3

vi Sensor Measurement

f(v1, v2, v3)

Page 6: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

One Example of Aggregation - Count

• Example: consider a query that counts the number of motes in a network of indeterminate size

Page 7: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

adopted from slides from S. Madden

7

2

1

3

4

5

Scenario: Count

Goal: Count the number of nodes in the network.

Number of children is unknown.

1 2 3 4 5- - - - -

- - - - -

- - - - -

- - - - -

- - - - -

- - - - -

- - - - -

Sensor #

Time

Page 8: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

2

1

3

Scenario: Count

Goal: Count the number of nodes in the network.

Number of children is unknown.

1 2 3 4 51 - - - -

- - - - -

- - - - -

- - - - -

- - - - -

- - - - -

- - - - -

Sensor #

Time

Page 9: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

2

1

3

4

Scenario: Count

Goal: Count the number of nodes in the network.

Number of children is unknown.

1 2 3 4 51 - - - -

1 1 1 - -

1 + 2 1 1 - -

- - - - -

- - - - -

- - - - -

- - - - -

Sensor #

Time

Page 10: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

2

1

3

4

5

Scenario: Count

Goal: Count the number of nodes in the network.

Number of children is unknown.

1 2 3 4 51 - - - -

1 1 1 - -

1 + 2 1 1 1 -

1 + 2 1 + ½

1 + ½

1 -

- - - - -

- - - - -

- - - - -

Sensor #

Time

Page 11: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

2

1

3

4

5

Scenario: Count

Goal: Count the number of nodes in the network.

Number of children is unknown.

1 2 3 4 51 - - - -

1 1 1 - -

1 + 2 1 1 1 -

1 + 2 1 + ½

1 + ½

1 1

1+3 1+ ½ 1+ ½ 1+1 1

- - - - -

- - - - -

Sensor #

Time

Page 12: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

2

1

3

4

5

Scenario: Count

Goal: Count the number of nodes in the network.

Number of children is unknown.

1 2 3 4 51 - - - -

1 1 1 - -

1 + 2 1 1 1 -

1 + 2 1 + ½

1 + ½

1 1

1+3 1+ ½ 1+ ½ 1+1 1

1+3 1+2/2

1+2/2

1+1 1

- - - - -

Sensor #

Time

Page 13: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

2

1

3

4

5

Scenario: Count

Goal: Count the number of nodes in the network.

Number of children is unknown.

1 2 3 4 51 - - - -

1 1 1 - -

1 + 2 1 1 1 -

1 + 2 1 + ½

1 + ½

1 1

1+3 1+ ½ 1+ ½ 1+1 1

1+3 1+2/2

1+2/2

1+1 1

1+4 1+2/2

1+2/2

1+1 1

Sensor #

Time

Page 14: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Count Example – A Better Scheme

• Each leaf node in the tree reports a count of 1 to their parents

• Interior nodes sum the count of their children, add 1 to it, and report that value to their parent

Page 15: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Data Aggregation Process

• Sensor nodes are organized into a tree hierarchy rooted at the Base Station

• Non-leaf nodes act as the aggregators

Page 16: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Example Aggregation

• Max, Min• Count, Sum• Average• Median

Page 17: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Tiny Aggregation

• Distribution phase– Aggregate queries are pushed down into the

network• Collection phase

– Aggregate values are continuously routed up from children to parents

Page 18: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Energy Consumption

Time v. Current Draw During Query Processing

0

5

10

15

20

0 0.5 1 1.5 2 2.5 3Time (s)

Cur

rent

(mA

) Snoozing

Processing

Processingand Listening

Transmitting

Page 19: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Declarative Queries for Sensor Networks

• Examples:SELECT nodeid, lightFROM sensorsWHERE light > 400EPOCH DURATION 1s

1 EpochEpoch NodeidNodeid LightLight TempTemp AccelAccel SoundSound

0 1 455 x x x

0 2 389 x x x

1 1 422 x x x

1 2 405 x x x

Sensors

•Time is partitioned into epochs of duration iA single aggregate value is produced to combine the readings of all devices during the epoch

Page 20: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Aggregation Queries

SELECT roomNo, AVG(sound)FROM sensorsGROUP BY roomNoHAVING AVG(sound) > 200EPOCH DURATION 10s

Rooms w/ sound > 200

3

2SELECT AVG(sound)FROM sensorsEPOCH DURATION 10s

Epoch AVG(sound)0 4401 445

Epoch roomNo AVG(sound)0 1 3600 2 5201 1 3701 2 520

Page 21: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Section 4.1 of TAG

Illustration: Aggregation

1 2 3 4 5

1 1

2

3

4

1

1

2 3

4

51

Sensor #

Slot

#

Slot 1SELECT COUNT(*) FROM sensors

Page 22: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Illustration: Aggregation

1 2 3 4 5

1 1

2 2

3

4

1

1

2 3

4

5

2

Sensor #

Slot

#

Slot 2SELECT COUNT(*) FROM sensors

Page 23: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Illustration: Aggregation

1 2 3 4 5

1 1

2 2

3 1 3

4

1

1

2 3

4

5

31

Sensor #

Slot

#

Slot 3SELECT COUNT(*) FROM sensors

Page 24: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Illustration: Aggregation

1 2 3 4 5

1 1

2 2

3 1 3

4 5

1

1

2 3

4

5

5Sensor #

Slot

#

Slot 4SELECT COUNT(*) FROM sensors

Page 25: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Illustration: Aggregation

1 2 3 4 5

1 1

2 2

3 1 3

4 5

1 1

1

2 3

4

51

Sensor #

Slot

#

Slot 1SELECT COUNT(*) FROM sensors

Page 26: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Flow Up the tree during an epoch

How parents choose the duration of the interval in which they will receive values?

Page 27: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Section 7.1 of [Aggre_1]

Topology Maintenance and Recovery

• How to address the unreliable nature of WSNs in TAG?– Each node maintains a fixed size of its neighbors –

Select a better parent node– If a node does not hear from its parent for some

time, it assumes that its parent has failed

Page 28: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Secure Aggregation

Page 29: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Secure Aggregation

• It is challenging to design suitable security mechanisms for Wireless Sensor Networks (WSNs)– Stringent resource constraints on energy,

processing power, memory, bandwidth, etc.• WSNs need lightweight secure mechanisms• We introduce an LCG-based secure

aggregation scheme– Efficiency and simplicity

Page 30: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Security Goals

• Security Goals– Confidentiality

• Sensor data/readings cannot be disclosed to attackers– Integrity

• If an adversary modifies a data message, the receiver should be able to detect this tampering

– Authenticity• Ensures that data messages come from the intended sender

• Assumptions– The existence of a key management scheme– WSN nodes can negotiate the key and trust setup

Page 31: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

LCG-based Security Protocols• Basic Hop by Hop Message Transmission

• Notations– A, B, C…: Sensor Nodes– E(P, K): Encryption of plaintext

message P using key K– P1|P2: Concatenation of message

P1 and P2

– MAC(K, P): Message Authentication Code (MAC) of message P using key K

– X0: seed of the LCG– a, b, m: Parameters of the LCG

DBE

HA

F

G

I

Base Station

J

C

E(PA | MAC(PA, KAH), KAH)

E(PB | MAC(PB, KBH), KBH)

E(AggrH | MAC(AggrH, KHJ), KHJ)

E(PB | MAC(PB, KCH), KCH)

E(PB | MAC(PB, KDH), KDH)

Page 32: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Integrity and Authenticity

• CBC: Cipher Block Chaining

Page 33: Aggregation and Secure Aggregation. Learning Objectives Understand why we need aggregation in WSNs Understand aggregation protocols in WSNs Understand

Assignment

• 1. Why do we need aggregation in wireless sensor networks?

• 2. What is the basic idea of TAG?• 3. What is the basic idea of LCG-based secure

aggregation in wireless sensor networks?