• Nem Talált Eredményt

3.5 crypt prob time : Extending crypt with timed and probabilistic syntax and semantics

3.5.2 Operational Semantics

Rulerk says that the set of clocks to be reset inκ(kCRkApt) isCRand the clock resets occur in Apt; and ruleri says that the invariant of processφ . Aptis the intersection ofφand the invariant predicate inApt.

PROTOCOLS

u1. Ud(A,v); u2. Udπ Apt,v);

u3. Ud(φ ,→Apt,v) if Ud(Apt,v);

u4. Ud(kCRk Apt,v) if Ud(Apt,v[rst:CR]);

u5. Ud(φ . Apt, v) if Ud(Apt,v)∧ |= (v+d)(φ);

u6. Ud(A1pt[ ]A2pt,v) if Ud(A1pt,v)∨ Ud(A2pt,v);

u7. Ud(A1pt|A2pt,v) if Ud(A1pt,v)∨ Ud(A2pt, v);

u8. Ud(A1ptp A2pt,v) if Ud(A1pt,v)∨ Ud(A2pt,v);

u9. Ud(Xpt,v) if Ud(P[P/Xpt],v);

Rules (u1-u2) are the Until axioms for the states (A,v) and (απ Apt,v). Inu3 the system stays in the state (φ ,→ Apt, v) until d time units, if this is valid to the state (Apt, v) as well.

Rules (u4-u5) come from the definition of the clock reset and invariant. In rule (u4)v[rst:CR] represents the clock valuation v where the clocks in CR are reset. Rules (u6-u8) say that the system stays untildtime units at the state withA1pt[ ]A2pt,A1pt|A2pt, andA1ptp A2pt, if it stays dtime in the state with one of the two processesA1ptandA2pt. Ruleu9 is concerned with the until predicate for (recursive) process variableXpt, which comes directly from the definition of recursive process invocation. Note thatP is a plain process defined incrypt.

I define the satisfaction predicate|=,|=⊆Φ(C), on clock constraints. For each φ∈Φ(C) I use the shorthand|=v(φ) iffv satisfies φ, for all clock valuationv. The set of past closed constraint, Φ(C)⊆Φ(C), is used for defining semantics of location invariant, ∀v∈ V,d∈R≥0: |= (v+d)(φ)

=⇒ |= (v)(φ). Intuitively, this says that if the valuationv+d, which is defined as v(xc) +dfor all clocksxc, satisfies the constraint φthen so doesv. I adopt the variant of time automata used in [24], where location invariant and clock resets are defined as functions∂ andκassigning a set of clock constraints Φ(C) and a set of clocks to be resetR(C), respectively, to acryptprobtime process.

The probabilistic timed transition (action) rules for cryptprobtime are given as follows. I provide the connection of each PTTS transition with the edge syntax in probabilistic timed automata.

a1. (απ Apt, v)

α(d), π

−−−−−−→P T T S (Apt, v+d) if απ Apt

α, true

−−−−−→π Apt; a2. (kCRkApt,v)

α(d), π

−−−−−−→P T T S (A0pt,v0) if (Apt,v[rst:CR])

α(d), true

−−−−−−→π (A0pt,v0);

a3. (φ ,→Apt,v)

α(d), π

−−−−−−→P T T S (A0pt,v0) if (Apt,v)

α(d), φ

−−−−−−→π (A0pt, v0)∧(v+d)(φ);

a4. (φ . Apt,v)

α(d), π

−−−−−−→P T T S (A0pt,v0) if (Apt, v)

α(d), true

−−−−−−→π (A0pt,v0)∧(v+d)(φ);

a5. (Apt,v)

α(d), π

−−−−−−→P T T S (φ . A0pt,v0) if (Apt, v)

α(d), true

−−−−−−→π (A0pt,v0)∧(v+d)(φ);

a6. (A1pt[ ] A2pt,v)

α(d), π

−−−−−−→P T T S (A1pt0,v0) if (A1pt,v)

α(d), true

−−−−−−→π (A1pt0, v0);

a7/a. (A1ptp A2pt, v)

α(d), π(p)

−−−−−−→P T T S (A1pt0,v0) if A1ptp A2pt

α, true

−−−→ π(p)A1pt0

a7/b. (A1ptp A2pt,v)

α(d), π(1−p)

−−−−−−→ P T T S (A2pt0,v0) if A1ptp A2pt

α, true)

−−−−−−−→π(1−p)A2pt0

a8. (A1pt|A2pt,v)

α(d), π

−−−−−−→P T T S (A1pt0 |norst(A2pt),v0) if (A1pt,v)

α(d), true

−−−−−−→π (A1pt0,v0);

a9. (Xpt, v)

α(d), π

−−−−−−→P T T S (P0,v0) if (P[P/Xpt],v)

α(d), true

−−−−−−→π (P0,v0).

In rule a2 v0 =v[rst:CR] + d, and in the rest rulesv0 =v +d. v[rst:CR] represents the valuation v where the clocks in CR are reset. Each rule should be interpreted that the PTTS transition on the left side can be performed if there is an edge in a corresponding automaton.

For instance, rule a1 applies if there is an edge απ Apt

α, true

−−−−−→π Apt in the corresponding automaton. Rulea1 says that after performing actionαwithdtime units the system gets to the process Apt with the clock valuation after d time units elapsed. Rule a2 says that by the time kCRkAptproceeds toApt, the clocks inCRwill have been reset. In the rulesa3 anda4 the timed transition can be performed if (v+d)(φ) holds, which means that the valuationv+dmust satisfy the clock guard φ. Rules a5-a6 describe the case when process A1pt is activated (the rules for activatingA2ptare similar). π(p) andπ(1−p) in rulesa7/a-bmean that in distributionπthe first and second transitions (edges) are chosen with probabilitypand (1−p). Ina8 to avoid conflict of clock variables, it is required that after performing the transition, processA2ptcannot perform resetting at the beginning. The last rule is the action rule for recursive process variableXpt. It can be proven, based on the rulesu1-u9 anda1-a9, that probabilistic timed transition system of cryptprobtime satisfies axiomsUntil andDelay, hence, it is well defined.

Theorem 2. For all cryptprobtime process Apt and for all closed valuation v0, PTTS(Apt,v0, F) is indeed the probabilistic timed transition system defined in probabilistic timed automata. Hence, the correctness of the semantics of cryptprobtime is based on the correctness of the probabilistic timed automata.

Proof. (Sketch) Any process defined in crypttime can be expressed in a corresponding timed au-tomaton. To show this, I adopt the notionimage-finiteandfinitely sorted(borrowed from transition system theory). A probabilistic timed automaton is image-finite if for a given distributionπ, the set of outgoing edges of each state with the same actionact is finite. Formally, for eachq,act and π, the size of the set{qact, φ−→πq0|q∈ L}is finite. A probabilistic timed automaton is finitely-sorted if for a given distributionπ, the set of outgoing edges with the same actionact of every state,{act

| ∃q0 ∈ L: q act, φ−→π q0}, is finite.

The associated probabilistic timed automaton for a (initial) processA0ptcan be constructed by associating the process A0pt to the initial locationq0, then each transition A0pt α

, φ

−→π A1pt can be defined in terms of a corresponding probabilistic timed automaton,PT = (L, q0,P, C,∂, κ, E, Π), as follows:

A0pt =kκ(q0)k∂(q0).(φ ,→(απ A1pt))

In this process definition, A0pt corresponds to location q0 of the corresponding probabilistic timed automaton at which the set of clocks to be reset isκ(q0), and the invariant∂(q0) is defined.

The edge fromq0toq1,q0α

,φ,π

−→ q1, corresponds to the time constructφ ,→(απA1pt). Generally, for every subsequent processAiptafter some transition steps fromA0pt we have

Aipt=kκ(qi)k ∂(qi).(φ ,→(απ Ai+1pt )) which corresponds to the edgeqi

α,φ,π

−→ qi+1 in PT. For the more complex target process such asA(i+1)pt 1 [ ] . . . [ ] A(i+1)pt n we have

PROTOCOLS

Aipt=kκ(qi)k ∂(qi).[ ]nj=1j ,→(αjπ A(i+1)pt j))

whereAiptcorresponds to locationqi (with the appropriate resets and invariant) and the sub-process [ ]nj=1j ,→(αjπ A(i+1)t j)) corresponds to the edge fromqi to the locationq(i+1)j with label (αjj), 1≤j ≤n, such thatαj is the first enabled action (due to the valid condition atqi) among then processes. In case there are more than one enabled action at the same time, it can be treated in the same way as the non-deterministic choices.

For the target processA(i+1)pt 1p A(i+1)pt 2, we have the following process definition forAipt: Aipt =kκ(qi)k∂(qi). (φ1 ,→(α1π(p)A(i+1)pt 1)⊕p φ2,→(α2π(1−p) A(i+1)pt 2))

whereAiptcorresponds to locationqi, and from this location we can get to the locationA(i+1)pt 1 with probability p and to A(i+1)pt 1 with probability 1−p, via the edges (or the corresponding transition) with the labels (α11) and (α22), respectively.

For the target processA(i+1)pt 1 |. . .|A(i+1)pt n, we have

Aipt=kκ(qi)k∂(qi). (φ ,→(απ A(i+1)pt 1 |. . .|A(i+1)pt n)),

which says that from the location corresponding to processAiptwe can get to the location corre-sponding toA(i+1)pt 1 |. . .|A(i+1)pt n, via the edge (transition) with the label (α,φ). The reason is that we associate the parallel composition ofcryptprobtimeprocesses to a location in the probabilistic timed automaton, instead of interpreting it as parallel composition of automata. Hence, the tran-sitionA1pt |A2pt α

, φ

−→π A1pt0 |A2pt corresponds to the edgeq−→act, φπ q0, whereA1pt |A2ptcorresponds to locationq, whileA1pt0 | A2pttoq0.

In case there is not any outgoing edge fromqiwe have the following process definitions for each type of target process:

Ait =kκ(qi)k∂(qi). nil

I defined rules for renaming of clock variables and I showed that the process with non-conflict of clock variables,ncv, property is preserved by clock renaming, hence, the restriction I made to process without conflict of clock variables is harmless [24]. Based on the rules of renaming I also added new rules for structural equivalent resulted from renaming. I omit the discussion of these rules in details because I do not use them in the dissertation, but the reader can find it in my longer report [Th12 , 2013].

Weak probabilistic timed (weak prob-timed) labeled bisimulation

I provide a novel bisimilarity definition, calledweak prob-timed labeled bisimulation forcryptprobtime, which enables us to prove or refute the security of probabilistic timed systems.

My proposed definition makes use of the definition of static equivalence proposed in the applied π-calculus [27], which says that the outputs of static equivalent processes cannot be distinguished by the environment (or attackers). The main advantage of static equivalence is that it only takes into account the static knowledge exposed by two processes to show the behavioral equivalence of them. This method is much easier to use than using the observational equivalence [27], where I have to consider the dynamic behavior of processes.

Let the extended processAbe {t1/x1} |. . .| {tn/xn} |P1 |. . .| Pn. The frame ϕofAis the parallel composition{t1/x1} |. . .| {tn/xn} that models all the information that is output so far by the processA, which aret1,. . . , tn in this case.

Definition 14. Static equivalence for extended processes(≈s). Two extended processesA1 andA2 are statically equivalent, denoted asA1sA2, if their frames are statically equivalent. Two framesϕ1 andϕ2 are statically equivalent if they include the same number of active substitutions and same domain; and any two terms that are equal inϕ1are equal in ϕ2 as well. Intuitively, this means that the outputs of the two processes cannot be distinguished by the environment.

In my proposedweak prob-timed labeled bisimulation, I extend the static equivalence with time and probabilistic elements. The meaning ofweak is that in this dissertation I want to examine whether the attackers can distinguish the behavior of two processes, based on the information they canobserve. Hence, in weak prob-timed labeled bisimulation, I do not require the equivalence of the probability of two action traces, because practically an observer cannot distinguish if an action is performed with 1/2 or 1/3 probability.

Nevertheless, I also proposed the definition of strong prob-timed labeled bisimulation in my longer report [Th12 , 2013], which I do not discuss in this dissertation, because I found that for analyzing the security of DTSN and SDTP, it is sufficient to use the weak prob-timed labeled bisimulation. Strong prob-timed labeled bisimulation is stricter, since it also distinguishes two processes based on the probability of their corresponding action traces.

Definition 15. (Weak prob-timed labeled bisimulation for cryptprobtime processes)

Let PTTSi(Aipt, v0, F) =(Si,α×R≥0 ×Π,si0,−→P T T Si,Ui,F),i∈ {1,2}be two probabilistic timed transition systems for cryptprobtime processes. Weak prob-timed labeled bisimilarity (≈pt) is the largest symmetric relation R, R ⊆ S1 × S2 with s10 R s20, where each si is the pair of a closed cryptprobtime process and a same initial valuationv0 ∈ Vc, (Aipt,v0), such that s1 Rs2 implies:

1. A1s A2; 2. if s1

τ(d), π

−−−−→P T T S1 s01 for a scheduler F, then ∃ s02 such that s2 τ(

Pdi), πi

=⇒ P T T S2 s02 for the sameF, withd=f(Pdi)for some functionf, ands01 Rs02;

3. ifs1 α(d), π

−−−−→P T T S1 s01 for a scheduler F andf v(α)⊆dom(A1)∧bn(α)∩f n(A2) =∅, then

∃s02 such thats2

α(Pdj), πi

=⇒ P T T S2s02 for the sameF, withd=f(P

dj)for some functionf, ands01 Rs02. Again,dom(Ai)represents the domain ofAi,

and vice versa. A1 andA2 are the extended processes we get by removing all the probabilistic and timed elements fromA1pt andA2pt, respectively.

The arrow =αP T T S is the shorthand of the action trace −→τ P T T S −→α P T T S

−→τ P T T S, where

−→τ P T T Srepresents a series (formally, a transitive closure) of sequential transitions−→τ P T T S. P di

on =⇒P T T S is the sum of the time elapsed at each transition, and represents the total time elapsed during the sequence of transitions. Note thatf n(A2pt) anddom(A1pt) is the same asf n(A2) and dom(A1), respectively. Moreover, a process Apt is closed if its non-timed and “non-probabilistic”

counterpartAis closed.

Intuitively, in caseA1pt and A2pt represent two protocols (or two variants of a protocol), then the meaning of each point in the Definition is as follows: (i) the outputs of the two processesA1pt andA2pt cannot be distinguished by the environment based on their behaviors; (ii) the time that the protocols spend on the performed operations until they reach the corresponding points is in some relationship defined by a functionf. Heref depends on the specific definition of the security property, for instance, it can returnditself, hence, the requirement for time consumption would bed=P

di. In particular, the first point means thatA1pt andA2pt are statically equivalent, that is, the environment cannot distinguish the behavior of the two protocols based on their outputs;

the second point says thatA1ptandA2ptremain statically equivalent after silent transition (internal computation) steps. Finally, the third point says that the behavior of the two protocols matches in transition with the actionα.

PROTOCOLS