Constructing Mid-points for Two party Asynchronous Protocols Petar - - PowerPoint PPT Presentation

constructing mid points for two party asynchronous
SMART_READER_LITE
LIVE PREVIEW

Constructing Mid-points for Two party Asynchronous Protocols Petar - - PowerPoint PPT Presentation

Constructing Mid-points for Two party Asynchronous Protocols Petar Tsankov, Mohammad Torabi Dashti, David Basin ETH Z urich OPODIS11 December 16, 2011 Context, motivation, goals Protocols, end-points, mid-points December 16, 2011


slide-1
SLIDE 1

Constructing Mid-points for Two party Asynchronous Protocols

Petar Tsankov, Mohammad Torabi Dashti, David Basin ETH Z¨ urich OPODIS’11 December 16, 2011

slide-2
SLIDE 2

Protocols, end-points, mid-points

Context, motivation, goals

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 2

slide-3
SLIDE 3

Protocols, end-points, mid-points

Context, motivation, goals

Mid-point End-point End-point

Mid-points:

  • relay, redirect, filter communication

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 2

slide-4
SLIDE 4

Protocols, end-points, mid-points

Context, motivation, goals

Mid-point End-point End-point

Mid-points:

  • relay, redirect, filter communication
  • can enforce a protocol (e.g. stateful firewalls)

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 2

slide-5
SLIDE 5

How to implement a mid-point?

Context, motivation, goals

Mid-point End-point End-point

We need a specification!

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 3

slide-6
SLIDE 6

How to implement a mid-point?

Context, motivation, goals

Mid-point End-point End-point

We need a specification! Protocols specifications:

  • specify the end-points’ behavior
  • do not specify the mid-point’s behavior

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 3

slide-7
SLIDE 7

How to implement a mid-point?

Context, motivation, goals

Mid-point End-point End-point

We need a specification! Protocols specifications:

  • specify the end-points’ behavior
  • do not specify the mid-point’s behavior

The problem

How do we implement a system, when we don’t know what it should do?

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 3

slide-8
SLIDE 8

Why mid-point specifications?

Context, motivation, goals

Mid-points are often incorrectly implemented 1:

QUALITY CONTROL

REJECTED

  • Checkpoint, netfilter/iptables, ISA Server

1Case study by D. Bidder-Senn, D. Basin, G. Caronni. “Midpoints versus

endpoints: From protocols to firewalls”

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 4

slide-9
SLIDE 9

Why mid-point specifications?

Context, motivation, goals

Mid-points are often incorrectly implemented 1:

QUALITY CONTROL

REJECTED

  • Checkpoint, netfilter/iptables, ISA Server

Mid-point specifications are useful for:

  • Model-driven development
  • Code inspection
  • Model-based testing

1Case study by D. Bidder-Senn, D. Basin, G. Caronni. “Midpoints versus

endpoints: From protocols to firewalls”

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 4

slide-10
SLIDE 10

Why mid-point specifications?

Context, motivation, goals

Mid-points are often incorrectly implemented 1:

QUALITY CONTROL

REJECTED

  • Checkpoint, netfilter/iptables, ISA Server

Mid-point specifications are useful for:

  • Model-driven development
  • Code inspection
  • Model-based testing

. . . they are a good starting point to implement a mid-point

1Case study by D. Bidder-Senn, D. Basin, G. Caronni. “Midpoints versus

endpoints: From protocols to firewalls”

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 4

slide-11
SLIDE 11

Goal

Context, motivation, goals

Protocol specification Communication environment specification Mid-point specification

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 5

slide-12
SLIDE 12

Goal

Context, motivation, goals

Protocol specification Communication environment specification Mid-point specification

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 5

slide-13
SLIDE 13

Roadmap

  • Context, motivation, goals
  • Challenges
  • The model
  • Framework
  • TCP case study
  • Future work

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 6

slide-14
SLIDE 14

Challenge: Channels fidelity

Challenges

End-point Mid-point

Time 1

End-point Mid-point

Time 2

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 7

slide-15
SLIDE 15

Challenge: Channels fidelity

Challenges

End-point Mid-point

Time 1

End-point Mid-point

Time 2 ❳❳❳❳❳❳❳❳❳❳❳ channel property

lose duplicate reorder Reliable no no no Resilient no yes yes Lossy yes no yes

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 7

slide-16
SLIDE 16

Challenge: Non-determinism

Challenges

  • Under-specification
  • allow alternative behaviors

1 2 3 1 2 3

rcv(syn) snd(synack) snd(rst)

  • Abstraction
  • probabilistic choices

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 8

slide-17
SLIDE 17

The setting

The model

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

M

  • E1, E2: the end-points
  • C1
  • , C1

i , C2

  • , C2

i : channels

Assumption

The end-points and the channels are formally specified We need to compute M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 9

slide-18
SLIDE 18

Process algebraic specifications

The model

  • End-points and channels are specified µCRL

Benefits: General purpose process algebra with mature tool support E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 10

slide-19
SLIDE 19

Process algebraic specifications

The model

  • End-points and channels are specified µCRL

Benefits: General purpose process algebra with mature tool support

  • We can compute the parallel composition of processes

Example: P = E1C1

i C1

  • E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

M

P

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 10

slide-20
SLIDE 20

Process algebraic specifications

The model

  • End-points and channels are specified µCRL

Benefits: General purpose process algebra with mature tool support

  • We can compute the parallel composition of processes

Example: P = E1C1

i C1

  • E

2

Ci

2

Co

2

M

P

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 10

slide-21
SLIDE 21

Definition of enforcement

The model

  • Reference model

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-22
SLIDE 22

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-23
SLIDE 23

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-24
SLIDE 24

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model

M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-25
SLIDE 25

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model

M P' Q'

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-26
SLIDE 26

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

M P' Q'

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-27
SLIDE 27

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

M P' Q'

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-28
SLIDE 28

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

P' Q' M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-29
SLIDE 29

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

P' Q' M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-30
SLIDE 30

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

P' Q' M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-31
SLIDE 31

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

P' Q' M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-32
SLIDE 32

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

P' Q' M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-33
SLIDE 33

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

P' Q' M

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-34
SLIDE 34

Definition of enforcement

The model

  • Reference model

P = E1C1

i C1

  • Q = E2C2

i C2

  • R = PQ

E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

  • Implementation

model I = P′MQ′

P' Q' M

Definition: Enforcement

M enforces (E1, E2) iff I ≡b R

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 11

slide-35
SLIDE 35

Computing the mid-point

The model E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

Reference model

P' Q' M

Implementation model December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 12

slide-36
SLIDE 36

Computing the mid-point

The model E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

P Q E

1

E

2

Co

1

Ci

1

Ci

2

Co

2

Reference model

P' Q' M

Implementation model

Observation: The mid-point is the reference model! M := PQ

Theorem

M enforces the protocol (E1, E2)

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 12

slide-37
SLIDE 37

The framework

The framework Compute M Compute M

Specification of the mid-point Environment specification Protocol specification

Compute M = PQ

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 13

slide-38
SLIDE 38

The framework

The framework Compute M Compute M Minimize M Minimize M

Specification of the mid-point Specification of the minimized mid-point Environment specification Protocol specification

Apply branching bisimulation reduction

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 13

slide-39
SLIDE 39

The framework

The framework Compute M Compute M Minimize M Minimize M

Specification of the mid-point Specification of the minimized mid-point DFA of the mid-point

Transform to DFA Transform to DFA

Environment specification Protocol specification

Apply a standard NFA to DFA transformation

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 13

slide-40
SLIDE 40

Case study: TCP specification

TCP case study

We distinguish two TCP roles: initiator and responder

  • Responder end-point

Input alphabet: snd(msg), rcv(msg) msg ∈ {S, SA, A, F}

1 2 3 4 7 5 6 10 8 9 11

snd(F) rcv(S) snd(SA) rcv(A) snd(F) snd(F) rcv(F) snd(A) rcv(A) snd(A) rcv(F) rcv(A) snd(A) rcv(F) December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 14

slide-41
SLIDE 41

TCP mid-point

TCP case study

  • E1: initiator end-point
  • E2: responder end-point
  • C1
  • , C1

i , C2

  • , C2

i : lossy

channels

  • Input alphabet:

fw(id, msg) msg ∈ {S, SA, A, F} id ∈ {1, 2}

1 2 3 6 10 5 4 9 8 7 14 13 12 11 16 15 17

fw(2,S) fw(1,F) fw(1,SA) fw(2,A) fw(1,F) fw(2,F) fw(1,SA) fw(2,F) fw(1,A) fw(2,A) fw(2,A) fw(1,A) fw(2,A) fw(2,F) fw(2,A) fw(2,A) fw(1,F)fw(1,A) fw(2,A) fw(2,A) fw(2,A) fw(1,A) fw(2,S) fw(2,A) fw(1,F) fw(1,F) fw(2,F) fw(1,F) fw(1,A) December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 15

slide-42
SLIDE 42

TCP mid-point

TCP case study

  • E1: initiator end-point
  • E2: responder end-point
  • C1
  • , C1

i , C2

  • , C2

i : lossy

channels

  • Input alphabet:

fw(id, msg) msg ∈ {S, SA, A, F} id ∈ {1, 2}

1 2 3 6 10 5 4 9 8 7 14 13 12 11 16 15 17

fw(2,S) fw(1,F) fw(1,SA) fw(2,A) fw(1,F) fw(2,F) fw(1,SA) fw(2,F) fw(1,A) fw(2,A) fw(2,A) fw(1,A) fw(2,A) fw(2,F) fw(2,A) fw(2,A) fw(1,F)fw(1,A) fw(2,A) fw(2,A) fw(2,A) fw(1,A) fw(2,S) fw(2,A) fw(1,F) fw(1,F) fw(2,F) fw(1,F) fw(1,A) December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 15

slide-43
SLIDE 43

TCP mid-point

TCP case study

  • E1: initiator end-point
  • E2: responder end-point
  • C1
  • , C1

i , C2

  • , C2

i : lossy

channels

  • Input alphabet:

fw(id, msg) msg ∈ {S, SA, A, F} id ∈ {1, 2}

1 2 3 6 10 5 4 9 8 7

fw(2,S) fw(1,F) fw(1,SA) fw(2,A) fw(1,F) fw(2,F) fw(1,SA) fw(2,F) fw(2,A) fw(1,A) fw(2,S) fw(2,A) fw(1,F) fw(1,F) fw(2,F)

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 15

slide-44
SLIDE 44

Future work

TCP case study

Secret data

  • End-points (often) keep secret data

(e.g. secret keys)

  • Secret data is not exposed to the

mid-point

1 2 3

rcv(x) [x=s] snd(y) [x≠s] snd(z) s←secret data

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 16

slide-45
SLIDE 45

Branching bisimulation

Backup slides

A symmetric binary relation B over processes is a branching bisimulation relation iff (P, P′) ∈ B implies that for any action a, P

a

→ P1, then

  • either a = τ and (P1, P′) ∈ B;
  • r P′ executes a sequence of (zero or more) silent actions

P′

τ

→ · · · τ → ˆ P′ such that (P, ˆ P′) ∈ B and ˆ P′

a

→ P′

1 with

(P1, P′

1) ∈ B.

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 17

slide-46
SLIDE 46

Enforcing the protocol

Backup slides

M A

1

A

2

R ⊒r MA1A2

December 16, 2011 Constructing Mid-points for Two-party Asynchronous Protocols 18