📎

Semantics of Applied Pi-Calculus

⚠️
This page is not part of the curriculum

Symbolic Cryptography

We consider cryptography as fully reliable - abstract everything away.

Example:

dec(enc(M,K)K)M\text{dec}(\text{enc}(M,K)K) \rarr M

ver(sign(x,sk(k)),vk(k))x \operatorname{ver}(\operatorname{sign}(x, s k(k)), v k(k)) \rarr x 

The Applied Pi-Calculus has a signature Σ\Sigma that consists of a 2 finite sets:

constructors i.e.(enc, sign)(\text{enc, sign})

destructors i.e.(dec, ver)(\text{dec, ver})

Destructors

Typical rules:

fst(pair(x,y))x \operatorname{fst}(\operatorname{pair}(x, y)) \rightarrow x 

snd(pair(x,y))y \operatorname{snd}(\operatorname{pair}(x, y)) \rightarrow y 

dec(enc(x,y),y)x \operatorname{dec}(\operatorname{enc}(x, y), y) \rightarrow x 

deca(enca(x,ek(y)),dk(y))x \operatorname{deca}(\operatorname{enca}(x, \operatorname{ek}(y)), \operatorname{dk}(y)) \rightarrow x 

ver(sign(x,sk(y)),vk(y))x \operatorname{ver}(\operatorname{sign}(x, \operatorname{sk}(y)), v k(y)) \rightarrow x 

They have evaluation rules :

σ\sigma : variables \mapsto terms (Substitution)

Examples

σ={pair(n,m)/x,k/y}\sigma=\{\operatorname{pair}(n, m) / x, k / y\}

ver(sign(pair(n,m),sk(k)),vk(k))pair(n,m) \operatorname{ver}(\operatorname{sign}(\operatorname{pair}(n, m), \mathrm{sk}(k)), v k(k)) \Downarrow \text{pair}(n, m) 

The equality can be tested through: eq(x,x)x\operatorname{eq}(x, x) \Downarrow x

Equational Theory

is identified by signature Σ\Sigma .

We write ΣM=N\Sigma \vdash M=N

iff MM is equal to NN in the equational theory.

Processes

Almost identical to Pi-Calculus:

P,Q,R::=P, Q, R::=

in(c,x).P\operatorname{in}(c, x). PReceive on channelcc, bind result toxx, runPP

out(c,x).P\text {out}(c, x) . PSend value ofyyto channelxx, runPP-xxis then bound inPP

00Terminate process

PQP \mid QRunPPandQQsimultaniously

!P! PRepeatedly generate copies ofPP

new a.P\text {new } a.PCreate a new variableaa, which is then bound inPP

let x=g(M1,,Mn) in P else Q \text {let } x=g\left(M_{1}, \ldots, M_{n}\right) \text { in } P \text { else } Q 

Guard + Pattern matching and binding a name (= value) to a variable

inPPor executingQQif guard condition is not met.

Free- vs. Bound-Names

Free names are public, bound names are (initially) private.

If PP is closed, it does not have free variables.

We denote free / bounded names in PP as:

fn(P)\text{fn}(P) free name

bn(P)\text{bn}(P) bound name

fv(P)\text{fv}(P) free variable

bv(P)\text{bv}(P) bound variable

Operational Semantics

Reduction Relation \rarr

Describes the communication. (Internal Reduction)

Structural Equivalence \equiv

is the smallest equivalence relation on processes through renaming names and variables so that: