Top Banner
Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010
50

Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

Mar 28, 2015

Download

Documents

Freddie Fenton
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

Bigraphs & Spygraphs

Michael Goldsmithe-Security Group

Digital Laboratory

University of Warwickand

Worcester College, Oxford

FOSAD: 8 September 2010

Page 2: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Outline

Bigraphs

Reaction Systems

Security Applications

Semantic Challenges

(Partial) Solutions

Page 3: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Outline

Bigraphs

Reaction Systems

Security Applications

Semantic Challenges

(Partial) Solutions

Page 4: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Robin Milner’s Final Legacy

R. Milner, The Space and Motion of Communicating Agents,Cambridge University Press,2009.

http://www.cl.cam.ac.uk/archive/rm135

Cover picture “borrowed” from Cambridge University Press website, http://www.cambridge.org/

Page 5: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Bigraphs

Two graphs, with a shared set of nodes and individual peripheries

The Place Graph is a forest (of rose trees) – a rose garden?

• external interface is its vector of roots

• internal interface is the vector of its sites – place-holder leaves of the trees

• represents logical – or physical – structure (drawn using nesting)

• a node is located in its parent

• two sibling nodes are adjacent

The Link Graph relates nodes to one another and to interface elements

• a hypergraph – not just binary relations

• both external and internal interfaces are finite sets of names to facilitate “plumbing”

• might represent communication channels (or barriers)…

• … or equally more abstract relations

Page 6: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Bigraph Composition

If you have two bigraphs, with the external interface of one compatible with the internal interface of the other, you can compose them

• graft the trees from one forest into the sites in the other (#roots = #sites)

• wire together the external interface of one to the corresponding names of the other

○ =

u ux

x

Page 7: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

The “C”-Word

Thus you can (if so minded) view bigraphs as arrows in a category

• between their inner and outer interfaces

Left-hand graphs in example have type

• (2,{x}) → (1,{u})

• (1,) → (2,{x})

Thus the inner interface of the first equals the outer interface of the second and we may compose them

The composition has type

• (1,) → (1,{u})

There are identity arrows id for each interface

• one site per root

• wire all names straight through

Page 8: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Flexibility Demands Discipline

Arbitrary bigraphs would not be terribly useful

• need to be able to understand role of various nodes (and links) in the bigraph

A signature assigns an arity (number of ports) to each of finite kinds of control

• different controls may be drawn with different shapes and/or labelled with their kind

• sorting disciplines provide well-formedness criteria

• “polygons may only be nested inside polygons with more edges”

• “polygons and rounded controls must alternate (as parents and children”)

• “rectangles have precisely one child”

• may equally constrain links

• define controls to have active and passive ports and require that “links connect no more than one active port together”

Well-formedness criteria constrain validity of compositions

u

Page 9: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Bigraphs are State Representations

Can vary from pure place graphs (no link-graph edges)

• e.g. syntax trees for arithmetic expressions:

(2 + 3) (1 + 5)

2 3 1 5

Page 10: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Bigraphs are State Representations

... to pure link graphs (every node its own root, no sites)

• e.g. Milner’s example of condition-event Petri nets

Page 11: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Bigraphs are State Representations

Most, of course, have non-trivial elements of both

• e.g. Milner’s example of a “built environment”

Page 12: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Outline

Bigraphs

Reaction Systems

Security Applications

Semantic Challenges

(Partial) Solutions

Page 13: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Redex and Reactum

A bigraphical reaction system is defined by a number of reaction rules

Each consists of two bigraphs of the same (atomic) type

The left-hand side, the redex, must match part of bigraph describing the state

The result of the transition is what you get when you substitute the right-hand side of the rule, the reactum, for the part that matched

... or at least, that’s the simplified version of the story

Page 14: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Familiar Reduction Systems

Addition and multiplication tables:

(modulo 8)

2 3 1 5

2 3

5 1 5

6

5 6 6

6

5 62

Page 15: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Familiar Reduction Systems

Lambda calculus

(x.E) E’ E[E’/x]

(f.(x.f (x x)) (x.f (x x))) (f.f ((x.f (x x)) (x.f (x x)))) (f.f (f ((x.f (x x)) (x.f (x x))))) ...

• Don’t necessarily want to be able to apply rules everywhere in the term

• head-normal reduction – only outermost application control

• normal-order reduction – only leftmost application control (even if inside )

• applicative-order reduction – rightmost application control outside

• Bigraphs allow places to be marked as active or inactive to achieve such effects

Page 16: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Bigraphical Reactive Systems: place only

r

R

R

r

A

a

enter.a.r A

a

A

R R

A R

A

R

A

R R

R

A

R A

enter.a.r

Page 17: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Bigraphical Reactive Systems: link as property

Page 18: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Bigraphical Reactive Systems: non-conservation

Page 19: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

BRS: Remote Interaction – CSP/occam

Page 20: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Outline

Bigraphs

Reaction Systems

Security Applications

Semantic Challenges

(Partial) Solutions

Page 21: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Why Is It Worth It?

The interface between physical and cyber-security

• that certain critical functions can only be performed on a guarded console

• together with models of the measures controlling access to it

• Clive Blackwell’s Spygraphs

Pervasive applications, location-based services

Vehicle-vehicle and vehicle-roadside telematics

Routing attacks on sensor mote networks

Key management in the wireless edge

Business process modeling

Role-based security architectures

Page 22: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Adjacency, Tokens, Data as Links

Page 23: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Message Passing

m

m m

m m

Page 24: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Message Interception

m

m m

m

Page 25: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Encrypted Message Passing

m

m m

m {m}

Page 26: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Frustrates Message Interception

m

m {m}

{m}

Page 27: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Shoulder Surfing

m

m

m

m

m

m m

Page 28: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Session Hijacking

y

yx

x

x

x

Page 29: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Developing Case Study

Using these sorts of rules to model threats to a Tokeneer*(-like) system

• biometric entry controls

• registration flaws

• subversion of authentication servers

• tail-gating

• malicious insiders

• many of these explicitly outside scope of Tokeneer …

• … but just as well, since it is supposed to be proven correct already!

* http://www.openproofs.org/wiki/Tokeneer

Page 30: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Outline

Bigraphs

Reaction Systems

Security Applications

Semantic Challenges

(Partial) Solutions

Page 31: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Canonical Labelled Transition System of a BRS

… or The Full Story About Matching Redexes

Recall the definition of composition of bigraphs:

A reaction rule (r,r’) is applicable to a ground bigraph b of a reactive system Β

iff there exist contexts (other bigraphs) and such that ○ b = ○ r

Under these circumstances, b has a -transition: b −→ ○ r’

The collection of all such transitions gives the labelled transition system for Β

• (Why not allow non-ground redexes and source bigraphs, and allow unifying inner contexts?)

○ =

u ux

x

Page 32: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

What’s Wrong with That?

Two things: one definite, one debatable

If ○ b = ○ r, then for any compatible bigraph Ω, (Ω ○ ) ○ b = (Ω ○ ) ○ r

… so in general there are infinitely many, arbitrarily large labels

• fortunately can show minimal transition system equivalent (in some exact sense)

• under reasonably weak assumptions

If b does a -transition, then the resulting bigraph retains the “baggage” from

R

A R A

Page 33: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Unengaged Transitions

The red agent plays no role in this transition – but the canonical LTS includes it and we must continue to explore the behaviour of the augmented system

Fortunately, for a nice BRS, we can restrict our attention to the prime engaged transition system, which excludes such monsters

• only consider redexes which “intersect” the source bigraph

R

A R AA

A

Page 34: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Niceness?

Unfortunately...

A BRS is nice if it is safe, simple, unary, affine and tight.

• a BRS is safe if its sorting is so

• a sorting is safe if its forgetful functor creates RPOs and reflects pushouts

• a BRS is simple, or unary, if all its reaction rules are so

• a reaction rule is simple, or unary, if its redex is so

• a redex is simple if it is open, guarding, and inner-injective

• a redex is unary if its outer face is unary

• a BRS is affine when all its rules are so

• a rule is affine if its instantiation map is injective

• a BRS is tight if every redex of a rule is tight

• a redex is tight if every unary split for it is tight

• a split is tight if some port in each side of the composition is connected to the other…

Page 35: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Opacity of Transitions

As in CCS, transitions become trivialised (too?) early

Any transition that a bigraph can do “without external assistance” is identified

• if the redex is contained in the source, the minimal context is the identity arrow id

This could be a problem:

Consider a system with two slots, and transitions that fills an empty slot with an adjacent token, and transitions that empty slots without external help

Start it with one slot filled

Then a set of rules which prefers to empty one slot over the other gives a BRS which is bisimilar to one which uses round-robin

But one can (nondeterministically) starve service for our initial token

The other can’t

Page 36: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Intuitive Transition Systems

Cunning coding can (often? always?) rescue the situation

• add links and transitions involving them to monitor the situation

But the “what contexts let me do extra things” labels are rarely what we want

In most cases, we are arguably interested in which transitions (can) actually fire

• not what we need to do in order that an arbitrary something might happen

Again, it may be possible to add artificial context-dependence via links

• cf Milner’s condition-event net example, emulating standard experiments with probes

Page 37: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

How Borrowed Context Reveals State Information

Page 38: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

What I Want

I want to be able to reason about which transitions take place where

... to be able to hide internal transitions at my discretion (and look inside later)

... to compare systems according to their interesting behaviour (refinement)

... to have a bigraphical setup suitable for FDR-style checking!

So I realised that I had better do something about it:

... sought funding from US Office of Naval Research

… initial $100K grant to investigate solutions to semantic issues

• #N000141010183, gratefully acknowledged

… coming to end at end of this month

• so this is the farewell tour for this phase

Page 39: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Outline

Bigraphs

Reaction Systems

Security Applications

Semantic Challenges

(Partial) Solutions

Page 40: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Where Have We Got to?

Addressed problem of uninformative labels

Two (and a half) solutions:

• Construction in SEFM’10 paper (Pisa next week)

• convoluted transformation of BRS to make it confess its actions

• The blindingly obvious (once you’ve seen it) variation on the canonical semantics

• just record more of the available data

• Ideas for a compact coding trick for the latter

Page 41: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

The Transformational Approach

Given a BRS over a signature K, define a BRS over a transformed signature K′ as follows:

• If K contains K : n, for some control type K, then let K′ contain K : n+1.

• For each natural number n such that there is a redex r containing n nodes, let K′ contain a new atomic control type : n+1.

• For any node of an existing bigraph, connect the new port to a new outer name, its identifier.

• Do the same to the reactum of every rule; add an idle (empty) region.

• For every n-node redex of a rule, add an extra region containing simply an ; add identifier links to the nodes of the original redex and wire them (in some fixed but arbitrary order), one to each port of the , as well as to the outer face; add an identity link to the with a name describing the reaction.

Everything clear?

• I did say it was convoluted

n

n

nn

Page 42: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

The Transformation

Before the transformation:

id

id

Page 43: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

The Transformation

After the transformation:

Page 44: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

What the Transformation Achieves

No (transformed) initial bigraph contains any and nor does any reactum

• and so by a simple induction nor does any bigraph reachable in the minimal transition system from those initial bigraphs

• but, by construction, every redex in the new BRS does contain a for some n

• clearly, therefore, no transition can fire without borrowing context

• and so there are no id-transitions any more

• moreover, the minimal context enabling a transition in the new system precisely identifies both the rule which gives rise to it ...

• ... and the nodes involved in the reaction

Job done?

n

n

Page 45: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

What the Transformation Achieves

Any transition of the original BRS can be reproduced in the transformed system

• since the requisite must lie in a separate region, there is no obstacle to pre-composing both the and with the borrowed context

• the label on the original transition may be recovered by deleting the region containing the and the associated identifier links

Therefore any bisimilarity and trace or failures equivalence or refinement which holds between two systems in the transformed world must necessarily hold between the original systems

• by design the converse does not hold: a common id-transition of the original systems may give rise to (possibly multiple) distinct transitions in the translation, distinguished by the reaction rule that fires and the actors involved

• thus the semantics induced by the transformation is in general strictly more discriminating than the original.

The labels contain sufficient information for us to be able to reconstruct the final state reached on some trace from a given initial bigraph

• which is certainly not the case for the received semantics.

n

n

Page 46: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

A Glimpse of the Obvious

Recall the original equation justifying a transition arising from a rule R = (r,r′)

• R is applicable to a bigraph b iff there exist contexts and such that ○ b = ○ r

• under these circumstances, b has a -transition: b −→ ○ r’

Suppose we remember not only but also [and (a name for) R]

• clearly this is a refined (more discriminating) transition system

• it still has the original labels, inter alia!

• effectively does record what was involved in the transition where

• acts as a “geographical combinator” identifying the actors by “pre-cancellation”

• up to isomorphism: if ○ r1 = ○ r2, then r1 and r2 must be in some real sense essentially the same

• thus the semantics induced by the transformation is in general strictly more discriminating than the original.

Much simpler • but -labels are (heuristically) likely to be large and complex

Page 47: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Transition Sub-Systems

So our transitions are labelled with , [and R]

Now makes sense to consider restricted sub-systems – e.g. those where = id

• didn’t before – at best could only find potentially maximal counts of ids

• all the interesting information encoded in the different range of borrowed contexts available in each state

Can also exclude cryptographically infeasible borrowings

• such as “parachuting in” an agent in possession of secret keys

• though this may also be achieved by localising links

Also enables selective hiding/renaming

• modify those transitions where = ○ x

• e.g. anonymise transitions going on in “dark corners”/“soundproof rooms”

Page 48: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

A Compact Representation for

Context will be a bigraph representing the “rest of the system”

• one or more sites where the root(s) of the redex r plug(s) in

Really only interested in where those sites are

• the what of the rest of the system can be inferred

Recall that the place graph is a forest of rose trees

• convenient to think of the set of children of a node...

• ... but as in all families they’re really a sequence

• “eldest” down to “youngest”

• so location of each site is determined by a path

• root_index,generation1_index,...,generationk_index

So can be captured as sequence of such paths (+ inner interface for links)

• discarding siblings, aunts and great-uncles, and all nth cousins at m removes

Page 49: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Specifications

I said I want to be able to enable some kind of FDR-like analysis

What sort of specifications?

Ultimately, full refinement-checking would be good

• specify touchstone behaviours allowed/required

First step: reachability analysis

• check that it is/is not possible to reach a state which matches a given redex

Page 50: Bigraphs & Spygraphs Michael Goldsmith e-Security Group Digital Laboratory University of Warwick and Worcester College, Oxford FOSAD: 8 September 2010.

FOSAD: 8 September 2010

Questions?