The SafetyNet project.
Related work.
Networked resource calculus.
Semantics.
Types.
Futher work.
In reality, a router is often pretty smart.
An AN allows users to make use of the computing power in the routers:
Active multicast networks can take advantage of processing power at the relays.
For example, an active relay can perform application-specific compression for low-bandwidth links.
Makes firewall deployment lightweight.
Scaleable VR.
Application-specific protocols.
Application-specific proxies.
...
Add a notable performance overhead.For example, if arbitrary C code were executed:Compromise network integrity.
Security violations from dereferencing arbitrary memory.Denial of Service attacks from flooding the network with packets or processes.
For example, each array assignment requires a bounds test and a run-time type test.
Can we achieve security and safety without requiring costly run-time checks?
To develop safety and security policies for ANs.
To design a typed language for programming ANs.
To show that any type-safe program will satisfy the safety and security policies.
To provide prototype implementations and simulation tools.
PIs: Alan Jeffrey (semantics gun for hire) and Ian Wakeman (networks expert), both University of Sussex.
At each location, there is a collection of resources and a collection of executing threads.
Threads may access existing resources, or register new resources.
Threads may spawn subthreads, and may migrate to neighbouring locations.
Threads can find out local information about the network, eg the next hop to a location, but not global information.
The language is statically typed, with a formal model of a `core' language.
serializable function remoteAccess (
dest : location,
packet : serializable type,
port : at dest
resource function (pdu : packet),
pdu : packet
) {
if (dest == localhost) {
access port (pdu);
} else {
spawn at route dest
remoteAccess (dest, packet, port, pdu);
}
}
Milner, Parrow and Walker's pi-calculus.Future work will be based on:Boudol's blue-calculus.
Fournet, Gonthier, Lévy, Maranget and Rémy's join calculus.
Moggi's monadic meta-language.
Girard / Reynolds' 2nd order lambda-calculus.
Hennessy and Riely's / Sewell's distributed pi-calculus.
Cardelli and Gordon's ambients.
Benton, Bierman, Hyland, de Paiva's linear lambda-calculus.Closest AN work is Gunter et al's PLAN.Abadi and Gordon's spi-calculus.
For eample, one possible network is:
l[register r = 0]This reduces to (by migration):
| m[at l register s = access r + 1]
l[register r = 0]then (by resource fetching):
| l[register s = access r + 1]
l[register r = 0]
| l[register s = 1]
Add a language of threads t including resource registration register r = v.
Add an expression for resource access access r.
Add declarations for new resources new r : T; and to spawn threads spawn t;.
The syntax of networks is:
N ::= 0 | N|N | l[t] | new r : T; N
(M | N) | OM | (N | O) M | N N | M M | 0 M new x : T; N new y : T; N[y / x] new x : T; (M | N) (new x : T; M) | N new x : T; 0 0 l[let p = D e; t] l[D let p = e; t]
l[let p = v; t] l[t[v/p]]
l[let p = v w; t] l[let p = e[v/x,w/q]; t]
(when v = function x q { e }) l[if (m == m) {D} else {E} t] l[D t]
l[if (m == n) {D} else {E} t] l[E t] (when m
n)
l[spawn t; u] l[t] | l[u]
l[register x = v] | l[let p = access x; t] l[register x = v] | l[let p = v; t]
l[new x : T; t] new x : T; l[t]
l[at m t] m[t] (when l
m)
l[let p = localhost; t] l[let p = l; t]
l[let p = route m; t] l[let p = n; t] (when l
n)
s = remoteAccess (target, int, port, 0);This can reduce (writings' = if(target == localhost) {access port (0)}
else {spawn at route target s}s'' = spawn at route target s
t = register port (x : int) { ...x... }
source [s] | target [t]source [s'] | target [t]
source [s''] | target [t]
hop1 [s] | target [t]
hop2 [s] | target [t]
target [s] | target [t]
target [s'] | target [t]
target [access port (0)] | target [t]
target [...0...] | target [t]
We can then verify:![]()
e : T
![]()
t : thread
![]()
N : network
Type safety: any well-typed program satisfies the required safety and security conditions.Together, these properties mean that any well-typed program will always satisfy the safety and security conditions.Subject reduction: any well-typed program stays well-typed.
Any resource of type at l resource T is only accessed at location l.and the subject reduction property:Any resource of type at l resource T is only ever registered with values of type T.
Any resource of type at l resource function (T) is only ever accessed with values of type T.
If NM and
N : network then
M : network
`Scale up' to a real programming language.http://klee.cs.depaul.edu/an/Develop and formalize `real world' safety and security policies.
Add linear types (for time-to-live counts or charging mechanisms).
Include security and digital signatures.
Include a `web of trust' model based on Hennessy and Riely.
Check principal typing.
Try out on real examples!