﻿Complexity Results for Security Protocols with
Diffie-Hellman Exponentiation and Commuting
Public Key Encryption
YANNICK CHEVALIER
IRIT-Université Paul Sabatier
and
RALF KÜSTERS ETH Zürich
and
MICHAËL RUSINOWITCH and MATHIEU TURUANI
LORIA-INRIA-Université Henri Poincaré
We show that the insecurity problem for protocols with modular exponentiation and arbitrary
products allowed in exponents is NP-complete. This result is based on a protocol and intruder
model which is powerful enough to uncover known attacks on the Authenticated Group Diffie-
Hellman (A-GDH.2) protocol suite. To prove our results, we develop a general framework in which
the Dolev-Yao intruder is extended by generic intruder rules. This framework is also applied to
obtain complexity results for protocols with commuting public key encryption.
Categories and Subject Descriptors: []: Computer Security
General Terms: Security Protocols, Verification
Additional Key Words and Phrases: Algebraic Properties, Complexity, Dolev-Yao Model, Diffie-
Hellman Exponentiation
1. INTRODUCTION
Designing secure communication systems in open environments, such as the Internet,
is a challenging task which heavily relies on cryptographic protocols. However,
severe attacks can be conducted on these systems just by exploiting the inherent
weaknesses of cryptographic protocols. Attacks on cryptographic protocols are easily
overlooked at the design level as adversaries may control the communication
network and may combine messages from different protocol sessions. Also, protocol
This paper is a full version of work previously published in [Chevalier et al. 2003a] and [Chevalier
et al. 2004]. The authors have partially been supported by PROCOPE and IST AVISPA. The
second author was also supported by the DFG.
Author’s address: Y. Chevalier, IRIT, 31068 Toulouse, France; R. Küsters, ETH Zürich, Institute
of Theoretical Computer Science, Haldeneggsteig 4, CH-8092 Zürich, Switzerland; M. Rusinowitch
and M. Turuani, LORIA-INRIA, 54506 Vandoeuvre-les-Nancy, France.
Permission to make digital/hard copy of all or part of this material without fee for personal
or classroom use provided that the copies are not made or distributed for profit or commercial
advantage, the ACM copyright/server notice, the title of the publication, and its date appear, and
notice is given that copying is by permission of the ACM, Inc. To copy otherwise, to republish,
to post on servers, or to redistribute to lists requires prior specific permission and/or a fee.
c○ 20YY ACM 1529-3785/20YY/0700-0001 $5.00
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY, Pages 1–50.
2 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
participants may be dishonest. The need for rigorous formal and tool supported
analysis of cryptographic protocols has therefore long been realized. The so-called
Dolev-Yao model, which has its roots in a paper by Dolev and Yao [Dolev and Yao
1983], is the dominating formal security model in this line of research (see [Meadows
2000] for an overview on the early history on protocol analysis). Many procedures
have been proposed to decide security properties of cryptographic protocols in the
Dolev-Yao model [Amadio et al. 2002; Boreale 2001; Rusinowitch and Turuani 2001;
Millen and Shmatikov 2001] and based on these procedures many tools have been
developed (see, e.g., [Millen and Shmatikov 2001; Chevalier and Vigneron 2001;
Corin and Etalle 2002]) and successfully been applied to find flaws in published
protocols [Clark and Jacob 1997; Boyd and Mathuria 2003; Basin et al. 2003].
Most methods and tools, including those mentioned above, take as a simplifying
assumption that the cryptographic algorithms are perfect (perfect cryptography
assumption). For instance, it is assumed that the decryption key is needed to
extract the plain-text from the cipher-text; without such a key, no information
whatsoever is leaked about the plain-text. Also, a cipher-text can only be generated
with the appropriate key and message. This simple model is insufficient
when dealing with the numerous protocols that use operators with algebraic properties,
such as the exclusive OR (XOR) and modular exponentiation. The reason
for this is twofold: First, without taking these properties into account, the protocols
do not even achieve their security goals in the absence of an intruder ([Boyd
and Mathuria 2003] contains many examples of such protocols). For instance, the
basic Diffie-Hellman key exchange protocol relies on a commutativity property of
exponentiation: (g a ) b = (g b ) a . Second, many attacks exploit algebraic properties
of operators, and hence, such attacks cannot be uncovered without considering such
properties. For example, the Recursive Authentication Protocol by Bull and Otway
[Bull and Otway 1997] was proven to be secure when perfect cryptographic
functions are employed [Paulson 1997] and was shown to be insecure when the protocol
is implemented using the XOR operator [Ryan and Schneider 1998] and its
nilpotency property. Section 6 contains another example, the A-GDH.2 protocol
suite (see [Boyd and Mathuria 2003] for more examples). Hence, it is crucial to
take algebraic properties of operators such as XOR, Diffie-Hellman exponentiation
and RSA encryption into account when analyzing cryptographic protocols.
Contribution of this work. In this paper, we show that the insecurity problem
for protocols that use Diffie-Hellman exponentiation with arbitrary products in
exponents is NP-complete when the protocols are analyzed w.r.t. a bounded number
sessions. We illustrate that our protocol and intruder model is powerful enough
to uncover attacks first pointed out by Pereira and Quisquater on the A-GDH.2
protocol suite [Pereira and Quisquater 2001]. The NP-completeness result is also
shown for protocols employing commuting public key encryption (such as RSA with
common modulus). As a consequence of our proofs, we in addition obtain that the
derivation problem, which asks whether the intruder can derive a given message
from a given finite set of messages, can be decided in deterministic polynomial time
both in case of Diffie-Hellman exponentiation and commuting public key encryption.
The proofs of the NP-completeness results work in two steps: First, we extend the
(standard) Dolev-Yao intruder by generic rules, called oracle rules. We show that
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 3
the insecurity problem is NP-complete for intruders extended by such rules. Second,
we show that the insecurity problem for the intruder extended by the ability to apply
Diffie-Hellman exponentiation and commuting public key encryption, respectively,
is an instance of the general framework established in the first step.
Related work. The first works to relax the perfect cryptographic assumption by
taking algebraic properties of operators into account are [Chevalier et al. 2003a;
Comon-Lundh and Shmatikov 2003]. In these works, the Dolev-Yao model was
extended by the XOR operator and its algebraic properties. For Diffie-Hellman exponentiation
and commuting public key encryption, as studied here, things become,
however, much more involved due to the more complex algebraic properties. In particular,
unlike the XOR operator, here we do not have the nilpotency property and
therefore need to record the number of occurrences of elements in a product, which
requires to manipulate equations over integers.
Meadows and Narendran [Meadows and Narendran 2002] designed unification
algorithms for handling properties of Diffie-Hellman cryptographic systems. Although
these results are useful, they do not solve the more general insecurity problem
(see also [Kapur et al. 2003]).
Pereira and Quisquater [Pereira and Quisquater 2004] proposed a systematic way
for analyzing protocol suites which extend the Diffie-Hellman key-exchange scheme
to a group setting. While they find interesting attacks which exploit algebraic properties
of Diffie-Hellman exponentiation, they do not consider decidability questions.
Goubault-Larrecq et al. [Goubault-Larrecq et al. 2005] developed a system to
verify protocols using modular exponentiation on a fixed generator g. There method
is based on approximations and they have a deduction rule to express that an
intruder can generate g a·b from g a and b, but they do not handle inverses, and
hence, they miss realistic attacks.
Boreale and Buscemi [Boreale and Buscemi 2003] addressed a problem similar
to ours. However, in their paper, among other restrictions, they put an a priori
bound on the number of factors that may occur in products, while in the present
paper, we allow an unlimited number of factors. Also, Boreale and Buscemi do not
provide a complexity result.
Millen and Shmatikov study Abelian groups and apply them to Diffie-Hellman
exponentiation [Millen and Shmatikov 2003], but they do not provide a decision
procedure. Also, they assume the base in exponentiations to be a fixed constant.
Recently, following the result presented in [Chevalier et al. 2003b], Shmatikov
[Shmatikov 2004] proposed a decision procedure for finding attacks in a variant
of our model for Diffie-Hellman exponentiation. He does, however, not provide
complexity results. While, unlike in our model, in Shmatikov’s model products
may occur outside of exponents, the factors in products may not start with an
exponentiation symbol, a restriction not present in our model.
Structure of the paper. In Section 2, we introduce our protocol and intruder
model, including the oracle rules mentioned above. The NP-completeness result for
this general framework is proven in Section 3. In Section 4 and 5, we instantiate the
oracle rules by rules that allow the intruder to apply Diffie-Hellman exponentiation
and show that the derivation problem and the protocol insecurity problem can be
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
4 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
decided in deterministic and non-deterministic polynomial time, respectively. To
illustrate our model and results, in Section 6 we formally specify the A-GDH.2 protocol
and present an attack on it first discovered by Pereira and Quisquater [Pereira
and Quisquater 2001]. Finally, in Section 7 we apply our method to protocols with
commuting public key encryption. We conclude in Section 8. Some parts of our
proofs are moved to the appendix.
2. THE PROTOCOL AND INTRUDER MODEL
The protocol and intruder model we describe here extends standard models for the
(automatic) analysis of security protocols [Amadio et al. 2002; Rusinowitch and
Turuani 2001; Millen and Shmatikov 2001] in two respects. First, messages can be
built using the operator Exp(·, ·), which stands for exponentiation, and a product
operator “·”. Second, in addition to the standard Dolev-Yao rewrite rules, the
intruder is equipped with the mentioned oracle rules, which are later instantiated
with rules to exponentiate terms. In what follows, we provide a formal definition
of our model by defining terms, messages, protocols, the intruder, and attacks.
2.1 Terms and Messages
The set of terms term is defined by the following grammar:
term ::= A | V | 〈term, term〉 | {term} s term
| {term} p
| Exp(term, product)
K
product ::= termZ | termZ · product
where A is a finite set of constants (atomic messages), containing principal names,
nonces, keys, and the constants 1 and secret; K is a subset of A denoting the set of
public and private keys; V is a finite set of variables; and Z is the set of integers,
the product exponents. We assume that there is a bijection · −1 on K which maps
every public (private) key k to its corresponding private (public) key k −1 .
The binary symbol 〈·, ·〉 stands for pairing, the binary symbol {·} s · for symmetric
encryption, and the binary symbol {·} p · for public key encryption. Note that a
symmetric key can be any term and that for public key encryption only atomic
keys (namely, public and private keys from K) can be used.
The product operator “·” models multiplication in an Abelian group. For instance,
the product a 2 · b 3 · c −2 stands for an element of this group where a 2 = a · a,
b 3 = b · b · b, and c −2 = c −1 · c −1 with c −1 the inverse of c. In the A-GDH.2 protocol
for example, the Abelian group is a subgroup G of order q of the multiplicative
group Z ∗ p where p and q are prime numbers. Terms and products are read modulo
commutativity and associativity of the product operator as well as the identity
t 1 = t. For instance, d 1 · c −2 · (b 3 · a 2 ) and a 2 · b 3 · c −2 · d are considered the same
products. Also, when we write t z1
1
· · · tzn
n , then we always assume that the head
symbol of ti is not a product operator. This can always be achieved by resolving
parentheses. We write t ∗ 1 · · · t ∗ n to denote a product of the form t z1
1
· · · tzn
n where
the zi are some non-zero integers. The operator Exp(·, ·) stands for exponentiation.
For instance, Exp(a, b2 · c−1 ) is ab2 ·c −1
.
If t, t1, . . . , tn are terms with n ≥ 2, then we call a product of the form tz for
some z �= 1 or a product of the form t z1
1 · · · tzn n a non-standard term. We often refer
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 5
to a term or a product as a “term”. We say standard term to distinguish a term
from a non-standard term.
Variables are denoted by x, y, . . ., terms are denoted by s, t, u, v, finite sets of
terms are written E, F, ..., and decorations thereof, respectively. We abbreviate
E ∪ F by E, F , the union E ∪ {t} by E, t, and E \ {t} by E \ t.
For a term t and a set of terms E, V(t) and V(E) denote the set of variables
occurring in t and E, respectively.
A ground term (also called message) is a term without variables. We use the
expressions standard and non-standard messages in the same way we use standard
and non-standard terms. A (ground) substitution σ is a mapping from V into the
set of standard (ground) terms. The application of a substitution σ to a term t (a
set of terms E) is written tσ (Eσ), and is defined as usual.
We say that two terms t and t ′ coincide modulo product exponents (t ≈ t ′ , for
short) if t and t ′ are equal except for the product exponents. For instance:
� Exp(g, a 2 ), Exp(g, b −3 · c) � ≈ � Exp(g, a 0 ), Exp(g, b 2 · c 5 ) �
�≈ � Exp(g, b 1 ), Exp(g, a 2 · c 5 ) �
This equivalence relation extends to substitutions in the obvious way: σ ≈ σ ′ iff
σ(x) ≈ σ ′ (x) for every variable x.
Given a standard term u and a term v, the replacement δ = [u ← v] of u by v
maps every term t to the term tδ = t[u ← v] which is obtained by replacing all
occurrences of u in t by v. Formally, we have:
Definition 2.1. The application of a replacement δ = [u ← v] to a term t, written
tδ, is defined inductively on the structure of t as follows:
—If t = u, then tδ = v. Otherwise:
—If t ∈ A ∪ V, then tδ = t.
—If t = 〈t1, t2〉, then tδ = 〈t1δ, t2δ〉.
—If t = {t1} s t2 , then tδ = {t1δ} s t2δ .
—If t = {t1} p
p
t2 , then tδ = {t1δ} t2δ .
—If t = Exp(t0, t z1
1
—If t = t z1
1
· · · tzp
p ), then tδ = Exp(t0δ, (t1δ) z1 · · · (tpδ) zp ).
· · · tzp
p , then tδ = (t1δ) z1 · · · (tpδ) zp .
Note that, for example, with δ = [Exp(g, a) ← 1] we have that Exp(g, a 2 )δ =
Exp(g, a 2 ) and Exp(g, a·b)δ = Exp(g, a·b). We emphasize that, by definition, tδ is
uniquely determined.
We can compose a substitution σ with a replacement δ: the substitution σδ maps
every x ∈ V to σ(x)δ.
The set of subterms of a term t, denoted by S(t), is defined as follows:
— If t ∈ A or t ∈ V, then S(t) = {t}.
— If t = 〈u, v〉, {u} s v, or {u} p v, then S(t) = {t} ∪ S(u) ∪ S(v).
— If t = Exp(u, t z1
1
— If t = t z1
1
· · · tzp
p ), then S(t) = {t} ∪ S(u) ∪ �
i S(ti).
· · · tzp
p , then S(t) = {t} ∪ �
i S(ti).
Recall that the ti are standard terms.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
6 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
We define S(E) = � {S(t) | t ∈ E}. Note that Exp(a, b 2 · c 1 ) and b 2 · c 1 · d 1 are
not subterms of Exp(a, b 2 · c 1 · d 1 ).
We define the set Sext(t) of extended subterms of t to be Sext(t) = S(t) ∪ {M |
Exp(u, M) ∈ S(t)}. Thus, the only difference to the definition of subterms is that
for subterms Exp(u, M) of t the product M also belongs to the set of (extended)
subterms of t.
The set of factors of a term t, denoted by F(t), is recursively defined:
— If t is standard and not Exp(·, ·), then F(t) = {t}.
— If t = Exp(u, t ∗ 1 · · · t ∗ p), then F(t) = {u, t1, .., tp}.
— If t = t ∗ 1 · · · t ∗ p, then F(t) = {t1, .., tp}.
Note that F(t) only contains standard terms. For example, with a, b, c ∈ A, F(a 2 ·
b 1 · c −1 ) = {a, b, c}.
We consider two different ways of measuring the size of a term, one includes the
product in exponents and the other does not. In any case, the size is defined according
to the DAG size of a term. We define |t| := Card(S(t)) (|t|ext := Card(Sext(t)))
to be the number of (extended) subterms of t.
Remark 2.2. |t|ext ≤ 2 · |t|.
Note that the definitions of | · | and | · |ext do not measure the size of product exponents.
To measure the space needed to represent the product exponents occurring
in t, we define
||t||exp :=
�
|z1| + . . . + |zn|,
t z1 1 ···tzn n ∈S(t)
where |zi| is the number of bits needed to represent the integer zi in binary. Also,
||t|| := |t| + ||t||exp.
For a set of terms E the size is defined in the same way (replace t by E in the above
definitions). For a substitution σ, we set
|σ| = �
|σ(x)|
x∈V
and analogously, we define ||σ||exp and ||σ||.
One easily shows by structural induction:
Lemma 2.3. Let s be a standard term, t be a term, and x be a variable or an
atomic message. Let δ be the replacement [s ← x]. Then, |tδ| ≤ |t|.
We now formulate the algebraic properties of terms. Recall that terms are read
modulo commutativity and associativity of the product operator as well as the
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 7
identity t 1 = t. In addition, we consider the following properties:
t · 1 = t (1)
t z · t z′
t 0 = 1 (2)
1 z = 1 (3)
= t z+z′
(4)
Exp(t, 1) = t (5)
Exp(Exp(t, t ′ ), t ′′ ) = Exp(t, t ′ · t ′′ ) (6)
A normal form of a term is obtained by iteratively applying these identities from
left to write. Note that the identities can be applied to subterms of terms and
that the normal forms are uniquely determined up to commutativity and associativity
of the product operator. In other words, the rewriting system induced by
the above identities when oriented from left to right is confluent modulo commutativity
and associativity of the product operator. Since we consider terms modulo
commutativity and associativity of the product operator, normal forms are uniquely
determined. The normal form of a term t is denoted by �t�. We illustrate the notion
of a normal form by some examples: If a, b, c, d ∈ A, then
— �(a 2 · b 1 ) · b −2� = a 2 · b −1
— �Exp(Exp(a, b 1 · c 1 ), c −1 · d 1 )� = Exp(a, b · d)
— �Exp(a, b 1 · c 1 · (c −1 · d 1 ) 1 )� = Exp(a, b · d)
— �Exp(Exp(a, (b 1 · c −2 ) 3 , b −3 ), c 6 )� = a.
The normal forms of sets of terms and substitutions are defined in the obvious way.
A term t is normalized if �t� = t. In the same way normalized sets and substitutions
are defined. Two terms t and t ′ are equivalent (modulo Exp and ·) if �t� = �t ′�. One
easily shows:
Lemma 2.4. For every term t, t ′ and substitution σ:
(1 ) S(�t�) ⊆ �S(t)�,
(2 ) ||�t�||exp ≤ ||t||exp,
(3 ) ||�t�|| ≤ ||t||,
(4 ) S(tσ) ⊆ S(t)σ ∪ S(V(t)σ), and
(5 ) �tσ� = ��t�σ� = �t�σ�� = ��t��σ��.
2.2 The Intruder Model
Our intruder model follows the Dolev-Yao intruder [Dolev and Yao 1983]. That is,
the intruder has complete control over the network and he can derive new messages
from his initial knowledge and the messages received from honest principals during
protocol runs. To derive a new message, the intruder can compose and decompose,
encrypt and decrypt messages, in case he knows the key. What distinguishes the
intruder we consider here from the standard Dolev-Yao intruder is that we equip
the intruder with guess rules which provide him with additional capabilities for
deriving messages. In Section 2.5, we consider guess rules that satisfies certain
conditions. We will call these rules oracle rules.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
8 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Decomposition rules Composition rules
Pair Lp1(〈m, m ′ 〉): 〈m, m ′ 〉 → m Lc(〈m, m ′ 〉): m, m ′ → 〈m, m ′ 〉
Lp2(〈m, m ′ 〉): 〈m, m ′ 〉 → m ′
Asymmetric Lad({m} p
K
): {m}p K , K−1 → m Lc({m} p
K ): m, K → {m}p K
′): {m}sm
′, m′ → m Lc({m} s
m ′): m, m′ → {m} s
m ′
Guess Lod(m): E → m Loc(m): E → m
with m subterm of E with E, m normalized and such
and E normalized. that every proper subterm of m
is a subterm of E.
Symmetric Lsd({m} s
m
Table I. Intruder rules.
The intruder derives new messages from a given (finite) set of message by applying
intruder rules. An intruder rule (or t-rule) L is of the form S → t, where S is a
finite set of standard messages and t is a standard message. Given a finite set E
of standard messages, the rule L can be applied to E if S ⊆ E. We define the
step relation →L induced by L to be a binary relation on finite sets of standard
messages. For every finite set of standard messages E we have E →L E, t (recall
that E, t stands for E ∪ {t}) if L is a t-rule and L can be applied to E. If L denotes
a (finite or infinite) set of intruder rules, then →L denotes the union �
the step relations →L with L ∈ L. With → ∗ L
L∈L →L of
we denote the reflexive and transitive
closure of →L.
The set of intruder rules we consider in this paper is depicted in Table I. In this
table, m, m ′ denote arbitrary standard messages, K is an element of K, and E is a
finite set of standard messages.
We emphasize that the notion of intruder rule will always refer to the rules listed
in Table I. For now, there may be any set of guess rules of the kind shown in
Table I, later we will consider certain classes of guess rules, namely oracle rules.
The intruder rules are denoted as shown in Table I. With Lod(m) and Loc(m) we
denote (finite or infinite) sets of guess rules. For uniformity, we therefore consider
Lp1(〈m, m ′ 〉), . . . , Lsd({m} s m ′) and Lc(〈m, m ′ 〉), . . . , Lc({m} s m ′) as singletons. Note
that, even if there are no guess rules, the number of decomposition and composition
rules is always infinite since there are infinitely many messages m, m ′ .
We further group the intruder rules as follows. In the following, t ranges over all
standard messages.
— Ld(t) := Lp1(t) ∪ Lp2(t) ∪ Lad(t) ∪ Lsd(t). In case, for instance, Lp1(t) is not
defined, i.e., the head symbol of t is not a pair, then Lp1(t) = ∅; analogously for
the other rule sets,
— Ld := �
t Ld(t), Lc := �
t Lc(t),
— Lod := �
t Lod(t), Loc := �
t Loc(t),
— Lo(t) := Loc(t) ∪ Lod(t), Lo := Loc ∪ Lod,
— Ld := �
t Ld(t) where Ld(t) is the set of all decomposition t-rules in Table I, i.e.,
all t-rule in the left column of the table,
— Lc := �
t Lc(t) where Lc(t) is the set of all composition t-rules in Table I, and
— L := Ld ∪ Lc.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 9
Note that L denotes the (infinite) set of all intruder rules we consider here. The
set of messages the intruder can derive from a (finite) set E of messages is:
forge(E) := � {E ′ | E → ∗ L E ′ }.
From the definition of intruder rules in Table I it immediately follows:
Lemma 2.5. If E is a normalized set of messages, then forge(E) is normalized.
The lemma says that if an intruder only sees normalized messages, then he only
creates normalized messages. Intruders should be modeled in such a way that
they cannot distinguish between equivalent messages. In what follows we always
assume that the intruder’s knowledge consists of a set of normalized messages,
where every single normalized message in this set can be seen as a representative
of its equivalence class.
2.3 Protocols
Informally speaking, a protocol consists of a finite set of principals and every principal
performs a finite and fixed sequence of receive-send actions. Since, as usual
in the Dolev-Yao model, we assume that the intruder controls the communication
network, all messages sent by a principal are sent to the intruder and all messages
received by a principal come from the intruder. When a principal receives a message
from the intruder, he performs his current receive-send action, i.e., after receipt of
the message and some computation a message is sent back to the intruder (if any).
The next message received from the intruder is processed by the next receive-send
action in the sequence in the same way.
Similar to other models [Rusinowitch and Turuani 2001; Millen and Shmatikov
2001; Chevalier et al. 2003a], we model receive-send actions by rewrite rules of the
form R ⇒ S. On receiving a message m, it is first checked whether m and R match,
i.e., whether there exists a ground substitution σ such that �m� = �Rσ�. If so, �Sσ�
is returned as output. We always assume that the messages exchanged between
the principals and the intruder are normalized. In particular, m is assumed to
be normalized and the output of the above rule is not Sσ but �Sσ�. This is because
principals and the intruder cannot distinguish between equivalent terms, and
therefore, they may only work on normalized terms (representing the corresponding
equivalence class of terms). We also note that since the different protocol rules in
the specification of a protocol may share variables, some of the variables in R and
S may be bounded already by substitutions obtained from applications of previous
protocol rules.
Instead of defining principals as a sequence of rewrite rules of the above form and
protocols as a finite set of principals, our definition is slightly more general. We
will not define principals explicitly but define protocols as a finite partially ordered
set of rewrite rules. Such a partial ordering can contain several linear orderings
of rewrite rules corresponding to sequences of rewrite rules, and hence, principals.
Before defining protocols formally, let us take a look at an example: The set of
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
10 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
rules of the example protocol is defined to be
1: Start ⇒ Na
2: {〈Na, x〉} s
⇒ End
K
1’: y ⇒ {〈y, Nb〉} s
K
with the partial ordering 1 < 2. Intuitively, rules 1 and 2 represent one principal,
say Alice, and step 1 ′ represents another principal, say Bob. The partial ordering
guarantees that Alice performs 1 before 2, but 1 ′ can be performed before 1, between
1 and 2, or after 2. The atom Na is a nonce generated by Alice, Nb is a nonce
generated by Bob, and K is the key shared between Alice and Bob. It is assumed
that the atom Start belongs to the initial intruder knowledge.
The formal definition of protocols and rewrite rules is as follows. The definition
of protocols also contains the initial intruder knowledge as we are interested in
attacks on protocols (Section 2.4). The three conditions required of protocols are
explained following the definition.
Definition 2.6. A protocol rule is of the form R ⇒ S where R and S are standard
terms.
A protocol P is a tuple ({Ri ⇒ Si, i ∈ I}, <I, E) where E is a finite normalized
set of standard messages with 1 ∈ E, the initial intruder knowledge, I is a finite
(index) set, <I is a partial ordering on I, and Ri ⇒ Si, for every i ∈ I, is a protocol
rule such that the following conditions are satisfied:
(1) The (standard) terms Ri and Si are normalized.
(2) For all x ∈ V(Si), there exists j ≤I i such that x ∈ V(Rj).
(3) For every subterm Exp(t1, t z2
2
V(tl) ⊆ �
j<Ii
· · · tzn
n ) of Ri, there exists k ∈ {1, .., n} such that
V(Rj) for every l ∈ {1, .., n} \ {k}.
Given a protocol P , in the following we let A denote the set of constants occurring in
P . We define S(P ) := E ∪ �
i∈I (Ri ∪ Si) to be the set of subterms of P , V := V(P )
to be the set of variables occurring in P , and |P | := |S(P )|, ||P || := ||S(P )||,
|P |ext := |S(P )|ext, and ||P ||ext := ||S(P )||ext to be the different sizes of P .
Condition 1. is w.l.o.g., since due to Lemma 2.4, the transformation performed
by a protocol rule and its normalized variant coincide.
Condition 2. guarantees that when with Si an output is produced, all variables
in Si are “bounded” already, i.e., the substitution of these variables is determined
by the previously received messages from the intruder. Otherwise, the output of
a protocol rule would be arbitrary since unbounded variables could be mapped to
any message.
Condition 3. guarantees that all exponents, except for at most one exponent tk,
in any subterm of Ri of the form Exp(·, ·) are built over variables from previous
steps, i.e. variables that have been assigned messages before the ith step. Below we
argue that in order to not miss attacks, protocol specifications should not contain
variables in exponents whose values are not determined by previous steps. Hence,
Condition 3. could be restricted even more by requiring that V(tl) ⊆ �
j<Ii V(Rj)
also for l = k. However, we use (3) in Definition 2.6 as it is sufficient and convenient
to use in proofs.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 11
Specification of Protocols Involving Diffie-Hellman Exponentiation—Discussion.
Typically, protocols that employ Diffie-Hellman exponentiation require to check
whether a given message belongs to a certain group (see, e.g., [Steiner et al. 1998]),
i.e., given a group generator g and a message m, one checks whether there exists
a message (number) a such that m = g a . It is tempting to model this by a term
of the form Exp(g, x) where g is a constant which stands for the group generator
g and x is a variable. In the symbolic world, such a term would only match with
messages of the form Exp(g, m ′ ) for some m ′ , and hence, with messages guaranteed
to belong to the group generated by g. However, a constant b (when interpreted
as a bit string) or the pair 〈c, d〉 with constants c and d (when interpreted as
the concatenation of two bit strings c and d) might also represent elements of the
group generated by g. Thus, if the adversary sends Exp(b, m ′ ) or Exp(〈c, d〉 , m ′ )
for some message m ′ , then in the cryptographic world both messages would be
accepted, i.e., pass the group membership test. However, in the symbolic world
these messages would not match with Exp(g, x). As a consequence, in the symbolic
world one might miss attacks that are possible in the cryptographic world. In order
to prevent this, we suggest to use in protocol specifications variables instead of terms
of the form Exp(g, x) or more generally Exp(g, t) where t is some term containing
a variable. That is, instead of writing, for example, Exp(g, x) ⇒ . . . we suggest
to write z ⇒ . . . for some variable z. In such a specification terms of the form,
for example, Exp(b, m ′ ) or Exp(〈c, d〉 , m ′ ) would be accepted. Of course, messages
could be accepted that w.r.t. the cryptographic interpretation would not belong to
the group generated by g, i.e., false attacks could occur. However, it seems quite
likely that, in a symbolic model, if there exists an attack on a protocol modeled
as just described, then in fact something is wrong with the protocol independent
of the issue of membership checks. Finally, we note that our modeling avoids the
need for instantiating variables by non-standard terms since messages of the form
Exp(m, m ′ ) only need to be matched with variables.
2.4 Attacks
We now define attacks on protocols. We first need to introduce the notion of an
execution ordering of a protocol: a linear ordering of some of the protocol rules in
a protocol consistent with the partial ordering.
Definition 2.7. A bijective mapping π : I ′ → {1, .., p} is called execution ordering
for P if I ′ ⊆ I, p is the cardinality of I ′ , and for all i, j we have that if i <I j
and π(j) is defined, then π(i) is defined and π(i) < π(j). We define the size of π
to be p.
Informally speaking, in an attack on a protocol P , the intruder chooses some
execution order for P and then tries to produce input messages for the protocol
rules in the order determined by the execution ordering. These input messages are
derived from the intruder’s initial knowledge and the output messages received so
far. The aim of the intruder is to derive the message secret. If different sessions
of a protocol running interleaved shall be analyzed, then these sessions must be
encoded into the protocol P . This is the standard approach when protocols are
analyzed w.r.t. a bounded number of sessions, see, for instance, [Rusinowitch and
Turuani 2001; Millen and Shmatikov 2001].
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
12 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Definition 2.8. Let P = ({R ′ ι ⇒ S ′ ι | ι ∈ I}, <I, S0) be a protocol. Then an
attack on P is a tuple (π, σ) where π is an execution ordering on P and σ is a
normalized ground substitution of the variables occurring in P such that
(1) �Riσ� ∈ forge(�S0, S1σ, ..., Si−1σ�) for every i ∈ {1, . . . , k} where k is the size of
π, Ri := R ′ π−1 (i) , and Si := S ′ π−1 (i) , and
(2) secret ∈ forge(�S0, S1σ, ..., Skσ�).
Due to Lemma 2.4, it does not matter whether, in the above definition, σ is normalized
or not. Also note that Lemma 2.5 implies: �forge(�S0, S1σ, ..., Si−1σ�)� =
forge(�S0, S1σ, ..., Si−1σ�).
The decision problem we are interested in is the following set of protocols:
Insecure := {P | there exists an attack on P }.
Later we will consider minimal attacks.
Definition 2.9. Let P = ({Rι ⇒ Sι | ι ∈ I}, <I, S0) be a protocol. An attack
(π, σ) is minimal if |σ| is minimal, i.e., for all substitutions σ ′ , if (π, σ ′ ) is an attack
on P , then |σ| ≤ |σ ′ |.
Clearly, if there is an attack, there is a minimal attack. Note, however, that minimal
attacks are not necessarily uniquely determined.
2.5 Oracle Rules
Oracle rules are guess rules which satisfy certain conditions. To define these rules,
we first need some new notions.
A derivation D of length n, n ≥ 0, is a sequence of steps of the form E →L1
E, t1 →L2 · · · →Ln E, t1, . . . , tn with a finite set of standard messages E, standard
messages t1, . . . , tn, and intruder rules Li ∈ L such that E, t1, . . . , ti−1 →Li
E, t1, . . . , ti and ti �∈ E ∪{t1, . . . , ti−1} for every i ∈ {1, . . . , n}. The rule Li is called
the ith rule of D and the step E, t1, . . . , ti−1 →Li E, t1, . . . , ti is called the ith step
of D. We write L ∈ D to say that L ∈ {L1, . . . , Ln}. If S is a set of intruder rules,
then we write S /∈ D to say S ∩ {L1, . . . , Ln} = ∅. The message tn is called the goal
of D.
We also need well-formed derivations, which are derivations where every message
generated by an intermediate step either occurs as subterm in the goal or in the
initial set of messages.
Definition 2.10. Let D = E →L1 . . . →Ln E ′ be a derivation with goal t. Then,
D is well-formed if E ′ ⊆ S(E, t).
We can now define oracle rules. Condition 1. in the following definition will allow
us to bound the length of derivations. The remaining conditions allow us to replace
a subterm u in σ by a smaller message and are later used to bound the size of the
substitution σ in an attack.
Definition 2.11. Let Lo = Loc ∪ Lod be a (finite or infinite) set of guess rules,
where Loc and Lod denote disjoint sets of composition and decomposition guess
rules, respectively. Then, Lo is a set of oracle rules (w.r.t. Lc ∪ Ld as defined
above) iff all of the following conditions are satisfied:
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 13
Input: protocol P = ({Rι ⇒ Sι, ι ∈ I}, <I, S0). Recall that V = V(P ).
(1) Guess an execution ordering π for P . Let k, Ri, and Si be defined as in Definition 2.8.
(2) Guess a normalized ground substitution σ such that |Vσ| ≤ |P | and ||σ||exp ≤ p(||P ||).
(3) Test that �Riσ� ∈ forge(�{Sjσ | j < i} ∪ {S0}�) for every i ∈ {1, . . . , k}.
(4) Test secret ∈ forge(�{Sjσ | j < k + 1} ∪ {S0}�).
(5) If each test is successful, then answer “yes”, and otherwise, “no”.
Fig. 1. NP Decision Procedure for Insecure where p denotes the polynomial bounding the size
of product exponents.
(1) For every message t and finite set E, if t ∈ forge(E), then there exists a wellformed
derivation from E with goal t.
(2) If F → Loc(t) F, t and F, t → Ld(t) F, t, a, then there exists a derivation D from
F with goal a such that Ld(t) �∈ D.
(3) For every finite set F of messages with 1 ∈ F , if F \ u → Lc(u) F , i.e., u can
be composed from F \ u in one step, then F → Lo(t) F, t implies �t[u ← 1]� ∈
forge(�F [u ← 1]�) for every message t.
3. THE NP DECISION ALGORITHM
We now state one of the main theorems of this paper, which says that Insecure
is decidable in non-deterministic polynomial time for every set of oracle rules satisfying
certain conditions. This generic theorem is then applied in Section 4 and
Section 7 to show that Insecure is in NP in presence of an intruder that can perform
Diffie-Hellman exponentiation and exploit commutative public-key encryption,
respectively.
In the theorem, two conditions are required of the set of oracle rules. The first is
that the oracle rule problem can be decided efficiently and the second is that the
set of oracle rules allows polynomial product exponent attacks.
The oracle rule problem is defined as follows:
OracleRule = {(E, m) | E →Lo E, m}
where E is a finite set of standard messages and m is a standard message, both
given as DAGs.
We say that the set of oracle rules Lo allows polynomial product exponent attacks if
for every protocol P and every minimal attack (π, σ) on this protocol there exists σ ′
such that σ ′ ≈ σ (recall that this means that σ ′ and σ coincide modulo the product
exponents), (π, �σ ′�) is an attack on P , and ||σ ′ ||exp is polynomially bounded in
||P ||. Note that by Lemma 2.4 this implies that ||�σ ′�||exp is polynomially bounded
in ||P || as well.
Theorem 3.1. Let Lo be a set of oracle rules. If
— OracleRule ∈ PTIME and
— Lo allows polynomial product exponent attacks,
then Insecure is in NP.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
14 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
The theorem is proved by showing that the non-deterministic algorithm depicted
in Figure 1 is a non-deterministic polynomial-time algorithm and that it decides
Insecure. The polynomial p, which is a polynomial bounding the size of product
exponents, exists due to the assumption that Lo allows polynomial product exponent
attacks. The structure of the algorithm is as follows: In step 1. and 2., a
“small” attack (π, σ) on the given protocol P is guessed. Then, in step 3. and 4. it
is checked whether (π, σ) is in fact an attack on P .
Obviously, the algorithm in Figure 1 is sound. The main problem is to show that
it is complete and that it runs in non-deterministic polynomial-time. This is shown
using results proved in Sections 3.1, 3.2 and 3.3. In what follows, we first explain
the results proved in these sections and then using these results prove completeness
of the algorithm and the claimed complexity.
In Section 3.1, we show (see Theorem 3.2) that the following problem, henceforth
called derivation problem, can be solved in polynomial time in ||E, t||, provided that
OracleRule can be decided in deterministic polynomial time:
Derive := {(E, t) | t ∈ forge(E)}
where E is a finite set of standard messages and t is a standard message, given as
DAGs.
In Section 3.2, we show (see Proposition 3.14) that substitutions of minimal
attacks are built from subterms of terms occurring in the description of the protocol.
Using Proposition 3.14, in Section 3.3 we bound the number of subterms in
substitutions of minimal attacks and obtain that |Vσ| ≤ |P | (Corollary 3.16).
Given these results, we can now prove Theorem 3.1.
Proof of Theorem 3.1. We show that the algorithm depicted in Figure 1 runs
in non-deterministic polynomial time and that it is sound and complete. Clearly,
as already mentioned, the algorithm is sound.
To show completeness, we need to prove that if there exists an attack (π, σ) on
P , then there is one with the size of σ bounded as in step 2. of the algorithm in
Figure 1. This immediately follows from Corollary 3.16 and our assumption that
Lo allows polynomial product exponent attacks.
It remains to show that our algorithm runs in non-deterministic polynomial time
in the size ||P || of P . Clearly, this is the case of step 1. and 2. of our algorithm.
To show this for step 3. and 4. we use Theorem 3.2. Let E be the set
�{Sjσ | j < i} ∪ S0 � for some i ∈ {1, . . . , k} and t be �Riσ� or secret. By Theorem
3.2, we can decide if t ∈ forge(E) in deterministic polynomial time in ||E, t||.
Corollary 3.16 implies that |E, t| ≤ |P |. Since ||σ||exp is polynomially bounded in
||P ||, this is also the case for ||{Sjσ | j < i} ∪ S0 ∪ {Riσ}||exp. By Lemma 2.4, it
follows that ||E, t||exp is polynomially bounded in ||P ||. Consequently, step 3. and
4. can be carried out in deterministic polynomial-time in ||P ||.
3.1 Deciding the Derivation Problem
We show that the derivation problem can be decided in polynomial time given that
this is the case for the problem OracleRule.
Theorem 3.2. Derive ∈ PTIME provided that OracleRule ∈ PTIME.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 15
Proof. Let dt(E) be the set consisting of the messages t ′ ∈ S(E, t) that can
be derived from E in one step. Using that the number of terms t ′ ∈ S(E, t)
is linear in ||E, t|| and that E →Lo E, t can be checked in polynomial time it
is easy to see that dt(E) can be computed in polynomial time in ||E, t||. Now,
if t ∈ forge(E), then Definition 2.11 guarantees that there exists a well-formed
derivation D = E →L1 E, t1 → . . . →Lr E, t1, .., tr, with tr = t. In particular,
ti ∈ S(E, t) for every i ∈ {1, . . . , k}. By definition of derivations, all ti are different.
It follows r ≤ |t, E|. Moreover, with d 0 t (E) := E and d l+1
t (E) := dt(d l t(E)) we have
that t ∈ d |E,t|
t
time, the theorem follows.
(E) iff t ∈ forge(E). Since d |E,t|
t
3.2 Characterizing the Subterms of Minimal Attacks
(E) can be computed in polynomial
We now show that substitutions of minimal attacks can be constructed by linking
subterms that are initially occurring in the problem specification (Proposition 3.14).
In order to prove the proposition, we first show some properties of replacements
(Lemmas 3.4 to 3.6), properties of substitutions in minimal attacks (Lemmas 3.7
to 3.9), and properties of derivations (Lemmas 3.10 to 3.13).
In what follows, we assume that Lo is a set of oracle rules. If t ∈ forge(E), we
denote by Dt(E) a well-formed derivation from E with goal t (chosen arbitrarily
among the possible ones). Note that there always exists such a derivation due to
the definition of oracle rules.
Let P = ({Rι ⇒ Sι, ι ∈ I}, <I, S0) be a protocol and (π, σ) be an attack on P .
Let k, Ri, and Si be defined as in Definition 2.8. Recall that S(P ) is the set of
subterms of P , A ⊆ S(P ), and V = V(P ) is the set of variables occurring in the
protocol. Also, we need the following crucial notion.
Definition 3.3. Let t and t ′ be two terms and θ a ground substitution. Then, t
is a θ-match of t ′ , denoted t ⊑θ t ′ , if t and t ′ are standard and �tθ� = t ′ .
3.2.1 Properties of Replacements. The following lemmas state distributivity
properties between the normalization function, substitutions, the exponentiation
operator, and replacements.
Lemma 3.4. Let u be a normalized term, M, M ′ be two products such that for
all t ∈ F(M) ∪ F(M ′ ), t is normalized. Let s be a standard normalized term and δ
the replacement [s ← 1]. Then:
(1 ) �(M · M ′ )δ� = ��M · M ′�δ�, in particular, �Mδ� = ��M�δ�.
(2 ) �Exp(u, M)δ� = ��Exp(u, M)�δ� if s �= �Exp(u, M)� and, in case s is of the form
Exp(·, ·), also s �= u.
Proof. See Appendix 9.1.
We note that 2. in the previous lemma does not hold without the restrictions on s.
The following example shows the problem in case s = �Exp(u, M)�: Assume that
s = Exp(a, b), u = a and M = b·c·c −1 . Then, s = �Exp(u, M)δ� �= ��Exp(u, M)�δ� =
1. The next example illustrates why s �= u is necessary: Define s = u = Exp(a, b)
and M = c. Then, 1 = �Exp(u, M)δ� �= ��Exp(u, M)�δ� = Exp(a, b · c).
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
16 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Lemma 3.5. Let σ be a normalized ground substitution, E a set of normalized
terms, s a normalized standard non atomic term, and δ the replacement [s ← 1].
Let σ ′ = �σδ�. If there is no standard subterm t of E such that t ⊑σ s, then
�Eσ ′� = ��Eσ�δ�.
Proof. See Appendix 9.1.
Lemma 3.6. Let t ′ , t1, . . . , tn, t, u be normalized standard terms, z1 . . . , zn ∈ Z,
and let δ be the replacement [u ← 1] such that u �= t, and t = �Exp(t ′ , t z1
1
If t ′ = Exp(·, ·), then we also assume that u �= t ′ . Then,
Proof. See Appendix 9.1
�tδ� = �Exp(�t ′ δ�, �t1δ� z1 · · · �tnδ� zn )�.
· · · tzn
n )�.
3.2.2 Properties of Substitutions of Minimal Attacks. The following lemma allows
to prove what we will call the unique matching property.
Lemma 3.7. Let s be a standard term, t be a normalized term, and σ be a normalized
substitution such that s ∈ S(�tσ�) and s �∈ S(xσ) for every x ∈ V(t). Then,
there exists a standard subterm t ′ of t with t ′ ⊑σ s.
Proof. By Lemma 2.4 we have
Since σ is in normal form this implies
S(�tσ�) ⊆ �S(tσ)�
⊆ �S(t)σ ∪ V(t)σ�.
S(�tσ�) ⊆ �S(t)σ� ∪ V(t)σ.
By assumption, s ∈ S(�tσ�) and s �∈ S(V(t)σ). It follows, s ∈ �S(t)σ�, which means
that there exists t ′ ∈ S(t) such that �t ′ σ� = s.
We now prove the unique matching property, which says that if the intruder
delivers messages m1, . . . , mi, then there is only at most one way to match these
matches against R1, . . . , Ri with Rj, j ∈ {1, . . . , i}, defined as above.
Lemma 3.8. Given any sequence of normalized messages m1, . . . , mi, there exists
at most one normalized substitution σ such that �Rjσ� = mj for j ∈ {1, . . . , i}.
Proof. Assume by contradiction that the lemma does not hold and let i ∈
{1, . . . , n} be minimal such that there exist two different normalized substitutions
σ and σ ′ such that �Rjσ� = �Rjσ ′� for j ∈ {1, . . . , i}. By minimality of i the
substitutions σ and σ ′ coincide on Vi−1 = V(R1, . . . , Ri−1) and they differ on a
variable in V(Ri) \ Vi−1. Let σ0 be the substitution equal to σ on Vi−1 and equal
to the identity on V(Ri) \ Vi−1, and let r = �Riσ0 �.
By Lemma 2.4, 5. and since Riσ = (Riσ0)σ and Riσ ′ = (Riσ0)σ ′ we have that
�Riσ� = �rσ� = �rσ ′�. By assumption, there exists x ∈ V(r) such that xσ �= xσ ′ .
Let tx ∈ S(r) be minimal w.r.t. the subterm relation such that x ∈ V(tx) and
�txσ� = �txσ ′�. Since r is a possible candidate tx is well-defined.
It is obvious that tx can neither be a variable nor a constant. In fact, it is easy
to see that tx must be of the form Exp(t1, t z2
2 · . . . · tzk
k ). By Definition 2.6, 3. and
since x ∈ V(tx), for all j ∈ {1, . . . , k} but one the tj are ground terms. Let j0 be
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 17
the index of the non-ground term, i.e., x ∈ V(tj0 ). By minimality of tx, we have
�tj0σ� �= �tj0σ ′�. Recalling that �txσ� = �txσ ′�, we consider the possible cases:
—j0 = 1: Let us first assume that �tj0σ� = Exp(b, M) and �tj0σ ′� = Exp(b ′ , M ′ ).
Since �txσ� = �txσ ′�, we must have b = b ′ and �M · Π n i=2 tzi
i � = �M ′ · Π n i=2 tzi
i �.
This implies M = M ′ and therefore �tj0σ� = �tj0σ ′�, in contradiction to the
assumption. If both �tj0σ� and �tj0σ ′� are not of the form Exp(·, ·), then because of
�txσ� = �txσ ′� it is again easy to see that �tj0σ� = �tj0σ ′�. If �tj0σ� = Exp(b, M) but
�tj0σ ′� is not of the form Exp(·, ·), then �txσ� = �txσ ′� implies that �M · Π n i=2 tzi
i � =
�Π n i=2 tzi
i �, and thus, M = 1, in contradiction to the fact that �tj0σ� is normalized.
Hence, the case j0 = 1 cannot occur.
—j0 > 1: First assume that t1 = Exp(b, M). The equality �txσ� = �txσ ′� now
implies that
�M · �t zj 0
j0 σ� · Π j∈{2,...,k}\{j0}t zj
j � = �M · �t zj 0
j0 σ′ � · Π j∈{2,...,k}\{j0}t zj
j �.
It follows that �t zj 0
j0 σ� = �t zj 0
j0 σ′�, in contradiction to the assumption. The case
that �txσ� is not of the form Exp(·, ·) is even simpler.
We now use this lemma to prove that any subterm of a substitution of a minimal
attack is either part of the protocol specification or a subterm of a normalized
message transmitted during the attack.
Lemma 3.9. Let (π, σ) be an attack on P with σ normalized, x ∈ V(Ri) for
some i ∈ {1, . . . , k}, and s ∈ S(σ(x)) standard. Then, there exists j ≤ i such that
s ∈ S(�Rjσ�) or there exists t ∈ S(P ) with t ⊑σ s.
Proof. Assume that there does not exist t ∈ S(P ) with t ⊑σ s and s �∈ S(�Rjσ�)
for all j ≤ i. It follows that s is not an atom. Let Vj = V(Rj) ∪ V(Sj) and let j be
minimal such that s ∈ S(Vjσ). By Definition 2.6, 2. we have s ∈ S(V(Rj)σ). Let
σ ′ = �σ[s ← 1]�.
By minimality of j, for all l < j we have Rlσ ′ = Rlσ, and thus, �Rlσ ′� = �Rlσ�.
Since s /∈ S(�Rjσ�) we also have �Rjσ�[s ← 1] = �Rjσ�. Now, Lemma 3.5 implies
�Rjσ ′� = �Rjσ�. Note that σ and σ ′ differ on at least one variable in V(R1, . . . , Rj).
This contradicts Lemma 3.8.
3.2.3 Properties of Derivations. Here we show some useful properties of derivations
which will allow us to easily replace terms in derivations. Let us start with
a simple observation which easily follows from the definition of decomposition and
composition rules.
Lemma 3.10. For every normalized finite set E of messages, message t, t-rule
L with E →L E, t and S(E, t) �= S(E), it follows that S(E, t) = S(E) ∪ {t} and L
is a composition rule.
The next lemma states that if a term t ′ is a subterm of a term t and t can be
derived from a set E but t ′ is not a subterm of E, then t ′ can be derived from E
and the last step of the derivation is a composition rule.
Lemma 3.11. Assume that t ′ ∈ S(t)\S(E) and t ∈ forge(E), then t ′ ∈ forge(E)
and there exists a derivation from E with goal t ′ ending with a composition rule.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
18 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Proof. Let D = E0 →L1 E1 · · · →Ln En be a derivation of t from E0 = E.
Then, since t ′ is a subterm of En there exists i > 0 minimal such that t ′ ∈ S(Ei).
By minimality of i we have t ′ ∈ S(Ei) \ S(Ei−1). Using Lemma 3.10, it follows that
D = E0 →L1 E1 · · · →Li Ei is a derivation with goal t ′ .
The following lemma is used in the proof of Lemma 3.13. It allows the construction
of special derivations where a given term is never decomposed. This will be critical
to replace composed terms by atoms in some derivations.
Lemma 3.12. Let t ∈ forge(E) and γ ∈ forge(E) be given with a derivation Dγ
from E ending with an application of a rule in Lc. Then, there is a derivation D ′
from E with goal t satisfying Ld(γ) �∈ D ′ .
Proof. See Appendix 9.1.
We can now prove a lemma which will allow us to replace certain subterms occurring
in a substitution of an attack by smaller terms. Note that from the assumption
made in this lemma it follows that s can be derived from E such that the last rule
is a composition rule. This allows us to replace s by a smaller term since when
deriving t, decomposing s will not be necessary.
Lemma 3.13. Let E and F be two sets of normalized messages such that 1 ∈
E ∪ F . Let t ∈ forge(E, F ) and s ∈ forge(E) such that s is non-atomic and
s /∈ S(E). Finally, let δ be the replacement [s ← 1]. Then, �tδ� ∈ forge(�Eδ, F δ�).
Proof. By Lemma 3.11 there exists a well-formed derivation Ds from E with
goal s such that the last step is a composition rule. By Lemma 3.12, there
exists a derivation Dt from E, F with goal t such that Ld(s) /∈ Dt. Assume
that Dt = E, F →L1 E, F, t1 →L2 E, F, t2 · · · →Ln E, F, t1 . . . , tn. We show
�tiδ� ∈ forge(�Eδ, F δ�) by induction on i ≤ n where t0 is some term in E, F .
Induction base: If t0 ∈ E ∪ F , then clearly �t0δ� ∈ �Eδ ∪ F δ�. Induction step: We
distinguish several cases.
—If Li = Lc(〈a, b〉), then either ti = s, and thus, tiδ = 1 ∈ forge(Eδ, F δ), or tiδ =
〈aδ, bδ〉 ∈ forge(�Eδ, F δ�) since by induction we have {aδ, bδ} ⊆ forge(�Eδ, F δ�).
Analogously, the terms {a} s b and {a}p K are treated.
—If Li = Lp1(〈ti, a〉), then s �= 〈ti, a〉 since Li /∈ Ld(s). Therefore, 〈ti, a〉 δ =
〈tiδ, aδ〉. By induction, 〈ti, a〉 δ ∈ forge(Eδ, F δ), and thus, tiδ ∈ forge(Eδ, F δ).
Analogously, the cases for Lp2, Lsd, and Lad are shown.
—If Li ∈ Lo, then we use Definition 2.11, 3. Let E ′ be the set of messages obtained
in Ds before the last step is applied. Then, E ′ \ s → Lc(s) E ′ , s. Also,
E, F, t1, . . . , ti−1 →Li E, F, t1, . . . , ti−1, ti. In particular E ′ , E, F, t1, . . . , ti−1 →Li
E ′ , E, F, t1, . . . , ti−1, ti. By Definition 2.11, 3. we obtain:
�tiδ� ∈ forge(�E ′ δ, Eδ, F δ, t1δ, . . . , ti−1δ�)
We know that E ′ δ = E ′ , Eδ = E, and all terms in E ′ can be derived from E.
Also, E and E ′ are normalized. By induction, �t1δ�, . . . , �ti−1δ� ∈ forge(�Eδ, F δ�).
Thus, forge(�E ′ δ, Eδ, F δ, t1δ, . . . , ti−1δ�) ⊆ forge(�Eδ, F δ�), and therefore, �tiδ� ∈
forge(�Eδ, F δ�)
For i = n, this gives us tδ ∈ forge(Eδ, F δ).
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 19
3.2.4 Properties of Minimal Attacks. We are now ready to prove Proposition
3.14 which states that substitutions of minimal attacks can always be constructed
by linking subterms that are initially occurring in the protocol P . This will be the
key to bound the number of subterms in minimal attacks (Theorem 3.15).
Proposition 3.14. Let (π, σ) be a minimal attack on the protocol P . Then, for
all s ∈ S(Vσ) there exists t ∈ S(P ) such that t ⊑σ s.
Proof. Let (π, σ) and s be as above. Assume (*): For every t, t ⊑σ s implies
t �∈ S(P ). We will lead this to a contradiction. Since A ⊆ S(P ), we have s �∈ A.
By Lemma 3.9 and (*), there exists j such that s ∈ S(�Rjσ�). Let N be minimal
among the possible j. If s ∈ S(�Siσ�) for some i, (*) together with Lemma 3.7
imply that there exists x ∈ V(Si) with s ∈ S(xσ). Then, by Definition 2.6, (2)
there exists Ri ′, i′ ≤ i such that x ∈ V(Ri ′). Thus, Lemma 3.9 and (*) imply that
there exists j ≤ i with s ∈ S(�Rjσ�). Note also that s �∈ S(S0) since otherwise
s ∈ S(P ). Now, the minimality of N yields i ≥ N. Let Ej = �S0σ, . . . , Sj−1σ�.
Summarizing, we have: s is non-atomic, not a subterm of EN but a subterm of
�RNσ�. Thus, by Lemma 3.11, s ∈ forge(EN).
Let δ be the replacement [s ← 1]. Since (π, σ) is an attack, we have for all 1 ≤ j ≤
k + 1 and Rk+1 = secret:
�Rjσ� ∈ forge(Ej)
We distinguish two cases:
—Assume j < N. Then, by minimality of N, s is neither a subterm of �Rjσ� nor a
subterm of Ej. Hence, with �Rjσ� ∈ forge(Ej) it follows ��Rjσ�δ� ∈ forge(�Ejδ�).
—Assume j ≥ N. With t = �Rjσ�, E = EN, and F = Ej, Lemma 3.13 implies
��Rjσ�δ� ∈ forge(�Ejδ�).
Thus, ��Rjσ�δ� ∈ forge(�Ejδ�) in both cases. Now, (*) and Lemma 3.5 imply for all
j:
�Rjσ ′ � ∈ forge(�S0σ ′ , . . . , Sj−1σ ′ �)
where σ ′ = �σδ�. Hence, (π, σ ′ ) is an attack. (Note that the conditions for applying
Lemma 3.5 are satisfied.) But since σ ′ is obtained from σ by replacing s by a strictly
smaller message, namely 1, we obtain |σ ′ | < |σ|, a contradiction to the assumption
that (π, σ) is a minimal attack.
3.3 Bounding the Number of Subterms of Minimal Attacks
Using Proposition 3.14, we obtain:
Theorem 3.15. For every minimal attack (π, σ) of a protocol P it follows that
S(�S(P )σ�) = �S(P )σ�
Proof. The inclusion �S(P )σ� ⊆ S(�S(P )σ�) is trivial. The converse inclusion
is a direct consequence of Proposition 3.14, which implies:
S(Vσ) ⊆ �S(P )σ�.
By Lemma 2.4, we know that S(�S(P )σ�) ⊆ �S(S(P )σ)� and S(S(P )σ) ⊆ S(P )σ ∪
S(Vσ). Thus, S(�S(P )σ�) ⊆ �S(P )σ� ∪ S(Vσ), and with the above:
S(�S(P )σ�) ⊆ �S(P )σ�.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
20 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
From this theorem, we immediately obtain:
Corollary 3.16. For every minimal attack (π, σ) of a protocol P and every
E ⊆ S(P ) it follows that |�Eσ�| ≤ |P |. In particular, |V(P )σ| ≤ |P |.
Proof. First, observe that the cardinality of the set �S(P )σ� is bounded by |P |.
Second, observe that �Eσ� ⊆ �S(P )σ�. From this, |�Eσ�| ≤ |P | follows immediately.
We obtain |V(P )σ| ≤ |P | if we set E = V(P ). Note that σ is normalized, and thus,
σ(x) = �σ(x)� for every variable x.
4. EXTENDING THE DOLEV-YAO INTRUDER BY DIFFIE-HELLMAN EXPONEN-
TIATION
We now extend the Dolev-Yao intruder given by the intruder rules Lc ∪ Ld (see
Subsection 2.2) by a set Lo of rules, the DH rules, which allow the intruder to
perform Diffie-Hellman exponentiation. This extended intruder is called the DH
intruder. We want to show that for the DH intruder the derivation problem can
be decided in deterministic polynomial time and the insecurity problem in nondeterministic
polynomial time. To this end, we show that the preconditions of
Theorem 3.2 and Theorem 3.1 are satisfied, respectively. Recall that Theorem 3.2
requires that i) Lo is a set of oracle rules and ii) OracleRule can be decided in
polynomial time. In addition, Theorem 3.1 requires that iii) Lo allows polynomial
product exponent attacks.
In Section 4.1 and 4.2, we prove i) and in Section 4.3 we prove ii). Using Theorem
3.2, we then conclude that for the DH intruder the derivation problem can be
decided in deterministic polynomial time (Corollary 4.9).
In Section 5, we prove iii), which with Theorem 3.1 yields that for the DH
intruder the insecurity problem can be decided in non-deterministic polynomial
time (Theorem 5.23).
First, we define the DH rules Lo.
Definition 4.1. We define Lo = Loc ∪ Lod to be the set of DH rules of the form
t, t1, . . . , tn → �Exp(t, t z1
1
· · · tzn
n )� =: u
with n ≥ 1, zi ∈ Z \ {0}, 1 ≤ i ≤ n, t, t1, . . . , tn normalized standard messages. If u
is of the form Exp(·, ·), then the above rule belongs to Loc(u) (the set of composition
DH rules), and to Lod(u) (the set of decomposition DH rules) otherwise. We call the
intruder using the rules Lo as oracle rules the DH intruder. We call t in the above
DH rule the head of this rule and we refer to z1, . . . , zn as the product exponents of
this rule. We require w.l.o.g. that the head t of a decomposition DH rule is of the
form Exp(·, ·) since otherwise t = u. Also, w.l.o.g. we may assume that ti �= tj for
every i �= j, and that zi �= 0 for every i.
Using that the messages on the right-hand side of a DH rule are normalized, one
easily observes the following.
Lemma 4.2. The rules in Loc and Lod are composition and decomposition guess
rules, respectively.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
4.1 Diffie-Hellman Rules allow Well-formed Derivations
Complexity Results for Security Protocols · 21
We show that Lo allows well-formed derivations (Lemma 4.5). In other words, we
show that Lo satisfies the first property required of oracle rules (see Definition 2.11).
The proof uses two lemmas, which are stated next.
The first lemma allows us to restrict our attention to certain kinds of derivations
where the Lo rules are only used on messages which were created by Dolev-Yao
rules or were present in the initial set of messages.
Lemma 4.3. Let E be a finite set of normalized standard messages and t be a
standard message such that t can be derived from t (w.r.t. L). Let D be a derivation
from E with goal t. Then, there exists a derivation D ′ from E with goal t such that
(1 ) D ′ is of the same length as D, and
(2 ) for every DH rule L ∈ D ′ ∩ Lo with head t ′ we have that t ′ ∈ E or there exists
a t ′ -rule L ′ ∈ D ′ ∩ (Ld ∪ Lc). Moreover, if L is a decomposition DH rule, then
t ′ ∈ E or there exists a t ′ -rule L ′ ∈ D ′ ∩ Ld.
Proof. See Appendix 9.2.
The next lemma gives us a criterion to determine whether a derivation is wellformed.
Lemma 4.4. Let D = E0 →L1 . . . En−1 →Ln En be a derivation with goal g.
(1 ) Assume that for every j with Ej−1 →Lj Ej−1, t the jth step in D and Lj ∈
Ld(t), there exists t ′ ∈ Ej−1 such that t is a subterm of t ′ and either t ′ ∈ E0
or there exists i with i < j and Li ∈ Ld(t ′ ). Then, if L ∈ D ∩ Ld(t) for some
L and t, then t ∈ S(E0).
(2 ) Assume that for every i < n and t with Li ∈ Lc(t), there exists j with i < j
such that Lj is a t ′ -rule and t ∈ S({t ′ } ∪ E0). Then, if L ∈ D ∩ Lc(t) for some
L and t, then t ∈ S(E0, g).
Given both the assumptions in 1. and 2., it follows that D is a well-formed derivation
with goal g.
Proof. See Appendix 9.2.
We can now prove that the Lo rules allow well-formed derivations:
Lemma 4.5. For every finite normalized set E of standard messages and normalized
standard message g, g ∈ forge(E) implies that there exists a well-formed
derivation from E with goal g.
Proof. Let E0 = E and D = E0 →L1 . . . →Ln En be a derivation of goal
g of minimal length. We may assume that D satisfies the properties stated in
Lemma 4.3, 2.
We prove that D satisfies the assumptions Lemma 4.4, 1. and 2.
(1) If Lj ∈ Ld(s) ∩ Ld(t), and thus, t ∈ S(s), then Li /∈ Loc(s), for all i < j, since
rules in Loc do not create standard terms, and Li /∈ Lc(s), for all i < j, by the
definition of derivation (since otherwise t would be in the left-hand side of Li).
Therefore, either s ∈ E0 or there exists i < j with Li ∈ Ld(s).
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
22 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
If Lj ∈ Lod(t) and t ′ is the head of Lj, by definition of decomposition DH rules
it is easy to see that t ∈ S(t ′ ). By Lemma 4.3, 2. it follows that t ′ ∈ E0 or
there exists L ′ ∈ D ∩ Ld(t ′ ).
By Lemma 4.4, 1. it follows that if L ∈ D ∩ Ld(t) for some L and t, then
t ∈ S(E0).
(2) If Li ∈ Lc(t) and i < n, then by minimality of D, there exists j > i such that
t belongs to the left-hand side of Lj. If Lj ∈ Ld, then as in 1. we can conclude
that t ∈ S(E0). If Lj ∈ Lc(t ′ ), then t ∈ S(t ′ ). If Lj ∈ Lo(t ′ ), then first
assume that t is the head of Lj. Lemma 4.3, 2. implies that there exists a t-rule
L ′ ∈ D ∩ (Ld ∪ Lc). Since Li ∈ Lc(t) and because of the minimality of D, t can
only be generated by one rule, we have Li = L ′ ∈ Lc. Thus, t �= Exp(·, ·). But
then, by definition of DH rules, t ∈ S(t ′ ). Now, assume that t is not the head
of Lj. If t /∈ S(t ′ ), we have that t ∈ S(t ′′ ) where t ′′ is the head of Lj and t ′′ is
of the form Exp(·, ·). (Otherwise, t can not disappear from t ′ .) By Lemma 4.3,
2. it follows that t ′′ ∈ E0 or there exists a t ′′ -rule L ′ ∈ D ∩ (Ld ∪ Lc). Since
t ′′ is of the form Exp(·, ·) we know that L ′ ∈ D ∩ Ld. Now, 1. implies that
t ′′ ∈ S(E0), and thus, t ∈ S(E0).
4.2 Diffie-Hellman Rules are Oracle Rules
We now prove the remaining properties required of oracle rules, and thus, show that
Lo forms a set of oracle rules (Proposition 4.7). First, we need a lemma similar to
Lemma 3.6.
Lemma 4.6. Let z1, . . . , zn ∈ Z \ {0}, and s, s1, . . . , sn, u be normalized standard
terms such that si �= sj for every i �= j, si �= 1 and si �= u for every i, s �= u,
u = �Exp(s, s z1
1 · · · szn n )�, and u = Exp(·, ·). Let δ be the replacement [u → 1]. Then,
u = �Exp(�sδ�, �s1δ� z1 · · · �snδ� zn )�.
Proof. See Appendix 9.2.
We are now prepared to prove:
Proposition 4.7. The set Lo of DH rules is a set of oracle rules.
Proof. We check each condition 1., 2., and 3. in Definition 2.11:
(1) This is an immediate consequence of Lemma 4.5.
(2) This follows from the observation that no term created with Loc can be decomposed
with Ld.
(3) Let u be a normalized standard message, F be a set of standard messages with
1 ∈ F , and t be a standard message such that F \u → Lc(u) F and F → Lo(t) F, t.
Let δ := [u ← 1]. If u = t, then tδ = 1 ∈ forge(F δ), and we are done. Now,
assume that u �= t. Since F → Lo(t) F, t, there exist t ′ , t1, . . . , tn ∈ F and
z1, . . . , zn ∈ Z\{0} such that ti �= tj for every i �= j and t = �Exp(t ′ , t z1
1
If t ′ �= Exp(·, ·) or u �= t ′ , then by Lemma 3.6 we obtain that
�tδ� = �Exp(�t ′ δ�, �t1δ� z1 · · · �tnδ� zn )�.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
· · · tzn
n )�.
Complexity Results for Security Protocols · 23
Thus, �tδ� ∈ forge(�F δ�). Now, assume that u = t ′ = Exp(v, M). Then,
�tδ� = ��Exp(v, M·t z1
1
= �Exp(v, M·t z1
1
· · · tzn
n )�δ�
· · · tzn
n )δ� (∗)
= �Exp(vδ, Mδ·(t1δ) z1 · · · (tnδ) zn )� (∗∗)
= �Exp(v, M·(t1δ) z1 · · · (tnδ) zn )� (∗ ∗ ∗)
= �Exp(v, M·�t1δ� z1 · · · �tnδ� zn )�
= �Exp(u, �t1δ� z1 · · · �tnδ� zn )�
where in (*) we apply Lemma 3.4, 2. using that v �= u and u �= t. In (**) we
again use that u �= t. We obtain (***) since u �∈ S(v, M).
Now, to show that �tδ� ∈ forge(�F δ�) it suffices to show that u ∈ forge(�F δ�). We
know F \ u → Lc(u) F , and since u = Exp(·, ·), we have F \ u → Loc(u) F . Hence,
there exist normalized terms s, s1, . . . , sn ∈ F \ u and z ′ 1, . . . , z ′ n ′ ∈ Z \ {0}
such that s and the si meet the conditions stated in Lemma 4.6 and u =
�Exp(s, s z1
1
· · · szn
n )�. Then, by Lemma 4.6, u = �Exp(�sδ�, �s1δ� z1 · · · �snδ� zn )�.
Thus, u ∈ forge(�F δ�).
4.3 Deciding DH Rules
The following proposition states that it is decidable in polynomial time whether a
given message can be derived from a finite set of messages by applying an oracle
rule once.
Proposition 4.8. For the DH intruder, the problem OracleRule is decidable
in deterministic polynomial time.
Proof. We need to show that there is a deterministic polynomial time algorithm
that given E and t decides whether there exists t ′ , t1, . . . , tn ∈ E and z1, . . . , zn ∈ Z
such that t = �Exp(t ′ , t z1
1 · · · tzn n )�. It is easy to see that E →Lo E, t iff
(1) t �= Exp(·, ·) and
(a) t ∈ E, or
(b) there exists M with Exp(t, M) ∈ E and F(M) ⊆ E, or
(2) t = Exp(v, M) and
(a) v ∈ E and F(M) ⊆ E, or
(b) there exists M ′ such that Exp(v, M ′ ) ∈ E and E ′ := {t ′ | the product
exponents in M and M ′ for t ′ differ} ⊆ E.
From this characterization of E →Lo E, t it is straightforward to derive a polynomial
time algorithm for deciding E →Lo E, t.
As an immediate consequence of the above proposition, Proposition 4.7, and
Theorem 3.2, we obtain the following corollary:
Corollary 4.9. For the DH intruder, Derive can be decided in deterministic
polynomial time.
5. THE DH RULES ALLOW POLYNOMIAL PRODUCT EXPONENT ATTACKS
In this section, we show that Insecure is NP-complete for the DH intruder (Theorem
5.23). By Theorem 3.1, Proposition 4.7, and Proposition 4.8, it remains to
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
24 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
show that DH rules allow polynomial product exponent attacks. To this end, we
will associate with a minimal attack (π, σ) a substitution σ Z and a linear equation
system such that i) σ Z coincides with σ except that the product exponents in σ are
replaced by new (integer) variables and ii) (π, σ ′ ) is an attack for every σ ′ obtained
from σ Z by substituting the variables in σ Z according to a solution of the equation
system. Since the size of the linear equation system can be bounded polynomially
in the size of the protocol, and thus, the size of the solutions of this equation system
can be bounded polynomially (see [Bockmayr and Weispfenning 2001]), we obtain
an attack with polynomially bounded product exponents (Proposition 5.22).
In the following subsection, we define messages that may have linear expressions
as product exponents. Before going into more detail, in Section 5.2, we provide
some more intuition behind the proof of Proposition 5.22. A detailed proof is then
given in Section 5.3 to 5.7.
5.1 Open Messages and Equation Systems
In this section, we define open messages and products, evaluation mappings, and
equation systems as well as various measures on the size of these objects.
Definition 5.1. Let Z be a set of variables. The set M = M(Z) of open messages
over Z, the set P = P(Z) of open products over Z, the set Lexp = Lexp(Z) of linear
expressions over Z are defined by the following grammar:
M ::= A | 〈M, M〉 | {M} s M
P ::= MLexp | MLexp · P
Lexp ::= Z | Z | Lexp + Lexp | Z·Lexp
| {M}p | Exp(M, P)
The size |e| of a linear expression e is the number of characters to represent e where
integers are encoded in binary. We say that e and e ′ are equal if they are equal
modulo associativity and commutativity of addition (modulo AC+, for short). In
particular, for a set of linear expressions S and a linear expression e, we say that
e belongs to S if the equivalence class modulo AC+ of e is one of the equivalences
classes induced by S. In the same way, the subset relationship between sets of
linear expressions is defined.
For an open message or an open product t let Lexp(t) denote the set of linear
expressions occurring in t. The set S(t) of subterms of t and |t|, i.e., the number of
subterms of t, are defined as usual. Also, recall that set Sext(t) of extended subterms
of t is defined as S(t) ∪ {M | Exp(u, M) ∈ S(t)}. We define |t| = Card(S(t)) and
|t|ext = Card(Sext(t)). Also, we set |t|exp = 0 if t is not a product and |t|exp =
|e1| + . . . + |en| if t = t e1
1
K
. . . ten
n . As usual, if E is a finite set of open messages
or products, |E|exp = Σs∈E|s|exp. With this we define ||t||exp = |S(t)|exp. Finally,
||t|| = |t| + ||t||exp, and ||t||ext = |t|ext + ||t||exp. We note :
Lemma 5.2. For every open message or product t we have that |t|ext ≤ 2 · |t|,
and thus, ||t||ext ≤ 2 · ||t||.
Note that the definitions of | · |, || · ||exp, and || · || for open messages and products
correspond to those for messages.
The above definitions and measures for open messages and products extend in
the obvious way to sets of open messages, open products, etc.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 25
We call a mapping β : Z → Z an evaluation mapping. The evaluation β(e) ∈ Z of
a linear expression e w.r.t. β is defined as usual. The evaluation mapping β extends
in the obvious way to open messages, open products, sets of open messages, etc.
Throughout this section, β will always denote an evaluation mapping from Z
into Z.
A linear equation system E (over Z) is a finite set of equations of the form e = e ′
where e and e ′ are linear expressions over Z. The size |E| of E is Σe=e ′ ∈E|e|+|e ′ |. An
evaluation mapping β is a solution of E (β |= E) if β(e) = β(e ′ ) for every equation
e = e ′ ∈ E. Let Lexp(E) = {e | e = e ′ ∈ E or e ′ = e ∈ E} denote the set of linear
expressions occurring in E. Let RE = {(e, e ′ ) | e = e ′ ∈ E} ⊆ Lexp(E) × Lexp(E)
and let R∗ E denote the reflexive and transitive closure of RE. We write E = E ′ if
R∗ E = R∗ E ′. We write E ⊆ E ′ if R∗ E ⊆ R∗ E ′. Thus, we consider linear equations
modulo reflexivity and transitivity of equality. Recall also that linear expressions
are considered modulo AC+.
5.2 Overview of the Proof of Proposition 5.22
To provide an overview of the proof of Proposition 5.22, we give an informal topdown
view of the proof. Recall that this proposition allows us to bound the product
exponent size of attacks.
The key for the proof is Lemma 5.21, which states: Let t, t1, . . . , tn be open messages
and β be an evaluation mapping such that �β(t)� ∈ forge(�β(t1)�, . . . , �β(tn)�).
Then, there exists an extension of β (also called β) and an equation system E such
that
(1) β |= E,
(2) �β ′ (t)� ∈ forge(�β ′ (t1)�, . . . , �β ′ (tn)�) for every β ′ |= E, and
(3) the size of E is polynomially bounded in ||t1, . . . , tn, t||ext.
The proof of this lemma is quite involved. The basic idea is to replace the
messages in a derivation D from �β(t1)�, . . . , �β(tn)� to �β(t)� by open messages which
coincide with the messages in D except for the product exponents. More precisely,
, which we call β-normal forms (or β-
one first turns the ti into open messages t ′ i
terms), such that β(t ′ i ) = �β(ti)�. In other words, t ′ i is the symbolic representation
of the normal form of β(ti). Now, we can simulate the derivation D in a (symbolic)
derivation D ′ starting with the β-normal forms t ′ 1, . . . , t ′ n. The intermediate terms
obtained in D ′ are β-normal forms of the corresponding terms in D. The equation
system E evolves in the process of turning the ti into β-normal forms and simulating
D.
More precisely, when turning ti into β-normal forms, we also associate an equa-
, Ei)
tion system with this normal form, i.e., we define what we call a β-tuple (t ′ i
where t ′ i is the β-normal form of ti and Ei is an equation system such that β is a
solution of Ei and for every solution β ′ of Ei we have that �β ′ (ti)� = �β ′ (t ′ i )�. In
other words, t ′ i is not only the symbolic representation of the normal form of β(ti)
but also the symbolic representation of the normal form of ti for other evaluation
mappings β ′ , although in this case β ′ (t ′ i ) needs to be normalized to coincide with
�β ′ (ti)�. The equation system E is obtained as a union of the equation systems of
the β-tuples for t1, . . . , tn, t and equations obtained in the course of simulating D.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
26 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Clearly, to prove the lemma, it is necessary to bound the size of β-tuples, i.e.,
of β-normal forms (β-terms) and the equations associated, as well as the size of
equations obtained when simulating D (see the subsequent sections for details).
Using the above lemma, it is now rather easy to prove Proposition 5.22, which
states that for every minimal attack (π, σ) there exists an attack (π, σ ′ ) of the same
structure, i.e., σ and σ ′ coincide up to product exponents, such that the size of
(all) the product exponents of σ ′ can be polynomially bounded in the size of the
protocols.
The idea of the proof of Proposition 5.22 is simply to associate to σ a symbolic
version σZ where all product exponents of σ are replaced by (new) integer variables.
Then, we apply the above lemma to the case where t = RiσZ and tj = SjσZ for
every j ∈ {0, . . . , i − 1}. For every i, the lemma yields an equation system E ′ i
and the solutions β ′ of the union of these systems yield new attacks (π, β ′ (σZ ))
on the protocol. Using that the (union of the) equation systems E ′ i
are “small”
and the fact that linear equation systems have “small” solutions β ′ [Bockmayr and
Weispfenning 2001], we obtain an attack (π, σ ′ ) with σ ′ = β ′ (σ Z ) with “small”
product exponents.
In the following section, we define β-tuples. We then show that β-tuples always
exist (Section 5.4). In Section 5.5 and 5.6, we bound the size of β-terms and their
associated equation systems, respectively, and thus, the size of β-tuples as a whole.
Then, in Section 5.7 we prove the mentioned Lemma 5.21 and Proposition 5.22,
and from this derive that Insecure is NP-complete for the DH intruder.
5.3 β-equivalence, β-tuples, and ≈β-equation Systems
Definition 5.3. Given β and open messages or open products t and t ′ , we say
that t and t ′ are β-equal (t =β t ′ ) iff β(t) = β(t ′ ). 1 We call t and t ′ β-equivalent
(t ≈β t ′ ) iff �β(t)� = �β(t ′ )�.
Definition 5.4. Given β and open messages or open products t and t ′ such that
t =β t ′ , we say that E is a =β-equation system for t and t ′ iff
(1) β |= E and
(2) t =β ′ t′ for all β ′ |= E.
We now show that “small” =β-equation systems exist. Recall that, for instance,
when we write ||t, t ′ ||ext we mean ||{t, t ′ }||ext.
Lemma 5.5. Given β and open messages or open products t and t ′ such that
t =β t ′ . Then there exists a =β-equation system E =β
t,t ′ of size ≤ 2||t, t′ || 3 ext for t and
t ′ .
Proof. We define R ⊆ Sext(t, t ′ )×Sext(t, t ′ ) such that s =β s ′ for all (s, s ′ ) ∈ R.
More precisely, R is the smallest binary relation over Sext(t, t ′ ) such that
—(t, t ′ ) ∈ R,
—If (s, s ′ ) ∈ R, and thus, by construction s =β s ′ , and s = 〈t1, t2〉 it follows that
s ′ = 〈t ′ 1, t ′ 2〉 for some open messages t ′ 1 and t ′ 2. Then, 〈t1, t ′ 1〉 ∈ R and 〈t2, t ′ 2〉 ∈ R.
For encryption we have analogous conditions on R.
1 Recall that equality means equality modulo associativity and commutativity of multiplication in
products, e.g., a 2 · b 3 · c −2 = c −2 · a 2 · b 3 .
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
—If (s, s ′ ) ∈ R, and s is the product t e1
1
of the form t ′e′ 1
1
Complexity Results for Security Protocols · 27
· · · ten
n , n ≥ 1, we have that s ′ is a product
· · · t′e ′
n
n , n ≥ 1. If ti =β t ′ j for some i and j, then (ti, t ′ j
) ∈ R.
Note that since s =β s ′ , for every ti there exists at least one =β-equal term t ′ j .
—If t = Exp(u, M) for some open message u and an open product M, we have
that t ′ = Exp(u ′ , M ′ ) for some open message u ′ and an open message M ′ . Then,
(u, u ′ ) ∈ R and (M, M ′ ) ∈ R.
For every (s, s ′ ) ∈ R, we define the equation system E (s,s ′ ) as follows: If s (and
thus, s ′ ) is not a product, then E (s,s ′ ) is the empty set. Otherwise, s is of the form
t e1
1 · · · ten n , n ≥ 1, and s ′ is of the form t ′e′ 1
1
(ti, t ′ j ) ∈ R}.
By structural induction it is easy to see that ER = �
(s,s ′ )∈R E (s,s ′ ) is a =βequation
system for t and t ′ . Obviously, the size of ER is ≤ 2||t, t ′ || 3 ext.
· · · t′e ′
n
n . We define E (s,s ′ ) = {ei = e ′ j |
In what follows, we refer to E =β
t,t ′ , as defined in the proof, as the =β-equation system
induced by t and t ′ .
Remark 5.6. The equation system E =β
t,t ′ as constructed in Lemma 5.5 is uniquely
determined.
We will also need to associate with ≈β-equivalent terms an equation system, which
we call a ≈β-equation system.
Definition 5.7. Given β and open messages or open products t and t ′ such that
t ≈β t ′ , we say that E is a ≈β-equation system for t and t ′ iff
(1) β |= E and
(2) t ≈β ′ t′ for all β ′ |= E.
To construct such an equation system given t and t ′ , we introduce the notion of a
β-tuple.
Definition 5.8. Given β and an open message or open product t we say that
(t ′ , E) where t ′ is an open message or an open product and E is an equation system
is a β-tuple for t iff
(1) β(t ′ ) = �β(t)�,
(2) β |= E, and
(3) t ≈β ′ t′ for every β ′ |= E.
We call t ′ a β-term (or the β-normal form) of t and E a β-equation system for t.
The following lemma shows how a ≈β-equation system can be obtained using βtuples.
Lemma 5.9. Let t and t ′ be open messages or open products such that t ≈β t ′ .
Assume that there exists a β-tuple (s, E) for t and a β-tuple (s ′ , E ′ ) for t ′ . Let E =β
s,s ′
be a =β-equation system for s and s ′ (such a system always exists). Then,
is a ≈β-equation system for t and t ′ .
E ≈β
t,t ′ = E ∪ E ′ ∪ E =β
s,s ′
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
28 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Proof. We first show that there always exists a =β-equation for s and s ′ . We
have that β(s) = �β(t)� = �β(t ′ )� = β(s ′ ). Thus, s =β s ′ and by Lemma 5.5 there
exists a =β-equation system, which we call E =β
s,s ′.
We need to show that E ≈β
t,t ′ is a ≈β-equation system for t and t ′ . Obviously,
β |= E ≈β
t,t ′ . Let β′ |= E ≈β
t,t ′ . We need to show that �β ′ (t)� = �β ′ (t ′ )�. Since β ′ |= E =β
s,s ′
we know β(s) = β(s ′ ). From β ′ |= E (β ′ |= E ′ ) we conclude �β ′ (s)� = �β ′ (t)�
(�β ′ (s ′ )� = �β ′ (t ′ )�). Thus, �β ′ (t)� = �β ′ (s)� = �β ′ (s ′ )� = �β ′ (t ′ )�.
5.4 Existence of β-tuples
We show that β-tuples exist for any open message and product.
Lemma 5.10. Let t be an open message or an open product and β be an evaluation
mapping. Then, there exists a β-tuple for t.
Proof. We construct a β-tuple (t β , E β
t ) of t inductively.
— If t ∈ A, then t β = t and E β
t = ∅. Obviously, (t β , E β
t ) is a β-tuple for t.
— If t = 〈t1, t2〉, let (t β β
β
1 , Et1 ) and (tβ2
, Et2 ) be β-tuples for t1 and t2. We define
tβ �
= t β
�
1 , tβ2
and E β
t = E β
β
t1 ∪ Et2 . Analogously, β-tuples are constructed in case of
encryption. By induction, it is easy to see that (t β , E β
t ) is a β-tuple for t.
— If t = t e1
1 · · · ten n , then let (t β
i
that C1, . . . , Cl ⊆ {t1, . . . , tn} are the equivalence classes over t1, . . . , tn modulo ≈β.
Define eCj = Σti∈Cj ei and let sCj ∈ Cj be some representative of Cj. W.l.o.g. assume
that for s ∈ C1 we have s ≈β 1. (The set C1 may be empty.) By induction
we have that sβ = 1 for every s ∈ C1 since β(sβ ) = �β(s)� = 1. Define
J = {j ∈ {2, . . . l} | β(eCj ) = 0}. If C = {s1, . . . , sk} where the sj are pairwise
≈β-equivalent and s β
j is a β-term for sj, we define
E β
C
, E β
ti ) be the β-tuple for ti for every i. Assume
= �
i�=j
E =β
s β
i ,sβ j
Note that β(s β
i ) = �β(si)� = �β(sj)� = β(s β
j ), and thus, sβ
exists. Let
Lemma 5.5, E =β
s β
i ,sβ j
Furthermore, we define
If J = {2, . . . , l}, then : t β = 1
otherwise : t β = Π j�∈J∪{1}(s β
Cj )eC j
E β
t =
n�
i=1
E β
ti ∪
l�
j=2
E β
Cj
.
�
∪ {eCj = 0}.
j∈J
i =β s β
j
, and due to
By induction, it is easy to see that (t β , E β
t ) is a β-tuple for t: Induction yields that
β |= E β
t . By the definition of the normalization function one easily verifies that
if J = {2, . . . , l}, then �β(t)� = 1, and thus, t β = �β(t)�. Otherwise, it is easy to
see that �β(t)� = Π j�∈J∪{1} �β(sCj )� β(eC j ) . By induction, β(s β
Cj ) = �β(sCj )�. Thus,
β(tβ ) = �β(t)�. Now, let β ′ |= E β
t . Let s, s ′ ∈ Cj with s �= s ′ . By definition of E β
t
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
we have β ′ |= E β s ∪ E β
s
Complexity Results for Security Protocols · 29
=β
≈β
′ ∪ E s,s ′(= Es,s ′). Thus, by Lemma 5.9, �β ′ (s)� = �β ′ (s ′ )�. We
also know sβ = 1, and thus, β ′ (sβ ) = 1 for every s ∈ C1. Finally, if j ∈ J, we have
that β ′ (eCj ) = 0. Now, it is easy to see that �β ′ (t)� = �β ′ (tβ )�.
— If t = Exp(u, M) and �β(u)� �= Exp(·, ·), then by induction, there exists a
) for M. Let
β-tuple (u β , E β u ) for u and a β-tuple (M β , E β
M
Furthermore, in both cases we set
If �β(M)� = 1, then : t β = u β ,
otherwise : t β = Exp(u β , M β )
E β
t = E β u ∪ E β
M .
We will conclude that (tβ , E β
t ) is a β-tuple for t by induction: Obviously, β |= E β
t .
Therefore, we must show that β(tβ ) = �β(t)� and �β ′ (t)� = �β ′ (tβ )� for every β ′ |=
E β
t . Two cases arise :
(1) Either �β(M)� = 1, and thus, �β(t)� = �β(u)�. Thus, by induction, �β(t)� =
�β(u)� = β(uβ ) = β(tβ ). Also, we have that β(M β ) = �β(M)� = 1, and thus,
M β = 1. By induction, 1 = �β ′ (M β )� = �β ′ (M)�. Hence,
�β ′ (t)� = �β ′ (u)� (∗)
= �β ′ (u β )� (∗∗)
= �β ′ (t β )�
where (∗) is by induction and definition of E β
t , and (∗∗) by definition of t.
= Exp(β(uβ ), β(M β )) (∗∗)
=
β(tβ ) where (∗) is by induction and (∗∗) is by definition of t. Now, let β ′ |= E β
t .
We have
(2) Or �β(M)� �= 1. Thus, �β(t)� = Exp(�β(u)�, �β(M)�) (∗)
�β ′ (t)� = �Exp(�β ′ (u)�, �β ′ (M)�)� (∗)
= �Exp(�β ′ (uβ )�, �β ′ (M β )�)�
= �Exp(β ′ (uβ ), β ′ (M β ))� (∗∗)
= �β ′ (tβ )�
where (∗) is by induction and definition of E β
t , and (∗∗) by definition of t β .
— If t = Exp(u, M) and �β(u)� = Exp(u ′ , M ′ ), by induction there exists a βtuple
(u β , E β u ) for u. In particular, β(u β ) = �β(u)�, and thus, u β is of the form
Exp(u ′′ , M ′′ ) where β(u ′′ ) = u ′ and β(M ′′ ) = M ′ . Moreover, by induction there
exists a β-tuple ((M ′′ · M) β , E β
(M ′′ ·M) ) for (M ′′ · M). Let
In both cases, we set
t β = u ′′ if �β(M ′′ · M)� = 1, i.e. �M ′ · β(M)� = 1
t β = Exp(u ′′ , (M ′′ · M) β ) otherwise.
E β
t = E β u ∪ E β
(M ′′ ·M) .
By induction, we can now show that (tβ , E β
t ) is a β-tuple for t: Obviously, β |= E β
t .
Therefore, we must only show that β(tβ ) = �β(t)� and �β ′ (t)� = �β ′ (tβ )� for every
β ′ |= E β
t . First, let (uβ , E β u ) = Exp(u ′′ , M ′′ ) as above. We know that �β(t)� =
�Exp(�β(u)�, β(M))� = �Exp(u ′ , �M ′ · β(M)�)�. If �M ′ · β(M)� = 1, then �β(t)� =
u ′ = β(u ′′ ) = β(tβ ). Otherwise,
�β(t)� = Exp(u ′ , �M ′ · β(M)�) = Exp(β(u ′′ ), �β(M ′′ ) · β(M)�)
= Exp(β(u ′′ ), �β(M ′′ · M)�) (∗)
= Exp(β(u ′′ ), β((M ′′ · M) β ))
(∗∗)
= β(t β )
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
30 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
where we obtain (∗) by induction and (∗∗) by definition of t β . Now, let β ′ |= E β
t . We
have that �β ′ (t)� = �Exp(β ′ (u), β ′ (M))�. Since β ′ |= E β u , it follows by induction that
�β ′ (u)� = �β ′ (u β )� = �β ′ (Exp(u ′′ , M ′′ ))�. Thus, �β ′ (t)� = �Exp(β ′ (u β ), β ′ (M))� =
�Exp(β ′ (u ′′ ), β ′ (M ′′ ) · β ′ (M))�, and therefore �β ′ (t)� = �Exp(β ′ (u ′′ ), β ′ (M ′′ · M))�.
Moreover, since β ′ |= E β
(M ′′ ·M) , induction yields �β ′ ((M ′′ · M) β )� = �β ′ (M ′′ · M)�.
Consequently, �β ′ (t)� = �Exp(β ′ (u ′′ ), β ′ ((M ′′ · M) β ))�. If t β = Exp(u ′′ , (M ′′ · M) β ),
then we obtain �β ′ (t)� = �t β�. Otherwise, t β = u ′′ and �β(M ′′ · M)� = 1, and thus,
(M ′′ · M) β = 1. Hence, �β ′ (t)� = �t β�.
5.5 Bounding the size of β-terms
From now on, we will denote by t β the β-term of t as constructed in the proof
of Lemma 5.10. We want to show that there always exists a β-tuple of t of size
polynomially bounded in ||t||. This is done in two steps: In this subsection, we
first bound the size of t β . Then, in the next subsection, we bound the size of the
equation system associated to t β .
First, we need to prove that β-terms are uniquely determined:
Lemma 5.11. For every open message or product t such that β(t) = �β(t)�, we
have that t β = t.
Proof. See Appendix 9.3.
For a set E of open messages or products, we define E β = {t β | t ∈ E}. In the
following lemma we bound |t β |ext and in Lemma 5.14 we bound ||t β ||exp. Both
lemmas are put together in Lemma 5.15 to yield a bound for ||t β ||ext.
Lemma 5.12. For open messages and products t, t1, . . . , tn and an evaluation
mapping β we have that
(1 ) S(t β ) ⊆ S(t) β .
(2 ) |�β(t)�| ≤ |t| and |�β(t1)�, . . . , �β(t1)�| ≤ |t1, . . . , tn|,
(3 ) |t β |ext ≤ 2 · |t|.
Proof. We prove these statements one by one:
(1): We proceed by structural induction on t.
—If t ∈ A, we have S(tβ ) = {t} = S(t) β . If t = 〈t1, t2〉, induction yields that
S(tβ ) = {tβ } ∪ S(t β
1 ) ∪ S(tβ2
) ⊆ {tβ } ∪ S(t1) β ∪ S(t2) β = S(t) β ; analogously for
encryption.
—If t = t e1
1
· · · ten
n , we have two cases: Either t β = 1, and we obviously have
S(t β ) ⊆ S(t) β . Or t β = Π j�∈J∪{1}(s β
Cj )eC j (see the proof of Lemma 5.10) where
for each s β
Cj there exists a ti such that t β
i
= sβ
Cj
. Thus, induction yields that :
S(t β ) ⊆ {t β } ∪ �
j /∈J∪{1} S(sβ
Cj ) ⊆ {tβ } ∪ � n
i=1 S(tβ
i )
⊆ {t β } ∪ � n
i=1 S(ti) β = S(t) β
—If t = Exp(u, M) and t β = u β , induction immediately yields S(t β ) ⊆ S(t) β .
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
—If t = Exp(u, M), t β = Exp(u β , M β ), and M = t e1
1
induction,
Complexity Results for Security Protocols · 31
S(tβ ) ⊆ {tβ } ∪ S(uβ ) ∪ �
i S(tβi
)
⊆ {tβ } ∪ S(u) β ∪ �
i S(ti) β = S(t) β
· · · ten
n , then M β �= 1 and, by
—If t = Exp(u, M), uβ = Exp(u ′′ , M ′′ ), and tβ = u ′′ . Then, S(tβ ) ⊆ S(uβ ) ⊆
S(u) β ⊆ S(t) β .
—Finally, assume that t = Exp(u, M), uβ = Exp(u ′′ , M ′′ ), and tβ = Exp(u ′′ , (M ′′ ·
M) β ) where (M ′′ · M) β �= 1. Thus, (M ′′ · M) β is of the form �
j /∈J∪{1} (sβ Cj )e′
j
for some e ′ j such that with M ′′ = t ′′e′′ 1
1
equals some t ′′
i
or tβi
. (Note that t′′ i
n · · · t′′e′′
′′
n ′′
= t′′βi
t ′′
i ∈ S(uβ ) ⊆ S(u) β . We conclude that
S(t β ) = {t β } ∪ S(u ′′ ) ∪ �
j /∈J∪{1} S(sβ
Cj )
and M = te1 1 · · · ten n every s β
Cj
by Lemma 5.11.) By induction,
⊆ {tβ } ∪ S(u ′′ ) ∪ �n i=1 S(tβi
) ∪ �n ′′
i=1 S(t′′ i)
⊆ {tβ } ∪ �n i=1 S(ti) β ∪ S(uβ )
⊆ {tβ } ∪ �n i=1 S(ti) β ∪ S(u) β = S(t) β
(2): First note that �β(t)� = β(t β ). It is easy to see that |β(s)| ≤ |s| for every open
message and product s. Thus,
|�β(t)�| = |β(t β )| ≤ |t β | (∗)
≤ Card(S(t) β ) ≤ Card(S(t)) = |t|
where for (∗) we use 1. The same argument works for |�β(t1)�, . . . , �β(t1)�| ≤
|t1, . . . , tn|.
(3): This is an immediate consequence of 1. and Lemma 5.2: |t β |ext ≤ 2 · |t β | ≤
2 · Card(S(t) β ) ≤ 2 · |t|.
We now want to bound ||t β ||exp. To do this, we need the following lemma:
Lemma 5.13. Let E be a finite set of open messages or products such that
Sext(E) = E and t maximal (w.r.t. subterm ordering) in E. Then :
| �
Sext(s β )|exp ≤ | �
s∈E
Proof. See Appendix 9.3.
We use this lemma to prove:
s∈E\{t}
Sext(s β )|exp + ||t|| 2 ext
Lemma 5.14. For every open message or product t, it follows that ||t β ||exp ≤
||t|| 3 ext.
Proof. Let E = Sext(t). Thanks to Lemma 5.13, we know that ||tβ ||exp =
|Sext(tβ )|exp ≤ | �
s∈E Sext(sβ )|exp. This allows us to iteratively extract a (maximal)
term from E and shows that | �
s∈E Sext(sβ )|exp ≤ |t|ext · ||t|| 2 ext. (Note that
Card(E) = |t|ext.) This yields ||tβ ||exp ≤ ||t|| 3 ext.
We have bounded both the number of extended subterms of t β and the size of its
integer coefficients (Lemma 5.12 and 5.14). Putting this together, we finally obtain
the polynomial bound on β-terms:
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
32 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Lemma 5.15. For every open message or product t, we have ||t β ||ext ≤ 3·||t|| 3 ext.
5.6 Bounding the size of β-equation systems
In the previous subsection, we have bounded the size of β-terms t. We now bound
the size of β-equation systems associated to these terms, and hence, bound the size
of β-tuples. To do so, we first construct a particular β-equation system for t whose
size can be polynomially bounded in ||t||ext.
In what follows, β is an evaluation mapping and t an open message or product.
We first describe the equation system E ′β
t for an open message or product t added
when going from the equation system of the subterms of t to that of t:
—If t is atomic, a pair, or encryption, then E ′β
t = ∅.
—If t = t e1
1
E ′β
t = � l
j=2
· · · ten
n , then with the notation used in the proof of Lemma 5.10, we set
E β
Cj
∪ �
j∈J {eCj = 0}.
—If t = Exp(u, M) and �β(u)� �= Exp(·, ·), then E ′β
t = ∅. Otherwise, uβ =
Exp(u ′′ , M ′′ ) and we set E ′β
t = E ′β
(M ′′ ·M) .
Remark 5.16. The equation system E ′β
t is uniquely determined (modulo AC+).
The equation system E ′β
t describes the constraints on product exponents on one
level of t. The complete equation system for t is defined as the union of the equation
systems for all subterms of t:
E β
t = �
s∈Sext(t)
E ′β
s .
We now prove that (t β , E β
t ) is a β-tuple for t and that the size of E β
t is polynomially
bounded in the size of t. But first, we need to show the following lemma for β-tuples
on products:
Lemma 5.17. Let M = t e1
1
· · · ten
n and M ′ = t ′e′ 1
1
n · · · t′e′
′
n ′
such that β(t′ i ) =
�β(t ′ i )�. Let (t β
i , Ei) be a β-tuple for ti for every i. Then, ((M ′ ·M) β , E ′β
(M ′ ·M) ∪�
i Ei)
is a β-tuple for M ′ · M.
Proof. See Appendix 9.3.
Lemma 5.18. For every open message or product t and every evaluation mapping
β the following is true.
(1 ) The tuple (tβ , E β
t ) is a β-tuple for t.
(2 ) The size of E ′β
t is bounded by a polynomial in ||t||ext.
(3 ) The size of (tβ , E β
t ), which is the some of the size of tβ and E β
t is bounded by
a polynomial in ||t||ext.
Proof. We prove these statements one by one.
(1): We proceed by structural induction on t according to the construction in
Lemma 5.10.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 33
—The case where t ∈ A is obvious. Now, assume that t = 〈t1, t2〉. Then, E β
t =
E ′β
t ∪ �
s∈Sext(t1)
E ′β
s ∪ �
s∈Sext(t2)
E ′β
s . By definition, E β
t = E β
t1
∪ E β
t2
. (Note that
here we use Remark 5.16.) Just as in the proof of Lemma 5.10, from this we can
conclude that (t β , E β
t ) is a β-tuple. The argument for encryption is similar.
—If t = t e1
1
· · · ten
n and with the notation introduced in the proof of Lemma 5.10,
by definition of E ′β
t and using Remark 5.16, we can conclude that E β
t = �
i �l β �
j=2 E ∪ {eCj = 0}. Again, as in the proof of Lemma 5.10 it follows that
Cj
j∈J
(tβ , E β
t ) is a β-tuple for t.
E β
ti ∪
—If t = Exp(u, M) and �β(u)� �= Exp(·, ·), then by definition of E β
t and using
Remark 5.16 we have E β
t = E β u ∪ E β
M
(t β , E β
t ) is a β-tuple for t.
and as in Lemma 5.10 this implies that
—Finally, assume that t = Exp(u, M), �β(u)� �= Exp(·, ·), and uβ = Exp(u ′′ , M ′′ ).
Assume that M = t e1
1 · · · ten n . Lemma 5.17 implies that ((M ′′ · M) β , E ′β
(M ′′ ·M) ∪
� β
i Eti ) is a β-tuple for M ′′ · M. By definition of E β
t and Remark 5.16 we have
that E β u ∪ �
i
E β
ti
that (t β , E β
t ) is a β-tuple for t.
′β
∪ E (M ′′ β
·M) ⊆ Et . Then, as in the proof of Lemma 5.10 it follows
(2): In case t is atomic, a pair, or encryption, nothing is to show. In case t is a
product, using Lemma 5.5 and 5.15 it is easy to see that E ′β
t can be bounded by a
polynomial in ||t||ext. For the case t = Exp(·, ·), one obtains a polynomial in ||t||ext
bounding the size of E ′β
t using Lemma 5.15 and the case where t is a product.
(3): If p is the polynomial bounding the size of E ′β
t , then p(||t||ext) · ||t||ext bounds
the size of E β
t . By Lemma 5.15 we know that the size of tβ can be bounded by a
polynomial in ||t||ext.
Finally, by Lemma 5.5, 5.9, and 5.18 we have established the existence of particular
≈β-equation systems whose size is polynomially bounded:
Proposition 5.19. Let t and t ′ be open messages or open products and β be an
evaluation mapping such that t ≈β t ′ . Then, there exists a ≈β-equation system for
t and t ′ of size polynomially bounded in ||t, t ′ ||ext.
We will denote such an equation system by E ≈β
t,t ′ .
5.7 Bounding the Size of Product Exponents in Attacks
We are now prepared to prove the key lemma of this section, Lemma 5.21. As
mentioned, using this lemma, we can conclude that DH rules allow polynomial
product exponent attacks (Proposition 5.22). As an immediate consequence, we
obtain that Insecure is NP-complete for the DH intruder (Theorem 5.23).
Lemma 5.21 is proved in two steps. First, a restricted version is considered where
only one intruder rule is applied (Lemma 5.20). Then, this is extended to complete
derivations.
In the following proofs, we will consider extensions of evaluation mappings. We
say that a mapping β ′ : Z ′ → Z is an extension of an evaluation mapping β : Z → Z
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
34 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
if Z ⊆ Z ′ and β ′ (z) = β(z) for all z ∈ Z. Since β and β ′ coincide on Z, by abuse
of notation, we often refer to an extension of β by β.
Lemma 5.20. Let t1, . . . , tn be open messages, s be a normalized message, β be
an evaluation mapping, and L ∈ L an intruder rule such that β(ti) = �β(ti)� for
all i and �β(t1)�, . . . , �β(tn)� → s ∈ L. Then, there exists an open message t, an
equation system E, and an extension β of β such that
(1 ) β(t) = s,
(2 ) β |= E,
(3 ) �β ′ (t1)� . . . , �β ′ (tn)� → �β ′ (t)� ∈ L for every β ′ |= E,
(4 ) max{|e| | e ∈ Lexp(t)} ≤ max{|e| | e ∈ Lexp(t1, . . . , tn)} + n, and
(5 ) the size of E is polynomially bounded in ||t1, . . . , tn||ext.
Proof. See Appendix 9.3.
We will now extend this lemma to complete derivations. In Section 5.2, we have
provided some intuition behind the proof of this lemma.
Lemma 5.21. Let t, t1, . . . , tn be open messages such that there exists a derivation
witnessing �β(t)� ∈ forge(�β(t1)�, . . . , �β(tn)�) . Then, there exists an extension
of β and an equation system E such that
(1 ) β |= E,
(2 ) �β ′ (t)� ∈ forge(�β ′ (t1)�, . . . , �β ′ (tn)�) for every β ′ |= E, and
(3 ) the size of E is polynomially bounded in ||t1, . . . , tn, t||ext.
Proof. Let E = {�β(t1)�, . . . , �β(tn)�} and let D be a well-formed derivation witnessing
�β(t)� ∈ forge(E). We know that the length l of D is polynomially bounded
in |�β(t1)�, . . . , �β(tn)�, �β(t)�|. By Lemma 5.12, 2. |�β(t1)�, . . . , �β(tn)�, �β(t)�| is
bounded by a polynomial in |t1, . . . , tn, t|, and thus, in ||t1, . . . , tn, t||ext. Assume
that the ith step of D is E, s1, . . . , si−1 →Li E, s1, . . . , si for every 1 ≤ i ≤ l where
si is a normalized message for every i and sl = �β(t)�. Since D is well-formed we
have that si ∈ S(�β(t1)�, . . . , �β(tn)�, �β(t)�) for every i.
Let (t β , E β
t ) be a β-tuple of t and t β
i be a β-tuple of ti for every i. It follows that
β(t β
i ) = �β(ti)�, and thus, E = {β(t β
1 ), . . . , β(tβ n)}. Hence, to the first step of D
we can apply Lemma 5.20 and obtain an open message s ′ 1, an equation system E1,
and an extension of β such that β(s ′ 1) = s1, β |= E1, and �β ′ (t β
1 )�, . . . , �β ′ (t β n)� →L1
�β ′ (t β
1 )�, . . . , �β ′ (t β n)�, �β ′ (s ′ 1)� for every β ′ |= E1.
Note that β(t β
i ) = �β(t β
i )� for every i and β(s ′ 1) = �β(s ′ 1)� = s1. Thus, we
can apply Lemma 5.20 inductively and obtain s ′ j , Ej, and an extension of β such
that β(s ′ j ) = sj, β |= Ej and �β ′ (t β
1 )�, . . . , �β ′ (tβ n)�, �β ′ (s ′ 1)�, . . . , �β ′ (s ′ j−1 )� →Lj
�β ′ (t β
1 )�, . . . , �β ′ (tβ n)�, �β ′ (s ′ 1)�, . . . , �β ′ (s ′ j )� for every β ′ |= Ej and 1 ≤ j ≤ l. Consequently,
β |= �l j=1 Ej and �β ′ (s ′ l )� ∈ forge(�β ′ (t β
1 )�, . . . , �β ′ (tβ n)�) for every β ′ |=
�l j=1 Ej.
If β ′ |= �n β
Eti , then �β ′ (ti)� = �β ′ (t β
i )�. We know that β(tβ ) = �β(t)� = sl =
i=1
β(s ′ l ). Thus, tβ =β s ′ l . Consequently, due to Lemma 5.5, the =β-equation system
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
E =β
t β ,s ′ l
for t β and s ′ l exists. Now, if β′ |= E β
t ∪ E =β
t β ,s ′ l
�β ′ (s ′ l )�. We set
E =
n�
i=1
Complexity Results for Security Protocols · 35
E β
β
ti ∪ E
t ∪
l�
j=1
Ej ∪ E =β
tβ ,s ′ .
l
we obtain �β ′ (t)� = �β ′ (t β )� =
It follows that β |= E and �β ′ (t)� ∈ forge(�β ′ (t1)�, . . . , �β ′ (tn)�) for every β ′ |= E.
It remains to show that E is polynomially bounded in ||t1, . . . , tn, t||ext. Lemma
5.20 implies that every Ej is polynomially bounded in ||t1, . . . , tn, s ′ 1, . . . , s ′ j−1 ||ext.
We have that β(s ′ j ) = sj ∈ S(�β(t1)�, . . . , �β(tn)�, �β(t)�). Thus, using Lemma 5.12,
|s ′ j | can polynomially be bounded in |t1, . . . , tn, t|. By Lemma 5.2, |s ′ j |ext can poly-
nomially be bounded in |t1, . . . , tn, t|. From Lemma 5.20 it follows that max{|e| |
e ∈ Lexp(s ′ j
)} ≤ max{|e| | e ∈ Lexp(t β
1 , . . . , tβ n)} + n · (j − 1). We know that
j ≤ l and that l is polynomially bounded in ||t1, . . . , tn, t||ext. Also, max{|e| | e ∈
Lexp(t β
1 , . . . , tβ n)} ≤ ||t β
i ||exp ≤ ||ti|| 3 ext for some i (see Lemma 5.14). Thus, there
exists a polynomial p such that ||s ′ j ||ext is bounded by p(||t1, . . . , tn, t||ext). Consequently,
||t1, . . . , tn, t, s ′ 1, . . . , s ′ j ||ext is bounded by (p ′ (||t1, . . . , tn, t||ext) + 1) ×
p(||t1, . . . , tn, t||ext) where p ′ is the polynomial bounding l. By Lemma 5.20, this
shows that Ej is polynomially bounded in ||t1, . . . , tn, t||ext. Lemma 5.18 and 5.5
now imply that E is polynomially bounded in ||t1, . . . , tn, t||ext.
We can now show that DH rules allow polynomial product exponent attacks.
Proposition 5.22. DH rules allow polynomial product exponent attacks.
Proof. Let (π, σ) be a minimal attack on P . Let σ Z be σ where all product
exponents are replaced by new variables. Let β assign to every of these variables
the corresponding product exponent. Thus, σ(x) = β(σ Z (x)) for every x ∈ V(P ).
Note that, due to Corollary 3.16, |σ Z | can polynomially be bounded in |P |. Since
the product exponents in σ Z are variables, we have that ||σ Z ||exp ≤ |σ Z | 2 . Thus,
||σ Z ||ext can polynomially be bounded in ||P ||ext.
Let k, R1, . . . , Rk, S0, . . . , Sk be defined as usual. W.l.o.g. we assume that S0 is a
single message instead of a set of messages. (Otherwise, represent S0 = {a1, . . . , an}
by the term 〈a1, 〈a2 . . . 〈an−1, an〉 · · ·〉〉.)
Let Rk+1 = secret. We know that �β(Riσ Z )� ∈ forge(�β(S0σ Z )�, . . . , �β(Si−1σ Z )�,
for every 1 ≤ i ≤ k + 1.
By Lemma 5.21, for every i there exists an extension of β (the different extensions
are independent from each other) and an equation system Ei such that
—β |= Ei,
—�β ′ (Riσ Z )� ∈ forge(�β ′ (S0σ Z )�, . . . , �β ′ (Si−1σ Z )� for every β ′ |= Ei, and
—the size of Ei is polynomially bounded in ||S0σ Z , .., Skσ Z , R1σ Z , .., Rk+1σ Z ||ext
which in turn can polynomially be bounded in ||P ||ext.
Consequently, β |= � k
i=1 Ei =: E, and thus, E is solvable, and for every β ′ |= E we
have that (π, β ′ (σ Z )) is an attack on P . By [Bockmayr and Weispfenning 2001],
there exists a solution β ′ of E where the binary representation of the integers can
polynomially be bounded in the size of E, and thus, by Lemma 5.21, polynomially
be bounded in ||P ||ext. We define σ ′ to be β ′ (σ Z ). Then, (π, σ ′ ) is an attack on
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
36 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
P . Also, σ ≈ σ ′ , i.e., σ and σ ′ only different in the product exponents, and the
||σ ′ ||exp is polynomially bounded in ||P ||ext, and thus, by Lemma 5.2, in ||P ||.
In [Rusinowitch and Turuani 2001] it was shown that Insecure is NP-hard in
presence of the DY intruder. The proof easily carries over to the DH intruder. As
an immediate consequence of Proposition 4.7, Proposition 4.8, Proposition 5.22,
and Theorem 3.1 we obtain:
Theorem 5.23. The problem Insecure is NP-complete for the DH intruder.
6. THE A-GDH.2 PROTOCOL
The A-GDH.2 protocol [Steiner et al. 1998] allows a group of people who share
pairwise long-term keys to establish a shared secret key using Diffie-Hellman exponentiation.
We refer the reader to [Steiner et al. 1998] and [Pereira and Quisquater
2001] for a more detailed description of this protocol.
Let P = {1, . . . , n, I} be the set of principals that may be involved in a run
of a A-GDH.2 protocol where I is the name of the intruder (who can be both
a legitimate participant and a dishonest principal). Any two principals i, j ∈ P
share a long-term secret key Ki,j(= Kj,i). In a protocol run, a group G ⊆ P of
principals (membership to a group may vary from one run to another) establish a
session key that at the end of the protocol run is only known to the members of the
group as long as all members in G are honest (implicit key authentication). In a
run, one principal plays the role of the so-called master. Assume for example that
A, B, C, D ∈ P want to share a session key and that D is the master. Then, A sends
a message to B, B sends a message to C, and C sends a message to the master D.
Then, D computes the session key for himself and also broadcasts keying material
to A, B, and C using the long-term secret keys shared with these principals who
from this material can each derive the session key. We call A the first, B the second,
and C the third member of the group.
We now give a formal specification of the protocol in our protocol model. We
abbreviate terms 〈t1, 〈t2 · · · 〈tn−1, tn〉 · · ·〉〉 by t1, . . . , tn. We will define protocol
rules Π p,j
i,l,p ′ which describe the lth step, l ∈ {1, 2}, of principal p ∈ P, in the jth
instance of p, j ≥ 0, acting as the ith member of the group in which p ′ ∈ P is the
master. The relation Π p,j
i,1,p ′ < Πp,j
i,2,p ′ is the only partial order relationship between
protocol rules. By rp,j we denote a random number (an atomic message) generated
by p in instance j, and secretp,j denotes a secret (some atomic message) of p in
instance j. We define Π p,j
1,1,p ′, i.e., the first step of p in instance j acting as the first
member of the group (i.e., the initiator of the protocol) where p ′ is the master:
1 ⇒ α, Exp(α, r p,j )
where α is a group generator (an atomic message), and for i > 1 we define Π p,j
i,1,p ′
to be
x p,j
1 , . . . , xp,j i ⇒ Exp(xp,j 1 , rp,j ), . . . , Exp(x p,j
i−1 , rp,j ), x p,j
i , Exp(x p,j
i , r p,j )
where the x p,j
member, i > 0, is the protocol rule
k are variables. The second step Π p,j
i,2,p
y p,j ⇒ {secret p,j } s
Exp(y p,j ,r p,j ·K −1
p,p ′ ) .
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
′ of p in instance j as ith
Complexity Results for Security Protocols · 37
Note that Exp(yp,j , rp,j · K −1
p,p ′) is the session key computed by p and that implicit
key authentication requires that no principal outside of the group can get hold of
secretp,j . We now define the protocol rule M p,j
p1···ph which describes principal p ∈ P
in the jth instance acting as master for the group p1, . . . , ph, p ∈ P (in this order)
where p is the last member of that group. We define M p,j
p1···ph to be
z p,j
1 , . . . , z p,j
h+1 ⇒ Exp(zp,j 1 , r p,j · Kp1,p), . . . , Exp(z p,j
h , rp,j · Kph,p), {secret p,j } s
Exp(z p,j
h+1 ,rp,j )
where the z p,j
k
are variables, Exp(z p,j
k , rp,j · Kpk,p) is the keying material for pk,
and the message Exp(z p,j
h+1 , rp,j ) is the session key computed by the master p.
The following protocol P describes two sessions of the A-GDH.2 protocol one for
the group p, p ′ , I, p ′′ ∈ P and one for the group p, p ′ , p ′′ where in both cases p ′′ is the
master of the group. Note that in the first instance, the actions of the intruder I
need not be defined. Formally, the set of protocol rules in P consists of the rules de-
′′, Πp,1 ′′ (note that Πp,1 ′′ < Πp,1 ′′), the rules
scribing p in the first session Π p,1
1,1,p 1,2,p 1,1,p
for p ′ in the first session Π p′ ,1
2,1,p ′′, Πp′ ,1
2,2,p ′′, and the master M p′′ ,1
pp ′ I
1,2,p
of the first session.
The protocol rules of the second session are Π p,2
1,1,p ′′, Πp,2
1,2,p ′′, Πp′ ,2
2,1,p ′′, Πp′ ,2
2,2,p ′′, M p′′ ,2
pp ′ .
The initial intruder knowledge is {α, rI,1 } ∪ {KpI | p ∈ P}. Let secret be some of
the secrets returned by p or p ′ in the second session. Note that since the intruder
is not a member of the group of the second session, he should not be able to obtain
secret. However, as shown in [Pereira and Quisquater 2001], there exists an attack
on P . It is easy to verify that this attack will be found by our decision procedure.
7. TRANSFERRING THE RESULTS TO COMMUTATIVE PUBLIC-KEY ENCRYP-
TION
In this section, we transfer the results obtained in Section 4 and 5 for Diffie-Hellman
exponentiation to commutative public-key encryption (such as RSA with common
modulus). We show that the insecurity problem is still NP-complete and
that the derivation problem, i.e., the problem of deciding whether a given message
can be derived from the finite set of messages, can be decided efficiently.
These results can be obtained by slight modifications of the models and proofs
presented in previous sections. This is possible since Diffie-Hellman exponentiation
and commutative public-key encryption, which in case of RSA also involves
exponentiation, share algebraic properties. Basically, we will now interpret
the exponentiation operation c = Exp(m, kA) as the message m encrypted
is the corresponding private key. By comput-
by (the public key) kA where k ′ A
ing Exp(c, k ′ A ) = Exp(m, kA · k ′ A ) = Exp(m, 1) = m the cipher c can be decrypted
and the result is the plain-text m. We have commutativity of encryption as
Exp(Exp(m, kA), kB) and Exp(Exp(m, kB), kA) are equivalent modulo the algebraic
properties that we consider. Due to this new interpretation of exponentiation as
public-key encryption some differences arise.
First, the intruder capabilities differ. In case of commutative public-key encryption
the intruder is not able to compute the inverse of exponents, e.g., given a
public key (n, e) and a cipher text c = me mod n, the intruder can not compute
the private key d and then by computing cd mod n obtain m. Conversely, in the
Diffie-Hellman setting, exponentiation is done modulo a publicly known prime, and
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
38 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
thus, it is computationally feasible to compute the inverse of exponents, e.g., given
m = ga·b and b where g generates the multiplicative group induced by the prime
p, the intruder can easily compute the inverse b−1 of b modulo p − 1 (in case an
inverse exists) and by computing mb−1 obtain ga .
Second, in the setting discussed so far, the intruder does not explicitly have
inverses of messages in his knowledge, e.g., b−1 , since he can only have standard
messages in his knowledge. However, in the public-key setting we consider in this
section, this is too restrictive since inverses correspond to private keys, and of
course, we need to allow the intruder to possess such keys (own private keys and
private keys of dishonest principals).
In what follows, we will first provide two simple examples to illustrate the use of
commutative public-key encryption systems in cryptographic protocols. We then
indicate the changes necessary in our protocol and intruder model and finally state
the main results of this section.
7.1 Examples of Protocols Relying on Commutative Public-key Encryption
The following two example protocols are taken from [Schneier 1996].
The first protocol is due to Shamir. The aim of this protocol is to permit secure
communication between two agents who neither share a symmetric key nor know
the public key of the other agent. The protocol uses the commutativity property
of the RSA encryption system:
1. A → B : Exp(secret, KA)
2. B → A : Exp(Exp(secret, KA), KB)
3. A → B : Exp(secret, KB)
In this protocol, a common RSA modulus n is assumed. The public key of A is
(n, KA) and the one for B is (n, KB). The message secret is some non-negative
integer < n. The term Exp(secret, KA) stands for secretKA mod n. By the algebraic
properties of exponentiation, we have that Exp(Exp(secret, KA), KB) =
Exp(secret, KA · KB) = Exp(Exp(secret, KB), KA). In step 3 of the protocol,
) =
A computes Exp(Exp(Exp(secret, KA), KB), K ′ A ) = Exp(secret, KA · KB · K ′ A
Exp(secret, KB) where K ′ A
is A’s private key. Thus, the protocol itself uses the
commutativity of encryption. Since B is not authenticated in this protocol, it is
obvious that the intruder I can impersonate B, by simply playing B’s role while
using her own public key KI.
A commutative public-key encryption system or signature scheme may also be
relevant in the case of group protocols. Inspired by the protocol given in [Schneier
1996], Chapter 23, consider a group of l agents. A trusted server generates two
large prime numbers p and q, computes n = p · q, and l + 1 numbers k0, . . . , kl such
that:
k0 · · · kl ≡ 1 mod (p − 1) · (q − 1)
Each agent Ai, 1 ≤ i ≤ l, receives for every j the public keys Kj which is the
product of all k0 to kl except kj and the private key ki. Note that
Exp(M, k0 · · · kl) = M,
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
and in particular,
Complexity Results for Security Protocols · 39
Exp(Exp(M, ki), Ki) = Exp(M, ki · Ki) = M.
Once the key distribution is completed, a message can be signed by a subset
{Ai} i∈I, I⊆[1,..,l] of the members of the group. For example, suppose l = 4 and
A1 wants to sign a contract, say the message M, with A2 and A4. A possible
message sequence is:
1. A1 → A2 : Exp(M, k1)
2. A2 → A4 : Exp(Exp(M, k1), k2)
3. A4 → A1 : Exp(Exp(Exp(M, k1), k2), k4)
On receiving the second message, A4 can verify the signatures and identity of the
agents that have signed M by testing whether
Exp(Exp(Exp(Exp(M, k1), k2), K1), K2) = Exp(M, k1 · K1 · k2 · K2) = M.
Agent A4 can then also sign the contract using her private key k4. The point here
is that due to the commutativity property, A4 does not need to know in what order
the agents signed the message. Certainly, this protocol, when for instance used as
a contract signing protocol, has many problems, which, however, we do not intend
to discuss here.
7.2 The Protocol and Intruder Model for Protocols with Commutative Public-Key
Encryption
We now provide a formal definition of our model by defining terms, messages,
protocols, the intruder, and attacks.
Terms and Messages.. The definitions are similar to the ones in Section 2.1. We
omit the public-key operator {m} p
k as it is now represented by Exp(m, k). We
could include it to model non-commutative encryption. However, for brevity of
presentation, we will drop this operator. The main difference is that the product
exponents are now restricted to be non-negative integers. This is motivated by the
fact that, unlike in the Diffie-Hellman setting, inverting exponents is infeasible (see
below for more explanation). Formally, we define:
term ::= A | V | 〈term, term〉 | {term} s term| Exp(term, product)
product ::= term N | term N · product
where A is a finite set of constants (atomic messages), containing principal names,
nonces, keys, and the constants 1 and secret; K is a subset of A denoting the set
of public and private keys; V is a finite set of variables; and N is the set of nonnegative
integers. We assume that there is a bijection · ′ on K which maps every
public (private) key k to its corresponding private (public) key k ′ .
As mentioned, the exponentiation operator now models commutative public-key
encryption. Therefore, the product exponents are restricted to be non-negative
integers since it is infeasible to decrypt a message Exp(m, k) without knowing the
private key k ′ of k even if one has the public-key k. (Recall that in the case of Diffie-
Hellman Exponentiation, given k, everyone, including the intruder, could compute
k −1 and then Exp(Exp(m, k), k −1 ) = Exp(m, k · k −1 ) = Exp(m, 1) = m.) However,
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
40 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
in case a principal knows the private key k ′ , he can invert the exponent. To capture
this, we consider private keys as atomic messages k ′ (rather than the inverse k −1
of k) and extend the normalization function to make sure that in exponents public
and private keys cancel each other out, i.e., we have that Exp(Exp(m, k), k ′ ) =
Exp(m, k · k ′ ) = Exp(m, 1) = m.
More precisely, we consider the following algebraic properties, which include the
ones for Diffie-Hellman exponentiation (Section 2.1) and in addition the identity
k·k ′ = 1 where k ′ is the private (public) key corresponding to the public (private) k.
Thus, besides commutativity and associativity of the product operator we consider
the following properties where t is a standard term, M1, M2 are products, k, k ′ ∈ K
as above, and z, z ′ are non-negative integers:
t1 = t t · 1 = t Exp(t, 1) = t
t0 = 1 tz · tz′ = tz+z′ Exp(Exp(t, M1), M2) = Exp(t, M1 · M2)
1 z = 1 k · k ′ = 1
A normal form �t� of a term t is defined analogously to the case of Diffie-Hellman
exponentiation, i.e., it is obtained by exhaustively applying these identities from left
to right. Note that �t� is uniquely determined up to commutativity and associativity
of the product operator. Two terms t and t ′ are equivalent if �t� = �t ′�. The notion
of normal form extends in the obvious way to sets of terms and substitutions. We
illustrate the notion of a normal form by some examples: If a, b, c, d ∈ K, then
(1) �(a 2 · b 1 ) · b ′2 � = a 2 · b ′ ,
(2) �Exp(Exp(a, (b 1 · c 1 ), c ′ · d ′2 )� = Exp(a, b · d ′2 ), and
(3) �Exp(Exp(a, b 3 · c ′6 · b ′3 ), c 6 )� = a.
Recall that, for instance, b ′ denotes the decryption key corresponding to b.
Protocols. Protocols are defined just as in Definition 2.6.
In our protocol model, the RSA protocol (Section 7.1) can formally be stated as
follows where we assume that A runs one instance of the protocol as initiator and
B runs one instance as responder. The protocol consists of three protocol rules
denoted (A, 1), (A, 2), and (B, 1) with
(A, 1) : 1 ⇒ Exp(secret, KA),
(A, 2) : x ⇒ Exp(x, K ′ A), and
(B, 1) : y ⇒ Exp(y, KB)
where (A, 1) and (A, 2) denote the first and second protocol step performed by
A, respectively, and (B, 1) denotes B’s protocol step. The partial ordering is <=
{((A, 1), (A, 2))}, i.e., we only have that (A, 1) < (A, 2). This makes sure that (A, 1)
must be performed before (A, 2). The initial intruder knowledge is {1, KI, K ′ I }, i.e.,
besides the constant 1, the intruder knows his public and private key.
The Intruder Model and Attacks.. Given a finite normalized set E of messages,
the (infinite) set forge(E) of messages the intruder can derive from E is defined in
the same way as it is defined for the case of Diffie-Hellman Exponentiation except
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 41
that the product exponents zi in the oracle rules are now restricted to be nonnegative
integers (cf. Definition 4.1). The intruder obtained in this way is called
the RSA intruder in what follows.
Attacks and the problem Insecure are defined as before (see Definition 2.8).
It can easily be checked that the protocol formally specified above is insecure
according to our definition.
7.3 Main Results for Protocols with Commutative Public-Key Encryption
The following results carry over from the case of Diffie-Hellman Exponentiation in
a rather straightforward way.
Theorem 7.1. For the RSA intruder, Derive can be decided in deterministic
polynomial time.
The proof of this theorem is along the same lines as the one for the DH intruder.
Theorem 7.2. For the RSA intruder, the problem Insecure is NP-complete.
The main difference to the proof for the DH intruder is that now we do not reduce
the insecurity problem to solving linear equations in integers, but non-negative
integers. Since, according to [Borsh and Treybig 1976], the size of the solutions can
still be bounded polynomially in the size of the equation system, we still can bound
the size of the substitution needed for an attack, and hence, obtain an NP decision
algorithm. As before, NP-hardness is easily established.
8. CONCLUSION
We have shown that the insecurity problem for protocols that use Diffie-Hellman
exponentiation with arbitrary products in exponents is NP-complete and that in
this setting the derivation problem can be decided in deterministic polynomial
time. We have also shown how these results can be transfered to protocols with
commuting public key encryption.
REFERENCES
Amadio, R., Lugiez, D., and Vanackere, V. 2002. On the symbolic reduction of processes with
cryptographic functions. Theoretical Computer Science 290, 1, 695–740.
Basin, D., Mödersheim, S., and Viganò, L. 2003. An On-The-Fly Model-Checker for Security
Protocol Analysis. In Proceedings of the 8th European Symposium on Research in Computer
Security (ESORICS 2003), E. Snekkenes and D. Gollmann, Eds. Lecture Notes in Computer
Science, vol. 2808. Springer, 253–270.
Bockmayr, A. and Weispfenning, V. 2001. Solving numerical constraints. In Handbook of
Automated Reasoning, A. Robinson and A. Voronkov, Eds. Vol. I. Elsevier Science, Chapter 12,
751–842.
Boreale, M. 2001. Symbolic trace analysis of cryptographic protocols. In Automata, Languages
and Programming, 28th International Colloquium (ICALP 2001). Lecture Notes in Computer
Science, vol. 2076. Springer-Verlag, 667–681.
Boreale, M. and Buscemi, M. 2003. On the Symbolic Analysis of Low-Level Cryptographic
Primitives: Modular Exponentiation and the Diffie-Hellman Protocol. In In Proceedings of the
Workshop on Foundations of Computer Security (FCS 2003).
Borsh, I. and Treybig, L. 1976. Bounds on positive integral solutions of linear diophantine
equations. Proc. Amer. Math. Soc. 55, 299–304.
Boyd, C. and Mathuria, A. 2003. Protocols for Authentication and Key Establishment. Springer.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
42 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Bull, J. and Otway, D. 1997. The authentication protocol. Technical Report DRA/CIS3/PROJ/
CORBA/SC/1/CSM/436-04/03, Defence Research Agency, Malvern, UK.
Chevalier, Y., Küsters, R., Rusinowitch, M., and Turuani, M. 2003a. An NP Decision
Procedure for Protocol Insecurity with XOR. In Proceedings of the Eighteenth Annual IEEE
Symposium on Logic in Computer Science (LICS 2003). IEEE, Computer Society Press, 261–
270.
Chevalier, Y., Küsters, R., Rusinowitch, M., and Turuani, M. 2003b. Deciding the Security
of Protocols with Diffie-Hellman Exponentiation and Products in Exponents. In FSTTCS
2003: Foundations of Software Technology and Theoretical Computer Science, P. Pandya and
J. Radhakrishnan, Eds. Lecture Notes in Computer Science, vol. 2914. Springer, 124–135.
Chevalier, Y., Küsters, R., Rusinowitch, M., and Turuani, M. 2004. Deciding the Security
of Protocols with Commuting Public Key Encryption. In IJCAR 2004 Workshop W6 ARSPA
Automated Reasoning for Security Protocol Analysis.
Chevalier, Y. and Vigneron, L. 2001. A Tool for Lazy Verification of Security Protocols. In
Proceedings of the 16th IEEE Conference on Automated Software Engineering (ASE 2001).
IEEE CS Press, 373–376.
Clark, J. and Jacob, J. 1997. A Survey of Authentication Protocol Literature. Web Draft
Version 1.0 available from http://citeseer.nj.nec.com/.
Comon-Lundh, H. and Shmatikov, V. 2003. Intruder deductions, constraint solving and insecurity
decision in presence of exclusive or. In Proceedings of the Eighteenth Annual IEEE
Symposium on Logic in Computer Science (LICS 2003). IEEE, Computer Society Press, 271–
280.
Corin, R. and Etalle, S. 2002. An Improved Constraint-Based System for the Verification of
Security Protocols. In Proceedings of the 9th International Symposium on Static Analysis (SAS
2002), M. Hermenegildo and G. Puebla, Eds. Lecture Notes in Computer Science, vol. 2477.
Springer, 326–341.
Dolev, D. and Yao, A. 1983. On the Security of Public-Key Protocols. IEEE Transactions on
Information Theory 29, 2, 198–208.
Goubault-Larrecq, J., Roger, M., and Verma, K. 2005. Abstraction and resolution modulo
AC: How to verify Diffie-Hellman-like protocols automatically. Journal of Logic and Algebraic
Programming. To appear.
Kapur, D., Narendran, P., and Wang, L. 2003. Analyzing protocols that use modular exponentiation:
Semantic unification techniques. In Proceedings of the 14th International Conference
on Rewriting Techniques and Applications (RTA 2003), R. Nieuwenhuis, Ed. Lecture Notes in
Computer Science, vol. 2706. Springer, 165–179.
Meadows, C. 2000. Open issues in formal methods for cryptographic protocol analysis. In
Proceedings of DISCEX 2000. IEEE Computer Society Press, 237–250.
Meadows, C. and Narendran, P. 2002. A Unification Algorithm for the Group Diffie-Hellman
Protocol. In Workshop on Issues in the Theory of Security (WITS 2002).
Millen, J. and Shmatikov, V. 2003. Symbolic Protocol Analysis with Products and Diffie-
Hellman Exponentiation. In Proceedings of the 16th IEEE Computer Security Foundations
Workshop (CSFW 16). IEEE Computer Society, 47–61.
Millen, J. K. and Shmatikov, V. 2001. Constraint solving for bounded-process cryptographic
protocol analysis. In Proceedings of the 8th ACM conference on Computer and Communications
Security. ACM Press, 166–175.
Paulson, L. 1997. Mechanized Proofs for a Recursive Authentication Protocol. In 10th IEEE
Computer Security Foundations Workshop (CSFW-10). IEEE Computer Society Press, 84–95.
Pereira, O. and Quisquater, J.-J. 2001. A Security Analysis of the Cliques Protocols Suites. In
Proceedings of the 14th IEEE Computer Security Foundations Workshop (CSFW-14). 73–81.
Pereira, O. and Quisquater, J.-J. 2004. Generic Insecurity of Cliques-Type Authenticated
Group Key Agreement Protocols. In Proceedings of the 17-th IEEE Computer Security Foundations
Workshop (CSFW-17 2004). IEEE Computer Society Press, 16–29.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 43
Rusinowitch, M. and Turuani, M. 2001. Protocol Insecurity with Finite Number of Sessions
is NP-complete. In 14th IEEE Computer Security Foundations Workshop (CSFW-14). IEEE
Computer Society, 174–190.
Ryan, P. and Schneider, S. 1998. An Attack on a Recursive Authentication Protocol. Information
Processing Letters 65, 1, 7–10.
Schneier, B. 1996. Applied Cryptography. John Wiley& sons, New York.
Shmatikov, V. 2004. Decidable Analysis of Cryptographic Protocols with Products and Modular
Exponentiation. In 13th European Symposium on Programming (ESOP 2004), D. Schmidt,
Ed. Lecture Notes in Computer Science, vol. 2986. Springer, 355–369.
Steiner, M., Tsudik, G., and Waidner, M. 1998. CLIQUES: A new approach to key agreement.
In IEEE International Conference on Distributed Computing Systems. IEEE Computer Society
Press, 380–387.
9. APPENDIX
9.1 Characterizing the Factors of Minimal Attacks
Lemma 3.4. Let u be a normalized term, M, M ′ be two products such that for
all t ∈ F(M) (t ∈ F(M ′ )), t is normalized. Let s be a standard normalized term
and δ the replacement [s ← 1]. Then:
(1) �(M · M ′ )δ� = ��M · M ′�δ�, in particular, �Mδ� = ��M�δ�.
(2) �Exp(u, M)δ� = ��Exp(u, M)�δ� if s �= �Exp(u, M)� and, in case s is of the form
Exp(·, ·), also s �= u.
Proof. Statement 1 is straightforward. We prove 2. given the restrictions on s.
First, assume that u is not of the form Exp(·, ·). Then i) �Exp(u, M)� = u, and
thus, �M� = 1, or ii) �Exp(u, M)� = Exp(u, �M�) and �M� �= 1. We consider both
cases.
In case i) we obtain that �M�δ = 1. By 1. we know that �Mδ� = ��M�δ�(= 1).
Thus,
�Exp(u, M)δ� = �Exp(uδ, Mδ)� (∗)
= �Exp(uδ, �Mδ�)�
= �uδ�
= ��Exp(u, M)�δ�
where in (*) we use that Exp(u, M) �= s (otherwise �Exp(u, M)� = s since s is
normalized).
In case ii), we obtain
��Exp(u, M)�δ� = �Exp(u, �M�)δ�
= �Exp(uδ, �M�δ)� (∗)
= �Exp(uδ, ��M�δ�)�
= �Exp(uδ, �Mδ�)� (∗∗)
= �Exp(uδ, Mδ)�
= �Exp(u, M)δ� (∗ ∗ ∗)
where in (*) we use that Exp(u, �M�) �= s (otherwise �Exp(u, M)� = �Exp(u, �M�)� =
s), in (**) we use 1., and in (***) that Exp(u, M) �= s. Note that both in i) and ii)
the fact that u �= s in case s is of the form Exp(·, ·) is not needed.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
44 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Now, assume that u = Exp(v, M ′ ) for some v and M ′ . Then, we obtain
��Exp(u, M)�δ� = ��Exp(v, M ′ · M)�δ�
= �Exp(v, M ′ · M)δ� (∗)
= �Exp(vδ, (M ′ δ · Mδ)� (∗∗)
= �Exp(Exp(vδ, M ′ δ), Mδ)�
= �Exp(uδ, Mδ)� (∗ ∗ ∗)
= �Exp(u, M)δ� (∗ ∗ ∗∗)
where (*) is obtained just as in the first case. We use that v is not of the form
Exp(·, ·) and that Exp(v, M ′ · M) �= s (otherwise �Exp(v, M ′ · M)� = �Exp(u, M)� =
s). Recall that the first case works even without the assumption that v �= s. In
(**), again we use that Exp(v, M ′ · M) �= s. In (***), we use that u �= s (not
that otherwise u = s and s is of the form Exp(·, ·)). Finally, (****) uses that
Exp(u, M) �= s.
Lemma 3.5. Let σ be a normalized ground substitution, E a set of normalized
terms, s a normalized standard non atomic term, and δ the replacement [s ← 1].
Let σ ′ = �σδ�. If there is no standard subterm t of E such that t ⊑σ s, then
�Eσ ′� = ��Eσ�δ�.
Proof. Assume there is no standard subterm t of E such that t ⊑σ s. Consider
Ωs = {t ∈ S(E) | �tσ ′� �= ��tσ�δ�}. By contradiction assume the stronger result
Ωs �= ∅. Let u ∈ Ωs be minimal for the subterm relation. By definition of σ ′ the
term u is not a variable, and s non-atomic implies it cannot be a constant.
If u = {u1} s u2 , {u1} a u2 or 〈u1, u2〉 then �uσ� �= s for otherwise u ⊑σ s. By minimality
of u one has �u1σ ′� = ��u1σ�δ� and �u2σ ′� = ��u2σ�δ�. Thus we have �uσ ′� = ��uσ�δ�
which contradicts u ∈ Ωs.
Thus necessarily one has u = Exp(u1, M). By minimality for all v ∈ F(u) one
has �vσ ′� = ��vσ�δ�. Thus we have:
Exp(�u1σ ′ �, �Mσ ′ �) = Exp(��uσ�δ�, ��Mσ�δ�)
Since we have �uσ� �= s and �u1σ� �= s we conclude by Lemma 3.4 point 2.
Lemma 3.6. Let t ′ , t1, . . . , tn, t, u be normalized standard terms, z1 . . . , zn ∈ Z,
and let δ be the replacement [u ← 1] such that u �= t, and t = �Exp(t ′ , t z1
1
If t ′ = Exp(·, ·), then we also assume that u �= t ′ . Then,
�tδ� = �Exp(�t ′ δ�, �t1δ� z1 · · · �tnδ� zn )�.
· · · tzn
n )�.
Proof. We distinguish two cases. First, assume that t ′ = Exp(v, M) for some
normalized term v and a normalized product M. Note that v �= Exp(·, ·) since t ′ is
normalized.Then,
�Exp(�t ′ δ�, �t1δ� z1 · · · �tnδ� zn )� = �Exp(�vδ�, �Mδ�·�t1δ� z1 · · · �tnδ� zn )�
= �Exp(vδ, Mδ·(t1δ)
(∗)
z1 · · · (tnδ) zn )�
= �Exp(v, M·t z1
1 · · · tzn n )δ� (∗∗)
= ��Exp(v, M·t z1
1
= �tδ�
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
· · · tzn
n )�δ� (∗ ∗ ∗)
Complexity Results for Security Protocols · 45
where in (*) we use that u �= t ′ , and thus, �t ′ δ� = �vδ� (in this case, �Mδ� = 1) or
�t ′ δ� = Exp(�vδ�, �Mδ�). In (**) we use that u �= t: If u = Exp(v, M·t z1
1
then since u is normalized Exp(v, M·t z1
1
have that u = Exp(v, M·t z1
1
· · · tzn
n ) = �Exp(v, M·t z1
1
· · · tzn
n ),
· · · tzn
n ) must be normalized, but then we
· · · tzn
n )� = t, in contradiction
to u �= t. Finally, in (***) we use that v �= Exp(·, ·), u �= t, and Lemma 3.4, 2.
Now, assume that t ′ �= Exp(·, ·). For both cases, u �= t ′ and u = t ′ , the argument
is similar to the one above. (Replace v by t ′ and omit �Mδ�, Mδ, and M in the
above identities.)
Lemma 3.12. Let t ∈ forge(E) and γ ∈ forge(E) be given with a derivation Dγ
from E ending with an application of a rule in Lc. Then, there is a derivation D ′
from E with goal t satisfying Ld(γ) �∈ D ′ .
Proof. First, we need some notation. If D1 = E1 → . . . → F1 and D2 = E2 →
. . . → F2 are two derivations such that E2 ⊆ F1, then D = D1.D2 is defined as
the concatenation of the steps of D1 and the ones in D2. In addition, to obtain a
derivation, we remove in D the steps from D2 that generate terms already present
in F1.
By definition of a derivation, Ld(γ) �∈ Dγ. Let D be Dγ without its last rule,
i.e., Dγ is D followed by some L ∈ Lc. Define D ′′ = D.Derivt(E) = D.D ′′′ —
D ′′′ is obtained from Derivt(E) by removing redundant steps. Note that D ′′ is a
derivation with goal t. We distinguish two cases:
—Assume L = Lc(γ). Then Ld(γ) /∈ D ′′ since the (two) direct subterms of γ are
created in D, and thus, Ld(γ) /∈ D ′′ . In other words, D ′ = D ′′ is the derivation
we are looking for.
—Assume L = Loc(γ). Then, if Ld(γ) /∈ D ′′ , nothing is to show. Otherwise, let F1
be the final set of messages of D. Now, Definition 2.11, (2) implies that every step
in D ′′′ of the form F1, F2, γ → Ld(γ) F1, F2, γ, β can be replaced by a derivation
from F1, F2 with goal β that does not contain rules from Ld(γ). Replacing steps
in this way and then removing redundant steps yields the derivation D ′ we are
looking for.
9.2 Extending the Dolev-Yao Intruder by Diffie-Hellman Exponentiation
Lemma 4.3. Let E be a finite set of normalized standard messages and t be a
standard message such that t can be derived from t (w.r.t. L). Let D be a derivation
from E with goal t. Then, there exists a derivation D ′ from E with goal t such that
(1) D ′ is of the same length as D, and
(2) for every DH rule L ∈ D ′ ∩ Lo with head t ′ we have that t ′ ∈ E or there exists
a t ′ -rule L ′ ∈ D ′ ∩ (Ld ∪ Lc). Moreover, if L is a decomposition DH rule, then
t ′ ∈ E or there exists a t ′ -rule L ′ ∈ D ′ ∩ Ld.
Proof. Let D be a derivation from E with goal t. From D we construct D ′
as follows. Assume that L ∈ D ∩ Lo with head t ′ and that neither t ′ ∈ E nor
there exists a t ′ -rule L ′ ∈ D ′ ∩ (Ld ∪ Lc). Then, there exists L ′ ∈ D ∩ Lo(t ′ ).
Assume that L is of the form t ′ , t1, . . . , tn → t with product exponents z1, . . . , zn
and that L ′ is of the form t ′′ , t ′ 1, . . . , t ′ n ′ → t′ with product exponents z ′ 1, . . . , z ′ n ′.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
46 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Then, obviously t = �Exp(t ′′ , t z1
1
· · · tzn
n · t ′z′ 1
1
n · · · t′z′
′
n ′ )� and t can be obtained by the
DH rule ˆ L = t ′′ , t1, . . . , tn, t ′ 1, . . . , t ′ n ′ → t with head t′′ . Thus, L can be replaced
by ˆ L. Iterating this replacement we obtain D ′ satisfying 1. and for every DH rule
L ∈ D ′ ∩ Lo with head t ′ there exists no L ′ ∈ D ′ ∩ Lo(t ′ ) preceding L in D ′ . From
this 2. immediately follows. Note that if L is a decomposition DH rule, then t ′ is
of the form Exp(·, ·), and thus, cannot be created by a rule in Lc.
Lemma 4.4. Let D = E0 →L1 . . . En−1 →Ln En be a derivation with goal g.
(1) Assume that for every j with Ej−1 →Lj Ej−1, t the jth step in D and Lj ∈
Ld(t), there exists t ′ ∈ Ej−1 such that t is a subterm of t ′ and either t ′ ∈ E0
or there exists i with i < j and Li ∈ Ld(t ′ ). Then, if L ∈ D ∩ Ld(t) for some
L and t, then t ∈ S(E0).
(2) Assume that for every i < n and t with Li ∈ Lc(t), there exists j with i < j
such that Lj is a t ′ -rule and t ∈ S({t ′ } ∪ E0). Then, if L ∈ D ∩ Lc(t) for some
L and t, then t ∈ S(E0, g).
Given both the assumptions in 1. and 2., it follows that D is a well-formed derivation
with goal g.
Proof. 1. is immediate by induction on j ∈ {1, . . . , n}. Given the assumptions
in 2., we prove by induction on n − i that for all i ∈ {1, . . . , n}, Li ∈ Lc(t) implies
t ∈ S(E0, g). If n − i = 0, then t = g and therefore t ∈ S(E0, g). For the induction
step, the assumptions in 2. imply that there exists j > i such that Lj is a t ′ -rule
and t ∈ S(E0, t ′ ). If Lj ∈ Ld(t ′ ), then t ′ ∈ S(E0) (see above). If Lj ∈ Lc(t ′ ), then
by induction t ′ ∈ S(E0, g), and hence, t ∈ S(E0, g).
Given both the assumptions in 1. and 2., it immediately follows that D is a
well-formed derivation with goal g.
Lemma 4.6. Let z1, . . . , zn ∈ Z \ {0}, and s, s1, . . . , sn, u be normalized standard
terms such that si �= sj for every i �= j, si �= 1 and si �= u for every i, s �= u,
u = �Exp(s, s z1
1 · · · szn n )�, and u = Exp(·, ·). Let δ be the replacement [u → 1]. Then,
u = �Exp(�sδ�, �s1δ� z1 · · · �snδ� zn )�.
Proof. First, assume that s �= Exp(·, ·). Then, u = Exp(s, s z1
1
· · · szn
n ). Conse-
quently, u �∈ S(s, s1, . . . , sn), and thus, s = sδ, and si = siδ for every i. Therefore,
we obtain that u = �Exp(�sδ�, �s1δ� z1 · · · �snδ� zn )�.
Now, assume that s = Exp(v, M). Since s is normalized we know that v �=
Exp(·, ·). Using that u = Exp(·, ·), we obtain u = Exp(v, �M · s z1
1 · · · szn n �) with
�M · s z1
1 · · · szn n � �= 1. Also, u /∈ S(v). Then, with E = F(M) ∪ {s1, . . . , sn} there
exists a set E ′ = {s ′ 1, . . . , s ′ n ′} ⊆ E and z′ 1, . . . , z ′ n ′ ∈ Z \ {0} such that u =
Exp(v, s ′z′ 1
1
n · · · s′z′
′
n ′ ) and u �∈ S(v, E′ ).
Claim. ��Mδ� · �s1δ� z1 · · · �snδ� zn � = s ′z′ 1
1
n · · · s′z′
′
′ .
Proof of the claim. Assume that M = s zn+1
Then, z ′ i = Σj∈Cizj. Let C = � n ′
n
n+1 · · · sz n ′′
n
′′ . Let:
Ci = {j ∈ {1, . . . , n ′′ } | sj = s ′ i}.
i=1 Ci. We have that �s z1
1
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
· · · szn n ·s zn+1
n+1 · · · sz n ′′
n ′′ � =
Complexity Results for Security Protocols · 47
�Π n′
zj
i=1Πj∈Cisj � = Πn′ i=1s′z′ i
i and �Π j /∈Cs zj
j � = 1. Using that the sj are normalized, it
follows that �Π j /∈Csjδ zj�
= �Π j /∈C �sjδ� zj � = 1. Now with s ′ iδ = s′ i the claim follows.
Using that sδ = Exp(vδ, Mδ), u �= M, u /∈ S(v), and u �= s, the claim implies that
�Exp(�sδ�, �s1δ� z1 · · · �snδ� zn )� = �Exp(�vδ�, �Mδ�·�s1δ� z1 · · · �snδ� zn )� = u.
9.3 The DH Rules Allow Polynomial Product Exponent Attacks
Lemma 5.11. For every open message or product t such that β(t) = �β(t)�, we
have that t β = t.
Proof. The proof proceeds by structural induction on t. If t is atomic, a pair,
or encryption, the claim is obvious.
If t = t e1
1 · · · ten n , we know that that β(ti) = �β(ti)� �= 1 for every i, �β(ti)� �= �β(tj)�
for every i �= j, and β(ei) �= 0 for every i. From this, one easily concludes that
tβ = t.
Finally, assume that t = Exp(u, M). First we note that �β(u)� �= Exp(u ′ , M ′ )
for any normalized u ′ and M ′ : Otherwise, �β(t)� = Exp(u ′ , M ′′ ) = β(t), and thus,
β(u) = u ′ . Hence, Exp(u ′ , M ′ ) = �β(u)� = �u ′� = u ′ , which is a contradiction.
Also, �β(M)� �= 1 since otherwise Exp(β(u), β(M)) = β(t) = �β(t)� = �β(u)�, but
we know that �β(u)� �= Exp(·, ·). Hence, Exp(β(u), β(M)) = β(t) = �β(t)� =
Exp(�β(u)�, �β(M)�), and thus, β(u) = �β(u)� and β(M) = �β(M)�. By induction,
this yields uβ = u and M β = M. By definition of tβ , we obtain tβ = Exp(uβ , M β ) =
Exp(u, M) = t.
Lemma 5.13. Let E be a finite set of open messages or products such that
Sext(E) = E and t maximal (w.r.t. subterm ordering) in E. Then:
| �
Sext(s β )|exp ≤ | �
s∈E
s∈E\{t}
Sext(s β )|exp + ||t|| 2 ext
To prove this lemma, we first need to bound the |...|exp size of a product. This
is the following claim:
Claim 1. For every open message or product t with t β = Exp(u, M) it follows
that |M|exp ≤ |t| · ||t||exp ≤ ||t|| 2 ext.
Proof. We show by structural induction on t that |M|exp ≤ |t| · ||t||exp. Since
|t| ≤ ||t||ext and ||t||exp ≤ ||t||ext, the lemma follows.
First consider the case were t = Exp(u ′ , M ′ ) and �β(u ′ )� �= Exp(·, ·). Then,
|M|exp ≤ |M ′ |exp ≤ ||t||exp.
Now, assume that t = Exp(u ′ , M ′ ) and �β(u ′ )� = Exp(·, ·), and thus, u ′β =
Exp(u ′′ , M ′′ ) for some u ′′ and M ′′ . Then, M = (M ′′ · M ′ ) β , and therefore, by
induction |M|exp ≤ |M ′′ |exp + |M ′ |exp ≤ |u ′ | · ||u ′ ||exp + ||t||exp ≤ |t| · ||t||exp where
we use that ||u ′ ||exp ≤ ||t||exp and |u ′ | < |t|.
In all other cases, if t β = Exp(u, M), then there exists a subterm v of t such that
v β = t β . In these cases the bound follows by induction.
We can now proceed with the proof of Lemma 5.13 :
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
48 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
Proof. We proceed (again) by structural induction on t. If t is an atomic
message, then obviously | �
s∈E Sext(sβ )|exp = | �
s∈E\{t} Sext(sβ )|exp.
If t = 〈t1, t2〉, then tβ � �
=
t β
1 , tβ2
, and thus, Sext(tβ ) ⊆ {tβ } ∪ Sext(t β
β
1 ) ∪ Sext(t2 ).
We know that t1, t2 ∈ E \ t since Sext(E) = E. Since |tβ |exp = 0, we obtain
| �
s∈E Sext(sβ )|exp = | �
s∈E\{t} Sext(sβ )|exp. For encryption the argument is analogously.
If t = t e1
1 · · · ten n , then Sext(tβ ) ⊆ {tβ } ∪ �
β
i
Sext(ti ). We know that t1, . . . , tn ⊆
E\{t}, and thus, Sext(tβ ) ⊆ �
s∈E\{t} Sext(sβ )∪{tβ }. With |tβ |exp ≤ |t|exp ≤ ||t|| 2 ext
the claim follows.
Now, assume that t = Exp(u, M) and tβ = uβ , tβ = u ′′ , or tβ = Exp(uβ , M β )
(see the cases in Lemma 5.10). In the first two cases we have Sext(tβ ) ⊆ Sext(uβ ) ∪
Sext(M β ) ⊆ �
s∈E\{t} Sext(sβ ). In the latter case, we have Sext(tβ ) ⊆ {tβ } ∪
Sext(uβ ) ∪ Sext(M β ) ⊆ {tβ } ∪ �
s∈E\{t} Sext(sβ ) and |tβ |exp = 0. Thus, in every
case | �
s∈E Sext(sβ )|exp = | �
s∈E\{t} Sext(sβ )|exp.
Finally, assume that t = Exp(u, M), �β(u)� = Exp(u ′ , M ′ ), uβ = Exp(u ′′ , M ′′ ).
Then, tβ = Exp(u ′′ , (M ′′ · M) β ), and thus,
Sext(t β ) ⊆ {t β } ∪ Sext(u β ) ∪ Sext((M ′′ ·M) β )
⊆ {t β } ∪ Sext(u β ) ∪ {(M ′′ ·M) β } ∪ Sext(M β ).
(Note that by Lemma 5.11, Sext(M ′′β ) = Sext(M ′′ ) and that Sext(M ′′ ) ⊆ Sext(u β ).)
Consequently, Sext(t β ) ⊆ {t β } ∪ {(M ′′ ·M) β } ∪ �
s∈E\{t} Sext(s β ). We know that
|t β |exp = 0, and by Lemma 1, it follows |(M ′′ · M) β |exp ≤ ||t|| 2 ext.
Lemma 5.17. Let M = t e1
1
· · · ten
n and M ′ = t ′e′ 1
1
n · · · t′e′
′
n ′
Let (t β
i , Ei) be a β-tuple for ti for every i. Then, ((M ′ · M) β , E ′β
(M ′ ·M)
β-tuple for M ′ · M.
such that β(t′ i ) = �β(t ′ i )�.
∪ �
i Ei) is a
Proof. Let t = M ′ · M. Obviously, β |= E ′β
t ∪ �
i Ei. We also know that
β(tβ ) = �β(t)�. Let β ′ |= E ′β
t ∪ �
i Ei. We need to show that �β ′ (tβ )� = �β ′ (t)�.
Claim I. �β ′ (ti)� = �β ′ (t β
i )� and �β ′ (t ′ j )� = �β ′ (t ′β
j )� for every i and j.
Proof of Claim I. Since β ′ |= Ei we immediately have �β ′ (ti)� = �β ′ (t β
i )�. Lemma 5.11
implies that t ′β
j = t′ j . Thus, �β ′ (t ′ j )� = �β ′ (t ′β
j )�.
Let the classes C1, . . . , Cl be defined as in the proof of Lemma 5.10.
Claim II. �β ′ (s)� = �β ′ (s ′ )� for every k and s, s ′ ∈ Ck.
Proof of the Claim II. First, assume that s = t ′ i and s′ = t ′ j
for some i and j. Due
to Lemma 5.11, we have that sβ = s and s ′β = s ′ . Then, by definition of E ′β
t we
obtain that β ′ (s) = β ′ (s ′ ). Now, assume that s = ti and s ′ = t ′ j . Again, we have
s ′β = s ′ . The definition of E ′β
t yields that β ′ (s ′ ) = β ′ (s β ). Since β ′ |= Ei we have
that �β ′ (s)� = �β ′ (s β )�. Thus, �β ′ (s ′ )� = �β ′ (s)�. A similar argument can be applied
if s = ti and s ′ = tj. This concludes the proof of the claim.
By definition of E ′β
t we know that β ′ (eCj ) = 0 for every j ∈ J. Using Claim I and
II it is now easy to see that �β ′ (t β )� = �β ′ (t)�.
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
Complexity Results for Security Protocols · 49
Lemma 5.20. Let t1, . . . , tn be open messages, s be a normalized message, β be
an evaluation mapping, and L ∈ L an intruder rule such that β(ti) = �β(ti)� for
all i and �β(t1)�, . . . , �β(tn)� → s ∈ L. Then, there exists an open message t, an
equation system E, and an extension β of β such that
(1) β(t) = s,
(2) β |= E,
(3) �β ′ (t1)� . . . , �β ′ (tn)� → �β ′ (t)� ∈ L for every β ′ |= E,
(4) max{|e| | e ∈ Lexp(t)} ≤ max{|e| | e ∈ Lexp(t1, . . . , tn)} + n, and
(5) the size of E is polynomially bounded in ||t1, . . . , tn||ext.
To prove this lemma, we first prove the following claim:
Claim. Let t0, . . . , tn be open messages and β be an evaluating mapping such that
β(ti) = �β(ti)� for every i. Let z1, . . . , zn be integer variables not occurring in the
ti. Finally, let t = Exp(t0, t z1
1 · · · tzn n ) β . Then, the size of every linear expression in
t is bounded by max{|e| | e ∈ Lexp(t0, t1, . . . , tn)} + n.
Proof of the claim. First note that due to Lemma 5.11 we have t β
i = ti. Let
M = t z1
1
· · · tzn
n . We distinguish different cases.
The case where β(t0) = �β(t0)� �= Exp(·, ·) is easy to prove.
Now, assume that β(t0) = �β(t0)� = Exp(u ′ , M ′ ), and thus, t0 = Exp(u ′′ , M ′′ )
with β(u ′′ ) = u ′ and β(M ′′ ) = M ′ . If t = u ′′ , the statement of the lemma is
obvious. Otherwise, t = Exp(u ′′ , (M ′′ · M) β ) and (M ′′ · M) β �= 1. Assume that
M ′′ = t ′′e′′ 1
n
1 · · · t′′e′′
′′
n ′′ . We know that �β(t ′′
i ) for every i and β(t′′ i ) �= β(t′′ j )
for every i �= j. Let C1, . . . , Cl be the equivalence classes as defined in the proof of
), and thus,
i )� = β(t ′′
Lemma 5.10. Then, t = Πj�∈J∪{1}(s β
Cj )eC j . Using that �β(t ′′
i )� = β(t ′′
i
t ′′β
i
= t′′
i
, and tβ
i = ti we know that s β
Cj
= t′′
i
or sβ
Cj = ti for some i. Also, there
is at most one t ′′
i in every class Cj. Consequently, the size of eCj is bounded as
required. All proper subterms of t are subterms of some ti. Thus, the size of linear
expressions in t can be bounded as required. This concludes the proof of the claim.
We can now proceed with the proof of Lemma 5.20 :
Proof. We consider the different intruder rules L.
First, assume that L = Lp1. Then, n = 1, �β(t1)� = 〈a, b〉, s = a, t1 = 〈a ′ , b ′ 〉
where a and b are normalized messages, and a ′ and b ′ are open messages with
β(a ′ ) = a and β(b ′ ) = b. We define t = a ′ , E = ∅, and β is not extended. Then,
obviously conditions 1. to 5. are satisfied. The cases for Lp2, Lad, and Lc are similar.
Now, assume that L = Lsd. Then, n = 2, �β(t1)� = {a} s b and �β(t2)� = b for
normalized messages a and b. Thus, t1 = {a ′ } s b ′ and t2 = b ′′ where a ′ , b ′ , and b ′′
are open messages such that β(a ′ ) = a and β(b ′ ) = β(b ′′ ) = b. We define t = a ′ ,
E = E =β
b ′ ,b ′′, and β is not extended. Using Lemma 5.5, it is easy to check that the
conditions 1. to 5. are satisfied.
Finally, assume that L = Lo. Then, s = �Exp(β(t1), β(t2) a2 · · · β(tn) an� for some
ai ∈ Z. We define t = Exp(t1, t z2
2
· · · tzn
n ) β , where the zi are new variables, and
E = E β
t . We extend β such that β(zi) = ai for every i. By Lemma 5.10, we
have s = �β(Exp(t1, t z2
2
· · · tzn
n ))� = β(t), β |= E, �β ′ (t)� = �β ′ (Exp(t1, t z2
2
· · · tzn
n ))� =
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
50 · Y. Chevalier, R. Küsters, M. Rusinowitch, M. Turuani
�Exp(�β ′ (t1)�, �β ′ (t2)� β′ (z2) · · · �β ′ (t2)� β′ (z2) )� for every β ′ |= E. The claim implies
4. and from Lemma 5.18 we obtain 5.
Received May 2005; revised October 2006; accepted February 2007
ACM Transactions on Computational Logic, Vol. V, No. N, Month 20YY.
