Safe Equivalences for Security Properties

Mário S. Alvim^{1}, Miguel E. Andrés^{2}, Catuscia Palamidessi^{1}, and Peter van Rossum^{2}.

1INRIA and LIX, École Polytechnique Palaiseau, France. 2Institute for Computing and Information Sciences, The Netherlands.

Abstract. In the field of Security, process equivalences have been used to characterize various information-hiding properties (for instance secrecy, anonymity and non-interference) based on the principle that a protocol P with a variable x satisfies such property if and only if, for every pair of secrets s_{1} and s_{2}, P [^{s_{1}}/_{x}] is equivalent to P [^{s_{2}}/_{x}]. We argue that, in the presence of nondeterminism, the above principle relies on the assumption that the scheduler “works for the benefit of the protocol”, and this is usually not a safe assumption. Non-safe equivalences, in this sense, include complete-trace equivalence and bisimulation. We present a formalism in which we can specify admissible schedulers and, correspondingly, safe versions of these equivalences. We prove that safe bisimulation is still a congruence. Finally, we show that safe equivalences can be used to establish information-hiding properties.

1 Introduction

One of the fundamental problems in computer security is the protection from information leaks, namely how to make sure that a system does not reveal, by observations that can be made during the execution, some information that we wish to maintain secret.

One way to prevent an attacker to infer the secret from the observables is to create noise, namely to make sure that for every execution in which a given secret produces a certain observable, there is at least another execution in which a different secret produces the same observable. In practice this is often done by using randomization, see for instance the DCNet [10] and the Crowds [23] protocols.

In the literature about the foundations of Computer Security, however, the quantitative aspects are often abstracted away, and probabilistic behavior is replaced by nondeterministic behavior. Correspondingly, there have been various approaches in which information-hiding properties are expressed in terms of equivalences based on nondeterminism, especially in a concurrent setting. For instance, [24] defines anonymity as follows^{1}: A protocol S is anonymous if, for every pair of culprits a and b, S[^{a}/_{x}] and S[^{b}/_{x}] produce the same observable traces. A similar definition is given in [1] for secrecy, with the difference that S[^{a}/_{x}] and S[^{b}/_{x}] are required to be bisimilar. In [13], an electoral system S preserves the confidentiality of the vote if for any voters v and w, the observable behavior of S is the same if we swap the votes of v and w. Namely, S[^{a}/_{v} |^{b} /_{w}] ∼ S[^{b}/_{v} |^{a} /_{w}], where ∼ represents bisimilarity.

1 The actual definition of [24] is more complicated, but the spirit is the same.

These proposals are based on the implicit assumption that all the nondeterministic executions present in the specification of S will always be possible under every implementation of S. Or at least, that the adversary will believe so. In concurrency, however, as argued in [8], nondeterminism has a rather different meaning: if a specification S contains some nondeterministic alternatives, typically it is because we want to abstract from specific implementations, such as the scheduling policy. A specification is considered correct, with respect to some property, if every alternative satisfies the property. Correspondingly, an implementation is considered correct if all executions are among those possible in the specification, i.e. if the implementation is a refinement of the specification. There is no expectation that the implementation will actually make possible all the alternatives indicated by the specification.

We argue that the use of nondeterminism in concurrency corresponds to a demonic view: the scheduler, i.e. the entity that will decide which alternative to select, may try to choose the worst alternative. Hence we need to make sure that “all alternatives are good”, i.e. satisfy the intended property. In the above mentioned approaches to the formalization of security properties, on the contrary, the interpretation of nondeterminism is angelic: the scheduler is expected to actually help the protocol to confuse the adversary and thus protect the secret information.

There is another issue, orthogonal to the angelic/demonic dichotomy, but relevant for the achievement of security properties: the scheduler should not be able to make its choices dependent on the secret, or else nearly every protocol would be insecure, i.e. the scheduler would always be able to leak the secret to an external observer (for instance by producing different interleavings of the observables, depending on the secret). This remark has been made several times already, and several approaches have been proposed to cope with the problem of full-information scheduler (aka almighty, omniscient, clairvoyant, etc.), see for example [6,7,9,8,3].

The risk of a naive use of nondeterminism to specify a security property, is not only that it may rely on an implicit assumption that the scheduler behaves angelically, but also that it is clairvoyant (fully-informed), i.e. that it peeks at the secrets (that it is not supposed to be able to see) to achieve its angelic strategy.

Example 1. Consider the following system, in a CCS-like syntax: S =^{def} (c)(A ∥ H_{1} ∥ H_{2} ∥ Corr), with A =^{def} \overline{c}⟨sec⟩, H_{1} =^{def} c(s).\overline{out}⟨a⟩, H_{2} =^{def} c(s).\overline{out}⟨b⟩, Corr =^{def} c(s).\overline{out}⟨s⟩. Here ∥ is the parallel operator, \overline{c}⟨sec⟩ is a process that sends sec on channel c, c(s).P is a process that receives s on channel c and then continues as P, and (c) is the restriction operator, enforcing synchronization on c. The name sec represents a secret.

It is easy to see that we have S [^{a}/_{sec}] ∼ S [^{b}/_{sec}]. Note that, in order to simulate the third branch in S [^{a}/_{sec}], the process S [^{b}/_{sec}] needs to select its first branch. Viceversa, in order to simulate the third branch in S [^{b}/_{sec}], the process S [^{a}/_{sec}] needs to select its second branch. This means that, in order to achieve bisimulation, the scheduler needs to know the secret, and change its choice accordingly.

This example shows a system that intuitively is not secure, because the third component, Corr, reveals whatever secret it receives. However, according to the equivalencebased notions of security discussed above, it is secure. But it is secure thanks to a scheduler that angelically helps the system to protect the secret, and it does so by making its choices dependent on the secret. We consider these assumptions on the scheduler excessively strong.

We do not claim, however, that we should rule out the use of angelic nondeterminism in security: on the contrary, angelic nondeterminism can be a powerful specification concept. We only advocate a cautious use of this notion. In particular, it should not be used in a context in which the scheduler may be in collusion with the attacker. The goal of this paper is to define a framework in which we can combine both angelic and demonic nondeterminism in a setting in which also probabilistic behavior may be present, and in a context in which the scheduler is restricted (i.e. not fully-informed). We define “safe” variant of typical equivalence relations (complete traces and bisimulation), and we show how to use them to characterize information-hiding properties.

1.1 Contribution

The main novelties of our work can be articulated as follows:

• We propose a formalism for concurrent systems which accounts for both probabilistic and nondeterministic behaviour, and in which the latter is of two kinds: global and local. The first represents the possible interleavings produced by the parallel components, which may be influenced by the attacker. The second is associated to the possible choices internal to each component, which may depend on the secrets or other unknown parameters, not controlled by the attacker. Correspondingly, we split the scheduler in two constituents: global and local. The latter is actually a tuple of local schedulers, one for each component of the system.

• We propose a notion of admissible scheduler for the above systems, in which the global constituent is not allowed to see the secrets, and each local constituent is not allowed to see any information about the other components. We then generalize the standard definition of strong (probabilistic) information hiding (such as nointerference and strong anonymity) to the case in which also nondeterminism is present, under the assumption that the schedulers are admissible.

• We use admissible schedulers to define safe versions of complete-trace equivalence and bisimilarity especially tuned for security (in this paper we often refer to complete traces as simply traces). This means that we account for the possibility that the global constituent of the scheduler is in collusion with the attacker, and therefore does not necessarily help the system to obfuscate the secret. We show that the latter is still a congruence, like in the classical case.

• We finally show that our notions of safe trace equivalence and bisimilarity imply strong information hiding in the above sense.

2 Probabilistic Automata

In this section we gather preliminary notions and results related to probabilistic automata [26,25].

A function μ: Q → [0, 1] is a discrete probability distribution on a set Q if the support of μ is countable and ∑_{q∈Q} μ(q) = 1. The set of all discrete probability distributions on Q is denoted by D(Q).

A probabilistic automaton is a quadruple M = (Q, Σ, q̂, α) where Q is a countable set of states, Σ a finite set of actions, q̂the initial state, and α is a transition function α : Q → P(Σ×D(Q)). Here P(X) is the set of all finite subsets of X. If α(q) = ∅ then q is a terminal state. We write q →^{a} μ for (a, μ) ∈ α(q). Moreover, we write q→^{a}r whenever q →^{a} μ and μ(r) > 0. A fully probabilistic automaton is a probabilistic automaton satisfying |α(q)| ≤ 1 for all states. In case α(q) ≠ ∅ in a fully probabilistic automaton, we will overload notation and use α(q) to denote the distribution outgoing from q. A path in a probabilistic automaton is a sequence σ = q_{0} →^{a_{1}} q_{1} →^{a_{2}} ⋯ where q_{i} ∈ Q, a_{i} ∈ Σ and q_{i}⟶^{a_{i+1}}q_{i+1}. A path can be finite in which case it ends with a state. A path is complete if it is either infinite or finite ending in a terminal state. Given a path σ, first(σ) denotes its first state, and if σ is finite then last(σ) denotes its last state. Let Paths_{q}(M) denote the set of all paths, Paths^{⋆}_{q}(M) the set of all finite paths, and CPaths_{q}(M) the set of all complete paths of an automaton M, starting from the state q. We will omit q if q = q̂. Paths are ordered by the prefix relation, which we denote by ≤. The trace of a path is the sequence of actions in Σ^{∞} = Σ^{∗} ∪ Σ^{ω} obtained by removing the states, hence for the above path σ we have trace(σ) = a_{1}a_{2} . . .. We denote by Traces(M) the complete traces of M, i.e. Traces(M) =^{def} {trace(σ) | σ ∈ CPaths(M)}. If Σ′ ⊆ Σ, then trace_{Σ′}(σ) is the projection of trace(σ) on the elements of Σ′.

Let M = (Q, Σ, q̂, α) be a (fully) probabilistic automaton, q ∈ Q a state, and let σ ∈ Paths^{⋆}_{q}(M) be a finite path starting in q. The cone generated by σ is the set of complete paths ⟨σ⟩ = {σ′ ∈ CPaths_{q}(M) | σ ≤ σ′}. Given a fully probabilistic automaton M = (Q, Σ, q̂, α) and a state q, we can calculate the probability value, denoted by P_{q}(σ), of any finite path σ starting in q as follows: P_{q}(q) = 1 and P_{q}(σ →^{a} q′) = P_{q}(σ)·μ(q′), where last(σ) →^{a} μ. Let Ω_{q} =^{def} CPaths_{q}(M) be the sample space, and let F_{q} be the smallest σ-algebra generated by the cones. Then P_{q} induces a unique probability measure on F_{q} (which we will also denote by P_{q}) such that P_{q}(⟨σ⟩) = P_{q}(σ) for every finite path σ starting in q. For q = q̂ we write P instead of Pq̂.

A scheduler for a probabilistic automaton M is a function ζ: Paths^{⋆}(M) → (Σ × D(Q) ∪ {⊥}) such that for all finite path σ, if α(last(σ)) ≠ ∅ then ζ(σ) ∈ α(last(σ)), and ζ(σ) = ⊥ otherwise. Hence, a scheduler ζ selects one of the available transitions in each state, and determines therefore a fully probabilistic automaton, obtained by pruning from M the alternatives that are not chosen by ζ. A scheduler is history dependent since it takes into account the path and not only the current state. It may be partial, i.e. it may halt the execution at any time^{2}.

3 Systems

In this section we describe the kind of systems we are dealing with. We start by introducing a variant of probabilistic automata, that we call Tagged Probabilistic Automata

2 In this paper, however, we will consider only total schedulers, to be more in line with the standard semantics of CCS.

(TPA). These systems are parallel compositions of probabilistic processes, called components. Each component is equipped with a unique identifier, called tag. Whenever a component (or a pair of components in case of synchronization) makes a step, the corresponding transition will be decorated with the associated tag (or pair of tags).

Similar systems have been already introduced in [3]. The main differences are that here the components may contain nondetermism, and a secret can label any transition.

3.1 Tagged Probabilistic Automata

We now formalize the notion of TPA.

Definition 1. A Tagged Probabilistic Automaton is a tuple (Q, L, Σ, q̂, α), where Q is a set of states, L is a set of tags, Σ is a set of actions, q̂ ∈ Q is the initial state, α: Q → P(L × Σ × D(Q)) is a transition function.

In the following we write q ⟶^{l:a} μ for (ℓ, a, μ) ∈ α(q), and we use enab(q) to denote the tags of the components that are enabled to make a transition. Namely, enab(q) =^{def} {ℓ ∈ L | there exists a ∈ Σ, μ ∈ D(Q) such that q ⟶^{l:a} μ}. In these systems, we can decompose the scheduler in two: a global scheduler, which decides which component or pair of components makes the move next, and a local scheduler, which solves the internal nondeterminism of the selected component.

We assume that the local scheduler can only select enabled transitions, and that the global scheduler can only select enabled components. This means that the execution does not stop unless all components are blocked. This is in line with the tradition of process algebra and of Markov Decision Processes, but contrasts with that of Probabilistic Automata [26]. However, the results in this paper do not depend on this assumption.

Definition 2. Let M = (Q, L, Σ, q̂, α) be a Tagged Probabilistic Automaton.

• A global scheduler for M is a function ζ: Paths^{⋆}(M) → (L ∪ {⊥}) such that for all finite paths σ, if enab(last(σ)) ≠ ∅ then ζ(σ) ∈ enab(last(σ)), and ζ(σ) = ⊥ otherwise.

• A local scheduler for M is a function ξ: Paths^{⋆}(M) → (L × Σ × D(Q) ∪ {⊥}) such that, for all finite paths σ, if α(last(σ)) ≠ ∅ then ξ(σ) ∈ α(last(σ)), and ξ(σ) = ⊥ otherwise.

• A global scheduler ζ and a local scheduler ξ for M are compatible if, for all finite paths σ, ξ(σ) = (ℓ, a, μ) implies ζ(σ) = ℓ, and ξ(σ) = ⊥ implies ζ(σ) = ⊥.

• A scheduler is a pair (ζ, ξ) of compatible global and local schedulers.

3.2 Components

We are going to use a simple probabilistic process calculus (a sort of probabilistic version of CCS [20,21]) to specify the components.

We assume a set of actions or channel names Σ with elements a, a_{1}, a_{2}, ⋯, including the special symbol τ denoting a silent step. Except τ, each action a has a co-action ā ∈ Σ and we assume ¯ ā = a. Components are specified by the following grammar:

q ::= 0 | a.q | q_{1} + q_{2} | ∑_{i} p_{i} : q_{i} | q_{1}|q_{2} | (a)q | A

The constructs 0, a.q, q_{1} + q_{2}, q_{1}|q_{2} and (a)q represent termination, prefixing, nondeterministic choice, parallel composition, and the restriction operator, respectively. ∑_{i} p_{i} : q_{i} is a probabilistic choice, where p_{i} represents the probability of the i-th branch and must satisfy 0 ≤ p_{i} ≤ 1 and ∑_{i} p_{i} = 1. The process call A is a simple process identifier. For each identifier, we assume a corresponding unique process declaration of the form A =^{def} q. The idea is that, whenever A is executed, it triggers the execution of q. Note that q can contain A or another process identifier, which means that our language allows (mutual) recursion. We will denote by f n(q) the free channel names occurring in q, i.e. the channel names not bound by a restriction operator.

Components’ semantics: The operational semantics consists of probabilistic transitions of the form q→^{a}μ where q ∈ Q is a process, a ∈ Σ is an action and μ ∈ D(Q) is a distribution on processes. They are specified by the following rules:

PRF \overline{a.q →^{a} δ_{q}}  NDT \frac{q_{1} →^{a} μ}{q_{1} + q_{2} →^{a} μ}

PRB \overline{∑_{i} p_{i} : q_{i} →^{τ} ∘ ∑_{i} p_{i} · δ_{q_{i}}} PAR \frac{q_{1} →^{a} μ}{q_{1} | q_{2} →^{a} μ | q_{2}}

CALL \frac{q →^{a} μ}{A →^{a} μ} if A =^{def}q COM \frac{q_{1} →^{a} δ_{r_{1}} q_{2} →^{ā} δ_{r_{2}}}{q_{1} | q_{2} →^{τ} δ_{r_{1}|r_{2}}} RST \frac{q →^{a} μ}{(b)q →^{a} (b)μ} a,ā≠b

We assume also the symmetric versions of the rules NDT, PAR and COM. The symbol δ_{q} is the delta of Dirac, which assigns probability 1 to q and 0 to all other processes. The symbol ∘ ∑_{i} is the summation on distributions. Namely, ∘ ∑_{i} p_{i} · μ_{i} is the distribution μ such that μ(x) = ∑_{i} p_{i} · μ_{i}(x). The notation μ | q represents the distribution μ′ such that μ′(r) = μ(q′) if r = q′ | q, and μ′(r) = 0 otherwise. Similarly, (b)μ represents the distribution μ′ such that μ′(q) = μ(q′) if q = (b)q′, and μ′(q) = 0 otherwise.

3.3 Systems

A system has the form (A) q_{1} ∥ q_{2} ∥ ⋯ ∥ q_{n}, where the q_{i}’s are components and A ⊆ Σ. The restriction on A enforces synchronization on the channel names belonging to A, in accordance with the CCS spirit.

Systems’ semantics The semantics of a system gives rise to a TPA, where the states are terms representing systems during their evolution. A transition now is of the form q ⟶^{ℓ:a} μ where a ∈ Σ, μ ∈ D(Q), and ℓ ∈ L is either the tag of the component which makes the move, or a (unordered) pair of tags representing the two partners of a synchronization. We can simply define L as L = I ∪ I^{2} where I = {1, 2, …, n}.

Interleaving \frac{q_{i} →^{a} ∘ ∑_{j} p_{j} · δ_{q_{ij}}}{(A) q_{1} ∥ ⋯ ∥ q_{i} ∥ ⋯ ∥ q_{j} ∥ ⋯ ∥ q_{n} ⟶^{i:a} ∘ ∑_{j} p_{j} · δ_{(A)q_{1}∥···∥q_{ij}∥···∥q_{n}}} a∉A

where i is the tag indicating that the component i is making the step. Note that we assume that probabilistic choices are finite. This implies that every transition q ⟶^{ℓ:a} μ can be written q ⟶^{ℓ:a} ∘ ∑_{i} p_{i} · δ_{q_{i}}, and justifies the notation used in the interleaving rule.

Synchronization \frac{q_{i} →^{a} δ_{q′_{i}}  q_{j} →^{ā} δ_{q′_{j}}}{(A) q_{1} ∥ ⋯ ∥ q_{i} ∥ ⋯ ∥ q_{j} ∥ ⋯ ∥ q_{n} ⟶^{\{i,j\}:τ} δ_{(A)q_{1}∥···∥q′_{i}∥···∥q′_{j}∥···∥q_{n}}}

here {i, j} is the tag indicating that the components making the step are i and j. Note that it is an unordered pair. Sometimes we will write i, j instead of {i, j}, for simplicity.

Example 2. Consider the systems of Example 1. Figures 1(a) and 1(b) show the TPAs of S [^{a}/_{sec}] and of S [^{b}/_{sec}] respectively. For simplicity we do not write the restriction on channels c and out, and the termination symbol 0. We use ’−’ to denote a component that is stuck. The corresponding tags are indicated in the figure with numbers above the components. The set of enabled transitions should be clear from the figures. For instance, we have enab(S [^{b}/_{sec}]) = \{\{1, 2\}, \{1, 3\}, \{1, 4\}\} and enab( − || \overline{out}⟨a⟩ || − || − ) = {2}. The scheduler ζ defined as

ζ(σ) =^{def} \begin{cases}\{1, 4\} & if σ = S [^{a}/_{sec}] , \\ 2 & if σ = S [^{a}/_{sec}] ⟶^{1,2:τ} ( − || \overline{out}⟨a⟩ || − || − ), \\ 3 & if σ = S [^{a}/_{sec}] ⟶^{1,3:τ} ( − || − || \overline{out}⟨b⟩ || − ), \\ 4 & if σ = S [^{a}/_{sec}] ⟶^{1,4:τ} ( − || − || − || \overline{out}⟨a⟩ ), \\ ⊥ & otherwise, \end{cases}

is a global scheduler for S [^{a}/_{sec}].

1(a)  1(b)

Fig. 1. Automata S [^{a}/_{sec}] and S [^{b}/_{sec}]

4 Admissible schedulers

In this section we restrict the discerning power of the global and local schedulers in order to avoid the problem of the information leakage induced in security by clairvoyant schedulers. We impose two kinds of restrictions: For the global scheduler, following [3], we assume that it can only see, and keep memory of, the observable actions and the components that are enabled, but not the secret actions. As for the local scheduler, we assume that the local nondeterminism of each component is solved on the basis of the view of the history local to that component, i.e. the projection of the history of the system on that component. In other words, each component has to make decisions based only on the history of its own execution; it cannot see anything of the other components.

4.1 Restricting Global Schedulers

We assume that the set of actions Σ is divided in two parts, the secret actions S and the observable actions O. The secret actions are supposed to be invisible to the global scheduler. Formally, this can be achieved using a function sift with sift(a) equals τ if a ∈ S and equals a otherwise. Then, we restrict the power of the global scheduler by forcing it to make the same decisions on paths he cannot tell apart.

Definition 3. Given a TPA M, a global scheduler ζ for M is admissible if for all paths

σ_{1} and σ_{2} we have t(σ_{1}) = t(σ_{2}) impliesζ(σ_{1}) = ζ(σ_{2}), where t (q̂ ⟶^{l_{1}:a_{1}} q_{1} ⟶^{l_{2}:a_{2}} ⋯

⟶^{l_{n}:a_{n}} q_{n+1}) =^{def} (enab(q̂), sift(a_{1}), l_{1})(enab(q_{1}), sift(a_{2}), l_{2})⋯(enab(q_{n}), sift(a_{n}), l_{n}).

The idea is that t sifts the information of the path that the scheduler can see. Since sift “hides” the secrets, the scheduler cannot take different decisions based on secrets.

4.2 Restricting Local Schedulers

The restriction on the local scheduler is based on the idea that a step of the component i of a system can only be based on the view that i has of the history, i.e. its own history. In order to formalize this restriction, it is convenient to introduce the concept of i-view of a path σ, or projection of σ on i, which we will denote by σ_{↾i}. We define it inductively:

(σ ⟶^{ℓ:a} μ)_{↾i} = \{ \begin{matrix}σ_{↾i} ⟶^{i:b} δ_{q_{i}} & if ℓ = \{i, j\} and μ = δ_{(A) q_{1}∥...∥q_{i}∥...∥q_{j}∥...∥q_{n}} \\ σ_{↾i} ⟶^{i:a} μ & if ℓ = i \\ σ_{↾i} & otherwise \end{matrix}

In the above definition, the first line represents the case of a synchronization step involving the component i, where we assume that the premise for i is of the form q′_{i} ⟶^{b} δ_{q_{i}}. The second line represents an interleaving step in which i is the active component. The third line represents step in which the component i is idle.

The restriction to the local scheduler can now be expressed as follows:

Definition 4. Given a TPA M and a local scheduler ξ for M, we say that ξ is admissible if for all paths σ and σ′, if ξ(σ) = (ℓ, a, μ), and ξ(σ′) = (ℓ′, a′, μ′) we have:

• if ℓ = ℓ′ = i and σ_{↾i} = σ′_{↾i}, then ξ(σ) = ξ(σ′),

• if ℓ = ℓ′ = {i, j}, σ_{↾i} = σ′_{↾i}, and σ_{↾j} = σ′_{↾j} then ξ(σ) = ξ(σ′).

A pair of compatible schedulers (ζ, ξ) is called admissible if ζ and ξ are admissible.

5 Safe equivalences

In this section we revise process equivalence notions to make them safe for security.

5.1 Safe Complete Traces

We define here a safe version of complete-trace semantics. The idea is that we compare two processes based not only on their traces, but also on the choices that the global scheduler makes at every step. We do this by recording explicitly the tags in the traces.

Definition 5.

• Given a TPA M = (Q, L, Σ, q̂, α), the (complete) safe traces of M, denoted here by Traces_{s}, are defined as the probabilities of sequences of tags and actions corresponding to all possible complete executions, i.e.

Traces_{s}(M) = { f : (L × Σ)^{∞} → [0, 1] | there exists an admissible scheduler (ζ, ξ) s.t.∀t ∈ (L × Σ)^{∞} f(t) = P_{M,ζ,ξ}({σ ∈ CPaths(M) | trace_{s}(σ) = t}) }

where P_{M,ζ,ξ} is the probability measure in M under (ζ, ξ), and trace_{ta} extracts from a path the sequence of tags and actions, i.e. trace_{ta}(ϵ) = ϵ (on the empty path trace_{ta} gives the empty string) and trace_{ta}(q ⟶^{ℓ:a} σ) = ℓ : a · trace_{ta}(σ).

• We denote by Traces_{s}(q) the safe traces of the automaton associated to a system q.

• Two systems q_{1} and q_{2} are safe-trace equivalent, denoted by q_{1} ≃_{s} q_{2}, if and only if Traces_{s}(q_{1}) = Traces_{s}(q_{2}).

The following example points out the difference between ≃_{s} and the standard (complete) trace equivalence.

Example 3. Consider the TPAs of Example 2. The two TPAs have the same complete traces. In fact Traces(S [^{a}/_{sec}]) = \{τ · \overline{out}⟨a⟩ , τ · \overline{out}⟨b⟩\} = Traces(S [^{b}/_{sec}]). On the other hand, we have Traces_{s}(S [^{a}/_{sec}]) = {f_{1}, f_{2}, f_{3}} where f_{1}({1, 2} : τ · 2 : \overline{out}⟨a⟩) = f_{2}(\{1, 3\} : τ · 3 : \overline{out}⟨b⟩) = f_{3}(\{1, 4\} : τ · 4 : \overline{out}⟨a⟩\}) = 1, and f_{i}(t) = 0 otherwise (for i ∈ {1, 2, 3}), while Traces_{s}(S [^{b}/_{sec}]) = {f_{1}, f_{2}, f_{4}} with f_{1}, f_{2} as above, and f_{4}(\{1, 4\} : τ · 4 : \overline{out}⟨b⟩) = 1, f_{4}(t) = 0 otherwise.

5.2 Safe Bisimilarity

In this section we propose a security-safe version of strong bisimulation, that we call safe bisimulation. This is an equivalence relation stricter than safe-trace equivalence, with the advantage of being a congruence. Since in this paper schedulers can always observe which component is making a step (even a silent step), it does not seem natural to consider weak bisimulation.

We start with some notation. Given a TPA M = (Q, L, Σ, q̂, α), and a global scheduler ζ, we write q ⟶^{a}_{ζ} μ if there exists σ ∈ Paths^{⋆}(M) such that ζ(σ) ≠ ⊥, (ζ(σ), a, μ) ∈ α(q), and q = last(σ). Note that the restriction to ζ still allows nondeterminism, i.e. there may be μ_{1}, μ_{2}, such that q ⟶^{a_{1}}_{ζ} μ_{1} and q ⟶^{a_{2}}_{ζ} μ_{2} (with either a_{1} = a_{2} or a_{1} ≠ a_{2}).

We now define the notion of safe bisimulation. The idea is that, if q and q′ are bisimilar states, then every move from q should be mimicked by a move from q′ using the same (admissible) scheduler.

Definition 6. Given a TPA M = (Q, L, Σ, q̂, α), we say that a relation R ⊆ Q × Q is a safe bisimulation if, whenever q_{1} R q_{2}, then enab(q_{1}) = enab(q_{2}), and for all admissible global schedulers ζ for M such that ζ(σ_{1}) = ζ(σ_{2}) whenever last(σ_{1}) = q_{1} and last(σ_{2}) = q_{2}:

• if q_{1} ⟶^{a}_{ζ} μ_{1}, then there exists μ_{2} such that q_{2} ⟶^{a}_{ζ} μ_{2} and μ_{1} R μ_{2}, and

• if q_{2} ⟶^{a}_{ζ} μ_{2}, then there exists μ_{1} such that q_{1} ⟶^{a}_{ζ} μ_{1} and μ_{1} R μ_{2},

where μ_{1} R μ_{2} means that for all equivalence classes X ∈ QR̂, we have μ_{1}(X) = μ_{2}(X), where R̂ is the smallest equivalence class induced by R.

The following result is analogous to the case of standard bisimulation:

Proposition 1. The union of all the safe bisimulations is still a safe bisimulation.

Therefore the largest safe bisimulation exists, and coincides with the union of all safe bisimulations. We call it safe bisimilarity, and we denote it by ∼_{s}.

Given two TPAs on the same L and Σ, M_{1} = (Q_{1}, L, Σ, q̂_{1}, α_{1}) and M_{2} = (Q_{2}, L, Σ, q̂_{2}, α_{2}), we can define bisimulation and bisimilarity across their states, i.e. as relations on (Q_{1} ∪ Q_{2}), in the obvious way, by constructing the TPA M with a new initial state q̂ and two transitions to δq̂_{1} and to δq̂_{2}, respectively.

Given two components or systems, q_{1} and q_{2}, we will say that q_{1} and q_{2} are safely bisimilar, denoted by q_{1} ∼_{s} q_{2}, if the initial states of the corresponding TPAs are safely bisimilar. Note that q_{1} ∼_{s} q_{2} is possible only if q_{1} and q_{2} have the same number of active components, where “active”, for a component, means that during the execution of the system it will make at least one step. Note that in the case of components, or of systems constituted by one component only, safe bisimulation and safe bisimilarity coincide with standard bisimulation and bisimilarity (denoted by ∼), respectively. This is not the case for systems, as shown by the following example:

Example 4. Consider again the TPAs of Example 2. As pointed out in the introduction, we have S [^{a}/_{sec}] ∼ S [^{b}/_{sec}]. However S [^{a}/_{sec}] ≁_{s} S [^{b}/_{sec}]. To show this, let us construct a new TPA (as described before) with initial state q̂ such that q̂ ⟶^{ℓ:τ} S [^{a}/_{sec}] and q̂ ⟶^{ℓ:τ} S [^{b}/_{sec}]. Now consider the (admissible) global scheduler ζ such that

ζ(σ) =^{def} \begin{cases}ℓ & if σ = q̂, \\ \{1, 4\} & if σ = q̂ ⟶^{ℓ:τ} S [^{a}/_{sec}] , \\ 2 & if σ = q̂ ⟶^{ℓ:τ} S [^{a}/_{sec}] ⟶^{1,2:τ} ( − || \overline{out}⟨a⟩ || − || − ), \\ 3 & if σ = q̂ ⟶^{ℓ:τ} S [^{a}/_{sec}] ⟶^{1,3:τ} ( − || − || \overline{out}⟨b⟩ || − ), \\ 4 & if σ = q̂ ⟶^{ℓ:τ} S [^{a}/_{sec}] ⟶^{1,4:τ} ( − || − || − || \overline{out}⟨a⟩ ), \\ \{1, 4\} & if σ = q̂ ⟶^{ℓ:τ} S [^{b}/_{sec}] , \\ 2 & if σ = q̂ ⟶^{ℓ:τ} S [^{b}/_{sec}] ⟶^{1,2:τ} ( − || \overline{out}⟨a⟩ || − || − ), \\ 3 & if σ = q̂ ⟶^{ℓ:τ} S [^{b}/_{sec}] ⟶^{1,3:τ} ( − || − || \overline{out}⟨b⟩ || − ), \\ 4 & if σ = q̂ ⟶^{ℓ:τ} S [^{b}/_{sec}] ⟶^{1,4:τ} ( − || − || − || \overline{out}⟨b⟩ ), \\ ⊥ & otherwise. \end{cases}

It is easy to see that S [^{b}/_{sec}] cannot mimic the transition 4 : \overline{out}⟨a⟩ produced by S [^{a}/_{sec}] using the same scheduler ζ.

It turns out that safe bisimulation is a congruence with respect to all the operators of our language, as expressed by the following theorem. (Statements 2(a) and 2(b) are just the standard compositionality result for probabilistic bisimulation.)

Theorem 1.

1. ∼_{s} is an equivalence relation.

2. Let a ∈ Σ and A, B, B′ ⊆ Σ. Let p_{1}, …, p_{n} be probability values, and let q, q_{1}, q_{2}, …, q_{n}, q′_{1}, q′_{2}, …, q′_{n} be components.

(a) If q_{1} ∼_{s} q_{2}, then a.q_{1} ∼_{s} a.q_{2}, q_{1} + q ∼_{s} q_{2} + q, (a)q_{1} ∼_{s} (a)q_{2}, and q_{1} | q ∼_{s} q_{2} | q.

(b) If q_{1} ∼_{s} q′_{1}, …, q_{n} ∼_{s} q′_{n} , then ∑_{i} p_{i} : q_{i} ∼_{s} ∑_{i} p_{i} : q′_{i}.

(c) If (B) q_{1} ∥ … ∥ q_{n} ∼_{s} (B′) q′_{1} ∥ … ∥ q′_{n}, and f n(q) ∉ B ∪ B′, then

(A ∪ B) q_{1} ∥ … ∥ q ∥ … ∥ q_{n} ∼_{s} (A ∪ B′) q′_{1} ∥ … ∥ q ∥ … ∥ q′_{n}.

The following property shows that bisimulation is stronger than safe-trace equivalence, like in the standard case.

Proposition 2. If q_{1} ∼_{s} q_{2} then q_{1} ≃_{s} q_{2}.

Like in the standard case, the vice-versa does not hold, and safe-trace equivalence is not a congruence^{3}.

3 This is because we are considering the complete traces.

6 Safe Nondeterministic Information Hiding

In this section we define the notion of information hiding under the most general hypothesis that the nondeterminism is handled partly in a demonic way and partly in an angelic way. We assume that the demonic part is in the realm of the global scheduler, while the angelic part is controlled by the local scheduler. The motivation is that in a protocol the local components can be thought of as programs running locally in a single machine, and locally predictable and controllable, while the network can be subject to attacks that make the interactions unpredictable.

We recall that, in a purely probabilistic setting, the absence of leakage, such as nointerference and strong anonymity, is expressed as follows (see for instance [5]). Given a purely probabilistic automaton M, and a sequence ã = a_{1}a_{2} … a_{n}, let P_{M}([ã]) represent the probability measure of all complete paths with trace ã in M. Let S be a protocol containing a variable action secr, and let s be secret actions. Let M_{s} be the automaton corresponding to S[^{s}/_{secr}]. Define Pr(ã | s) as P_{M_{s}}([ã]). Then S is leakage-free if for every observable trace ã , and for every secret s_{1} and s_{2}, we have Pr(ã | s_{1}) = Pr(ã | s_{2}).

In a purely nondeterministic setting, on the other hand, the absence of leakage has been characterized in the literature by the property S[^{s_{1}}/_{secr}] ≅ S[^{s_{2}}/_{secr}], where ≅ is an equivalence relation like trace equivalence, or bisimulation. As we have argued in the introduction, this definition assumes an angelic interpretation of nondeterminism.

We want to combine the above notions so to cope with both probability and nondeterminism. Furthermore, we want to extend it to the case in which part of the nondeterminism is interpreted demonically. Let us first introduce some notation.

Let S be a system containing a variable action secr. Let s be a secret action. Let M_{s} be the TPA associated to S[^{s}/_{secr}] and let (ζ, ξ) be a compatible pair of global and local schedulers for M_{s}. The probability of an observable trace ã given s is defined as Pr_{ζ,ξ}(ã | s) = P_{M_{s},ζ,ξ}([ã]).

The global nondeterminism is interpreted demonically, and therefore we need to ensure that the conditional of an observable, given the two secrets, are calculated with respect to the same global scheduler. On the other hand, the local scheduler is interpreted angelically, and therefore we can compare the conditional probabilities generated by the two secrets as sets under different schedulers. In other words, we have the freedom to match conditional probability from the first set with one of the other set, without requiring the local scheduler to be the same.

Either angelic or demonic, we want to avoid the clairvoyant schedulers, i.e. a scheduler should not be able to use the secret information to achieve its goals. For this purpose, we require both the global and the local scheduler to be admissible.

Definition 7. A system is leakage-free if, for every secrets s_{1} and s_{2}, every admissible global scheduler ζ, and every observable trace ã, {Pr_{ζ,ξ}(ã | s_{1}) | ξ admissible and compatible with ζ} = {Pr_{ζ,ξ}(ã | s_{2}) | ξ admissible and compatible with ζ}.

The safe equivalences defined in Section 5 imply the absence of leakage:

Theorem 2. Let S be a system with a variable action secr and assume S[^{s_{1}}/_{secr}] ≃_{s} S[^{s_{2}}/_{secr}] for every pair of secrets s_{1} and s_{2}. Then S is leakage-free.

Note that the vice versa is not true, i.e. it is not the case that the leakage-freedom of S implies S[^{s_{1}}/_{secr}] ≃_{s} S[^{s_{2}}/_{secr}]. This is because in the definition of safe-trace equivalence we compare the set of probability functions (determined by the schedulers) on traces, while in the definition of leakage-freedom we compare the set of probabilities of each trace, which may come from different functions. This additional degree of freedom generated by the local scheduler helps the system to obfuscate the secret, and provides further justification for the adjective “angelic” for the local nondeterminism.

From the above theorem and from Proposition 2, we also have the following corollary (with the same premises as the previous theorem):

Corollary 1. If S[^{s_{1}}/_{secr}] ∼_{s} S[^{s_{2}}/_{secr}] for every pair of secrets s_{1} and s_{2}, then S is leakage-free.

7 Related Work

The problem of deriving correct implementations from secrecy specifications has received a lot of attention already. One of the first works to address the problem was [18], which showed that the fact that an implementation is a consistent refinement w.r.t. a specification does not imply that the (information-flow) security properties are preserved. More recently, [2] has proposed a notion of secrecy-preserving refinement, and a simulation-based technique for proving that a system is the refinement of another.

[11] argues that important classes of security policies such as noninterference and average response time cannot be expressed by traditional notion of properties, which consist of sets of traces, and proposes to use hyperproperties (sets of properties) instead. [14] addresses the problem of supervisory control, i.e, given a critical system G that may leak confidential information, how to design a controller C so that the system G|C dos not leak. An effective algorithm is presented to compute the most permissible controller such that the system is still opaque w.r.t. a secret.

Concerning angelic and demonic nondeterminism, there are various works which investigate their relation and possible combination. In [4] it is shown that angelic and demonic nondeterminism are dual. [19] uses multi-relations to express specifications involving both angelic and demonic nondeterminism. There are two kinds of agents, demonic and angelic ones, and there is the point of view of the internal system and the one of the external adversary. [22] considers the problem of refining specifications while preserving ignorance. While the focus is on the reduction of demonic nondeterminism of the specification, the hidden values are treated essentially in a angelic way.

The problem of the leakage caused by full-information schedulers has also been investigated in literature. [6] and [7] work in the framework of probabilistic automata and introduce a restriction on the scheduler to the purpose of making them suitable to applications in security protocols. Their approach is based on dividing the actions of each component of the system in equivalence classes (tasks). The order of execution of different tasks is decided in advance by a so-called task scheduler, which is historyindependent and therefore much more restricted than our notion of global scheduler.

[3] proposes a notion of system and admissible scheduler very similar to our notion of system and admissible global scheduler. The main difference is that in that work the components are deterministic and therefore there is no notion of local scheduler.

The work in [9,8] is similar to ours in spirit, but in a sense dual from a technical point of view. Instead of defining a restriction on the class of schedulers, they provide a way to specify that a choice is transparent to the scheduler. They achieve this by introducing labels in process terms, used to represent both the states of the execution tree and the next action or step to be scheduled. They make two states indistinguishable to schedulers, and hence the choice between them private, by associating to them the same label. We believe that every scheduler in our formalism can be expressed in theirs, too. In [8] they also consider the problem of defining a safe version of bisimulation for expressing security properties. They call it demonic bisimulation. The main difference with our work is that we consider a combination of angelic and demonic nondeterminism, and this affects also the definition of bisimulation. Similarly, our definition of leakage-freedom reflects this combination. In [8] the aspect of angelicity is not considered, although they may be able to simulate it with an appropriate labeling.

The fact that full-information schedulers are unrealistic has also been observed in fields other than security. First attempts used restricted schedulers in order to obtain rules for compositional reasoning [12]. The justification for those restricted schedulers is the same as for ours, namely, that not all information is available to all entities in the system. However that work considers a synchronous parallel composition, so the setting is rather different from ours. Later on, it was shown that model checking is unfeasible in its general form for the restricted schedulers in [12] (see [16] and, more recently, [15]). Despite of undecidability, not all results concerning such schedulers have been negative as, for instance, the technique of partial-order reduction can be improved by assuming that schedulers can only use partial information [17].

8 Conclusion and Future work

We have observed that some definitions of security properties based on process equivalences may be too naive, in that they assume the scheduler to be angelic, and, worse yet, to achieve its angelic strategy by peeking at the secrets. We have presented a formalism allowing us to specify a demonic constituent of the scheduler, possibly in collusion with the attacker, and an angelic one, under the control of the system. We have also considered restrictions on the schedulers to limit the power of what they can see, and extended to our nondeterministic framework the (probabilistic) information-hiding properties like non interference and strong anonymity. We then have defined “safe” equivalences. In particular we have defined the notions of safe trace equivalence and safe bisimilarity, and we have shown that the latter is still a congruence. Finally, we have shown that the safe equivalences can be used to prove information-hiding properties.

For the future, we plan to extend our framework to quantitative notions of information leakage, possibly based on information theory. We also plan to implement model checking techniques to verify information hiding properties for our kind of systems. A natural candidate for the implementation would be PRISM. Of course, we would need to restrict the class of schedulers in PRISM so to meet the admissibility criteria.

Acknowledgement. The authors wish to thank the anonymous reviewers for their useful comments, and Pedro D’Argenio for helpful discussion.

References

1. M. Abadi and A. D. Gordon. A calculus for cryptographic protocols: The spi calculus. Inf. and Comp., 148(1):1–70, 1999.

2. R. Alur and S. Zdancewic. Preserving secrecy under refinement. In Proc. of ICALP, number 4052 in LNCS, pages 107–118. Springer-Verlag, 2006.

3. M. E. Andrés, C. Palamidessi, P. van Rossum, and A. Sokolova. Information hiding in prob-

abilistic concurrent systems. www.cs.ru.nl/M.Andres/downloads/SAuN.pdf  .

4. R. J. R. Back and J. von Wright. Combining angels, demons and miracles in program specifications. TCS, 100(2):365–383, 1992.

5. M. Bhargava and C. Palamidessi. Probabilistic anonymity. In Proc. of CONCUR, volume 3653 of LNCS, pages 171–185. Springer, 2005.

6. R. Canetti, L. Cheung, D. Kaynar, M. Liskov, N. Lynch, O. Pereira, and R. Segala. Taskstructured probabilistic i/o automata. In Proc. of WODES, 2006.

7. R. Canetti, L. Cheung, D. K. Kaynar, M. Liskov, N. A. Lynch, O. Pereira, and R. Segala. Time-bounded task-PIOAs: A framework for analyzing security protocols. In Proc. of DISC, volume 4167 of LNCS, pages 238–253. Springer, 2006.

8. K. Chatzikokolakis, G. Norman, and D. Parker. Bisimulation for demonic schedulers. In Proc. of FOSSACS, volume 5504 of LNCS, pages 318–332. Springer, 2009.

9. K. Chatzikokolakis and C. Palamidessi. Making random choices invisible to the scheduler. In Proc. of CONCUR’07, volume 4703 of LNCS, pages 42–58. Springer, 2007.

10. D. Chaum. The dining cryptographers problem: Unconditional sender and recipient untraceability. Journal of Cryptology, 1:65–75, 1988.

11. M. R. Clarkson and F. B. Schneider. Hyperproperties. In CSF, pages 51–65. IEEE, 2008.

12. L. de Alfaro, T. A. Henzinger, and R. Jhala. Compositional methods for probabilistic systems. In Proc. of CONCUR, volume 2154 of LNCS. Springer, 2001.

13. S. Delaune, S. Kremer, and M. Ryan. Verifying privacy-type properties of electronic voting protocols. Journal of Computer Security, 17(4):435–487, 2009.

14. J. Dubreil, P. Darondeau, and H. Marchand. Supervisory control for opacity. IEEE Transactions on Automatic Control, 55(5):1089 –1100, 2010.

15. S. Giro. Undecidability results for distributed probabilistic systems. In Proc. of SBMF, volume 5902 of LNCS, pages 220–235. Springer, 2009.

16. S. Giro and P. R. D’Argenio. Quantitative model checking revisited: Neither decidable nor approximable. In FORMATS, volume 4763 of LNCS, pages 179–194. Springer, 2007.

17. S. Giro, P. R. D’Argenio, and L. M. F. Fioriti. Partial order reduction for probabilistic systems: A revision for distributed schedulers. In Proc. of CONCUR, volume 5710 of LNCS, pages 338–353. Springer, 2009.

18. J. Jacob. On the derivation of secure components. In S&P, pages 242–247. IEEE, 1989.

19. C. E. Martin, S. A. Curtis, and I. Rewitzky. Modelling angelic and demonic nondeterminism with multirelations. Science of Computer Programming, 65(2):140–158, 2007.

20. R. Milner. Communication and Concurrency. Series in Comp. Sci. Prentice Hall, 1989.

21. R. Milner. Communicating and mobile systems: the π-calculus. CUP, 1999.

22. C. Morgan. The shadow knows: Refinement and security in sequential programs. Science of Computer Programming, 74(8):629–653, 2009.

23. M. K. Reiter and A. D. Rubin. Crowds: anonymity for Web transactions. ACM Transactions on Information and System Security, 1(1):66–92, 1998.

24. S. Schneider and A. Sidiropoulos. CSP and anonymity. In Proc. of ESORICS, volume 1146 of LNCS, pages 198–218. Springer, 1996.

25. R. Segala. Modeling and Verification of Randomized Distributed Real-Time Systems. PhD thesis, 1995. Tech. Rep. MIT/LCS/TR-676.

26. R. Segala and N. Lynch. Probabilistic simulations for probabilistic processes. Nordic Journal of Computing, 2(2):250–273, 1995.