A first-order conditional logic is considered, with semantics given by a variant of ϵ-semantics where means that approaches 1 super-polynomially – faster than any inverse polynomial. This type of convergence is needed for reasoning about security protocols. A complete axiomatization is provided for this semantics, and it is shown how a qualitative proof of the correctness of a security protocol can be automatically converted to a quantitative proof appropriate for reasoning about concrete security.
Security protocols, such as key-exchange and key-management protocols, are short, but notoriously difficult to prove correct. Flaws have been found in numerous protocols, ranging from the 802.11 Wired Equivalent Privacy (WEP) protocol used to protect link-layer communications from eavesdropping and other attacks [10] to standards and proposed standards for Secure Socket Layer [24,26] to Kerberos [7]. Not surprisingly, a great deal of effort has been devoted to proving the correctness of such protocols. There are two largely disjoint approaches. The first essentially ignores the details of cryptography by assuming perfect cryptography (i.e., nothing encrypted can ever be decrypted without the encryption key) and an adversary that controls the network. By ignoring the cryptography, it is possible to give a more qualitative proof of correctness, using logics designed for reasoning about security protocols. Indeed, this approach has enabled axiomatic proofs of correctness and model checking of proofs (see, for example, [23,25]). The second approach applies the tools of modern cryptography to proving correctness, using more quantitative arguments. Typically it is shown that, given some security parameter k (where k may be, for example, the length of the key used) an adversary whose running time is polynomial in k has a negligible probability of breaking the security, where “negligible” means “less than any inverse polynomial function of k” (see, for example, [8,19]). There has been recent work on bridging the gap between these two approaches, with the goal of constructing a logic that can allow reasoning about quantitative aspects of security protocols while still being amenable to mechanization. This line of research started with the work of Abadi and Rogaway [1]. More recently, Datta et al. [13] showed that by giving a somewhat nonstandard semantics to their first-order Protocol Composition Logic [12], it was possible to reason about many features of the computational model. In this logic, an “implication” of the form is interpreted as, roughly speaking, the probability of B given φ is high. For example, a statement like secret encrypted ⊃ adversary does not decrypt the secret says “with high probability, if the secret is encrypted, the adversary does not decrypt it”. While the need for such statements should be clear, the probabilistic interpretation used is somewhat unnatural, and no axiomatization is provided by Datta et al. [13] for the ⊃ operator (although some sound axioms are given that use it).
The interpretation of ⊃ is quite reminiscent of one of the interpretations of → in conditional logic, where can be interpreted as “typically, if φ then ψ” [22]. Indeed, one semantics given to →, called ϵ-semantics [2,21], is very close in spirit to that used in [13]; this is particularly true for the formulation of ϵ-semantics given by Goldszmidt, Morris, and Pearl [20]. In this formulation, a formula is evaluated with respect to a sequence of probability measures (probability sequence, for short): it is true if, roughly speaking, (where is taken to be 1 if ). This formulation is not quite strong enough for some security-related purposes, where the standard is super-polynomial convergence, that is, convergence faster than any inverse polynomial. To capture such convergence, we can take to be true with respect to this probability sequence if, for all polynomials p, there exists such that, for all , . (Note that this implies that .) In a companion paper [14], it is shown that reinterpreting → in this way gives an elegant, powerful variant of the logic considered in [13], which can be used to reason about security protocols of interest.
While it is already a pleasant surprise that conditional logic provides such a clean approach to reasoning about security, using conditional logic has two further significant advantages, which are the subject of this paper. The first is that, as I show here, the well-known complete axiomatization of conditional logic with respect to ϵ-semantics continues to be sound and complete with respect to the super-polynomial semantics for →; thus, the axioms form a basis for automated proofs. The second is that the use of conditional logic allows for a clean transition from qualitative to quantitative arguments. To explain these points, I need to briefly recall some well-known results from the literature.
As is well known, the KLM properties [22] (see Section 2) provide a sound and complete axiomatization for reasoning about → formulas with respect to ϵ-semantics [18]. More precisely, if Δ is a collection of formulas of the form , then Δ (ϵ-)entails (that is, for every probability sequence , if every formula in Δ is true in according to ϵ semantics, then so is ), then is provable from Δ using the KLM properties. This result applies only when Δ is a collection of → formulas. Δ cannot include negations or disjunctions of → formulas. Conditional logic extends the KLM framework by allowing Boolean combinations of → statements. A sound and complete axiomatization of propositional conditional logic with semantics given by what are called preferential structures was given by Burgess [11]; Friedman and Halpern [16] proved it was also sound and complete for ϵ-semantics.
Propositional conditional logic does not suffice for reasoning about security. The logic of [13] is first-order; quantification is needed to capture important properties of security protocols. A sound and complete axiomatization for the language of first-order conditional logic, denoted , with respect to ϵ-semantics is given by Friedman, Halpern, and Koller [17]. The first major result of this paper shows that a conditional logic formula φ is satisfiable in some model M with respect to ϵ-semantics iff it is satisfiable in some model with respect to the super-polynomial semantics. It follows that all the completeness results for ϵ-semantics apply without change to the super-polynomial semantics.
I then consider the language which essentially consists of universal → formulas, that is, formulas of the form , where φ and ψ are first-order formulas. As in the KLM framework, there are no nested → formulas or negated → formulas. The second major result of this paper is to provide a sound and complete axiomatization that extends the KLM properties for reasoning about when a collection of formulas in entails a formula in .
It might seem strange to be interested in an axiomatization for when there is already a sound and complete axiomatization for the full language . However, has some significant advantages. In reasoning about concrete security, asymptotic complexity results do not suffice; more detailed information about security guarantees is needed. For example, we may want to prove that an SSL server that supports 1,000,000 sessions using 1024 bit keys has a probability of 0.999999 of providing the desired service without being compromised. I show how to convert a qualitative proof of security in the language , which provides only asymptotic guarantees, to a quantitative proof. Moreover, the conversion shows exactly how strong the assumptions have to be in order to get the desired 0.999999 level of security. More generally, the proof shows that, given a qualitative proof of a property and ϵ, we can compute a δ in polynomial time from the proof itself such that if the assumptions in the proof all hold with probability at least , then the conclusion holds with probability at least . Such a conversion is not possible with . This conversion justifies reasoning at the qualitative level. A qualitative proof can be constructed without worrying about the details of the numbers, and then automatically converted to a quantitative proof for the desired level of security.
There has been work on formal proof techniques for concrete cryptography [5,6,9]. However, it has largely focused on relational techniques where security is proved via game-based reductions, similar to traditional cryptographic proofs. The kind of transition from qualitative to quantitative reasoning that is my focus here has not been investigated. Perhaps even closer to this paper is that of Bana, Hasebe, and Okada [4]. They also have an operator → that can be viewed as attempting to capture qualitatively some probabilistic aspects of reasoning about security. I discuss their work in more detail in Section 4.
In the next section, I review the syntax and semantics of conditional logic, with an emphasis on ϵ-semantics, and show how it can be modified to deal with the super-polynomial convergence that is more appropriate for reasoning about security. In Section 3, I provide axioms and inference rules for both qualitative and quantitative reasoning. I conclude in Section 4 with some discussion of the usefulness of this logic for reasoning about security.
First-order conditional logic
I review the syntax and semantics of first-order conditional logic here. It is straightforward to specialize all the definitions and results to the propositional case, so I do not discuss the propositional case further.
The syntax of first-order conditional logic is straightforward. Fix a finite first-order vocabulary consisting, as usual, of function symbols, predicate symbols, and constants. Starting with atomic formulas (i.e., closed quantifier-free first-order formulas) over the vocabulary , more complicated formulas are formed by closing off under the standard truth-functional connectives (i.e., ∧ ,∨, ¬, and ⇒), first-order quantification, and the binary modal operator →. Thus, a typical formula is . Let be the resulting language. Let be the pure first-order fragment of , consisting of →-free formulas. Let consist of all formulas in of the form , where φ and ψ are in . (I henceforth omit the unless it is necessary for clarity.) Note that does not include negations of → formulas or conjunctions of → formulas. While not having conjunctions does not really impair the expressive power of (since we will be interested in sets of formulas, where a set can be identified with the conjunction of the formulas in the set), the lack of negation does.
I give two semantics to formulas in . In both semantics, the truth of formulas is defined with respect to PS structures. A PS structure is a tuple , where D is a domain, W is a set of worlds, π is an interpretation, which associates with each predicate symbol (resp., function symbol, constant) in and world a predicate (resp., function, domain element) of the right arity, and is a probability sequence, where each probability measure in the sequence is a probability measure on W. I assume for ease of exposition that all subsets of W are measurable with respect to each probability measure in the sequence. (I discuss below how this assumption can be weakened considerably.) As usual, a valuation V associates with each variable x an element .
Given a valuation V and structure , the semantics of ∧, ¬, ⇒, and ∀ is completely standard. In particular, the truth of a first-order formula in in a world , written , is determined as usual. For , let . If φ is a closed formula, so that its truth does not depend on the valuation, I occasionally write rather than . I write if for all worlds w. The truth of an → formula does not depend on the world, but only on the structure M and valuation V. Define
where is taken to be 1 if . (I could have written , since the truth of is independent of the world w; I occasionally do this below.)
If W is infinite, the assumption that every subset of W is measurable is a very strong one. Suppose instead that there is a fixed σ-algebra of measurable sets that is the domain of all the probability measures in the sequence. All that is needed in the semantics above is that is measurable (i.e., ) for every formula φ and valuation V. I now give a condition sufficient to guarantee this.
As usual, the set of terms over the vocabulary is defined inductively. A variable x is a term, a constant is a term, and if is a k-ary function symbol and are terms, then is a term. An atomic expression over has the form either (a) , where is a k-ary predicate symbol and are terms over , (b) , where is a k-ary predicate symbol and are terms over , or (c) , where and are terms over . I claim that if the domain D is finite or countably infinite and for all valuations V and atomic expressions A, is measurable, then is measurable for all formulas φ in the language and valuations V. The claim follows by a straightforward induction on the structure of formulas. For a formula φ of the form , observe that , where is the valuation that agrees with V except that . Since D is countable and is closed under countable intersection, it follows that . If φ has the form , note that is either ∅ or W, since it is independent of the world, so must be measurable. All other cases in the induction argument are straightforward.
I also consider an alternative semantics that gives super-polynomial convergence.
Note that if and is a polynomial whose leading coefficient is positive, then for sufficiently large n.
As usual, I write if for all valuations V, and if for all PS structures in a set , and similarly with ⊧ replaced by .
Axioms for qualitative and quantitative reasoning
In this section, I start by showing that qualitative reasoning for both ⊧ and is characterized by the same axiom system. I then provide a complete axiomatization for . Finally, I consider quantitative conditional logic. In the axioms, it is convenient to use as an abbreviation for . Note that if φ is a closed formula, then iff there exists such that, for all , . Since , this can happen only if for all , or equivalently, for all , and similarly with ⊧ replaced by . Thus, can be read as saying “φ is almost surely eventually true”.
Qualitative reasoning
As was mentioned in the Introduction, Friedman, Halpern, and Koller [17] provide a complete axiomatization for with respect to ⊧. For security applications, a generalization of their result is needed, where it is possible to restrict to models where all worlds satisfy a particular first-order theory Λ. We can think of Λ as describing first-order properties of the security protocol being analyzed. Formally, Λ is just a (possibly infinite) set of first-order formulas.
Let denote provability in first-order logic given the formulas in the theory Λ. Let consist of the following axioms and rules:
Λ-AX.
φ, if and .
C0.
All substitution instances of propositional tautologies.
C1.
.
C2.
.
C3.
.
C4.
.
C5.
.
C6.
.
F1.
, where t is substitutable for x in the sense discussed below and is the result of substituting t for all free occurrences of x in φ (see [15] for a formal definition).
F2.
.
F3.
if x does not occur free in φ.
F4.
, where is quantifier-free and is obtained from by replacing zero or more occurrences of x in by y.
F5.
.
MP.
From φ and infer ψ.
Gen.
From φ infer .
R1.
From infer .
R2.
From infer .
The axiom system of [17] does not have Λ-AX (this is needed to incorporate the theory Λ) and includes an axiom that follows from Λ-AX; otherwise, the axiom systems are identical. As observed in [17], the “positive” version of F5, , is also sound. It is not included in the axiomatization because it is provable from the other axioms.
I now briefly discuss the axioms. Λ-AX just says that any first-order formula provable in Λ is also provable in . The notion of “substitution instance of a propositional tautology” in C0 means that we start with a propositional tautology, and then uniformly replace each instance of a propositional variable by a formula in . For example, is a substitution instance of the propositional tautology , where is substituted for p.
C1 has been called reflexivity; it says, for example, that birds are typically birds. C2 is called the and rule; it says, for example, that if birds typically fly and birds typically have wings, then birds typically both fly and have wings. C3 is the or rule; it says, for example, that if birds typically fly and insects typically fly, that something that is either a bird or an insect typically flies. C4 is cautious monotonicity; it says that if birds typically fly and birds typically have wings, then flying birds typically have wings. Full monotonicity would say that if birds typically have wings then red birds have wings or, more generally, , for an arbitrary . This is not sound (although the analogue is sound if we replace → by ⇒). R1 is left logical equivalence; it says that if we replace the left-hand side of a → formula by a provably equivalent formula, the resulting → formula is equivalent to the original formula. Again, the stronger version (that if we replace the left-hand side by a stronger formula we get a formula weaker than the original) does not hold; this is just full monotonicity. R2 is right weakening; it says that if we replace the right-hand side of a → formula by a weaker formula, the resulting → formula is weaker than the original formula. The axioms and rules C1–C4, R1, and R2 characterize the core properties of →, and will essentially reappear in system P, discussed below.
C5 encodes the fact that the truth of depends only on the world; if it is true at some world, it is true at all worlds (and hence holds with probability 1). This lets us handle nested occurrence of →. C6 is clearly a trivial consequence of the probabilistic semantics.
To understand the notion of “substitutable” in F1, observe that a term t with free variables that might be captured by some quantifiers in φ cannot be substituted for x; for example, while is true as long as the domain has at least two elements, the result of substituting y for x is , which is surely false. In the case of first-order logic, it suffices to define “substitutable” so as to make sure this does not happen (see [15] for details). However, in modal logics such as this one, more care must be taken. In general, terms cannot be substituted for universally quantified variables in a modal context, since terms are not in general rigid; that is, they can have different interpretations in different worlds. To understand the impact of this, consider the formula (where P is a unary predicate and c is a constant). This formula is not valid in PS structures. For example, consider a PS structure , where , , is such that gives positive probability to both and , and π is such that in world , holds, does not, and c is interpreted as , while in world , holds, does not, and c is interpreted as . Then it is easy to see that holds in both worlds, but does not hold, no matter how x is interpreted. It follows that and . Thus, if φ is a formula that has occurrences of →, then the only terms that are considered substitutable for x in φ are other variables.
The fact that variables are rigid is what makes F5 sound: if in some world given some valuation V, then in all worlds given valuation V, and hence holds with probability 1. F2, F3, F4, MP, and Gen are standard axioms and rules of first-order logic, and apply to modal logic as well.
I want to show that is also sound and complete for the semantics. The key step in doing that is to show that a formula is satisfiable with respect to the ⊧ semantics iff it is satisfiable with respect to the semantics.
Ifis a PS structure such that D is countable, then there exists a probability sequencesuch that, for all valuations V,iff, where.
Suppose that , where (D may be finite), and . Suppose that the set of variables is . (I am implicitly assuming that the set of variables is countable, as is standard.) Define a valuation V to be constant at k if for all ; a valuation V is eventually constant if V is constant at k for some k. Clearly there are only countably many eventually constant valuations. Let be an enumeration of pairs of the form such that V is eventually constant and ; let be an enumeration of pairs of the form such that V is eventually constant and , where each pair appears in the enumeration infinitely often. There exists a function such that for all n, if , then for all the first n pairs . Similarly, there exists a function g that maps elements in the enumeration to such that if is in , then is the least integer k such that, for infinitely many indices h, we have . (There must be such an integer k, since .)
I now construct a subsequence of by taking , where, if is the nth element of , then N is the least integer greater than such that . Let . I now prove that iff for all valuations V and formulas by a straightforward induction on the structure of φ. If φ is an atomic formula, this is immediate, since M and differ only in their probability sequences. All cases but the one where φ has the form follow immediately from the induction hypothesis. If φ has the form , suppose that the free variables in are contained in . Given V, let be an eventually constant valuation such that for . Clearly, for all distributions Pr on W, we have , and similarly with M replaced by . First suppose that . Thus, we must have , so is in . Suppose that is the Nth pair in . The construction guarantees that for all , we have . It follows that , and thus .
Next suppose that . Thus, , so the pair appears infinitely often in the enumeration . For each index h such that this pair appears in position h in , by construction, we have that . Hence, , so , as desired.2
Exactly the same argument shows that there exists a probability sequence such that, for all valuations V, iff , where and considers exponential convergence for →; that is, if, for all c, there exists some such that, for all , . I have focused on super-polynomial rather than exponential convergence here since that is what is considered in the security literature.
□
Let consist of all PS structures M such that every world in M satisfies Λ.
is a sound and complete axiomatization forwith respect to both ⊧ and. That is, the following are equivalent for all formulas in:
;
;
.
The equivalence of parts (a) and (b) for the case that is proved in Theorem 5.2 of [17]. The same proof shows that the result holds for arbitrary Λ. To show that (a) implies (c), I must show that all the axioms are valid, and that the rules of inference preserve validity. This is straightforward for all the axioms and rules other than C2, C3, C4, and C5. I consider each of these axioms in turn.
For C2, suppose that is a PS structure such that and . Since , , given a positive polynomial p, there exists such that, for all , , for . For all , . Thus, for ,
For C3, note that
Now suppose that and . Given a positive polynomial p, as in the case of C2, there exist and such that, for all , , for . It easily follows from (1) that if , then
For C4, note that
so the argument follows essentially the same lines as that for C2. Finally, the validity of C5 follows easily from the fact that the truth of a formula of the form or is independent of the world, and depends only on the probability sequence.
Finally, I must show that (c) implies (b). Suppose not. Then there exists a formula φ such that but . Thus, there exists and valuation V such that . The proof in [17] shows that if a formula is satisfiable with respect to ⊧ at all, then it is satisfiable in a structure in with a countable domain. Thus, without loss of generality, M has a countable domain. But then it immediately follows from Theorem 3.1 that .3
An easy extension of this argument shows that conditions (a), (b), and (c) of Theorem 3.2 are also equivalent to . The argument that the axioms are sound for the semantics is similar in spirit to that above showing that they are sound for the semantics; this shows that implies . The fact that is equivalent to follows from the observation in the previous footnote that Theorem 3.1 also holds for the semantics.
□
I next completely characterize reasoning in . (Recall that consists of all formulas of the form , where φ and ψ are first-order formulas.) More precisely, I characterize when one formula in can be derived from other formulas in , given a first-order theory. I first consider the fragment of consisting of all formulas of the form where φ and ψ are closed first-order formulas. Thus, does not allow → formulas to be universally quantified. I start by giving a sound and complete axiomatization for expressions of the form , where φ is a formula in and Δ is a set of formulas in . I allow Δ to be infinite here (this seems more consistent with the usage in [22]), but all the results hold without change if Δ is restricted to being finite. (I make comments along the way about the changes needed if Δ is restricted to being finite.) if for every formula implies that . If Δ is finite, then iff . Thus, if Δ is finite, the is expressible in ; I allow the slightly greater generality of infinite sets to be able to relate the results of this paper to earlier work. I write if for all PS structures M and valuations V.
Consider the following axioms:
LLE.
if (left logical equivalence).
RW.
if (right weakening).
REF.
(reflexivity).
AND.
.
OR.
.
CM.
(cautious monotonicity).
TRIV.
if (trivial).
We have one rule of inference:
TRANS.
From for all and infer (transitivity).
This collection of rules has been called system [22] or the KLM properties.4
The standard presentation of system is somewhat different from that given here. For one thing, Λ is not usually mentioned explicitly; I mention it here to make the dependence on Λ clear. For another, the set Δ is typically not included as part of the rule, but is put on the left-hand side of ⊢, so what I am calling an axiom is typically viewed as an inference rule; for example, AND is usually written as “from and infer ”. Finally, the axiom TRIV and the rule TRANS are not usually given explicitly, but are built into how inference works in . However, it is easy to see that what I have done here is equivalent to the standard approach.
The rules are obvious analogues of axioms in . In particular, LLE is the analogue of R1; and RW is the analogue of R2; REF, AND, and OR are just restatements of C2, C3, and C4, respectively, in this notation.
Note that even if Δ and Λ are infinite, since all the rules are in fact finitary, we have iff there is a finite set and a finite set such that . For the completeness result, I make an innocuous technical restriction: I assume that the vocabulary includes a countably infinite set of constants and there are (as usual) countably many variables, and for every formula , there are infinitely many constants and variables that do not appear in Δ.5
The assumption holds trivially if Δ is restricted to being a finite set, as long as the set of constants and variables is infinite. Even if Δ can be infinite, we can always add countably infinite fresh constants to and rename variables, so this restriction is innocuous. The assumption is used in the proof of Theorem 3.4 below, where at one point I need to assume that there infinitely many “fresh” constants and variables that do not appear in Δ or φ. A similar assumption arises in the proof of Theorem 3.3.
I want to extend this result from to ; thus, I now want to allow . I actually extend a little further to allow first-order formulas, so . In addition, I want the axiomatization to be sound and complete for the semantics as well as the ⊧ semantics, so as to make it more applicable to reasoning about security protocols.
To get a complete axiomatization, I still need to use the axioms and rules of , but now I need (special cases of) a few other axioms and rules in modified to deal with this language:
C6+.
.
F1+.
if t is substitutable for x in φ.
F4+.
, where is quantifier-free and is obtained from by replacing zero or more occurrences of x in by y.
F5+.
.
IMP.
if , Δ is finite, and (implication).
Gen+.
If z is a variable that does not appear free in Δ, then (a) if , then from infer ; (b) from infer .
Of course, C6+, F4+ and F5+ are just C6, F4, and F5 restated using ↪, F1+ is just a special case of F1 (restated using ↪), IMP is a special case of Λ-AX, and Gen+ can be viewed as a special case of Gen. (It is not hard to show that it follows from Gen if Δ is finite.) Since I now allow first-order formulas, whose truth depends on the world, I take if for all formulas implies . I now write if for all PS structures M and valuations V.
Let be the axiom system consisting of the axioms and rules of together with C6+, F1+, F4+, F5+, IMP, and Gen+. I write if there is a derivation from whose last line in .
If, then the following are equivalent:
;
;
.
The fact that (a) implies (c) follows from the proof of Theorem 3.2, since all the axioms and rules in are essentially (special cases of) axioms and rules in . The fact that (c) implies (b) follows just as in the proof of Theorem 3.2, using Theorem 3.1. Thus, it remains to show that (b) implies (a). As usual, for completeness, it suffices to show that if , then there is a structure , a valuation V, and a world w such that and ; roughly speaking, this says that if is not provable in , then its negation is satisfiable.
The proof is quite similar in spirit to the completeness proof for given in [17], but there are some subtleties involved in dealing with the restricted language. Specifically, the proof in [17] uses a Henkin-style argument, using maximal consistent sets C of formulas. Because we work here with formulas of the form , we must redefine maximal consistent sets appropriately.
A set of formulas in is -consistent if there is no finite subset of such that . If is a vocabulary and is a set of constants and variables, then a maximal-consistent set of formulas is a -consistent set of formulas that use only symbols in such that if ψ is a formula that uses only symbols in , then is not -consistent. is -good if (1) is a maximal Λ--consistent set of formulas, (2) implies for some , (3) if then for all , and (4) if (resp., ) is in Δ for , then so is (resp., ).6
This is an adaptation of the definition of -good given in [17], where the notion was applied to sets of formulas in and a set of constants.
Let be a countably infinite set of constants not in Δ or φ such that there are countably many constants in not in , Δ, or φ. (Our technical assumption ensures that such a sets exists.)
If, then there exists a-good setsuch that, whereifandif φ has the form, whereis quantifier-free andare constants in.7
If the set Δ is restricted to being finite in formulas of the form , then we replace the requirement by for all finite . Analogous changes must be made throughout the proof.
Once Lemma 3.5 is proved, the rest of the argument follows essentially the same lines as that of [17], so I just briefly outline the argument here. For each , let . We construct a model where , W consists of all the -good sets such that (so that worlds are -good sets), and π is such that, for all , we have and, for each atomic formula ψ, iff . This is consistent, since all sets in W agree on formulas of the form and , and hence (since is -good) on formulas of the form and ; thus, the formula is in iff . As shown in [17], it is possible to define a sequence of probability measures such that iff for all quantifier-free closed formulas (note that if , then for all ), and, if φ has the form , then . This gives us the desired model.
So, to complete the proof of Theorem 3.4, it remains to prove Lemma 3.5. To do this, I construct in stages. Starting with Δ, at each stage I add more and more formulas until I get a set that is -good. Let be the set of variables that appear in Δ and φ, and let be a countably infinite set of variables not in Δ or φ such that there are countably many variables not in , Δ, or φ. (Again, our assumptions guarantee that such a set exists.) If , suppose that . For convenience suppose that has the form . (If , then we can just take .) Let if and otherwise. Clearly
This is immediate if , since in that case . And if φ has the form and , then it follows from Gen+(b) that , contradicting our assumption.
Let be an enumeration of formulas in over the vocabulary whose only (free or bound) variables are in . We define a sequence of set inductively. Let . Suppose that have been defined. Let be the existential first-order formula in the enumeration. Let and let . I claim that
If not, since , there must exist some m such that and . Since and, by construction, does not appear in or φ, it follows from Gen+(a) that . It is easy to see that is a valid first-order formula. Thus, by IMP, . It thus follows from TRANS that , a contradiction.
I next construct a sequence inductively, by taking , and taking if and otherwise. Let . It is clear from the construction that for all m; thus,
Several other properties of must be noted. First, the construction guarantees that if a first-order formula of the form is in , then for some . It easily follows from F1+ that if then for all . Moreover, it follows from F5+ that if for then . Finally, it is easy to see that if , then . (Proof: first observe that by REF and , so , by LLE. Recall that, by definition, . By F4+, . By TRANS, . It easily follows that if , then .)
Let be the result of replacing all occurrences of in by , for and replacing all occurrences of in by for ; similarly, let be the result of replacing all occurrences (if any) of in by . It is easy to see that is -good, and that (if this is not the case, then it is immediate that (4) does not hold either). This completes the proof of Lemma 3.5 and, with it, the proof of Theorem 3.4. □
Quantitative reasoning
The super-polynomial semantics just talks about asymptotic complexity. It says that for all k, the conclusion will hold with probability greater than for sufficiently large n, provided that the assumptions hold with sufficiently high probability, where n can be, for example, the security parameter. While this asymptotic complexity certainly gives insight into the security of a protocol, in practice, a system designer wants to achieve a certain level of security, and needs to know, for example, how large to take the keys in order to achieve this. In this section, I provide a more quantitative semantics appropriate for such reasoning, and relate it to the more qualitative “asymptotic” semantics.
The syntax of the quantitative language, which is denoted , is just like that of the qualitative language, except that, instead of formulas of the form , there are formulas of the form , where r is a real number in . The semantics of such a formula is straightforward:
Let be the obvious analogue of , consisting of all formulas of the form , where φ and ψ are first-order formulas.
Because does not really consider limiting probability, it would be straightforward to give it semantics using a single probability measure Pr. That is, if a model M involves just a single distribution Pr rather than a sequence , then we could take if . Indeed, that is essentially the semantics used in [14], where the focus is on quantitative security. I continue to use a sequence of probability measures here, since my goal is to relate quantitative proofs to qualitative proofs.
That said, it is not hard to show that the same formulas are valid for the language whether we consider a single probability measure or a sequence of probability measures in the semantics. This makes closer to other approaches that have used probability and classical implication. A recent example is the work of Atserias and Balcázar [3]. They consider formulas of the form , where X and Y are sets of attributes, and can be identified with conjunctions of primitive propositions. Changing the notation of Atserias and Balcázar to be compatible with that of this paper, if . Given a set Δ of such formulas, if for all implies . Atserias and Balcázar provide algorithms for checking when such entailments hold, using linear programming. Note that in Atserias and Balcàzar’s work, the same γ is used for the hypothesis and the conclusion in the entailment; it will be crucial for my main result that it is possible to use different parameters (the framework used here allows us to write the parameter explicitly in the formula).
I now explain how qualitative reasoning in and quantitative reasoning in can be related. First note that for each of the axioms and rules in system , there is a corresponding sound axiom or rule in . Consider the following axioms:
LLEq.
if .
RWq.
if .
REFq.
.
ANDq.
, where .
ORq.
, where .
CMq.
, where .
C6q.
for all .
F5q.
, where is an abbreviation for .
Let consist of the rules above, together with TRIV, F1+, F4+, IMP, Gen+, and TRANS (all of which hold with no change in the quantitative setting), and
INC.
if (increasing superscript).
The rules inare all sound.
The soundness of the quantitative analogues of the rules in is immediate from the proof of Theorem 3.2. The soundness of remaining rules holds as it did before (since they are unchanged). □
I do not believe that is complete, nor do I have a candidate complete axiomatization for the quantitative language. Nevertheless, as the proofs in [14] show, (when combined with axioms for reasoning about actions and partial correctness) suffices for proving many results of interest in security. Moreover, as I now show, there is a deep relationship between and . To make it precise, given a set of formulas , say that is a quantitative instantiation of Δ if there is a bijection f from Δ to such that, for every formula , there is a real number such that , where if , and . That is, is a quantitative instantiation of Δ if each qualitative formula in Δ has a quantitative analogue in .
Although the proof of the following theorem is straightforward, it shows the power of using of . Specifically, it shows that if is derivable in then, for all , there exists a quantitative instantiation of Δ such that is derivable in . Thus, if the system designer wants security at level r (that is, she wants to know that a desired security property holds with probability at least ), then if she has a qualitative proof of the result, she can compute the strength with which her assumptions must hold in order for the desired conclusion to hold. For example, she can compute how to set the security parameters in order to get the desired level of security. This result can be viewed as justifying qualitative reasoning. Roughly speaking, it says that it is safe to avoid thinking about the quantitative details, since they can always be derived later. Note that this result would not hold if the language allowed negation. For example, even if could be proved given some assumptions (using the axiom system ), it would not necessarily follow that holds, even if the probability of the assumptions was taken arbitrarily close to one.
If, then for all, there exists a quantitative instantiationof a finite subsetof Δ such that. Moreover,can be found in polynomial time, given the derivation of.
Intuitively, consists of the formulas in Δ needed for the proof of . The existence of follows by a straightforward induction on the length of the derivation. If it has length 1, then the proof must be an instance of an axiom. In this case, the argument proceeds by considering each axiom in turn. The arguments are all straightforward. I consider a few representative cases here. If the axiom TRIV was applied, then it must be the case that , so we can take and . If REF was applied, the φ has the form . In this case, take . By REFq, . The conclusion now follows from INC. If AND was applied, then φ must have the form , where . Let . Choose such that .8
It suffices to take , but there is an advantage to having this greater flexibility; see the discussion after the proof.
Let . By ANDq, it easily follows that . The argument for all the other axioms in is similar and left to the reader.
Now suppose that the derivation of has length . If the last line of the derivation is an axiom, the argument above applies without change. Otherwise, it must be the result of applying Gen+(a), Gen+(b), or TRANS. I consider the latter two cases here; the case of Gen+(a) is straightforward and left to the reader. If Gen+(b) was applied, then φ has the form and there is a derivation of length less than N, where z does not appear in Δ. By the induction hypothesis, there is a subset of Δ and instantiation of of such that . Since , by Gen+(a), it follows that .
Finally, if the last step in the proof of is an application of TRANS, then there exists such that for all and . By the induction hypothesis, there exists a finite subset of and a quantitative instantiation of such that . By the induction hypothesis again, for each formula , there exists a finite subset of Δ and a quantitative instantiation of such that . Let and let . By TRANS, we have , as desired.
This argument also shows that finding from the proof of just involves solving some simple linear inequalities, which can be done in polynomial time. □
The proof of Theorem 3.7 gives even more useful information to the system designer. In general, there may be a number of quantitative instantiations of Δ that give the desired conclusion. For example, as the proof shows, if the AND rule is used in the qualitative proof, and we want the conclusion to hold at level r, we must just choose and such that and hold at level and , respectively. If the system designer finds it easier to satisfy the first formula than the second (for example, the first may involve the length of the key, while the second may involve the degree of trustworthiness of one of the participants in the protocol), there may be an advantage in choosing relatively small and larger. As long as , the desired conclusion will hold.
Given r, we might wonder how close to optimal the q we can find in Theorem 3.7 is. While I cannot give a definitive answer here, the following comments may give some insight. For each axiom individually, the quantitative instantiation is optimal, in the sense that it is not hard to find examples where the bounds are satisfied with equality. For example, in the ANDq rule, we cannot do better in general than taking . However, it could well be that when putting several steps in a proof together, we end up with a significant overestimate. Different proofs of the same conclusion might lead to different estimates. That also suggests that developing new proof rules might be useful, since they might result in better estimates.
Discussion
I have shown how the intuition behind the ⊃ operator used by Datta et al. [13] can be captured using the well-studied conditional implication operator →, where is interpreted as “the probability of ψ conditional on φ converges to 1” (or converges to 1 super-polynomially). Using → with this interpretation has a significant advantage: it allows us to relate quantitative and qualitative reasoning. Specifically, for a rich fragment of full first-order conditional logic, I have shown that if φ is provable from a collection Δ of formulas in , then, for all r, there exists a quantitative instantiation of a finite subset of Δ, computable in time polynomial in the length of the proof of , such that is provable from . That mean that once we have a qualitative proof of a fact of interest from some assumptions, we can compute the strength of the assumptions needed to reach that conclusion.
I have suggested that this result is applicable to reasoning about quantitative security. This statement must be interpreted carefully. While is a rich fragment of , it clearly does not suffice for stating and proving interesting facts about security programs. To do that, we need more operators than just those for reasoning about (conditional) probability. For example, the logic used in [14] includes Hoare-like assertions of the form and included axioms about the predictability of nonces and the unforgeability of signatures. Even if we had a completeness theorem for the fragment of the logic that does not involve the → operator (which we do not), there may be interactions between the → operator and the other operators. So while the axioms of this paper are still sound, it is unlikely that they will be enough for completeness (even when they are added to complete axiomatizations for the other operators). The fact that (as shown by Theorem 3.1) that the language cannot distinguish super-polynomial convergence from non-super-polynomial convergence is further evidence that the logic cannot capture all that is needed for proving correctness of security protocols.
Nevertheless, that does not render the results of this paper irrelevant for security. Even in a richer logic, Theorem 3.7 still holds. More precisely, if there is a qualitative proof of a fact of the form using only the axioms and rules of for reasoning about → (or, more generally, using only axioms and rules that have quantitative analogues (as the axioms and rules of do)), then, for all r, we can find a quantitative instantiation of a finite subset of Δ such that is provable. In [14], nontrivial quantitative properties of a challenge-response protocol are proved using the axioms of and axioms involving that talk about properties of nonces and the likelihood that a signature can be forged. Interestingly, the superscript q used in the proof (and in the axioms that talk about the properties of nonces and unforgeability) is not a constant, but a function of the security parameter (and other parameters); this does not affect the arguments about at all (all the axioms of this paper still hold), but again, makes it more applicable to security. It is easy to transform the quantitative proof given in [14] to a qualitative proof of a conclusion of the form where the only axioms used for reasoning about → are those in . We simply erase the superscript on →, and put (qualitative versions of) the axioms for nonces and unforgeability into Δ. Now Theorem 3.7 can be used, for example, to deduce the strength of security parameter needed to get the conclusion to hold with a given strength. Put another way, we can think of the proof in [14] as going in the “forward” direction: given assumptions about the security parameter and unforgeability, we prove that a conclusion about the security protocol holds with a certain probability. Theorem 3.7 lets us go in the “backward” direction: after proving a result qualitatively, we can deduce the strength that the assumptions need to hold with to be able to get the conclusion to hold with a given strength. It seems to me that both directions are of practical interest.
It is perhaps also worth noting that one of the features of the logic considered here is that it allows us to make statements about conditional probability; the formula is making a statement about the probability of φ conditional on ψ. Most of the security analyses in the literature have focused on unconditional probability; this amounts to considering formulas of the form . (This is the case for the analyses done by Datta et al. [14], for example.) One reason for the focus on unconditional probability may be that the guarantees provided by cryptographic schemes are typically unconditional guarantees (or, at least, their formalizations avoid the use of unconditional probabilities). For example, when we say that a signature scheme has only a negligible probability of being broken, we take this probability to be unconditional (i.e., relative to the whole space). A signature scheme is considered secure even if someone broadcasts all the secret keys, as long as this is done with exponentially small probability. Of course, conditional on getting the secret keys, the system is highly insecure. But we don’t tend to worry about that in our proofs; it is a negligible event.
As shown by the analysis of Datta et al. [14], the logic considered here is of interest even in the unconditional case (i.e., if we restrict to formulas of the form or ). Moreover, although current analyses seem to focus on the unconditional case, it seems to me that a more refined security analysis might want to take into account some conditional probabilities: we might be interested, for example, in how secure a system would be if one of the agents in the system chose a somewhat weak key or inadvertently changed some security settings in a system. Note that once we allow nontrivial formulas φ in the antecedent of →, it becomes critical that → is nonmonotonic. While a conclusion of the form may be sound, a conclusion of the form may not be, if φ is an unlikely event (like an agent inadvertently changing some security setting).
Finally, it is worth considering in a little more detail the relationship between this work and that of Bana, Hasebe, and Okada [4]. As I mentioned in the introduction, they also use a → operator. They give semantics to their → operator relative to a sequence of probability measures, just as I do, but the technical details of their semantics are quite different from the semantics I use.9
In more detail, for Bana et al., each probability measure is a measure on a possibly different domain . They also consider sequences , where , in giving the semantics of formulas. Very roughly speaking, if , where holds if φ holds for all non-negligible subsets of S, and is a non-negligible subset of S if for all n and is non-negligible as a function of n, that is, does not grow super-polynomially.
There are clearly significant differences between the two semantics for →. In the semantics for → that I have used, there is no analogue to the sequence S of events. Moreover, my focus is on events whose probability increases (super-polynomially) to 1, rather than non-negligible events. As an anonymous reviewer pointed out, we could make the two approaches somewhat closer by viewing the measures used by Bana et al. as all being defined on a single space (i.e., the crossproduct of the domain of ’s), where the measurable subsets of Ω are those of the form and is a measurable subset of , defining , and identifying a sequence where with the subset of Ω. But even with these identifications, the other differences pointed out above still remain.
Bana et al. work purely at the qualitative level; they have no “concrete” analogue to their → operator. Thus, they make no attempt to relate their quatitative semantics to a more quantitative semantics. That said, they are very interested in relating qualitative work on what they call symbolic adversaries to more quantitative work on verification that works directly on models that involve probability. So, their goals are the same as mine. More experience is needed to determine which logic is better suited to reasoning about such programs. However it is done, as I hope the results of this paper have made clear, a logic with conditional statements can be an extremely useful addition to a security analyst’s toolkit.
Footnotes
Acknowledgments
Work supported in part by NSF under grants IIS-0812045, IIS-0911036, and CCF-1214844 ITR-0325453 and IIS-0534064, and by AFOSR under grant FA9550-05-1-0055.
I thank Anupam Datta, John Mitchell, Riccardo Pucella, Arnab Roy, and Shayak Sen for many useful discussions on applying conditional logic to security protocols. The anonymous reviewers of the paper provided many helpful suggestions as well.
References
1.
M.Abadi and P.Rogaway, Reconciling two views of cryptography (the computational soundness of formal encryption), in: Proc. IFIP International Conference on Theoretical Computer Science (TCS’00), Lecture Notes in Computer Science, Vol. 1872, Springer-Verlag, 2000, pp. 3–22.
2.
E.Adams, The Logic of Conditionals. Reidel, Dordrecht, Netherlands, 1975. doi:10.1007/978-94-015-7622-2.
3.
A.Atserias and J.L.Balcázar, Entailment among probabilistic relations, in: Proc. 30th IEEE Symposium on Logic in Computer Science, 2015, pp. 621–632.
4.
G.Bana, K.Hasebe and M.Okada, Computationally complete symbolic attacker and key exchange, in: Proc. 13th ACM SIGSAC Conference on Computer and Communications Security (CCS ’13), 2013, pp. 1231–1246.
5.
G.Barthe, B.Grégoire, S.Heraud and S.Zanella-Béguelin, Computer-aided security proofs for the working cryptographer, in: Advances in Cryptology (CRYPTO 2011), P.Rogaway, ed., Lecture Notes in Computer Science, Vol. 6841, 2011, pp. 71–90. doi:10.1007/978-3-642-22792-9_5.
6.
G.Barthe, B.Grégoire and S.Zanella-Béguelin, Formal certification of code-based cryptographic proofs, SIGPLAN Notices44(1) (2009), 90–101. doi:10.1145/1594834.1480894.
7.
G.Bella and L.C.Paulson, Kerberos version IV: Inductive analysis of the secrecy goals, in: Proc. 5th European Symposium on Research in Computer Security, J.-J.Quisquater, ed., LNCS, Vol. 1485, Springer-Verlag, 1998, pp. 361–375.
8.
M.Bellare, R.Canetti and H.Krawczyk, A modular approach to the design and analysis of authentication and key exchange protocols, in: Proc. 30th Annual Symposium on the Theory of Computing, 1998, pp. 419–428.
9.
B.Blanchet, A computationally sound mechanized prover for security protocols, in: IEEE Symposium on Security and Privacy, 2006, pp. 140–154.
10.
N.Borisov, I.Goldberg and D.Wagner, Intercepting mobile communications: The insecurity of 802.11, in: Proc. 7th Annual International Conference on Mobile Computing and Networking, 2001, pp. 180–189.
11.
J.Burgess, Quick completeness proofs for some logics of conditionals, Notre Dame Journal of Formal Logic22 (1981), 76–84. doi:10.1305/ndjfl/1093883341.
A.Datta, A.Derek, J.C.Mitchell, V.Shmatikov and M.Turuani, Probabilistic polynomial-time semantics for a protocol security logic, in: 32nd International Colloquium on Automata, Languages, and Programming (ICALP), 2005, pp. 16–29. doi:10.1007/11523468_2.
14.
A.Datta, J.Y.Halpern, J.C.Mitchell, A.Roy and S.Sen, A symbolic logic with concrete bounds for cryptographic protocols, 2015, Available at: http://arxiv.org/abs/1511.07536.
15.
H.B.Enderton, A Mathematical Introduction to Logic, Academic Press, New York, 1972.
16.
N.Friedman and J.Y.Halpern, Plausibility measures and default reasoning, Journal of the ACM48(4) (2001), 648–685. doi:10.1145/502090.502092.
17.
N.Friedman, J.Y.Halpern and D.Koller, First-order conditional logic for default reasoning revisited, ACM Trans. on Computational Logic1(2) (2000), 175–207. doi:10.1145/359496.359500.
18.
H.Geffner, High probabilities, model preference and default arguments, Mind and Machines2 (1992), 51–70.
19.
O.Goldreich, Foundations of Cryptography, Vol. 1, Cambridge University Press, 2001.
20.
M.Goldszmidt, P.Morris and J.Pearl, A maximum entropy approach to nonmonotonic reasoning, IEEE Transactions of Pattern Analysis and Machine Intelligence15(3) (1993), 220–232. doi:10.1109/34.204904.
21.
M.Goldszmidt and J.Pearl, Rank-based systems: A simple approach to belief revision, belief update and reasoning about evidence and actions, in: Principles of Knowledge Representation and Reasoning: Proc. Third International Conference (KR ’92), 1992, pp. 661–672.
22.
S.Kraus, D.Lehmann and M.Magidor, Nonmonotonic reasoning, preferential models and cumulative logics, Artificial Intelligence44 (1990), 167–207. doi:10.1016/0004-3702(90)90101-5.
23.
J.Mitchell, M.Mitchell and U.Stern, Automated analysis of cryptographic protocols using Murφ, in: Proc. 1997 IEEE Symposium on Security and Privacy, IEEE Computer Society Press, 1997, pp. 141–151. doi:10.1109/SECPRI.1997.601329.
24.
J.C.Mitchell, V.Shmatikov and U.Stern, Finite-state analysis of SSL 3.0, in: Proc. Seventh USENIX Security Symposium, 1998, pp. 201–216.
25.
L.C.Paulson, Isabelle, a Generic Theorem Prover, Lecture Notes in Computer Science, Vol. 828, Springer-Verlag, 1994.
26.
D.Wagner and B.Schneier, Analysis of the SSL 3.0 protocol, in: Proc. 2nd USENIX Workshop on Electronic Commerce, 1996, pp. 29–40.