Abstract
In this paper, we consider the problem of verifying anonymity and unlinkability in the symbolic model, where protocols are represented as processes in a variant of the applied pi calculus, notably used in the
Introduction
Security protocols aim at securing communications over various types of insecure networks (e.g. web, wireless devices) where dishonest users may listen to communications and interfere with them. A secure communication has a different meaning depending on the underlying application. It ranges from the confidentiality of data (medical files, secret keys, etc.) to, e.g. verifiability in electronic voting systems. Another example of a security notion is privacy. In this paper, we focus on two privacy-related properties, namely unlinkability (sometimes called untraceability), and anonymity. These two notions are informally defined in the ISO/IEC standard 15408 [41] as follows:
Unlinkability aims at ensuring that a user may make multiple uses of a service or resource without others being able to link these uses together. Anonymity aims at ensuring that a user may use a service or resource without disclosing its identity.
Both are critical for instance for Radio-Frequency Identification Devices (RFID) and are thus extensively studied in that context (see, e.g. [52] for a survey of attacks on this type of protocols), but they are obviously not limited to it.
One extremely successful approach when designing and analyzing security protocols is the use of formal verification, i.e. the development of rigorous frameworks and techniques to analyze protocols. This approach has notably lead to the discovery of a flaw in the Single-Sign-On protocol used e.g. by Google Apps. It has been shown that a malicious application could very easily access to any other application (e.g. Gmail or Google Calendar) of their users [9]. This flaw has been found when analyzing the protocol using formal methods, abstracting messages by a term algebra and using the
Unfortunately, most of these results and tools focus on trace properties, that is, statements that something bad never occurs on any execution trace of a protocol. Secrecy and authentication are typical examples of trace properties: a data remains confidential if, for any execution, the attacker is not able to produce the data. However, privacy properties like unlinkability and anonymity are generally not defined as trace properties. Instead, they are usually defined as the fact that an observer cannot distinguish between two situations, which requires a notion of behavioural equivalence. Based on such a notion of equivalence, several definitions of privacy-type properties have been proposed (e.g. [5,21] for unlinkability, and [10,34] for vote-privacy). In this paper, we consider the well-established definitions of strong unlinkability and anonymity as defined in [5]. They have notably been used to establish privacy for various protocols either by hand or using ad hoc encodings (e.g. eHealth protocol [36], mobile telephony [6,7]). We provide a brief comparison with alternative definitions in Section 3.3.
Considering an unbounded number of sessions, the problem of deciding whether a protocol satisfies an equivalence property is undecidable even for a very limited fragment of protocols (see, e.g. [28]). Bounding the number of sessions suffices to retrieve decidability for standard primitives (see, e.g. [14,27]). However, analysing a protocol for a fixed (often low) number of sessions does not allow to prove security. Moreover, in the case of equivalence properties, existing tools scale badly and can only analyse protocols for a very limited number of sessions, typically 2 or 3. Another approach consists in implementing a procedure that is not guaranteed to terminate. This is in particular the case of
Our contribution. We believe that looking at trace equivalence of any pair of protocols is a too general problem and that much progress can be expected when one focuses on a few privacy goals and a class of protocols only (yet large and generic enough). We follow this different approach. We aim at proposing sufficient conditions that can be automatically checked, and that imply unlinkability and anonymity for a large class of security protocols. The success of our solution will be measured by confronting it to many real-world case studies.
More precisely, we identify a large class of 2-party protocols (simple else branches, arbitrary cryptographic primitives) and we devise two conditions called frame opacity and well-authentication that imply unlinkability and anonymity for an unbounded number of sessions. We show how these two conditions can be automatically checked using e.g. the
Our sufficient conditions. We now give an intuitive overview of our two sufficient conditions, namely frame opacity and well-authentication. In order to do this, assume that we want to design a mutual authentication protocol between a tag T and a reader R based on symmetric encryption, and we want this protocol to be unlinkable. We assume that k is a symmetric key shared between T and R.
A first attempt to design such a protocol is presented using Alice & Bob notation as follows (
Our second attempt takes the previous attack into account and randomises the tag’s response and should achieve mutual authentication by requiring that the reader must answer to the challenge
In this example, the attacker adopts a malicious behaviour that is not detected immediately by the tag who keeps executing the protocol. The fact that the tag passes successfully a conditional reveals crucial information about the agents that are involved in the execution. Our second condition, namely well-authentication, basically requires that when an execution deviates from the honest one, the agents that are involved cannot successfully pass a conditional, thus avoiding the leak of the binary information success/failure.
Our main theorem states that these two conditions, frame opacity and well-authentication, are actually sufficient to ensure both unlinkability and anonymity. This theorem is of interest as our two conditions are fundamentally simpler than the targeted properties: frame opacity can be expressed and established relying on diff-equivalence (without the aforementioned precision issue) and well-authentication is only a conjunction of reachability properties. In fact, they are both in the scope of existing automatic verification tools like
Some related work. The precision issue of diff-equivalence is well-known (acknowledged e.g. in [19,26,33,35]). So far, the main approach that has been developed to solve this issue consists in modifying the notion of diff-equivalence to get closer to trace equivalence. For instance, the swapping technique introduced in [35] and formally justified in [19] allows to relax constraints imposed by diff-equivalence in specific situations, namely in process algebras featuring a notion of phase, often used for modelling e-voting protocols. Besides, the limitation of the diff-equivalence w.r.t. conditional evaluations has been partially addressed in [26] by pushing away the evaluation of some conditionals into terms. Nevertheless, the problem remains in general and the limitation described above is not addressed by those works (incidentally, it is specifically acknowledged for the case of the BAC protocol in [26]). We have chosen to follow a novel approach in the same spirit as the one presented in [21]. However, [21] only considers a very restricted class of protocols (single-step protocols that only use hash functions), while we target more complex protocols.
This paper essentially subsumes the conference paper that has been published in 2016 [40]. Compared to that earlier work, we have greatly generalized the scope of our method and improved its mechanization. First, we consider more protocols, including protocols where one party has a single identity (e.g. DAA) as well as protocols where sessions are executed sequentially instead of concurrently (e.g. e-passport scenarios). Second, we consider a much more general notion of frame opacity, which enables the analysis of more protocols. As a result of these two improvements, we could apply our method to more case studies (e.g. DAA, ABCDH).
Outline. In Section 2, we present our model inspired from the applied pi calculus as well as the class of protocols we consider. We then introduce in Section 3 the notion of trace equivalence that we then use to formally define the two privacy properties we study in this paper: unlinkability and anonymity. Our two conditions (frame opacity and well-authentication) and our main theorem are presented in Section 4. Finally, we discuss how to mechanize the verification of our conditions in Section 5 and present our case studies in Section 6, before concluding in Section 8. A detailed proof of our main result is provided in Appendix.
Modelling protocols
We model security protocols using a process algebra inspired from the applied pi calculus [2]. More specifically, we consider a calculus close to the one which is used in the
Term algebra
We consider an infinite set
Given a signature
Consider the following signature:
As in the process calculus presented in [18], constructor terms are subject to an equational theory; this has proved very useful for modelling algebraic properties of cryptographic primitives (see e.g. [31] for a survey). Formally, we consider a congruence
To reflect the algebraic properties of the exclusive or operator, we may consider the equational theory generated by the following equations:
We also give a meaning to destructor symbols through the notion of computation relation. As explained below, a computation relation may be derived from a rewriting system but we prefer to not commit to a specific construction, and therefore we introduce a generic notion of computation relation. Instead, we assume an arbitrary relation subject to a number of requirements, ensuring that the computation relation behaves naturally with respect to names, constructors, and the equational theory.
A computation relation is a relation over if if if if if if
The last requirement expresses that the relation
A possible way to derive a computation relation is to consider an ordered set of rules of the form:
Proving that an ordered set rewriting rules as defined above induces a computation relation is beyond the scope of this paper but the interested reader will find such a proof in [39].
The properties of symbols in
Ordered rewriting rules are expressive enough to define a destructor symbol
For modelling purposes, we split the signature Σ into two parts, namely
We now define the syntax and semantics of the process algebra we use to model security protocols. We consider a calculus close to the one which is used in the
We consider a set
We write
Most constructs are standard in process calculi. The process 0 does nothing and we sometimes omit it. The process
The special construct
The process
We consider the RFID protocol due to Feldhofer et al. as described in [38] and which can be presented using Alice & Bob notation as follows:
The protocol is between an initiator I (the reader) and a responder R (the tag) that share a symmetric key k. We consider the term algebra introduced in Example 3. The protocol is modelled by the parallel composition of
The operational semantics of processes is given by a labelled transition system over configurations (denoted by K) which are pairs
We often write

Semantics for processes.

Sequence simplification rules.
The operational semantics of a process is given by the relation
We note that our semantics enjoys some expected properties. Reduction is stable by bijective renaming, thanks to Definition 1, item 3: if
As usual, the relation
Input and output actions are called observable, while all other are unobservable. Given a trace
We generally refer to τ,
Continuing Example 5. We have that
The names
We aim to propose sufficient conditions to ensure unlinkability and anonymity for a generic class of two-party protocols. In this section, we define formally the class of protocols we are interested in.
Roles. We consider two-party protocols that are therefore made of two roles called the initiator and responder role respectively. We assume a set
An initiator role is a process that is obtained using the following grammar:
Moreover, an initiator (resp. responder) role is assumed to be ground, i.e., contain no free variable, though it may contain free names.
Intuitively, a role describes the actions performed by an agent. A responder role consists of waiting for an input and, depending on the outcome of a number of tests, the process will continue by sending a message and possibly waiting for another input, or stop possibly outputting an error message. An initiator behaves similarly but begins with an output. The grammar forces to add a conditional after each input. This is not a real restriction as it is always possible to add trivial conditionals with empty
Continuing our running example,
Then, a protocol notably consists of an initiator role and a responder role that can interact together producing an honest trace. Intuitively, an honest trace is a trace in which the attacker does not really interfere, and that allows the execution to progress without going into an
A trace
Identities and sessions. In addition to the pair of initiator and responder roles, more information is needed in order to meaningfully define a protocol. Among the names that occur in these two roles, we need to distinguish those that correspond to identity-specific, long-term data (e.g. k from Example 5), called identity parameters and denoted
We also need to know whether sessions (with the same identity parameters) can be executed concurrently or only sequentially. For instance, let us assume that the Feldhofer protocol is used in an access control scenario where all tags that are distributed to users have pairwise distinct identities. Assuming that tags cannot be cloned, it is probably more realistic to consider that a tag can be involved in at most one session at a particular time, i.e. a tag may run different sessions but only in sequence. Such a situation will also occur in the e-passport application where a same passport cannot be involved in two different sessions of the BAC protocol (resp. PACE protocol) concurrently. This is the purpose of the components
A protocol Π is a tuple
Given a protocol Π, we define
Given a protocol Π, we also associate another process
Given a protocol If If
For the sake of simplicity, in case identity parameters only occur in one role, we assume that this role is the responder role. The omitted case where identity parameters occur only in the initiator role is very much similar. In fact, swapping the initiator and responder roles can also be formally achieved by adding an exchange of a fresh nonce at the beginning of the protocol under consideration. Note that the case where both
Let
In order to illustrate our method and the use of the repetition operator, we introduce a toy protocol which, as we shall see later, satisfies unlinkability only when sessions of the initiator role are executed sequentially. Using Alice & Bob notation, this protocol can be described as follows:
The protocol is between a tag T (the initiator) and a reader R (the responder) which share a symmetric key k. To avoid an obvious reflection attack (where
To formalise such a protocol, we consider
The processes modelling the initiator and the responder roles are as follows:
We may note that different choices can be made. For instance, we may decide to replace the process 0 occurring in
As a last example, we will consider one for which identity parameters only occur in one role. This example can be seen as a simplified version of the Direct Anonymous Attestation (DAA) sign protocol that will be detailed in Section 6.
We consider a simplified version of the protocol DAA sign (adapted from [50]). Note that a comprehensive analysis of the protocol DAA sign (as well as the protocol DAA join) will be conducted in Section 6. Before describing the protocol itself, we introduce the term algebra that will allow us to model the signature and zero knowledge proofs used in that protocol. We consider:
We consider the computation relation induced by the empty set of equations, and the rules:
The protocol is between a client C (the responder) and a verifier V (the initiator). The client is willing to sign a message m using a credential issued by some issuer and then he has to convince V that the latter signature is genuine. The client C has a long-term secret key
This protocol falls in our class, the two parties being the verifier
The tuple
The flexibility of our notion of protocol allows for a subtly different scenario to be analyzed by considering

Summary of our running examples.
Discussion about shared and non-shared protocols. As mentioned earlier and shown in Definition 6, we distinguish two cases depending on whether (i) both roles use identity parameters (i.e. when The shared case when The non-shared case when
Unlinkability and anonymity will be uniformly expressed for the cases (i-a) and (i-b) but our sufficient conditions will slightly differ depending on the case under study.
This section is dedicated to the definition of the security properties we seek to verify on protocols: unlinkability and anonymity. Those properties are defined using the notion of trace equivalence which relates indistinguishable processes.
Trace equivalence
Intuitively, two configurations are trace equivalent if an attacker cannot tell whether he is interacting with one or the other. Before formally defining this notion, we first introduce a notion of equivalence between frames, called static equivalence.
A frame ϕ is statically included in for any recipe R such that for any recipes
Two frames ϕ and
Intuitively, an attacker can distinguish two frames if he is able to perform some computation (or a test) that succeeds in ϕ and fails in
Let
Then, trace equivalence is the active counterpart of static equivalence, taking into account the fact that the attacker may interfere during the execution of the process. In order to define this, we first introduce Let K and Resuming Example 8, we may be interested in checking whether the configurations
In this paper, we focus on two privacy-related properties, namely unlinkability and anonymity.
Unlinkability
According to the ISO/IEC standard 15408 [41], unlinkability aims at ensuring that a user may make multiple uses of a service or a resource without others being able to link these uses together. In terms of our modelling, a protocol preserves unlinkability if any two sessions of a same role look to an outsider as if they have been executed with different identity names. In other words, an ideal version of the protocol with respect to unlinkability, allows the roles
In order to precisely define this notion, we have to formally define this ideal version of a protocol Π. This ideal version, denoted
Given a protocol If If
Unlinkability is defined as a trace equivalence between
A protocol
Going back to our running example (Example 8), unlinkability is expressed through the equivalence given in Example 13 and recalled below:
This intuitively represents the fact that the real situation where a tag and a reader may execute many sessions in parallel is indistinguishable from an idealized one where a given tag and a given reader can execute at most one session for each identity.
Although unlinkability of only one role (e.g. the tag for RFID protocols) is often considered in the literature (including [5]), we consider a stronger notion here since both roles are treated symmetrically. As illustrated through the case studies developed in Section 6 (see Sections 6.2 and 6.4), this is actually needed to not miss some practical attacks. We consider the variant of the toy protocol described in Example 9 where concurrent sessions are authorised for the initiator: However, we shall see that the original toy protocol of Example 9 (with sessions of the initiator running sequentially only) can be shown unlinkable using the technique developed in this paper. Formally, the following equivalence holds:
According to the ISO/IEC standard 15408 [41], anonymity aims at ensuring that a user may use a service or a resource without disclosing its identity. In terms of our modelling, a protocol preserves anonymity of some identities Given a protocol If If Let Going back to Example 10, anonymity w.r.t. identity of the client (i.e.
where
The notion of strong unlinkability that we consider is inspired by [5]. In this paper, the authors first propose a definition of weak unlinkability that is not expressed via a process equivalence, then they give a notion of strong unlinkability that implies the former notion and is expressed via a labelled bisimilarity. The authors argue that, compared to weak unlinkability, the strong variant is too constraining but has the advantage of being more amenable to verification. The first claim is based on an example protocol [5, Theorem 1] where a reader emits an observable “beep” when it sees the same tag twice, which breaks strong unlinkability but not weak unlinkability. Unlike the authors of [5], we do not consider this to be a spurious attack, but a potentially threatening linkability issue. The second claim is only substantiated by the fact that tools exist for automatically verifying bisimilarities. As discussed before, this is not sufficient. Moreover, there might be spurious attacks on strong unlinkability just because bisimilarity is a very restrictive equivalence: for this reason we would also consider that the strong unlinkability of [5] is too strong, and instead advocate for our variant based on trace equivalence.
We now show formally that, in the setting that we consider, our notion of unlinkability (Definition 10) indeed corresponds to the strong unlinkability of [5, Definition 12] where trace equivalence is required rather than bisimilarity. In this original formulation, strong unlinkability is a property of one specific role and not of the whole protocol. As a more technical difference, protocols in [5] may involve more than two roles, and agents may use private channels. In practice, this is used to communicate honest identities in setup phases, as is the case in their BAC case study. If we specialise the setting of [5] to two roles R and T (for Reader and Tag) which fall into the format of Definition 3 and do not use the distinguished private channel c, strong unlinkability of the tag role T corresponds to the following labelled bisimilarity:
Several other definitions of unlinkability have been proposed in the literature (see, e.g. [20,22] for a comparison). In particular, various game-based formulations have been considered, both in the computational and symbolic models. We first discuss the most common kind of games, called two-agents games in [22] and seen e.g. in [11,30,42]. As we shall see, these games can be accurately verified through diff-equivalence, but systematically miss some linkability attacks. We will not need any formal definition, but simply rely on the general idea behind these games, which run in two phases:
Learning phase: During this phase, the attacker can trigger an arbitrary number of sessions of the two roles (namely tag and reader) with the identity of his choice. This allows him to gain some knowledge. Eventually, the attacker chooses to end the learning phase and enter the second phase. Guessing phase: The challenger chooses an identity x among two distinguished identities
The attacker wins the game if he can infer whether x is
We consider a protocol between a tag T and a reader R sharing a symmetric key k. We consider that sessions can be executed in parallel, and we assume that T aborts in case the nonce
We consider the term algebra introduced in Example 1, and the equational theory introduced in Example 2 with in addition the equation
A same tag starts two sessions1
This is possible if different physical tags share the same identity, as may be the case e.g. in access control scenarios. In such cases, two different physical tags may run sessions concurrently.
The previous example illustrates a general phenomenon: two-agent games do not capture concurrent attacks. This is also seen with the protocol of Example 9, which suffers from the attack shown in Example 15, but is secure in the sense of two-agent games – this can actually be proved in
As pointed out in [22], three-agent games have also been considered where the challenge phase is changed as follows: the attacker chooses three tags
We suspect that three-agent games still miss some linkability attacks, though counter-example protocols are likely to be artificial. Further generalisations of these games could then be considered to obtain stronger security properties, and get closer to our notion of unlinkability. In any case, it is important to remark that this line of thought fundamentally relies on having a centralised reader since the attacker must distinguish between scenarios that differ only in the identities of some tags. This contrasts with our notion of unlinkability, which does not assume a centralised reader but treats symmetrically the tag and reader role, more generally called initiator and responder. Such a symmetric treatment is required to model unlinkability when the two parties share a dedicated channel or have an initial shared knowledge, e.g. in secure messaging protocols. We also argue that our definition has some value even when analysing protocols featuring centralised readers. In such cases, having reader roles expecting a specific identity seems artificial, but it can actually be seen as a way to model the successive states of a reader (e.g. in LAK, where the tags and reader evolve a common state almost in synchronisation) or a pre-established communication (e.g. in BAC or PACE, where an optical scan is performed to securely exchange a first secret). In any case, our analysis of the aforementioned protocols using our notion of unlinkability has revealed actual attacks that were previously unknown (see Section 6).
We now define our two conditions, namely frame opacity and well-authentication, and our result which states that these conditions are sufficient to ensure unlinkability and anonymity as defined in Section 3. Before doing that, we shall introduce annotations in the semantics of our processes, in order to ease their analysis.
Annotations
We shall now define an annotated semantics whose transitions are equipped with more informative actions. The annotated actions will feature labels identifying which concurrent process has performed the action. This will allow us to identify which specific agent (with some specific identity and session names) performed some action.
Given a protocol
The previous remark allows us to define an annotated semantics for our processes of interest. We consider annotations of the form
Traces of the annotated semantics will be denoted by
This assumption only serves the purpose of uniquely identifying agents. The assumed session nonces do not have to occur in the corresponding roles, so this does not require to change the protocol under study.
In annotated traces, τ actions are not really important. We sometimes need to reason up to these τ actions. Given two annotated trace Considering the protocol Going back to Example 16 and starting with
where
In light of attacks based on leakage from messages where non-trivial relations between outputted messages are exploited by the attacker to trace an agent, our first condition will express that all relations the attacker can establish on output messages only depend on what is already observable by him and never depend on a priori hidden information such as identity names of specific agents. Therefore, such relations cannot be exploited by the attacker to learn anything new about the agents involved in the execution. We achieve this by requiring that any reachable frame must be indistinguishable from an idealised frame that only depends on data already observed in the execution, and not on the specific agents (and their names) of that execution.
As a first approximation, one might take the idealisation of a frame
Our idealised frames will be obtained by replacing each message, produced by an output of label ℓ, by a context that only depends on ℓ, whose holes are filled with fresh session names and (idealisations of) previously inputted messages. Intuitively, this is still enough to ensure that the attacker does not learn anything that is identity-specific. In order to formalise this notion, we assume two disjoint and countable subsets of variables: input variables
Let
We may note this notion is not necessarily well-defined, as
Continuing Example 18, we consider the idealisation operator defined as follows:
On the latter simple example, such an idealisation will be sufficient to establish that any reachable frame obtained through an execution of
Continuing Example 9, to establish our indistinguishability property, namely frame opacity defined below, we will consider:
Regarding Example 10, we also need to define an idealisation that retains the shape of the second outputted message. Moreover, the idealisation of the second outputted message will depend on the nonce previously received. Assuming that the outputs are labelled with
The following proposition establishes that the particular choice of
Let
It is sufficient to observe that
We can now formalise the notion of frame opacity as announced: it requires that all reachable frames must be statically equivalent to idealised frames.
The protocol Π ensures frame opacity w.r.t.
There are many ways to choose the idealisation operator
At first reading, it is possible to skip the rest of the section and directly go to Section 4.3 since proposed canonical constructions are just instantiations of our generic notion of idealisation.
Intuitively, this construction builds the idealisation operator by examining the initiator and responder roles as syntactically given in the protocol definition. The main idea is to consider (syntactical) outputted terms one by one, and to replace identity parameters, as well as variables bound by a let construct by pairwise distinct names variables, i.e. variables in
Let
Continuing Example 8, we first perform some renaming to satisfy the conditions imposed by the previous definition. We therefore replace
Considering
Continuing Example 10, we consider a renaming σ that maps:
As illustrated by the previous examples, the syntactical idealisation is sufficient to conclude on most examples. Actually, using this canonical construction, we automatically build the idealisation operator and check frame opacity for all the examples we have introduced in the previous sections and for most of the case studies presented in Section 6.
The previous construction is clearly purely syntactic and therefore closely connected to the way the roles of the protocol are written. Its main weakness lies in the way variables are bound by let constructions. Since there is no way to statically guess the shape of messages that will be instantiated for those variables, the previous technique replaces them by fresh session names. False negatives may result from such over-approximations. We may therefore prefer to build an idealisation operator looking at the messages outputted during a concrete execution. In such a case, we may simply retain part of the shape of messages, which a priori does not reveal anything sensitive to the attacker (e.g. pairs, lists). This can be formalised as follows:
A symbol
Considering the signature and the equational theory introduced in Example 1 and Example 2, the symbols
Once the set
Considering the protocol given in Example 8, the resulting idealisation associated to Π (considering messages in
In [40], the idealisation operator associated to Π was exclusively computed using this method. The technique is implemented in the tool
Our second condition will prevent the attacker from obtaining some information about agents through the outcome of conditionals. To do so, we will essentially require that conditionals of
For a protocol Π, a conditional
Consider the process
Note that trivial conditionals required by the grammar of protocols (Definition 3) are safe and will thus not get in the way of our analysis. We can now formalise the notion of association, which expresses that two agents are having an honest, intended interaction, i.e. the attacker essentially did not interfere in their communications. For an annotated trace
Given a protocol Π, two annotations they are dual, i.e. the interaction
Continuing Example 18,
Finally, we can state our second condition.
The protocol Π is well-authenticating if, for any The annotations a and Moreover, when
Intuitively, this condition does not require anything for safe conditionals as we already know that they cannot leak new information to the attacker (he already knows their outcome). For unsafe conditionals, condition (i) requires that whenever an agent a evaluates them positively (i.e. he does not abort the protocol), it must be the case that this agent a is so far having an honest interaction with a dual agent
As illustrated in the following example, condition (ii) is needed to prevent from having executions where an annotation is associated to several annotations, which would break unlinkability in the shared case (i.e. when
We consider a protocol between an initiator and a responder that share a symmetric key k. The protocol can be described informally as follows:
Assuming that the two outputs are labelled with
While the condition (i) of well-authentication is verifiable quite easily by expressing it as simple reachability properties (as explained in Section 5.2), the required condition (ii) for the shared-case is actually harder to express in existing tools. We therefore shall prove that, for the shared case, once condition (i) of well-authentication is known to hold, condition (ii) is a consequence of two simpler conditions that are easier to verify (as shown in Section 5.2.2). First, the first conditional of the responder role should be safe – remark that if this does not hold, similar attacks as the one discussed above may break unlinkability. Second, messages labelled by some ℓ outputted in honest interactions by different agents should always be different.
Let
the first conditional that occurs in
for any execution
Consider an execution Agent Agent a is only associated to
Our main theorem establishes that the previous two conditions are sufficient to ensure unlinkability and anonymity.
Consider a protocol
Note that, when
The proof of this theorem is detailed in Appendix B, and we explain in Section 5 how to check these two conditions in practice relying on existing verification tools. We apply our method on various case studies that are detailed in Section 6. Below, we only briefly summarize the result of the confrontation of our method to our various running examples, focusing on unlinkability.
We note ✓ for a condition automatically checked using
We now discuss how to verify unlinkability and anonymity in practice, through the verification of our two conditions. More specifically, we describe how appropriate encodings allow one to verify frame opacity (Section 5.1) and well-authentication (Section 5.2), respectively through diff-equivalence and correspondence properties in
We additionally provide a tool, called
Frame opacity
We shall describe how to encode frame opacity using the diff-equivalence of
Diff-equivalence. Intuitively, diff-equivalence is obtained from trace equivalence by forcing the two processes (or configurations) being compared to follow the same execution. It has been introduced in [18] as a means to automatically verify observational equivalence in
We use our own notations here, taking advantage of the fact that our calculus is a simplification of the one used in [18]: in particular, channels are public constants and choice operators cannot be used in channel positions. We also use the notation
A bi-process P is uniform if for all reductions
From now on, we say that a bi-process is diff-equivalent when it satisfies the condition of [18, Theorem 1]. By extension, we say that the two projections of a bi-process are diff-equivalent when the bi-process is.
Diff-equivalence verification in
Consider now the analogue bi-process fragment
An extension of bi-processes. In the original notion of bi-processes [18], the two sides of a bi-process are isolated and can execute independently. However, the Horn clause encoding of bi-processes that is used for verification in
With this modification, [18, Theorem 1] does not hold anymore. In fact,
Besides the problem of the new meaning of diff-equivalence, an important question is whether extended diff-equivalence can be verified automatically, and how. We claim that it is straightforward, as the Horn clause encoding of bi-processes already features what is needed for adequately encoding extended bi-processes, namely the duplicated input variables seen in the above example – accordingly, we only had to modify a few tenth of lines of the
Encoding frame opacity through extended diff-equivalence. Using this extended notion of bi-process, we can now directly express frame opacity as the diff-equivalence of a bi-process. This bi-process will have
First, we need to ensure that any reduction of
Second, we need to ensure that computation failures that occur while computing idealizations result in a diff-equivalence failure. This is necessary to obtain a match with frame opacity, which requires that idealizations are well-defined even when destructors are involved. Hence, when the bi-process computes idealized values in its second projection, a failsafe computation should happen in the first projection. Moreover, idealizations should be computed using the values of the input variables from the right side of the bi-process execution, in line with the definition of idealization, i.e. Definition 13.

Our running example (Feldhofer) using
Before proving more formally that our translation is adequate, let us illustrate it on our running example, i.e. Example 8. We first give in Fig. 4 the description of the protocol in
This is not possible with the theoretical notion of bi-process, where
We now conclude with a formal correctness argument.
Let
Assume, by contradiction, that there exists an execution
Define

Practical application. Our tool
We explain below how to check condition (i) of well-authentication (see Definition 19). Once that condition is established, together with frame opacity, we shall see that condition (ii) is actually a consequence of a simple assumption on the choice of idealisation, which is always guaranteed when using
Condition (i)
Condition (i) of well-authentication is basically a conjunction of reachability properties, which can be checked in
Such an event is placed just before the action
For each conditional of the protocol, we first check if the simple syntactical definition of safe conditionals holds (see Definition 17). If it is the case we do nothing for this conditional. Otherwise, we need to check condition (i) of well-authentication. This condition can be easily expressed as a correspondence property relying on the events we have introduced. Let
For instance, given a conditional of the initiator role tagged with event when the event there must be a previous event and a previous event and a previous event
Note that by using the same variables (

Process modelling the Feldhofer protocol with events.

Some practical considerations. In our tool, safe conditionals are not automatically identified. Actually, the tool lists all conditionals and tells which ones satisfy condition (i) of well-authentication. The user can thus easily get rid of the conditionals that he identifies as safe. Furthermore, the structure of the
Note that, for some examples, we also verified condition (i) of well-authentication using
To verify Condition (ii) of well-authentication, we rely on Lemma 1 which provides two sufficient sub-conditions. Condition (a) of Lemma 1 can be checked manually;
Indeed, once frame opacity is known to hold, condition (b) actually follows immediately from simple properties of the idealisation function, since checking that honest outputs cannot be confused in executions of Let Consider an execution
As mentioned earlier, the tool whether frame opacity could be established or not: in particular, it infers an idealisation operator that, when in the shared case, satisfies the assumptions of Proposition 3; and the list of conditionals for which condition (i) of well-authentication holds.
If frame opacity holds and condition (i) of well-authentication holds for all conditionals – possibly with some exceptions for conditionals the user can identify as safe– then the tool concludes that the protocol given as input ensures unlinkability and anonymity w.r.t.
The syntaxic heuristic fully adopts the canonical syntactical construction from Section 4.2 (and displays a warning message when in the shared case, since all requirements are not met in this case). It can be enabled using the option
The semantic heuristic (enabled with the option
This heuristic follows the canonical syntactical construction described in Section 4.2 except that sub-terms having a function symbol at top-level that is involved in the equational theory will be replaced by a fresh session name in order to comply with hypothesis of Proposition 3. This is the default heuristic in UKano.
Finally, the user can also define its own idealisations and the tool
At a technical level, we built
Case studies
In this section we apply our verification method to several case studies. We rely on our tool
All case studies discussed in this section except two (i.e. DAA in Section 6.4 and ABCDH in Section 6.5) have been automatically verified using our tool OS: Linux 3.10-2-amd64 #1 SMP Debian 3.10.5-1x86_64 GNU/Linux CPU / RAM: Intel(R) Xeon(R) CPU X5650 @ 2.67 GHz / 47GO
Hash–Lock protocol
We consider the Hash-Lock protocol as described in [42]. This is an RFID protocol that has been designed to achieve privacy even if no formal proof is given. We suppose that, initially, each tag has his own key k and the reader maintains a database containing those keys. The protocol relies on a hash function, denoted
This protocol falls into our generic class of 2-party protocols in the shared case, and frame opacity and well-authentication can be automatically established in less than 0.01 second. We can therefore conclude that the protocol preserves unlinkability (note that anonymity does not make sense here). Actually, all implemented heuristics were able to successfully establish frame opacity automatically.
LAK protocol
We present an RFID protocol first introduced in [43], and we refer to the description given in [52]. To avoid traceability attacks, the main idea is to ask the tag to generate a nonce and to use it to send a different message at each session. We suppose that initially, each tag has his own key k and the reader maintains a database containing those keys. The protocol is informally described below (
Actually, this protocol suffers from an authentication attack. The protocol does not allow the reader to authenticate the tag. This attack can be informally described as follows (and already exists on the original version of this protocol). By using algebraic properties of ⊕, an attacker can impersonate a tag by injecting previously eavesdropped messages. Below,
Due to this, the protocol does not satisfy our well-authentication requirement even with sessions in sequence for
More importantly, this scenario can be seen as a traceability attack on the stateful version of the protocol leading to a practical attack. The attacker will first start a session with the targeted tag by sending it a nonce
We may note that the same protocol was declared untraceable in [52] due to the fact that they have in mind a weaker notion of unlinkability. Actually, their notion captures the intuitive notion that a tag is untraceable if for any execution in which two actions are performed by the same tag, there is another execution indistinguishable from the original one in which the actions have been performed by two different tags. We may note that in the attack scenario described above, the tag in itself does not leak anything but the reader does, explaining why this weak notion of untraceability missed this attack.
Now, to avoid the algebraic attack due to the properties of the xor operator, we may replace it by the pairing operator. The resulting protocol is a 2-party protocol that falls into our class, and for which frame opacity and well-authentication can be established (with concurrent sessions) using
BAC protocol and some others
An e-passport is a paper passport with an RFID chip that stores the critical information printed on the passport. The International Civil Aviation Organization (ICAO) standard [48] specifies several protocols through which this information can be accessed. Before executing the Basic Access Control (BAC) protocol, the reader optically scans a weak secret from which it derives two keys
In [5], two variants of the BAC protocol are described and analysed. We refer below to these two variants as the French version and the United Kingdom (U.K.) version. The U.K. version is claimed unlinkable (with no formal proof) whereas an attack is reported on the French version. We first give an informal description of the BAC protocol using Alice & Bob notation:
Then, to explain the difference between the two versions, we give a description of the passport’s role in Fig. 8.

Description of the passport’s role.
We do not model the
The U.K. version of the BAC protocol is a 2-party protocol according to our definition. Note that since the two error messages are actually identical, we can merge the two
Regarding the French version of this protocol, it happens that the passport’s role is neither an initiator role, nor a responder role according to our formal definition. Indeed, our definition of a role, and therefore of a 2-party protocol does not allow to model two sequences of tests that will output different error messages in case of failure. As illustrated by the attack on the French version of the BAC protocol, imposing this syntactic condition is actually a good design principle w.r.t. unlinkability.
Once the BAC protocol has been successfully executed, the reader gains access to the information stored in the RFID tag through the Passive and Active Authentication protocols (PA and AA). They are respectively used to prove authenticity of the stored information and prevent cloning attacks, and may be executed in any order. A formal description of these protocols is available in [4]. These two protocols also fall into our class and our conditions can be checked automatically both for unlinkability and anonymity properties. We can also use our technique to analyse directly the three protocols together (i.e. the U.K. version of the BAC together with the PA and AA protocols in any order). We analysed both orders, i.e. BAC followed by PA, and then AA, as well as BAC following by AA, and then PA. We establish unlinkability and anonymity w.r.t. all private data stored in the RFID chip (name, picture, etc.).
The Password Authenticated Connection Establishment protocol (PACE) has been proposed by the German Federal Office for Information Security (BSI) to replace the BAC protocol. It has been studied in the literature [15,16,25] but to the best of our knowledge, no formal proofs about privacy have been given. Similarly to BAC, its purpose is to establish a secure channel based on an optically-scanned key k. This is done in four main steps (see Fig. 9):
The tag chooses a random number Both the tag and the reader perform a Diffie–Hellman exchange (messages 2 & 3), and derive G from The tag and the reader perform a Diffie–Hellman exchange based on the parameter G computed at the previous step (messages 5 & 6). The tag and the reader derive a session key
Moreover, at step 6, the reader is not supposed to accept as input a message which is equal to the previous message that it has just sent.

PACE in Alice & Bob notation.
To formalise such a protocol, we consider
Except

Process
We consider the process
This is sufficient for the protocol to work properly but it obviously lacks equations that the attacker may exploit.
First, we would like to highlight an imprecision in the official specification that may lead to practical attacks on unlinkability. As the specification seems to not forbid it, we could have assumed that the decryption operation in
Second, we now consider that decryption is a constructor, and thus cannot fail, an we report on an attack that we discovered using our method on some models of PACE found in the literature [15,16,25]. Indeed, in all those papers, the first conditional of the reader
Third, we turn to PACE as properly understood from the official specification: when the latter test is present and the decryption may not fail. In that case, we report on a new attack.
Further, we propose a simple fix to the above attack by adding tags avoiding confusions between reader’s messages and tag’s messages. It suffices to replace messages 8 and 9 from Fig. 9 by respectively
Most authentication protocols are identity-based: the user needs to provide his identity and prove to the service provider he is not trying to impersonate somebody else. However, in many contexts, the service provider just needs to know that the user has some non-identifying attributes (e.g. age, gender, country, membership). For instance, a liquor shop just needs to have the proof that the user has the right to buy liquors (i.e. that he is old enough) and does not need to know the full identity of the user (e.g. as it is currently done when showing ID cards). Attribute-based authentication protocols solve this problem and allow a user to prove to another user, within a secure channel, that he has some attributes without disclosing its identity.
We used our method to automatically establish unlinkability of a typical use case of such a protocol taking part to the IRMA project.6
For more information about IRMA (“I Reveal My Attributes”), see
The key ingredient of this protocol is attribute-based credential (ABC). It is a cryptographic container for attributes. In ABC, attributes are signed by some issuers and allow for selective disclosure (SD): it is possible to produce a zero-knowledge (ZK) proof revealing a subset of attributes signed by the issuer along with a proof that the selected disclosed attributes are actually in the credential. This non-interactive proof protocol can be bound to some fresh data to avoid replay attacks. We shall use the notation
We analyse the ABCDH [3] using the model of SD from [24] used in the following scenario:
an organisation an organisation a user C wants to watch a movie rated adult-only due to its violent contents; his has a credential from a movie theatre V wants to verify whether the user has the right to watch this movie; it has a credential from
The scheme is informally given in Fig. 11.

ABCDH (where
This is a 2-party protocol that falls into our class. Actually, we have that
A Trusted Platform Module (TPM) is a hardware device aiming at protecting cryptographic keys and at performing some cryptographic operations. Typically, a user may authenticate himself to a service provider relying on such a TPM. The main advantage is to physically separate the very sensitive data from the rest of the system. On the downside however, such devices may be used by malicious agents to breach users’ privacy by exploiting their TPMs. Direct Anonymous Attestation (DAA) protocols have been designed to let TPMs authenticate themselves whilst providing accountability and privacy.
In a nutshell, some issuers issue credentials representing membership to a group to the TPM using group signatures via the DAA join protocol. Those credentials are bound to the internal secret of the TPM that must remain unknown to the service provider. Then, when a TPM is willing to prove to a verifier its membership to a group, it uses the DAA sign protocol. We analysed the RSA-based DAA join and sign protocols as described in [50]. Both protocols rely on complex cryptographic primitives (e.g. blind signatures, commitments, and Zero Knowledge proofs) but
DAA join
In the RSA-based DAA join protocol, the TPM starts by sending a credential request in the form of a commitment containing its internal secret, some session nonce and the public key of the issuer. The issuer then challenges the TPM with some fresh nonces encrypted asymmetrically with the public key of the TPM. After having received the expected TPM’s answer, the issuer sends a new nonce as second challenge. To this second challenge, the TPM needs to provide a ZK proof bound to this challenge proving that he knows the internal secret on which the previous commitment was bound. Finally, after verifying this proof, the issuer blindly signs the commitment allowing the TPM to extract the required credential.

DAA join.
We give in Fig. 12 an Alice & Bob description of the protocol between the TPM and the issuer. The message
This protocol falls in our class and lies in the shared case7
Both roles share the identity name
Once a TPM has obtained such a credential, it may prove its membership using the DAA sign protocol. This protocol is played by a TPM and a verifier: the verifier starts by challenging the TPM with a fresh nonce (step 1.), the latter then sends a complex ZK proof bound to this nonce (step 2.). The latter ZK proof also proves that the TPM knows a credential from the expected issuer bound to a secret he knows (essentially a message
We give in Fig. 13 an Alice & Bob description of the protocol between a verifier and the TPM willing to sign a message m using its credential
The protocol also specifies a mode that makes different signatures linkable by construction using

DAA sign.
Similarly to Examples 10, 11, we distinguish two cases whether
We discuss a more precise modelling and why it cannot be analyzed in our framework in 7.1.2.
We now summarise our results in Table 1. We only summarize results obtained regarding unlinkability and considering concurrent sessions. For each protocol, we mention the identity parameters of each role. Most of our case studies fall into the shared case with
Summary of our case studies regarding unlinkability with concurrent sessions
Summary of our case studies regarding unlinkability with concurrent sessions
In this section, we would like to discuss some further limitations of our approach. We first explain some limitations that come from the approach itself in Section 7.1. In Section 7.2, we then discuss some limitations of our tool
Limitations of our Theorem 1
Our approach consists of providing two sufficient conditions under which anonymity (see Definition 12) and unlinkability (see Definition 10) are satisfied. These condtions, even if they are satisfied by many concrete examples, may not be fullfilled by some protocols that are nevertheless anonymous and unlinkable (see examples described in Section 7.1.1). We then discuss in Section 7.1.2 some limitations that come from the class of protocols we consider.
Tightness of our conditions
As illustrated by the toy protocols given in Examples 30 and 31, our conditions are sufficient but not necessary to ensure unlinkability or anonymity. We suppose that, initially, each tag has its own key k and the reader maintains a database containing those keys. The protocol relies on symmetric encryption, and can be informally described as follows.
Once the reader receives the encryption, it opens it and checks the identity of the tag before accepting (or not) to grant access to the tag. This protocol falls into our generic class of 2-party protocols (shared case). Anonymity w.r.t. Regarding our conditions, frame opacity does not hold. Consider
Regarding well-authentication, we can establish that such a condition does not hold as well. Still considering the execution leading to the frame ϕ above, we can then consider a reader that starts two sessions accepting twice In order to ensure unlinkability, we now suppose that the tag sends its identity accompanied with a freshly generated random number r. Therefore, we have that:
This protocol falls into our generic class of 2-party protocols (shared case). The identity parameters of both roles are Actually, frame opacity can be established relying on either the syntaxical idealisation or the semantical one. The fresh random number inside each encryption allows one to ensure that all the ciphertexts are different. However, for the same reason as the one explained in the previous example, well-authentication does not hold: condition (ii) is not satisfied. We recall that this can be considered as a false attack only if the protocol and the use case both enforce that the continuation of the protocol in case the test passes is always indistinguishable from the continuation in the other case; this is a strong assumption.
Among the limitations coming from our definition of protocols, we first reconsider the DAA sign and PACE protocols to highlight some limitations of our approach.
Two parties only. Our notion of protocols only covers 2-party protocols. This obviously excludes important protocols with more than 2 parties such as secure group communication protocols [44], e-voting protocols [35], make mobile communication protocols [12], the combination of DAA join and DAA sign [35] that features 3 parties, etc.This also excludes scenarios where privacy is considered between group of entities. For instance for DAA sign (see Example 10 or Section 6.6.2), verifiers and clients may be associated to different issuers. Using our framework, one can analyze privacy between users in a single group (as in Example 10), or between groups but where each goup has only one user (as in Example 11). In the latter case, one would rather want to model privacy between groups where each group contains an unbounded number of users, but this is out of the scope of our approach. This is not surprinsing since such a scenario actually features three parties: clients, verifiers, issuers (forming groups); all with unbounded number of entities.
Honest trace. Now, we want to report on a potential limitation we discovered when analysing the PACE protocol using
Indeed, the attacker can alter the Diffie–Hellman shares, as informally depicted in Fig. 14, without impacting the successive conditionals.

Example of successful but dishonest interaction (X can be any message).
This is problematic because successful tests will pass (independently of the message X) while such interactions are not honest according to our current definition of honest trace (see Definition 4). This problematic interaction is however not detected in
The failure of well-authentication described above does not yield a failure of unlinkability. It is thus a case where one might want to make well-authentication less restrictive. One direction for weakening it is to extend the notion of “honest trace associated to a protocol” (Definition 5): instead of a single honest trace we would associate to a protocol a set of symbolic traces that are, roughly, traces with (possibly) variables in recipes. For PACE, one may for instance use
In practice, this limitation on the well-authentication condition does not seem very important, as the issue is tied to the peculiar use of two Diffie–Hellman rounds in PACE and, expanding the discussion beyond privacy, the attack on well-authentication shows a potential weakness in that protocol. Indeed, Tag and Reader fail to establish an agreement on each other’s Diffie–Hellman shares from the first round (i.e.
Stateless only. Our framework and our theorem only applies to stateless protocols (i.e. no mutable states persistent across sessions). This immediately excludes numerous real-world protocols such as secure messaging protocols [29], mobile communication protocols [12], etc.
Our tool
Besides the limitations of our tool
Conclusion
We have identified two conditions, namely well-authentication and frame opacity, which imply anonymity and unlinkability for a wide class of protocols. Additionally, we have shown that these two conditions can be checked automatically using the tool
In the future, we plan to improve the way our sufficient conditions are checked. For instance, we would like to let
Based on limitations discussed in Section 7.1.2, we also identify a number of research problems aimed at generalizing the impact of our technique. We would like to investigate the extension of our main theorem to the case of protocols with states. This is certainly technically challenging, but would make it possible to model more protocols, or at least model them more faithfully. We are also interested in extending our method to protocols with more than 2 parties which are commonplace (e.g. the combination of DAA join and DAA sign is essentially a 3-party protocol).
Finally, we believe that the overall methodology developed in this paper (i.e. privacy via sufficient conditions) could be applied in other contexts where privacy is critical: e.g. e-voting, attribute-based credentials, blockchain technologies, transparent certificate authorities. In our opinion, the privacy via sufficient conditions approach also sheds light on the privacy notions themselves. Indeed, each sufficient condition helps to get a better grasp of necessary ingredients for preserving privacy. It might thus be interesting to translate such conditions into more comprehensive guidelines helping the design of new privacy-enhancing protocols.
Footnotes
Appendix
We provide in this appendix the proof of our main result (Theorem 1). Our main argument consists in showing that, for any execution of
We fix a protocol
Abstraction of configurations
Instead of working with
Control is determined by associations
We show in that section that the outcome of tests is entirely determined by associations. This will be useful to show that, if we modify an execution (by renaming agents) while preserving enough associations, then the control flow is left unchanged. We assume that Π satisfies item (i) of the well-authentication condition. Let (⇒) We start by applying Proposition 4 to obtain an execution
(⇐) For this other direction, we observe that (up to changes of recipes that do not affect the resulting messages) if two agents are associated in the above execution (starting with
Invariance of frame idealisations
In general, a renaming of annotations can break executability: as illustrated in Example 33, mapping two dual annotations to annotations with different identities breaks the ability of the two underlying agents to communicate successfully. Moreover, even when executability is preserved, parameters change (so do names) and thus frames are modified. However, as stated next in Proposition 6, such renamings do not change idealised frames. We obtain the latter since we made sure that idealised frames only depend on what is already observable and not on specific identity or session parameters. In combination with frame opacity, this will imply (Proposition 7) that a renaming of annotations has no observable effect on the resulting real frames.
Let
Let We have shown that We assume that Π satisfies frame opacity. Let ρ be a renaming of annotations and We start by applying Proposition 4 on the two given executions to obtain two executions starting from Note that, if
Relying on frame opacity, we know that
A sufficient condition for preserving executability
We can now state a key lemma (Lemma 2), identifying a class of renamings which yield indistinguishable executions. More precisely, this lemma shows that for renamings satisfying some requirements, if
Finally, after having defined the notion of connection between agents, we can state our key lemma. Annotations a and We assume that Π satisfies frame opacity and item (i) of well-authentication. Let
We have that
The ground configurations The bi-process considered here does not make use of the extension of diff-equivalence presented before: its inputs are of the form
For the sake of simplicity, we decorate outputs of the biprocess obtained from
For any prefix Any bi-conditional when when
We proceed by induction on the prefix
Case
Case the prefix of
Conditions (c1) and (c2) follow from the fact that association is not affected by the execution of an output:
If the conditional has a label If the conditional is unsafe, we make use of Proposition 5 to show that the outcome of the conditional is the same on both sides. First, we deduce the following executions from Proposition 4 item (4) applied on the execution before renaming and Proposition 9 applied on the execution after renaming:
After the execution of this conditional producing
Thus, we have that
Conditions (c1) and (c2) are preserved because honest interactions are preserved by the renaming, since
Final proof
Thanks to Lemma 2, we can transform any execution of
We are now able to prove our main theorem.
Acknowledgments
We would like to thank Bruno Blanchet for his valuable help regarding the mechanisation in ProVerif of our frame opacity condition. The extension of bi-processes in Section
is due to him. We also thank Solène Moreau for her useful feedback on earlier versions of this paper. This work was conducted when Lucca Hirschi was working at LSV, ENS Paris-Saclay & Université Paris-Saclay, France and then at ETH Zurich, Switzerland. This work has received funding from the European Research Council (ERC) under the EU’s Horizon 2020 research and innovation program (grant agreement No 714955-POPSTAR) and the ANR project SEQUOIA ANR-14-CE28-0030-01.
