Knowledge Problems vs Unification and Matching: Dichotomy Results
Abstract
The research area of cryptographic protocol analysis contains a number of innovative algorithms and procedures for checking various security properties of protocols. Most of these procedures focus on solving one of several “knowledge problems” that model intruder knowledge. Solving these problems can demonstrate the ability of the intruder to obtain some forbidden information of the protocol, such as secret keys. Two important examples of these problems are the deduction problem and the static equivalence problem.
Deduction is concerned with the ability to derive a term from a set of terms (or knowledge) obtained from the observation of a protocol instance. Static equivalence, on the other hand, is concerned with distinguishing between two runs of a protocol based on two sets of knowledge. These two knowledge problems at first inspection appear to be very close to the older automated reasoning problems of matching and unification. However, this first impression is wrong, and there have been a few results that have shown theories where one problem, such as unification, is undecidable but another problem, such as deduction, is decidable. These existing dichotomy results were, however, incomplete, and not all cases had been examined, thus leaving the possibility of some connection between the problems for those unexamined cases.
In this paper, we consider the missing dichotomy cases. For each of the remaining cases, we demonstrate a theory that separates the two problems. In addition, once the dichotomy results are completed, it leaves open the question of the existence of non-trivial classes of theories for which all four of the problems are decidable. One example for which this is true is the well-known class of subterm convergent term rewrite systems. In this paper, we develop another example, a class of restrictive permutative theories for which all problems are likewise decidable.
Keywords and phrases:
Knowledge Problems, Unification, Matching, DecidabilityCopyright and License:
2012 ACM Subject Classification:
Theory of computation Equational logic and rewritingEditors:
Maribel FernándezSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The research area of cryptographic protocol analysis contains a number of innovative algorithms and procedures for checking various security properties of protocols, see, for example, [2, 8, 11, 12, 14]. These procedures consider protocols modeled in a symbolic way, typically via a rewrite system or equational theory. Most of these procedures focus on solving one of several knowledge problems which model adversary knowledge. Solving these problems can demonstrate the ability of the adversary to obtain some forbidden knowledge of the protocol such as secret keys. Two of the most important problems are deduction and static equivalence [2, 12]. The problem of deduction considers the ability of an adversary to observe one or more protocol sessions and decide if a specific term is derivable from this observed knowledge. More specifically, given a substitution, , representing knowledge of an adversary, the problem asks if there exists a term, , such that , where is a ground “target” term. The second problem is concerned with deciding whether two runs of a protocol can be distinguished. This is critical in cases such as voting protocols, where the ability to distinguish between, for example, yes and no votes could violate the security of the protocol. Here, given two substitutions, and , representing two runs of a protocol and two terms and , we would like to know if but . That is, the terms distinguish the runs of the protocol.
Interestingly, these knowledge problems seem to be closely related to the older problems of unification and matching. For example, matching seems closely related to deduction. In matching we are given the terms and must find the substitution whereas in deduction you are given the substitution and must find the term. Likewise, unification seems to be closely related to static equivalence. However, recent results [15, 10, 21, 5] have shown that the problems, although related, are not equivalent. For example, they have demonstrated theories for which one problem is decidable, such as deduction, but another is undecidable, such as unification. Furthermore, there are still some cases that remain open: in particular, the unification problem vs. the static equivalence problem, and matching vs. static-equivalence. We consider those missing cases in this paper showing that they are not equivalent either and thus completing the dichotomy results separating the knowledge problems from unification and matching.
In addition, we consider the classes of theories for which all the problems (i.e., knowledge, unification, and matching) are decidable. We know of some classes of theories for which this is the case, such as subterm convergent term rewrite systems. Here we demonstrate a new class of equational theories for which all these problems are also decidable.
Paper Outline
The remainder of the paper is organized as follows. Section 2 contains the preliminaries and background material, including the definitions of the knowledge problems. Section 3 reviews the previous results and then completes the final dichotomy results comparing the knowledge problems to unification and matching. Section 4 develops a class of equational theories for which all the considered problems are decidable. Finally, Section 5 includes the conclusions, remaining open problems, and future work.
2 Preliminaries
We use the standard notation of equational unification [7] and term rewriting systems [6]. Given a first-order signature and a (countable) set of variables , the -terms over variables are built in the usual way by taking into account the arity of each function symbol in . Each -term is well-formed: if it is rooted by a -ary function symbol in , then it has necessarily direct subterms. For any term , denotes the number of symbols occurring in . The set of -terms over variables is denoted by . The set of variables from occurring in a term is denoted by . A term is ground if . A term is linear if each variable in occurs only once in . For any position in a term (including the root position ), is the symbol at position , is the subterm of at position , and is the term in which is replaced by . A substitution is an endomorphism of with only finitely many variables not mapped to themselves. A substitution is denoted by , where the domain of is and the range of is . Application of a substitution to is written . A -equation is a pair of -terms denoted by or simply when it is clear from the context that we do not refer to an axiom.
Let denote a finite set of context variables (sometimes called holes) such that . We use the notation to represent the context variable . A context is a linear term containing only context variables. More formally, a context is a term, , where each variable (context hole) occurs at most once. Thus, the size of a context follows from the size of a term, where any hole occurrence counts for . Given a context with variables and terms , denotes the term where for , denotes the -th context variable occurring in the term , and is called the context part of . When , is said to be a context instantiated with terms in .
2.1 Equational Theories
Given a set of -axioms (i.e., pairs of terms in , denoted by ), the equational theory is the congruence closure of under the law of substitutivity (by a slight abuse of terminology, is often called an equational theory). Equivalently, can be defined as the reflexive transitive closure of an equational step defined as follows: if there exist a position of , (or ) in , and substitution such that and . An axiom is regular if . An axiom is collapse-free if and are non-variable terms. An equational theory is regular (resp., collapse-free) if all its axioms are regular (resp., collapse-free). An equational theory is said to be permutative if for any in , the number of occurrences of any (function or variable) symbol in is equal to the number of occurrences of that symbol in . Well-known theories such as Associativity (), Commutativity (), and Associativity-Commutativity () are permutative theories. A theory is said to be shallow if variables can only occur at a depth at most in axioms of . For example, is shallow but and are not. Any constant in not occurring in is said to be free.
Definition 1 (Unification).
Given a signature , an equational theory , and a set of -equations, . The -unification decision problem asks if there exists a substitution such that for all . If is presented as a rewrite relation , then we ask if there exists a substitution such that for all .
Another important algorithmic problem is matching, which can be seen as a restricted form of the unification problem.
Definition 2 (Matching).
Given a signature , an equational theory , and a set of -equations, . The -matching decision problem asks if there exists a substitution such that for all . If is presented as a rewrite relation , then we ask if there exists a substitution such that for all .
2.2 Rewrite Relations
Given a signature , an oriented -axiom is called a rewrite rule of the form such that , is not a variable and . A finite set of rewrite rules is called a term rewriting system (TRS, for short). Let be any TRS. For any -terms and , -rewrites to , denoted by , if there exist a position of , , and substitution such that and . The term is said to be -reducible, is called a redex, and in the particular case where , -rewrites to , denoted by . A term is an innermost redex if none of its proper subterms is a redex. The symmetric relation is denoted by . The rewrite relation is confluent if is included in . The rewrite relation is convergent if is both terminating and confluent. When is convergent, we have that for any terms , iff , where (resp., ) denotes the unique normal form of (resp., ) w.r.t . A TRS is said to be optimally reducing if for any in and any substitution , the following holds: ( is -irreducible for any strict subterm of ) implies that is -irreducible. A TRS is linear if for any in , both and are linear. A convergent TRS is said to be subterm convergent if for any , is either a strict subterm of or a constant. We refer to [6] for the classical notion of overlap and critical pair. Hence, a trivial critical pair is obtained by an overlap at the root position of a rule with a renaming of the same rule. A TRS with no non-trivial critical pairs is non-overlapping.
2.3 Knowledge Problems
The applied pi calculus and frames are used to model attacker knowledge [3]. In this model, the set of messages or terms which the attacker knows, and which could have been obtained from observing one or more protocol sessions, are the set of terms in of the frame , where is a substitution ranging over ground terms. We also need to model cryptographic concepts such as nonces, keys, and publicly known values. We do this by using names, which are essentially free constants. Here also, we need to track the names which the attacker knows, such as public values, and the names which the attacker does not know a priori, such as freshly generated nonces. consists of a finite set of restricted names; these names represent freshly generated names which remain secret from the attacker. The set of names occurring in a term is denoted by . For any frame , let be the set of names where ; and for any term , let denote – by a slight abuse of notation – the term . For any term , we say that satisfies the name restriction of if .
Definition 3 (Deduction).
Let be a frame, and a ground term. We say that is deduced from modulo , denoted by , if there exists a term such that and . The term is called a recipe of in modulo .
Another form of knowledge is the ability to tell if two frames are statically equivalent modulo .
Definition 4 (Static Equivalence).
Two terms and are equal in a frame modulo an equational theory , denoted , if , and . The set of all equalities such that is denoted by . Given a set of equalities , the fact that for all is denoted by . Two frames and are statically equivalent modulo , denoted as , if , and .
Deduction and static equivalence are known to be decidable for subterm convergent rewrite systems [2].
2.4 Graph Embedded TRS
It will be useful in one of the dichotomy results that follows to use a restricted class of term rewrite systems for which it is already known that the static equivalence problem is decidable. These systems were introduced in [25] and then simplified in [10], where they are used to expand on the class of subterm convergent term rewrite systems. Actually, we don’t need the full class here for the proofs that follow. Therefore, we only introduce the needed components below, which keeps the definition simpler and more compact. In particular, we introduce a subset of contracting TRSs below that omit the permutative component. One can find the full definition in [10].
The class of contracting TRS first starts by modeling the graph minor relation in the TRS setting. This is done by a set of rewrite schemas. This set of rewrite schemata then induces a graph-embedded term rewrite system. Notice that this is very similar to what is often done when considering the homeomorphic embedding relation in TRSs.
Definition 5 (Graph Embedding).
Consider the following reduction relation, , where is the set of rules given by the instantiation of the following rule schema:
We say a term is graph-embedded in a term , denoted , if is a well formed term such that .
A TRS is graph-embedded if for any , or is a constant.
The graph embedded class is not sufficient to obtain decidability of static equivalence, so we next need to introduce a type of projection rule that ensures access to subterms and thus decidability of static equivalence.
Definition 6 (Projecting Rule).
Let be a TRS, a variable and a term with a single occurrence of . A projecting rule in over leading to is a rule in which is a variant of where is a superterm of with no additional occurrences of .
How these projecting rules relate to the entire term-rewrite system can now be defined.
Definition 7 (Projection-Closed Derivation).
Let be a TRS. A non-empty -derivation is said to be projection-closed with respect to if it has the form
where
-
is a linear term and is a well formed term,
-
is a rule among (1), (2) and (4),
-
is a substitution ranging over variables,
-
if is rule (1), , then for any occurring in there exists a projecting rule in over leading to ,
-
if is rule (4), , then for any occurring in there exists a projecting rule in over leading to ,
-
is either projection-closed with respect to or empty.
These rule can be combined into a subset of the graph-embedded TRS, called contracting, for which the knowledge problems are decidable. However, the contracting definition also allows for a type of restricted permutation. For the results in this paper we don’t need to include the permutation component of the contracting definition and by leaving it out we obtain a strict subset of contracting, introduced below, which is simpler and for which the knowledge problems are decidable.
Definition 8 (Permutation-free Contracting TRS).
A TRS is said to be permutation-free contracting, -free contracting for short, if for any non-subterm rule in , there exist a position of , a substitution ranging over variables, and a projection-closed derivation with respect to such that and is of depth .
Proof.
Follows from [25] where it is shown that the knowledge problems are decidable for contracting TRS, and the fact that -free contracting TRS are a strict subset of contracting.
3 Dichotomy Results
It is known that Deduction and Static Equivalence are undecidable in general, see [1, 9]. It was also shown in [1] that static equivalence is not reducible to deduction. Interestingly, it is shown in [1] that deduction can be reduced to static equivalence. However, the proof in [1] requires the addition of a free function symbol. It is unknown if the reduction can be done without the addition. Furthermore, there exist theories for which deduction is decidable but static equivalence is not, see, for example, [9].
In this section we want to compare the knowledge problems to the well-known unification and
matching problems. Actually, this work has already been started, motivated by the close
similarities in the problems. Previous work has provided dichotomy results that compare a
knowledge problem to either unification or matching, demonstrating a theory for which one
is decidable but the other is not. Thus, before beginning the new results, let us quickly review these existing results. After the review, we then complete the picture by developing the final needed results comparing the problems.
Considering each of the possible cases:
-
1.
Unification vs deduction and static equivalence.
- (a)
-
(b)
There exist theories for which unification is decidable but deduction is undecidable. In [5] a theory is developed for which unification is decidable but deduction is undecidable.
-
(c)
There exist theories for which unification is decidable but static equivalence is undecidable. Shown in this paper.
-
(d)
There exist theories for which unification is undecidable but static equivalence is decidable. Shown in this paper.
-
2.
Matching vs deduction and static equivalence.
-
(a)
There exist theories for which matching is undecidable but deduction is decidable. It is shown in [10] that deduction is decidable in permutative theories but in [21] unification is shown to be undecidable for permutative theories. Actually, the problem used in the reduction is a matching problem, so this also demonstrates a theory for which matching is undecidable.
-
(b)
There exist theories for which matching is decidable but deduction is undecidable. This is due to the unification case (1b) above.
-
(c)
There exist theories for which matching is decidable but static equivalence is undecidable. Due to the unification case (1c) above.
-
(d)
There exist theories for which matching is undecidable but static equivalence is decidable. Shown in this paper.
-
(a)
We now proceed to consider each of the remaining dichotomy problems in turn.
3.1 Remaining Dichotomy Problems
Problem: Unification Decidable and Static Equivalence Undecidable
For this problem, we are comparing the unification problem to the problem of static equivalence, showing that the problems are not comparable. That is, we show that there exist theories for which unification is decidable and static equivalence is not. In particular, we will be using the theory of optimally reducing, linear, and convergent TRS.
In [5] it is shown that there exists an optimally reducing, linear, and convergent TRS for which the cap problem is undecidable. Since the cap problem is a special case of the deduction problem [10], the result developed in [5] provides the following:
Lemma 10 ([5]).
Deduction is undecidable in general for optimally reducing, linear, non-overlapping and convergent TRS.
The result is obtained by using a reduction from the halting problem for 2-counter Minsky machines [5]. We modify that reduction here to extend the result from the deduction problem to the static equivalence problem.
A 2-counter Minsky machine is a counter machine that is equipped with 2 non-negative counters that can be incremented, decremented and checked for equality with zero. Since these machines are Turing complete, the zero halting problem – whether the machine will halt in an accepting state with both counters at 0 – is undecidable. A configuration of a 2-counter machine can be represented as a triple , where is the label of the next instruction to be executed and , , are the current counter values. As shown in [5] the operations on such a machine can be modeled by a TRS. We modify their construction a little. For any of the finite many states, let be a unary function symbol and represent state . Let and be unary function symbols, and let be a rank 3 function symbol. Let be a nonce and be a constant representing zero. is used to represent the successor function, while is used to encode configurations. For any 2-counter machine, we can encode the initial configuration as and the final configuration as . We also assume that the machine makes no moves once it is in the final state . Then the state transitions of the counter machine can be modeled by the following convergent, linear, and optimally reducing TRS :
The symbol in the above TRS is used to ensure the optimally reducing requirement. In addition, notice that once the final state is reached the rewrite derivation comes to an end, and this exactly corresponds to the termination of the counter machine. Let stand for “configuration terms,” i.e., ground terms of the form where is a state symbol and , respectively be the initial and final configuration terms. It can be shown that can be deduced from modulo if and only if if and only if the Minsky machine reaches the final configuration.
We now show that the static equivalence problem is undecidable for this theory.
Lemma 11.
The static equivalence problem is undecidable in general for optimally reducing, linear, non-overlapping and convergent TRSs.
Proof.
Let be the the optimally reducing, linear, and convergent TRS outlined above. Construct two frames as follows:
-
1.
, where
-
2.
, where
where is a new private name (nonce) in . Thus .
Notice that the encoding of the initial configuration of the Minsky machine, that the variable maps to, is the same in both frames. The only difference between the frames is in the mappings on . Clearly if then is unified by , but not by .
The proof in the other direction – that if there is an equation that is unified by but not by then can be deduced from – can be proved in a way similar to the proof of Proposition 4 (pages 8–9) of [2].
Claim 1.
Let be a ground term and be a subterm of at position . If is reducible, then is reducible where is a free constant.
Proof.
Without loss of generality suppose for left-hand side of . Since there are no moves after the machine reaches the final state, the symbol does not appear on any left-hand side. Thus no nonvariable subterm of is unifiable with . It is also worth noting here that the term rewriting system , where is a free constant, is convergent.
We can make use of the constant abstraction (“cutting”) function as defined in [2]
By extension, we also define for any substitution , the substitution . With , we can prove the following:
Claim 2.
if and only if .
Proof.
The “if” part is straightforward. For the “only if” part, suppose
Let and let . Now if is a subterm of then occurs in since every rule in is variable-preserving. By the previous claim, if is reducible then so is which leads to a contradiction.
Claim 3.
Suppose cannot be deduced from . For any terms and such that , we have that implies .
Proof.
Assume . By the earlier claim, we have . Let us show that and . Suppose by contradiction, say for , that . Then there must be a nonvariable subterm of such that . But this means that can be deduced from , which is impossible by assumption. Thus, we have and . So, , equivalently .
Thus and are statically equivalent if and only if cannot be deduced from .
We need now the second component of the result, that unification is decidable for this TRS. We can rely on the following known result:
Lemma 12 ([22]).
Unification is decidable for optimally reducing and convergent TRSs.
Thus we obtain the desired dichotomy result for this section.
Theorem 13.
There exist theories for which unification is decidable but static equivalence is undecidable.
Proof.
Problem: Unification Undecidable and Static Equivalence Decidable
For this problem we again compare unification to static equivalence. However, now we show that there are theories for which unification is undecidable but static equivalence is decidable. We follow a similar strategy to that in [4], which shows the undecidability of unification for -strong TRSs. We need to modify the reduction so that it models not -strong theories but -free contracting . This modification does not impact the unification problem but since the static equivalence problem is decidable for -free contracting TRS, we obtain the desired result.
We will use the modified Post Correspondence Problem (MPCP). Let , and let . Then an instance of the MPCP is defined as follows:
-
Given a non-empty string .
-
Does there exist indices such that:
To start we need to convert the MPCP into a rewriting problem by interpreting the symbols in of the MPCP as unary function symbols, for each we have a function . Next, for any string we will convert the concatenation operation into function composition, denoted as such that:
Now, introduce new function symbols, , and distinct unary symbols, .
Let be an instance of the MPCP, from construct the following TRS, , For each pair :
These rules can be seen as checking that the strings correspond to a sequence of MPCP blocks. Notice that since the unique symbols prevent critical pairs between the rules of , the TRS is confluent. However, this current system, while convergent, is not a -free contracting TRS. Notice that the projection rules of Definition 8 are missing.
Now we need to add a second set of rules, , that ensure the TRS is -free contracting. The key requirement is that for any of the rules in that remove the function symbols , , and , there must exists another rule in of the form . Therefore, we introduce new unary function symbols for each , and and . Define the TRS as follows:
Again notice that due to the unique symbols , , and , there are no critical pairs between the rules of .
Finally, form the TRS by combining and : .
Lemma 14.
The TRS is -free contracting convergent.
Proof.
The convergence follows from the absence of critical pairs between the rules. is -free contracting due to the additional rules in .
Lemma 15.
Static equivalence is decidable for .
Proof.
Theorem 16.
There exist theories for which unification is undecidable but static equivalence is decidable.
Proof.
Let be an arbitrary instance of the MPCP. Let be the TRS constructed as above. From Lemma 15 the static equivalence problem is decidable.
Now consider the unification problem
where is a new constant. Notice that due to the string , we cannot use the rules contained in for reducing the left-hand side of this problem to the right, since there are no symbols contained in . Thus, the reduction is done via the rules in . However, as shown in [4] the unification problem above is decidable iff the corresponding MPCP is.
Remark 17.
It is interesting to note that there is an interesting parallel to the above result already in the literature. As already cited, in [4] it is shown that the unification problem is undecidable in general for -strong theories. In addition, in [19] a procedure is developed for solving the static equivalence problem for -strong theories. However, there is a difference in the definition of -strong from [4] to [19], for example in the first paper the rules in are required to be dwindling, while in the latter they are not dwindling. Thus, it’s not immediately clear if these two definitions are equivalent.
Problem: Matching Undecidable and Static Equivalence Decidable
Next we consider the final dichotomy results that remain, that of matching compared to static equivalence. First, we can note that since we have shown a case for which unification is decidable but static equivalence is undecidable, Theorem 13, we already have the following result due to the fact that if unification is decidable so is matching.
Corollary 18.
There exist theories for which matching is decidable but static equivalence is undecidable.
Next, notice that in the proof of Theorem 16, the right-hand side of the problem, is ground. Therefore, what we have is actually a matching problem and thus we also obtain the following result via the same proof.
Corollary 19.
There exist theories for which matching is undecidable but static equivalence is decidable.
4 Decidable Theories
With the completion of the dichotomy results we next want to consider the question of non-trivial classes of theories for which all the above problems, knowledge, matching, and unification, decidable. One such example is the class of subterm convergent TRSs. These TRSs are very useful in the formal analysis of cryptographic protocols since they can model a number of cryptographic primitives. However, they require that the theory can be oriented into a restricted type of TRS. We introduce in this section another non-trivial example, the separate variable-permuting class of theories which are a restricted form of equational theory. We show that all of the above problems are decidable for this particular class of permutative theories.
4.1 Separate Variable-Permuting Theories
Let us begin by introducing the class of variable-permuting theories and then the class of separate variable-permuting (SVP) theories.
Definition 20 (Variable-Permuting Theory).
An axiom is said to be variable-permuting [21] if all the following conditions are satisfied:
-
1.
the set of positions of is identical to the set of positions of ,
-
2.
for any non-variable position of , ,
-
3.
for any , the number of positions of in is identical to the number of positions of in .
An equational theory is said to be separate variable-permuting (, for short) if for any we have:
-
is a variable-permuting axiom,
-
and are rooted by the same function symbol that does not occur elsewhere in .
An inner constructor symbol of is a function symbol from that never occurs at the root of any equality in .
Example 21 (Intruder Theory with a Permutative Axiom).
Let us consider a theory used in practice to model a group messaging protocol [13]. For this protocol, the theory modeling the intruder can be defined [23] as a combination where
and
is a subterm convergent TRS and is a theory sharing with the constructor symbol .
The class of theories could be sufficient to specify intruder theories where one needs only a permutation of variables expressed via a single axiom, as in Example 21. Compared to a shallow theory like Commutativity, a theory allows us to express a permutation involving terms with constructor symbols. Thus, theories provide good examples for applying the combination methods developed in [16] to the deduction and static equivalence problems in the union of theories sharing only constructor symbols. We believe that theories could be useful to approximate , and so to provide an alternative to in some cases. The theory is clearly very interesting in protocol analysis, for instance to specify the exclusive-or theory, but it is difficult to implement.
Contrary to , the decision procedures discussed in the following for the deduction and static equivalence problems in theories are easy to implement in existing systems since they are very similar to the ones known in the class of subterm convergent theories, which is ubiquitous in protocol analysis.
4.2 Knowledge Problems in Separate Variable-Permuting Theories
The deduction problem is known to be decidable for the class of permutative theories [10], and so it is decidable for the class of theories since theories are permutative. The case of static equivalence is more complicated since it is known to be undecidable in permutative theories [15]. Therefore, we need to show that static equivalence becomes decidable when considering the particular case of theories. Static equivalence has been shown to be decidable in shallow permutative theories [17]. However, the theory is not shallow. As shown below, the approach followed in [17] for the case of shallow permutative theories can be reused for the case of theories. Actually, a decision procedure for static equivalence in any theory can obtained by computing a finite set of equalities bounded by , where . To define this particular finite set of equalities, we first construct a frame saturation dedicated to theories. Then, the recipes of the (deducible) terms included in that saturation are used to build an appropriate set of bounded equalities.
Let be the set of subterms of a term and let be the set of subterms of a substitution defined by .
Definition 22 (Frame Saturation for Theories).
Let be any theory. For any frame , let where is the set of terms such that , , and for some term .
The set of terms is the smallest set such that:
-
(1)
,
-
(2)
if and then ,
-
(3)
if , , , then ,
For any frame , is the substitution where is a fresh variable for any , and denotes the frame . Given a recipe for each , the substitution is called a recipe substitution of and is denoted by . Let . The set is the set of equalities such that and .
The two following technical lemmas are similar to the ones developed in [17] for the case of shallow permutative theories.
Lemma 23.
Let be any theory. For any terms and satisfying the name restriction, if and then .
Proof.
By induction on .
-
Base case: if , then it is true by definition of .
-
Inductive step: consider and are terms such that , , , and . Then, there exist and substitutions such that
-
–
for , and . In all these matching problems, note that and are only built over inner constructors. Thus, these matching problems correspond to syntactic matching. For any variable in , only two cases can occur.
-
1.
is a term where for . In that case, we define where for .
-
2.
is a subterm () of a term such that any subterm for is rooted by a inner constructor. Thus, and so there exists a variable such that . In that case, we define .
With the above definition of , we have .
-
1.
-
–
Let . By definition of , all the function symbol occurrences in are already in or in . Thus, . Since and , we have . Using the same argument, for , .
Hence the induction hypothesis applies to and , implying that
-
–
for ,
-
–
for .
Thus we have:
which completes the result.
-
–
Lemma 24.
Let be any theory. For any frames and , iff and .
Proof.
(If direction) Let be the set of all equalities such that .
Consider any . By definition of and , we have and . Since , we obtain . Then, by Lemma 23, we get , which means that . In a symmetric way, we show that . Then, we can conclude since .
Theorem 25.
Deduction and static equivalence are decidable in any theory.
Proof.
Decidability of deduction follows from the decidability of deduction in permutative theories [10], theories being permutative. Static equivalence is decidable thanks to Lemma 24.
The combination method developed in [16] can be directly applied to a union where is a convergent TRS with decidable deduction and static equivalence, and is a theory. In that case, the function symbols shared by and must be constructors for and inner constructors for . Notice that with a shallow permutative theory , constructor symbols can only occur in the ground terms appearing in , and this is clearly a limitation to the application of the combination method. Thus, considering theories instead of shallow ones allows us to get more significant applications.
Corollary 26.
Let be any convergent TRS where both deduction and static equivalence are decidable, and any theory such that the function symbols shared by and are constructors for and inner constructors for . Then, both deduction and static equivalence are decidable in .
4.3 Unification and Matching in Separate Variable-Permuting Theories
Finally, let us consider the unification and matching problems in theories. Similar to the static equivalence case, we cannot rely on the decidability of unification in the whole class of permutative theories, since unification have been shown to be undecidable in permutative theories [26] and even in variable permutative theories [15]. Fortunately, theories are examples of theories with the property of being closed by paramodulation, a notion formally introduced in [24, 20, 18]. Actually, the closure by paramodulation follows from the absence of non-variable overlap between two axioms of any theory. Since unification is decidable and finitary in theories closed by paramodulation [24, 20], we have that unification is finitary in theories. Since theories are regular and collapse-free, any unification algorithm in theories leads to a unification algorithm with free symbols, thanks to the combination method known for unification algorithms in regular collapse-free theories [27], the empty (aka free) theory being regular collapse-free. Consequently, unification with free constants, and so matching is also finitary in theories.
Theorem 27.
Unification and matching are decidable in any theory.
Finally, we can put all the above results together to obtain the following.
Theorem 28.
Unification, matching, deduction, and static equivalence are decidable for any theory.
5 Conclusions
In this paper we have completed the dichotomy results comparing the knowledge problems of static equivalence and deduction to matching and unification. In particular, we have completed the final four missing results in this comparison. We summarize the results in Table 1. The fields at the intersection of each possibility either cite the paper in the literature where the entire (or part of) the dichotomy result can be found. Otherwise the cell in the table contains the result in this paper.
| Deduction | Static Equivalence | |||||
| Decidable | Undecidable | Decidable | Undecidable | |||
| Unification | Decidable | Theorem 28 | [5] | Theorem 28 | Theorem 13 | |
| Undecidable | [10] and [21] | [1] | Theorem 16 | [1] | ||
| Matching | Decidable | Theorem 28 | [5] | Theorem 28 | Theorem 13 | |
| Undecidable | [10] and [21] | [1] | Corollary 19 | [1] | ||
In addition to completing the above dichotomy results we have developed a non-trivial class of theories, the theories, which are capable of symbolically modeling some cryptographic primitives and for which deduction, static equivalence, unification, and matching are all decidable.
There is still the interesting question of deduction compared to static equivalence. There is a reduction from deduction to static equivalence contained in [1]. However, this requires the addition of a new function symbol to the signature. Thus, this leaves open the question of whether this reduction can be done without the additional symbol or if there it can be shown that there are theories for which deduction can be separated from static equivalence. We plan to investigate these questions in future work.
References
- [1] Martín Abadi, Mathieu Baudet, and Bogdan Warinschi. Guessing attacks and the computational soundness of static equivalence. In Luca Aceto and Anna Ingólfsdóttir, editors, Foundations of Software Science and Computation Structures, 9th International Conference, FOSSACS 2006, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2006, Vienna, Austria, March 25-31, 2006, Proceedings, volume 3921 of Lecture Notes in Computer Science, pages 398–412, Berlin, Heidelberg, 2006. Springer. doi:10.1007/11690634_27.
- [2] Martín Abadi and Véronique Cortier. Deciding knowledge in security protocols under equational theories. Theor. Comput. Sci., 367(1-2):2–32, 2006. doi:10.1016/j.tcs.2006.08.032.
- [3] Martín Abadi and Cédric Fournet. Mobile values, new names, and secure communication. In Chris Hankin and Dave Schmidt, editors, Conference Record of POPL 2001: The 28th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, London, UK, January 17-19, 2001, pages 104–115. ACM, 2001. doi:10.1145/360204.360213.
- [4] Siva Anantharaman, Hai Lin, Christopher Lynch, Paliath Narendran, and Michaël Rusinowitch. Unification modulo homomorphic encryption. J. Autom. Reason., 48(2):135–158, 2012. doi:10.1007/s10817-010-9205-y.
- [5] Siva Anantharaman, Paliath Narendran, and Michaël Rusinowitch. Intruders with caps. In Franz Baader, editor, Term Rewriting and Applications, 18th International Conference, RTA 2007, Paris, France, June 26-28, 2007, Proceedings, volume 4533 of Lecture Notes in Computer Science, pages 20–35. Springer, 2007. doi:10.1007/978-3-540-73449-9_4.
- [6] Franz Baader and Tobias Nipkow. Term rewriting and all that. Cambridge University Press, New York, NY, USA, 1998.
- [7] Franz Baader and Wayne Snyder. Unification theory. In John Alan Robinson and Andrei Voronkov, editors, Handbook of Automated Reasoning (in 2 volumes), pages 445–532. Elsevier and MIT Press, 2001. doi:10.1016/B978-044450813-3/50010-2.
- [8] Mathieu Baudet, Véronique Cortier, and Stéphanie Delaune. YAPA: A generic tool for computing intruder knowledge. ACM Trans. Comput. Log., 14(1):4:1–4:32, 2013. doi:10.1145/2422085.2422089.
- [9] Johannes Borgström. Static equivalence is harder than knowledge. Electronic Notes in Theoretical Computer Science, 154(3):45–57, 2005. doi:10.1016/j.entcs.2006.05.006.
- [10] Carter Bunch, Saraid Dwyer Satterfield, Serdar Erbatur, Andrew M. Marshall, and Christophe Ringeissen. Knowledge problems in protocol analysis: Extending the notion of subterm convergent. CoRR, abs/2401.17226, 2024. doi:10.48550/arXiv.2401.17226.
- [11] Rohit Chadha, Vincent Cheval, Stefan Ciobaca, and Steve Kremer. Automated verification of equivalence properties of cryptographic protocols. ACM Trans. Comput. Log., 17(4):23, 2016. doi:10.1145/2926715.
- [12] Stefan Ciobaca, Stéphanie Delaune, and Steve Kremer. Computing knowledge in security protocols under convergent equational theories. J. Autom. Reason., 48(2):219–262, 2012. doi:10.1007/s10817-010-9197-7.
- [13] Katriel Cohn-Gordon, Cas Cremers, Luke Garratt, Jon Millican, and Kevin Milner. On ends-to-ends encryption: Asynchronous group messaging with strong security guarantees. In David Lie, Mohammad Mannan, Michael Backes, and XiaoFeng Wang, editors, Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, CCS 2018, Toronto, ON, Canada, October 15-19, 2018, pages 1802–1819. ACM, 2018. doi:10.1145/3243734.3243747.
- [14] Jannik Dreier, Charles Duménil, Steve Kremer, and Ralf Sasse. Beyond subterm-convergent equational theories in automated verification of stateful protocols. In Matteo Maffei and Mark Ryan, editors, Principles of Security and Trust - 6th International Conference, POST 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, volume 10204 of Lecture Notes in Computer Science, pages 117–140, Berlin, Heidelberg, 2017. Springer. doi:10.1007/978-3-662-54455-6_6.
- [15] Serdar Erbatur, Andrew M. Marshall, Paliath Narendran, and Christophe Ringeissen. Deciding knowledge problems modulo classes of permutative theories. In Juliana Bowles and Harald Søndergaard, editors, Logic-Based Program Synthesis and Transformation - 34th International Symposium, LOPSTR 2024, Milan, Italy, September 9-10, 2024, Proceedings, volume 14919 of Lecture Notes in Computer Science, pages 47–63. Springer, 2024. doi:10.1007/978-3-031-71294-4_3.
- [16] Serdar Erbatur, Andrew M. Marshall, and Christophe Ringeissen. Notions of knowledge in combinations of theories sharing constructors. In Leonardo de Moura, editor, Automated Deduction - CADE 26 - 26th International Conference on Automated Deduction, Gothenburg, Sweden, August 6-11, 2017, Proceedings, volume 10395 of Lecture Notes in Computer Science, pages 60–76. Springer, 2017. doi:10.1007/978-3-319-63046-5_5.
- [17] Serdar Erbatur, Andrew M. Marshall, and Christophe Ringeissen. Computing knowledge in equational extensions of subterm convergent theories. Math. Struct. Comput. Sci., 30(6):683–709, 2020. doi:10.1017/S0960129520000031.
- [18] Serdar Erbatur, Andrew M. Marshall, and Christophe Ringeissen. Non-disjoint combined unification and closure by equational paramodulation. In Boris Konev and Giles Reger, editors, Frontiers of Combining Systems - 13th International Symposium, FroCoS 2021, Birmingham, UK, September 8-10, 2021, Proceedings, volume 12941 of Lecture Notes in Computer Science, pages 25–42. Springer, 2021. doi:10.1007/978-3-030-86205-3_2.
- [19] Kimberly A. Gero. Deciding Static Inclusion for Delta-strong and Omega Delta-strong Intruder Theories: Applications to Cryptographic Protocol Analysis. PhD thesis, University at Albany–SUNY, 2015.
- [20] Christopher Lynch and Barbara Morawska. Basic syntactic mutation. In Andrei Voronkov, editor, Automated Deduction - CADE-18, 18th International Conference on Automated Deduction, Copenhagen, Denmark, July 27-30, 2002, Proceedings, volume 2392 of Lecture Notes in Computer Science, pages 471–485. Springer, 2002. doi:10.1007/3-540-45620-1_37.
- [21] Paliath Narendran and Friedrich Otto. Single versus simultaneous equational unification and equational unification for variable-permuting theories. J. Autom. Reason., 19(1):87–115, 1997. doi:10.1023/A:1005764526878.
- [22] Paliath Narendran, Frank Pfenning, and Richard Statman. On the unification problem for cartesian closed categories. J. Symb. Log., 62(2):636–647, 1997. doi:10.2307/2275552.
- [23] Ky Nguyen. Formal verification of a messaging protocol. Internship report, 2019. Work done under the supervision of Vincent Cheval and Véronique Cortier.
- [24] Robert Nieuwenhuis. Decidability and complexity analysis by basic paramodulation. Inf. Comput., 147(1):1–21, 1998. doi:10.1006/inco.1998.2730.
- [25] Saraid Dwyer Satterfield, Serdar Erbatur, Andrew M. Marshall, and Christophe Ringeissen. Knowledge problems in security protocols: Going beyond subterm convergent theories. In Marco Gaboardi and Femke van Raamsdonk, editors, 8th International Conference on Formal Structures for Computation and Deduction, FSCD 2023, July 3-6, 2023, Rome, Italy, volume 260 of LIPIcs, pages 30:1–30:19, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.FSCD.2023.30.
- [26] Manfred Schmidt-Schauß. Unification in permutative equational theories is undecidable. J. Symb. Comput., 8(4):415–421, 1989. doi:10.1016/S0747-7171(89)80037-9.
- [27] Katherine A. Yelick. Unification in combinations of collapse-free regular theories. J. Symb. Comput., 3(1/2):153–181, 1987. doi:10.1016/S0747-7171(87)80025-1.
