scieee AI-readable full text Open interactive document viewer

Protocol analysis modulo exclusive-or theories: a case study in Maude-MPA

González Burgueño, Antonio

Abstract

[EN] Escobar of the Universitat Politècnica de València in collaboration with José Meseguer (University of Illinois at Urbana-Champaign, USA) and Catherine Meadows (Naval Research Lab, Washington, DC, USA). We focus on protocols using exclusive-or as the only cryptographic properties of symbols, apart of the standard cancellation of encryption and decryption. The protocols analyzed in this document are borrowed from the paper ”Reducing Protocol Analysis with XOR to the XOR- Free Case in the Horn Theory Based Approach” by Ralf Küesters and Tomasz Truderung published in Journal of Automated Reasoning, volume 46, pages 325-352, Springer 2011. These protocols are divided into two groups, those that can be specified in the Alice-Bob notation and those corresponding to an Application Programming Interface (API). We have proved the same security properties described in Küesters and Truderung paper, but we go beyond that paper in the sense that we have provided protocol specifications that meet all the requirements of the original protocols, whereas Küesters and Truderung paper use simplified versions of these protocols. The main problem that we have encountered is to specify API protocols in Maude-NPA, since this was the first time that this kind of protocols were specified in the tool. Another contribution of this thesis is to confirm that protocols with exclusive-or can be verified in Maude-NPA

Full text

UNIVERSITAT POLIT` ECNICA DE VAL` ENCIA Depto. Sistemas Inform´aticos y Computaci´on M´aster en Ingenier´ıa del Software, M´etodos Formales y Sistemas de Informaci´on MASTER THESIS Protocol analysis modulo exclusive-or theories: a case study in Maude-NPA CANDIDATE: Antonio Gonz´alez Burgue˜no SUPERVISOR: Santiago Escobar Rom´an May 1, 2014 Departamento de Sistemas Inform´aticos y Computaci´on Universitat Polit´ecnica de Valencia Camino de Vera, s/n 46022 Valencia, Spain Contents 1 Introduction 3 2 Background on Term Rewriting 9 3 Maude-NPA 13 3.1 Maude-NPA’s Execution Model . . . . . . . . . . . . . . . . . . . 13 3.2 Syntax for Protocol Specification . . . . . . . . . . . . . . . . . . 16 3.2.1 Specifying the Protocol Syntax . . . . . . . . . . . . . . . 16 3.2.2 Algebraic Properties . . . . . . . . . . . . . . . . . . . . . 17 3.2.3 Specifying the Strands . . . . . . . . . . . . . . . . . . . . 18 3.3 ProtocolAnalysis........................... 19 4 Protocols with XOR 23 4.1 Needham-Schroeder Protocol with XOR algebraic properties (XORNSL) ................................. 23 4.1.1 Symbols............................ 24 4.1.2 Algebraic Properties . . . . . . . . . . . . . . . . . . . . . 25 4.1.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 26 4.1.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 27 4.2 Fixed Needham-Schroeder protocol with XOR algebraic properties(XOR-NSL-Fix) ......................... 29 4.2.1 Symbols............................ 29 4.2.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 30 4.2.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 30 4.2.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 31 4.3 Bull Recursive Authentication Protocol (RA) . . . . . . . . . . . 32 4.3.1 Symbols............................ 33 3 4.3.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 34 4.3.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 34 4.3.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 36 4.4 Bull Recursive Authentication Protocol Fix (RA-Fix Protocol) . 37 4.4.1 Symbols............................ 38 4.4.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 38 4.4.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 38 4.4.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 40 4.5 Shoup-Rubin Protocol . . . . . . . . . . . . . . . . . . . . . . . . 43 4.5.1 Symbols............................ 44 4.5.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 46 4.5.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 47 4.5.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 49 4.6 Symmetric Key distribution protocol using Smart Cards (SK3) . 50 4.6.1 Symbols............................ 52 4.6.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 52 4.6.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 52 4.6.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 53 5 The CCA series of protocols 55 5.1 CCA-0Original............................ 58 5.1.1 Symbols............................ 60 5.1.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 61 5.1.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 62 5.1.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 64 5.2 CCA-0 version of K¨uesters and Truderung . . . . . . . . . . . . 66 5.2.1 Symbols............................ 66 5.2.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 67 5.2.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 67 5.2.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 68 5.3 IBM’s first recommendations to avoid the attack . . . . . . . . . 70 5.4 CCA-1A................................ 70 5.4.1 Symbols............................ 71 5.4.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 71 5.4.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 71 5.4.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 71 5.5 CCA-1B................................ 72 4 5.5.1 Symbols............................ 72 5.5.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 72 5.5.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 73 5.5.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 73 5.6 CCA-1B version of K¨uesters and Truderung . . . . . . . . . . . 74 5.6.1 Symbols............................ 74 5.6.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 75 5.6.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 75 5.6.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 75 5.7 IBM’s second recommendations to avoid the attack . . . . . . . . 76 5.8 CCA-2B................................ 79 5.8.1 Symbols............................ 79 5.8.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 79 5.8.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 79 5.8.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 80 5.9 CCA-2C................................ 81 5.9.1 Symbols............................ 81 5.9.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 81 5.9.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 81 5.9.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 82 5.10 CCA-2C version of K¨uesters and Truderung . . . . . . . . . . . 83 5.10.1Symbols............................ 83 5.10.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 83 5.10.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 83 5.10.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 84 5.11CCA-2E................................ 84 5.11.1Symbols............................ 85 5.11.2 Algebraic properties . . . . . . . . . . . . . . . . . . . . . 85 5.11.3 Strand specification . . . . . . . . . . . . . . . . . . . . . 85 5.11.4 Protocol analysis . . . . . . . . . . . . . . . . . . . . . . . 85 6 Conclusions 87 Bibliography 87 Appendix A Never Patterns in CCA-0 Protocol 95 Appendix B Never Patterns for IBM’s recommendations 97 5 6 Abstract The development of this master thesis aims at verifying various existing security protocols using an advanced automated protocol verification tool, namely the Maude-NPA tool developed by Santiago Escobar (Universitat Polit`ecnica de Val`encia) in collaboration with Jos´e Meseguer (University of Illinois at Urbana- Champaign, USA) and Catherine Meadows (Naval Research Laboratory, Washington, DC, USA). We focus on protocols using exclusive-or as the only cryptographic properties of symbols, apart of the standard cancellation of encryption and decryption. The protocols analyzed in this document are borrowed from the paper “Reducing Protocol Analysis with XOR to the XOR-Free Case in the Horn Theory Based Approach” by Ralf K¨uesters and Tomasz Truderung published in the Journal of Automated Reasoning, volume 46, pages 325-352, Springer 2011. These protocols are divided into two groups, those that can be specified in the Alice-Bob notation and those corresponding to an Application Programming Interface (API). We have proved the same security properties described in K¨uesters and Truderung paper, but we go beyond that paper in the sense that we have provided protocol specifications that meet all the requirements of the original protocols, whereas K¨uesters and Truderung paper uses simplified versions of these protocols without exclusive-or properties. The main problem that we have encountered is to specify API protocols in Maude-NPA, since this was the first time that this kind of protocols were specified in the tool. A relevant contribution of this thesis is to confirm that complex protocols with exclusive-or can be verified in Maude-NPA. 1 Chapter 1 Introduction The Maude-NPA is a tool and inference system for reasoning about the security of cryptographic protocols in which the cryptosystems satisfy different equational properties. The tool handles searches in the unbounded session model, and thus can be used to provide proofs of security as well as to search for attacks. It is the next generation of the NRL Protocol Analyzer [Meadows 96], a tool that supported limited equational reasoning and was successfully applied to the analysis of many different protocols. The area of formal analysis of cryptographic protocols has been an active one since the mid 1980s. The idea is to verify protocols that use encryption to guarantee secrecy, and that use authentication of data to ensure security, against an attacker (commonly called the Dolev-Yao attacker [Dolev 83]) who has complete control of the network, and can intercept, alter, and redirect traffic, create new traffic on his/her own, perform all operations available to legitimate participants, and may have access to some subset of the longterm keys of legitimate principals. Whatever approach is taken, the use of formal methods has had a long history, not only for providing formal proofs of security, but also for uncovering bugs and security flaws that in some cases had remained unknown long after the original protocol’s publication. A number of approaches have been taken to the formal verification of cryptographic protocols. One of the most popular is model checking, in which the interaction of the protocol with the attacker is symbolically executed. Indeed, modelchecking of secrecy (and later, authentication) in protocols in the boundedsession model (where a session is a single execution of a process representing an honest principal) has been shown to be decidable [Rusinowitch 01], and a num- 3 CHAPTER 2. BACKGROUND ON TERM REWRITING TΣ(X)sas TΣ/E(X) and TΣ/E(X)sfor a sort s, respectively. For a set Eof Σ-equations, an E-unifier for a Σ-equation t=t0is a substitution σs.t. tσ =Et0σ. A complete set of E-unifiers of an equation t=t0 is written CSUE(t=t0). We say CSUE(t=t0) is finitary if it contains a finite number of E-unifiers. Arewrite rule is an oriented pair l→r, where l6∈ X and l, r ∈ TΣ(X)s for some sort s∈S. An (unconditional) order-sorted rewrite theory is a triple R= (Σ, E, R) with Σ an order-sorted signature, Ea set of Σ-equations, and Ra set of rewrite rules. A topmost rewrite theory (Σ, E, R) is a rewrite theory s.t. for each l→r∈R,l, r ∈ TΣ(X)State for a top sort State,r6∈ X , and no operator in Σ has State as an argument sort. The rewriting relation →Ron TΣ(X) is tp →Rt0(or →R) if p∈PosΣ(t), l→r∈R,t|p=lσ, and t0=t[rσ]pfor some σ. The relation →R/E on TΣ(X) is =E;→R; =E, i.e., t→R/E siff ∃u1, u2∈ TΣ(X) s.t. t=Eu1→Ru2=Es. Note that →R/E on TΣ(X) induces a relation →R/E on TΣ/E(X) by [t]E→R/E [t0]E iff t→R/E t0. When R= (Σ, E, R) is a topmost rewrite theory, we can safely restrict ourselves to the rewriting relation →R,E on TΣ(X), where the rewriting relation →R,E on TΣ(X) is tp →R,E t0(or →R,E) if p∈PosΣ(t), l→r∈R,t|p=Elσ, and t0=t[rσ]pfor some σ. Note that →R,E on TΣ(X) induces a relation →R,E on TΣ/E(X) by [t]E→R,E [t0]Eiff ∃w∈ TΣ(X) s.t. t→R,E wand w=Et0. The narrowing relation Ron TΣ(X) is tp σ,R t0(or σ,R, R) if p∈ PosΣ(t), l→r∈R,σ∈CSU∅(t|p=l), and t0=σ(t[r]p). Assuming that Ehas a finitary and complete unification algorithm, the narrowing relation R,E on TΣ(X) is tp σ,R,E t0(or σ,R,E, R,E) if p∈PosΣ(t), l→r∈R, σ∈CSUE(t|p=l), and t0=σ(t[r]p). In this thesis we consider only equational theories E=E0]Ax such that the oriented equations E0are confluent, coherent, and terminating modulo axioms Ax such as commutativity (C), associativitycommutativity (AC), or associativity-commutativity plus identity (ACU) of some function symbols. We also require axioms Ax to be regular, i.e., for each equation l=r∈Ax,Var(l) = Var(r). Note that axioms such as commutativity (C), associativity-commutativity (AC), or associativity-commutativity plus identity (ACU) are regular. The Maude-NPA has then both dedicated and generic algorithms for solving unification problems in such theories E0]Ax under appropriate conditions [Escobar 12]. The use of topmost rewrite theories provides several advantages; see [Thati 07]: 10 (i) as pointed out above the relation →R,E achieves the same effect as the relation →R/E, and (ii) we obtain a completeness result between narrowing ( R,E) and rewriting (→R/E), in the sense that a reachability problem has a solution iff narrowing can find an instance of it. 11 CHAPTER 2. BACKGROUND ON TERM REWRITING 12 Chapter 3 Maude-NPA In this Chapter we briefly present the Maude-NPA cryptographic analyzer tool. In Chapter 3.1 we present the Maude-NPA’s execution model. After that, in Chapter 3.2, we show the syntax for protocol specifications in Maude-NPA’s. In Chapter 3.3 we show how to specify the protocol syntax. Next, in Chapter 3.4 we show how to specify the algebraic properties of the protocol. Also, in Chapter 3.5 we show how to specify the protocol strands. And finally, in Chapter 3.6 we show how is performed a protocol analysis. 3.1 Maude-NPA’s Execution Model Given a protocol P, a state in the protocol execution is an EP-equivalence class [t]EPwith ta term of sort State, [t]EP∈TΣP/EP(X)State, where ΣPis the signature defining the sorts and function symbols for the cryptographic functions and for all the state constructor symbols, and EPis a set of equations specifying the algebraic properties of the cryptographic functions and the state constructors. A protocol Pis specified with a notation derived from strand spaces. In a strand, a local execution of a protocol by a principal is indicated by a sequence of messages [msg− 1, msg+ 2, msg− 3, . . . , msg− k−1, msg+ k] where each msgiis a term of sort Msg (i.e., msgi∈TΣP(X)Msg). Strand items representing input messages are assigned a negative sign, and strand items representing output messages are assigned a positive sign. We write m±to denote m+or m−, indistinctively. We often write +(m) and −(m) instead of m+and m−, respectively. For each positive message msgiin a sequence of messages [msg± 1, msg± 2, msg± 3, . . . , msg+ i, 13 CHAPTER 3. MAUDE-NPA . . . , msg± k−1, msg± k] the non-fresh variables (see below) occurring in an output message msg+ imust appear in previous messages msg1, msg2, msg3, . . . , msgi−1. In Maude-NPA [Escobar 06, Escobar 09c], strands evolve over time and thus we use the symbol |to divide past and future in a strand, i.e., [nil, msg± 1, . . . , msg± j−1|msg± j, msg± j+1, . . . , msg± k, nil], where msg± 1, . . . , msg± j−1are the past messages, and msg± j, msg± j+1, . . . , msg± kare the future messages (msg± jis the immediate future message). We often remove the nils for clarity, except when there is nothing else between the vertical bar and the beginning or end of a strand. We write Pfor the set of strands in a protocol, including the strands that describe the intruder’s behavior. Maude-NPA uses a special sort Msg of messages that allows the protocol specifier to describe other sorts as subsorts of the top sort Msg. The specifier can make use of a special sort Fresh in the protocol-specific signature Σ for representing fresh unguessable values, e.g., nonces. We make explicit the Fresh variables r1, . . . , rk(k≥0) generated by a strand by writing :: r1,...,rk:: [msg± 1, . . . , msg± n], where r1, . . . , rkappear somewhere in msg± 1, . . . , msg± n.Fresh variables generated by a strand are unique to that strand. To illustrate this we use the well-known Needham-Schroeder-Lowe (NSL) protocol [Lowe 96]. We reproduce the NSL protocol in the following. 1. A→B:{NA, A}pk(B) 2. B→A:{NA, NB, B}pk(A) 3. A→B:{NB}pk(B) where {M}pk(A)means message Mencrypted using the public key of principal with name A,NAand NBare nonces generated by the respective principals, and we use the comma as message concatenation. The specification of the strands of the participants is as follows: :: r :: [(pk(B, n(A, r); A))+,(pk(A, n(A, r); NB;B))−,(pk(B, NB))+] :: r’ :: [(pk(B, NA;A))−,(pk(A, NA;n(B, r0); B))+,(pk(B, n(B, r0)))−] Astate is a set of Maude-NPA strands unioned together by an associative and commutativity union operator & with identity operator ∅, along with an additional term describing the intruder knowledge at that point. The intruder knowledge is represented as a set of facts unioned together with an associative and commutativity union operator _,_ with identity operator ∅. There are two 14 3.1. MAUDE-NPA’S EXECUTION MODEL kinds of intruder facts: positive knowledge facts (the intruder knows message m, i.e., m∈I), and negative knowledge facts (the intruder does not yet know m but will know it in a future state, denoted by m/∈I). When new strands are not introduced into the state, the rewrite rules RP obtained from the protocol strands Pare as follows1, where L, L0are variables of the sort for lists of input and output messages (+m,−m), IK is a variable of the sort for sets of intruder facts (m∈I,m/∈I), SS is a variable of the sort for sets of strands, and Mis a variable of sort Msg: SS & [L|M−, L0] & (M∈I, IK)→SS & [L, M−|L0] & (M∈I, IK) (3.1) SS & [L|M+, L0] & IK →SS & [L, M+|L0] & IK (3.2) SS & [L|M+, L0] & (M /∈I, IK)→SS & [L, M+|L0] & (M∈I, IK) (3.3) In a forward execution of the protocol strands, Rule (3.1) synchronizes an input message with a message already in the channel (i.e., learned by the intruder), Rule (3.2) accepts output messages but the intruder’s knowledge is not increased, and Rule (3.3) accepts output messages and the intruder’s knowledge is positively increased. Note that Rule (3.3) makes explicit when the intruder learned a message M, which is recorded in the previous state by the negative fact M /∈I. A fact M /∈I can be paraphrased as: “the intruder does not yet know M, but will learn it in the future”. New strands are added to the state by explicit introduction through dedicated rewrite rules (one for each honest or intruder strand). It is also the case that when we are performing a backwards search, only the strands that we are searching for are listed explicitly, and extra strands necessary to reach an initial state are dynamically added. Thus, when we want to introduce new strands into the explicit description of the state, we need to describe additional rules for doing that, as follows: for each [ l1, u+, l2]∈ P :SS & [ l1|u+, l2] & (u/∈I, IK)→SS & (u∈I, IK) (3.4) where udenotes a message, l1, l2denote lists of input and output messages (+m,−m), IK denotes a variable of the sort for sets of intruder facts (m∈I,m/∈I), 1To simplify the exposition we omit the fresh variables at the beginning of each strand in a rewrite rule. 15 CHAPTER 3. MAUDE-NPA and SS denotes a variable of the sort for sets of strands. For example, intruder concatenation of two learned messages is described as follows: SS & [M− 1, M− 2|(M1;M2)+] & ((M1;M2)/∈I, IK)→SS & ((M1;M2)∈I, IK) In summary, for a protocol P, the set of rewrite rules obtained from the protocol strands that are used for backwards narrowing reachability analysis modulo the equational properties EPis RP={(3.1),(3.2),(3.3)} ∪ (3.4). 3.2 Syntax for Protocol Specification In this Chapter, we briefly describe how to specify a protocol and all its relevant items in the current version of the Maude-NPA. For further information we refer the reader to [Escobar 09b]. Note that, since we are using Maude also as the specification language, each declaration has to be ended by a space and a period. 3.2.1 Specifying the Protocol Syntax We begin by specifying sorts. In general, sorts are used to specify different types of data, that are used for different purposes. The Maude-NPA tool always assumes that the sort Msg is the top sort, but it allows user-defined subsorts of Msg that can be specified by the user for a more accurate protocol specification and analysis. To illustrate the definition of sorts, we use the Needham-Schroeder- Lowe (NSL) [Lowe 96]. For this protocol we need to define sorts to distinguish names, nonces and encrypted data. This is specified as follows: sorts Name Nonce Enc . subsort Name Nonce Enc < Msg . subsort Name < Public . We can now specify the different operators needed in NSL. A nonce generated by principal Ais denoted by n(A, r), where r is a unique variable of sort Fresh. Concatenation of two messages, e.g., NAand NB, is denoted by the operator ; , e.g., n(A, r); n(B, r0). Encryption of a message Mwith the public key KAof principal Ais denoted by pk(A, M), e.g., {NB}pk(B)is denoted by pk(B, n(B, r0)). Encryption with a secret key is denoted by sk(A, M). We begin with the public/private encryption operators. 16 3.2. SYNTAX FOR PROTOCOL SPECIFICATION op pk : Name Msg -> Enc . op sk : Name Msg -> Enc . Next we specify some principal names. For NSL, we have three constants of sort Name,a(for Alice), b(for Bob) and i(for the Intruder). We need two more operators, one for nonces and one for concatenation. The nonce operator is specified as follows. op n : Name Fresh -> Nonce . Note that the nonce operator has an argument of sort Fresh to ensure uniqueness. The argument of type Name is not strictly necessary, but it provides a convenient way of identifying which nonces are generated by which principal. This makes searches more efficient, since it allows us to keep track of the originator of a nonce throughout a search. Finally, we come to the message concatenation operator. In Maude-NPA, we specify concatenation via an infix operator ; defined as follows: op _ ; _ : Msg Msg -> Msg [gather (e E)] . Note that the gathering pattern of an operator [Maude 09] restricts the precedences of terms that are allowed as arguments. We give a (non-empty) sequence of as many E,e, or &values as the number of arguments in the operator, that is, one of these values for each argument position: −Eindicates that the argument must have a precedence value lower or equal than the precedence value of the operator, −eindicates that the argument must have a precedence value strictly lower than the precedence value of the operatorand −&indicates that the operator allows any precedence value for the corresponding argument. In fact, the precedence values work because of their combination with the gathering patterns. 3.2.2 Algebraic Properties Next, we specify the algebraic properties of the symbols defined above for the NSL protocol. There are three types of algebraic properties in Maude-NPA: (i) equational axioms, such as commutativity, or associativity-commutativity, 17 CHAPTER 3. MAUDE-NPA called axiomsand (ii) equational rules, called variant equations, and (iii) equational rules for dedicated unification algorithms, called dedicated equations . Variant and dedicated equations are specified in the PROTOCOL-EXAMPLE- ALGEBRAIC module, whereas axioms are specified within the operator declarations in the PROTOCOL-EXAMPLE-SYMBOLS module, as illustrated in what follows. Note that combinations of all three different types of algebraic properties will be available in the future but in the current version only axioms and variant equations can be combined. An equation is oriented into a rewrite rule in which the lefthand side of the equation is reduced to the righthand side. In NSL, we use two equations specifying the relationship between public and private key encryption, as follows: var X : Msg . var A : Name . eq pk(A,sk(A,X)) = X [variant] . eq sk(A,pk(A,X)) = X [variant] . Note that there are restrictions on the equations that can be included here, since the narrowing-based unification algorithm provided by the tool for those equations must be finitary, see [Escobar 09b]. For instance, the algebraic properties of exclusive-or symbol are specified as follows: eq X * X * Y = Y [variant] . eq X * X = null [variant] . eq X * null = X [variant] . Note that the redundant equational property X * X * Y = Y is necessary in Maude-NPA for coherence purposes; see [Escobar 09a]. 3.2.3 Specifying the Strands As explained in previous sections, the protocol itself and the intruder capabilities are both specified using strands. We use the keyword STRANDS-PROTOCOL for storing the principal strands. For example, the strands associated to the NSL protocol are specified as follows: eq STRANDS-PROTOCOL = :: r :: [nil | +(pk(B,n(A,r) ; A)), -(pk(A,n(A,r) ; NB ; B)), 18 3.3. PROTOCOL ANALYSIS +(pk(B,NB)), nil] & :: r :: [nil | -(pk(B,NA ; A)), +(pk(A,NA ; n(B,r) ; B)), -(pk(B,n(B,r))), nil] . [nonexec] . The next thing to specify is the actions of the intruder, or Dolev-Yao rules [Dolev 83]. These specify the operations an intruder can perform. Each such action can be specified by an intruder strand consisting of a sequence of negative nodes, followed by a single positive node. If the intruder can (nondeterministically) find more than one term as a result of performing one operation (as in deconcatenation), we specify each of these outcomes by separate strands. Every operation that can be performed by the intruderand every term that is initially known by the intruder, should have a corresponding intruder strand. For each operation used in the protocol we should consider whether or not the intruder can perform itand specify a corresponding intruder strand that describes the conditions under which the intruder can perform it. For the NSL protocol, we have four operations: encryption with a public key (pk), decryption with a private key (sk), concatenation ( ; ) and deconcatenation. We use the keyword STRANDS-DOLEVYAO for storing the intruder strands: eq STRANDS-DOLEVYAO = :: nil :: [ nil | -(X), -(Y), +(X ; Y), nil] & :: nil :: [ nil | -(X ; Y), +(X), nil] & :: nil :: [ nil | -(X ; Y), +(Y), nil] & :: nil :: [ nil | -(X), +(sk(i,X)), nil] & :: nil :: [ nil | -(X), +(pk(Ke,X)), nil] [nonexec] . 3.3 Protocol Analysis Next, we describe how to analyze a protocol in practice. First, we explain how a protocol state looks like and how an attack state is specified in the protocol. Then, we explain how the protocol analysis is performed. In Maude-NPA, each state associated to the protocol execution (i.e., a backwards search) is represented by a term with five different components separated 19 CHAPTER 4. PROTOCOLS WITH XOR eq X * X * Y = Y [variant] . eq X * X = null [variant] . eq X * null = X [variant] . where X and Y are variables of sort NNSet. Note that the redundant equational property X * X * Y = Y is necessary in Maude-NPA for coherence purposes; see [Escobar 09]. 4.1.3 Strand specification In this section we describe the strands denoting the actions of the protocol’s honest principals and the intruder capabilities. The strands of this protocol are specified as follows: eq STRANDS-PROTOCOL = :: r :: *** Alice *** [nil | +(pk(B, n(A,r) ; A)), -(pk(A, NB ; n(A,r) * B)), +(pk(B, NB)), nil] & :: r’ :: *** Bob *** [nil | +(pk(B, NA ; A)), -(pk(A, n(B,r’) ; NA * B)), +(pk(B, n(B,r’))), nil] where A and B are variables denoting names and NA and NB are variables denoting nonces of A and B respectively. The intruder capabilities are specified by the following strands: eq STRANDS-DOLEVYAO = :: nil :: [ nil | -(X), -(Y), +(X ; Y), nil ] & :: nil :: [ nil | -(X ; Y), +(X), nil ] & :: nil :: [ nil | -(X ; Y), +(Y), nil ] & :: nil :: [ nil | -(XN), -(YN), +(XN * YN), nil ] & :: nil :: [ nil | -(X), +(sk(i,X)), nil ] & :: nil :: [ nil | -(X), +(pk(A,X)), nil ] & :: r :: [ nil | +(n(i,r)), nil ] & :: nil :: [ nil | +(null), nil ] & 26 4.1. NEEDHAM-SCHROEDER PROTOCOL WITH XOR ALGEBRAIC PROPERTIES (XOR-NSL) :: nil :: [ nil | +(A), nil ] where variables Xand Ydenote messages, variable Adenotes a sort name of the participant, variables XN and Y N are of sort NNSet. The first strand denote concatenation of two messages, whereas the second and third strands denote the ability of deconcatenation. The fourth strand allows the intruder to perform the XOR. The fifth, sixth and seventh strands denote the ability of the intruder to perform private encryption and public encryption and to generate his own nonce, respectively. Finally, the two last strands allow the intruder to generate the XOR null element and any name, respectively. 4.1.4 Protocol analysis This protocol is insecure as it shown in [Chevalier 05] since it is subject to an attack similar to the one of the original NSPK protocol that exploits the algebraic properties of the XOR. This attack is found in Maude-NPA by searching backwards from the attack pattern below: eq ATTACK-STATE(0) = :: r’ :: *** Bob *** [nil, +(pk(b, NA ; a)), -(pk(a, n(b,r’) ; NA * b)), +(pk(b, n(b,r’))) | nil] || n(b,r’) inI || nil || nil || nil [nonexec] . The number of generated states in the different levels with Maude-NPA tool is as follows: reduce in MAUDE-NPA : summary(1) . result Summary: States>> 20 Solutions>> 0 27 CHAPTER 4. PROTOCOLS WITH XOR reduce in MAUDE-NPA : summary(2) . result Summary: States>> 48 Solutions>> 0 reduce in MAUDE-NPA : summary(3) . result Summary: States>> 72 Solutions>> 0 reduce in MAUDE-NPA : summary(4) . result Summary: States>> 93 Solutions>> 0 reduce in MAUDE-NPA : summary(5) . result Summary: States>> 110 Solutions>> 0 reduce in MAUDE-NPA : summary(6) . result Summary: States>> 116 Solutions>> 1 For this attack pattern Maude-NPA finds an initial state. The sequence of exchanged messages of the attack is as follows: generatedByIntruder(a), generatedByIntruder(pk(b, (b * i) ; a)), -(pk(b, (b * i) ; a)), +(pk(a, n(b, #0:Fresh) ; i)), -(pk(a, n(b, #0:Fresh) ; i)), +(pk(i, n(a, #1:Fresh) ; a * n(b, #0:Fresh))), -(pk(i, n(a, #1:Fresh) ; a * n(b, #0:Fresh))), +(n(a, #1:Fresh) ; a * n(b, #0:Fresh)), -(n(a, #1:Fresh) ; a * n(b, #0:Fresh)), +(a * n(b, #0:Fresh)), -(a), -(a * n(b, #0:Fresh)), +(n(b, #0:Fresh)), -(n(b, #0:Fresh)), +(pk(b, n(b, #0:Fresh))), -(pk(b, n(b, #0:Fresh))) where generatedByIntruder is produced by the Maude-NPA’s optimization of the Super Lazy intruder (see [Escobar 14] for details), which means it is a 28 4.2. FIXED NEEDHAM-SCHROEDER PROTOCOL WITH XOR ALGEBRAIC PROPERTIES (XOR-NSL-FIX) message that the intruder can trivially learn,i.e., it is not necessary to find out how it is generated. In this case, this happens with the name of one of the participants. After that, the intruder is able to use it with his own name and the other participant name to make a public encryption and use it in the attack. 4.2 Fixed Needham-Schroeder protocol with XOR algebraic properties (XOR-NSL-Fix) Since the Needham-Schroeder Protocol with XOR algebraic properties (XORNSL protocol) of Section 5 has an attack, a fixed version of the protocol (XORNSL-Fix) is proposed in [K¨uesters 11] in which the message {NB, NA* B}pk(A) is replaced by {NB,h(NA, NB) * B}pk(A), using a hash function h(·). The informal description of the fixed version of the protocol, is as follows: 1. A →B : {NA,A}pk(B) 2. B →A : {NB, h(NA, NB) * B}pk(A) 3. A →B : {NB}pk(B) where A, B denote principal names, NAand NBdenote nonces generated by participants, {M}Kdenotes encryption of message Musing key K, * is the exclusive-or operatorand h(M) denotes the hash function over a message M. This protocol is secure with the fix proposed. This fixed version of the XORNSL protocol is secure against the attack of [Chevalier 05] . 4.2.1 Symbols All the symbols are the same that for the original version of the protocol except the one for the hash function. This is specified as follows: sorts Hash . subsort Hash < NNSet < Msg . We can now specify the hash operator as follows: op h : Msg -> Hash [frozen] . 29 CHAPTER 4. PROTOCOLS WITH XOR 4.2.2 Algebraic properties The algebraic properties of the XOR-NSL fixed protocol are the same of the XOR-NSL protocol, which are specified by the AC property of symbol * and the equations of Section 4.1.2. 4.2.3 Strand specification As explained in previous section, the protocol itself and the intruder capabilities are both specified using strands. The principal strands are as follows: eq STRANDS-PROTOCOL = :: r :: *** Alice *** [nil | +(pk(B, n(A,r) ; A)), -(pk(A, NB ; h(n(A,r) ; NB) * B)), +(pk(B, NB)), nil] & = :: r’ :: *** Bob *** [nil | +(pk(B, NA ; A)), -(pk(A, n(B,r’) ; h(NA ; n(B,r’) * B)), +(pk(B, n(B,r’))), nil] [nonexec] . where Aand Bare variables denoting names and NA and NB are variables denoting nonces of Aand Brespectively. The difference between the specification of the fixed version and the original version of this protocol (see 4.1.3) is that in the original version of the protocol the message “pk(A, NB ; n(A,r) * B)” is replaced by “pk(A, NB ; h(n(A,r) ; NB) * B)” for Alice’ strand and “pk(A, n(B,r’) ; NA * B)” is replaced by “pk(A, n(B,r’) ; h(NA ; n(B,r’) * B)” for Bob’ strand. The intruder capabilities are specified as in the XOR-NSL protocol in Section 4.1.3, the only difference is the inclusion of the ability of the intruder to apply the hash function, that is specified as follows: :: nil :: [ nil | -(XN), +(h(XN)), nil ] & where XN denotes a sort sort of Msg. 30 4.2. FIXED NEEDHAM-SCHROEDER PROTOCOL WITH XOR ALGEBRAIC PROPERTIES (XOR-NSL-FIX) 4.2.4 Protocol analysis We use an attack pattern similar to the one used in Section 4.1.4. for the original version of the protocol, to prove wether the fix makes the protocol secure. eq ATTACK-STATE(0) = :: r’ :: *** Bob *** [nil, +(pk(b, NA ; a)), -(pk(a, n(b,r’) ; h(NA ; n(b,r’) * b)), +(pk(b, n(b,r’))) | nil] || n(b,r’) inI || nil || nil || nil [nonexec] . The number of generated states in the different levels with Maude-NPA tool is as follows: reduce in MAUDE-NPA : summary(1) . result Summary: States>> 3 Solutions>> 0 reduce in MAUDE-NPA : summary(2) . result Summary: States>> 4 Solutions>> 0 reduce in MAUDE-NPA : summary(3) . result Summary: States>> 2 Solutions>> 0 reduce in MAUDE-NPA : summary(4) . result Summary: States>> 4 Solutions>> 0 reduce in MAUDE-NPA : summary(5) . result Summary: States>> 2 Solutions>> 0 reduce in MAUDE-NPA : summary(6) . result Summary: States>> 0 Solutions>> 0 31 CHAPTER 4. PROTOCOLS WITH XOR The protocol is secure with this fix and, when this protocol is analyzed with Maude-NPA, it generates a finite search state space finding no initial state for the attack pattern above. 4.3 Bull Recursive Authentication Protocol (RA) The Bull Recursive Authentication Protocol (RA) [Bull 97, Comon-Lundh 03], aims at establishing fresh session keys between a fixed number of participants (for instance 3) and a server: one key for each pair of agents. We reproduce the RA below, using textbook Alice-and-Bob notation. A computes XA= h(A,B,NA), (A,B,NA) 1. A →B : XA B computes XB= h(B,C,NB,Xa), (B,C,NB,XA) 2. B →C : XB C computes XC= h(C,S,NC,Xb), (C,S,NC,XB) 3. C →S : XC 4. S →C : KAB * h(NA,KAS), KAB * h(NB,KBS), KBC * h(NB,KBS), KBC * h(NC,KCS) 5. C →B : KAB * h(NA,KAS), KAB * h(NB,KBS), KBC * h(NB,KBS) 6. B →A : KAB * h(NA,KAS) where A, B, C, S denotes participants names, NAand NB,NCdenotes nonces generated by participants, KAB and KBC denote session keys between participants A and B and B and C respectively, KAS,KBS and KCS denote encryption of principal names using the server’s nonce, and * is the exclusive-or operator. This protocol is insecure; an attack similar to the one of the standard Needham Schroeder protocol was found in [Chevalier 05] exploiting in this case the algebraic properties of the XOR . As we can see in [Comon-Lundh 03] this protocol is subject to an attack because secrecy of KAB from Cfails if the following constraint is satisfiable: T={MB, x, y, KAB∗h(KA, NA), KAB ∗h(KB, NB), KBC ∗h(KB, NB), KBC 32 4.3. BULL RECURSIVE AUTHENTICATION PROTOCOL (RA) ∗h(x, y)}implies KAB, where variables x, y represent terms whose value can be chosen by C. We guess that x, y are not instantiated and that the subterms are derived in the following order: h(x, y)< KBC < KAB.Observe that h(x, y) is derivable from Tin one step by applying function symbol h to xand y,KBC is derivable from T∪h(x, y) in one step, by (X), KAB is derivable from T∪h(x, y)∪KBC in one step, by two application of (X) : ((KAB ∗h(KB, NB)) ∗((KBC ∗h(KB, NB)) ∗KBC =KAB. Therefore, after the second reduction step we obtain an empty constraint, proving that secrecy of KAB is violated. The informal description of this attack is as follows: A computes XA= h(A,B,NA), (A,B,NA) 1. A →B : XA B computes XB= h(B,C,NB,Xa), (B,C,NB,XA) 2. B →C : XB C computes XC= h(C,S,NC,Xb), (C,S,NC,XB) 3. C →S : XC 4. S →C : KAB * h(NA,KAS), KAB * h(NB,KBS), KBC * h(NB,KBS), KBC * h(NC,KCS) 5. C →B : KAB * h(NA,KAS), KAB * h(NB,KBS), KBC * h(NB,KBS) 6. B →I : KAB, h(NA,KAS) 7. I(B) →A : KAB * h(NA,KAS) 4.3.1 Symbols The symbols of the Bull Recursive Authentication Protocol (RA) are the same of the XOR-NSL-Fix protocol, which are specified by the equations of Section 4.2.1. 33 CHAPTER 4. PROTOCOLS WITH XOR 4.3.2 Algebraic properties The algebraic properties of the Bull Recursive Authentication Protocol (RA) are the same of the XOR-NSL protocol, which are specified by AC and the equations of Section 4.1.2. 4.3.3 Strand specification In this section we describe the strands denoting the actions of the protocol’s honest principals and the intruder capabilities. First of all we define different variables of type Hash that will be used at the protocol specification. 1. HA represents h(A ; B ; NA) 2. HA’ represents h(KA;NA) 3. HB represents h(B, C ; NB; (A ; B ; NA; h(A ; B ; NA))) 4. HB’ represents h(KB,NB) The strands of this protocol are specified as follows: eq STRANDS-PROTOCOL = :: r :: *** Alice *** [nil | +(A ; B ; n(A,r) ; h(A ; B ; n(A,r))), -((SK * h(pkey(A,NS) ; n(A,r)))), nil ] & :: r :: *** Bob *** [nil | -(A ; B ; NA ; HA), +(B;C;n(B,r);(A;B;NA;HA); h(B ; C ; n(B,r) ; (A ; B ; NA ; HA))), -((SK * HA’) ; (SK * h(pkey(B,NS) ; n(B,r))) ; (SK’ * h(pkey(B,NS) ; n(B,r)))), +(SK * HA’), nil] & :: r :: *** Charlie *** [nil|-(B;C;NB;(A;B;NA;HA);HB), +(C;S;n(C,r);(B;C;NB;A;B;NA;HA;HB); h(C;S;n(C,r);(B;C;NB;A;B;NA;HA;HB))), 34 4.3. BULL RECURSIVE AUTHENTICATION PROTOCOL (RA) -(( SK * HA’) ; (SK * HB’) ; (SK’ * HB’) ; (SK’ * h(pkey(C,NS) ; n(C,r)))), +((SK * HA’) ; (SK * HB’) ; (SK’ * HB’)), nil] & :: r,r’ :: *** Server *** [nil|-(C;S;NC;B;C;NB;A;B;NA;h(A;B;NA); h(B;C;NB;A;B;NA;h(A;B;NA)); h(C;S;NC;B;C;NB;A;B;NA; h(A;B;NA);h(B;C;NB;A;B;NA;h(A;B;NA)))), +((seskey(A, B, n(s,r)) * h(pkey(A,n(s,r)) ; NA)) ; (seskey(A, B, n(s,r)) * h(pkey(B,n(s,r)) ; NB)) ; (seskey(B, C, n(s,r’)) * h(pkey(B,n(s,r)) ; NB)) ; (seskey(B, C, n(s,r’)) * h(pkey(C,n(s,r)) ; NC))), nil] where A,Band Care variables denoting names and NA,NB and NC are variables denoting nonces of A,Band Crespectively. The intruder capabilities are specified by the following strands: eq STRANDS-DOLEVYAO = :: nil :: [nil | -(X), -(Y), +(X ; Y), nil] & :: nil :: [nil | -(X ; Y), +(X), nil] & :: nil :: [nil | -(X ; Y), +(Y), nil] & :: nil :: [nil | -(XN), -(YN), +(XN * YN), nil] & :: nil :: [nil | -(XN), +(h(XN)), nil] & :: nil :: [nil | -(pkey(i,NX)), +(NX), nil] & :: nil :: [nil | -(NX), +(pkey(A,NX)), nil] & :: r :: [nil | +(n(i,r)), nil] & :: nil :: [nil | +(null), nil] & :: nil :: [nil | +(A), nil] [nonexec] . where variables Xand Ydenote messages, variable A denotes a sort name of the participant, variables XN and Y N denote Msg. The first strand denotes concatenation of two messages, whereas the second and third strands denote the ability of deconcatenation. The fourth strand allows the intruder to perform the 35 CHAPTER 4. PROTOCOLS WITH XOR reduce in MAUDE-NPA : summary(12) . result Summary: States>> 33 Solutions>> 0 reduce in MAUDE-NPA : summary(13) . result Summary: States>> 29 Solutions>> 0 reduce in MAUDE-NPA : summary(14) . result Summary: States>> 18 Solutions>> 0 reduce in MAUDE-NPA : summary(5) . result Summary: States>> 11 Solutions>> 0 reduce in MAUDE-NPA : summary(16) . result Summary: States>> 8 Solutions>> 0 reduce in MAUDE-NPA : summary(17) . result Summary: States>> 10 Solutions>> 0 reduce in MAUDE-NPA : summary(18) . result Summary: States>> 13 Solutions>> 0 reduce in MAUDE-NPA : summary(19) . result Summary: States>> 14 Solutions>> 0 reduce in MAUDE-NPA : summary(20) . result Summary: States>> 13 Solutions>> 0 reduce in MAUDE-NPA : summary(21) . result Summary: States>> 11 Solutions>> 0 reduce in MAUDE-NPA : summary(22) . result Summary: States>> 9 Solutions>> 0 reduce in MAUDE-NPA : summary(23) . result Summary: States>> 6 Solutions>> 0 42 4.5. SHOUP-RUBIN PROTOCOL reduce in MAUDE-NPA : summary(24) . result Summary: States>> 3 Solutions>> 0 reduce in MAUDE-NPA : summary(25) . result Summary: States>> 1 Solutions>> 0 reduce in MAUDE-NPA : summary(26) . result Summary: States>> 0 Solutions>> 0 The protocol is secure with this fix and, when this protocol is analyzed with Maude-NPA, it generates a finite search state space finding no initial state for the attack pattern above. 4.5 Shoup-Rubin Protocol Shoup and Rubin’s contribution is the design of a smart card protocol for session-key distribution, which is discussed within an extension of the Bellare- Rogaway’s framework [Bella 03] [Shoup 96]. In the original version of the protocol, there were five participants of the protocol: Alice, Bob, the Server and smart cards of Alice and Bob. According to what the protocol says, it is assumed that the communication between smart cards and participants Alice and Bob is secure and therefore the attacker can not extract anything from that communication. We have made the following simplifications to this protocol: −We have removed the strands of smart cards. −Alice generates its nonce, rather than generate their smart card and send it to her. −Bob generates its nonce, rather than generate their smart card and send it to him. −Bob generates the session key and sends it to Alice. In the original version was one of the smart cards who generated it and is sending his honest participant and this corresponding forward it to the other honest participant. We use these aliases to make easy the understanding of the specification: −SKrepresents {A, B}NB −PAB represents KAB ∗ {B}KA 43 CHAPTER 4. PROTOCOLS WITH XOR −KAB represents {A}KB The specification of this protocol using textbook Alice-and-Bob notation is as follows: 1. A →S : A, B 2. S →A : PAB,{PAB, B}KA 3. A →B : A, NA 4. B →A : NB,{NA, NB}KAB 5. B →A : {SK}KAB 6. A →B : {NB}KAB where A, B denote principal names, NAand NBdenote nonces generated by participants, {M}Kdenotes encryption of message Musing key Kand * is the exclusive-or operator. We use this attack pattern to check if the session key is secure eq ATTACK-STATE(0) = :: r :: *** Bob *** [nil, -(a ; NCA), +(n(b,r) ; e(nse(symKey(b), a), NCA ; n(b,r))), *** Simulation: Bob sends session key to Alice +(e(nse(symKey(b), a), sesK(n(b,r), a, b))), -(e(nse(symKey(b), a), n(b,r))) | nil] || sesK(n(b,r), a, b) inI || nil || nil || nil [nonexec] . As you can see in Section 4.5.4 this protocol is secure. 4.5.1 Symbols In the following we show how to specify the sorts and symbols for this protocol in the Maude-NPA’s syntax. More specifically, we need sorts to denote names, nonces, hash operator and Keys. This is specified as follows: sorts Name Nonce Symkey Key Sessionkey NSymEnc Null . 44 4.5. SHOUP-RUBIN PROTOCOL subsort Name Nonce < Msg . subsort Symkey Sessionkey NSymEnc < Msg . subsort Name < Public . subsort Null < NSymEnc . We can now specify the different operators needed in the Shoup-Rubin protocol. A nonce generated by principal A is denoted by n(A, r), where r is a unique variable of sort Fresh. Concatenation of two messages, e.g., NAand NB, is denoted by the operator “ ; ”, e.g., n(A, r); n(B, r’). Next, we specify some principal names. For XOR-NSL, we have three constants of sort Name, a (for Alice), b (for Bob) and i (for the Intruder). We need three more operators: one for nonces, one for concatenation and one for the XOR. The nonce operator is specified as follows: op n : Name Fresh -> Nonce [frozen]. Note that the nonce operator has an argument of sort Fresh to ensure uniqueness. The argument of type Name is not strictly necessary, but it provides a convenient way of identifying which nonces are generated by which principal. This makes searches more efficient, since it allows us to keep track of the originator of a nonce throughout a search. Message concatenation is specified in Maude-NPA via the infix operator ; , which is defined as follows: op _ ; _ : Msg Msg -> Msg [gather(e E) frozen]. Next we define the characteristics of the XOR operator which is defined to be used with NSymEnc type variables. Also we indicate that this operator has the associative and commutative properties. op _*_ : NSymEnc NSymEnc -> NSymEnc [assoc comm frozen] . Next we define diferents kinds of key generators. First we define the sesK operator which is defined to be used with the principal names and the nonce of one of the participants. op sesK : Nonce Name Name -> Sessionkey [frozen] . Second we define the symKey operator which is defined to be used with the participant name. op symKey : Name -> Symkey [frozen] . 45 CHAPTER 4. PROTOCOLS WITH XOR Also we define the nse operator which is defined as follows: op nse : Symkey Msg -> NSymEnc [frozen] . Next we define diferents kinds of encryption and decryption operators. We define the first encryption and decryption operators which are defined to be used with an arguments of sort Key and Msg. op e : Key Msg -> Msg [frozen] . op d : Key Msg -> Msg [frozen] . Next we define the second encryption and decryption operators which are defined to be used with an arguments of sort Symkey and Msg. op se : Symkey Msg -> Msg [frozen] . op sd : Symkey Msg -> Msg [frozen] . Next we define diferents kinds of key generators. We define the first key generator operator which are defined to be used with the principals names and the nonce of one of the participants op sesK : Nonce Name Name -> Sessionkey [frozen] . Next we define the second key generator operator which are defined to be used with the participant name . op symKey : Name -> Symkey [frozen] . And finally we define the third key generator operator which are defined to be used with a sort Symkey and the participant name. op nse : Symkey Name -> NSymEnc [frozen] . 4.5.2 Algebraic properties In this section we specify the algebraic properties of the symbols defined in the section 6.5.1, using equations apart of associative, commutative and identity properties. In Shoup-Rubin protocol, we use two equations specifying the relationship for each one of the two different types of encryption/decryption that we use. We specify as follows: 46 4.5. SHOUP-RUBIN PROTOCOL var NSEnc : NSymEnc . var M : Msg . eq d(NSEnc, e(NSEnc, M)) = M [variant] . eq e(NSEnc, d(NSEnc, M)) = M [variant] . var SKey : Symkey . eq sd(SKey, se(SKey, M)) = M [variant]. eq se(SKey, sd(SKey, M)) = M [variant]. The properties of the XOR operator are denoted by the following equations: var NSEnc NSEnc’ : NSymEnc . eq null * NSEnc = NSEnc [variant] . eq NSEnc * NSEnc = null [variant] . eq NSEnc * NSEnc * NSEnc’ = NSEnc’ [variant] . Note that the redundant equational property of the last equation is necessary in Maude-NPA for coherence purposes; see [Escobar 09]. 4.5.3 Strand specification In this section we describe the strands denoting the actions of the protocols honest principals and the intruder capabilities. The strands of this protocol are specified as follows: :: r :: *** Alice *** [nil | +(A ; B), -((PAB * nse(symKey(A), B)) ; (se(symKey(A), (PAB * nse(symKey(A), B)) ; B))), +(A ; n(A,r)), -(NCB ; e(PAB, n(A,r) ; NCB)), ***Simulation: Bob sends session key to Alice -(e(PAB, sesK(NCB, A, B))), +(e(PAB, NCB)), nil] & :: r :: *** Bob *** [nil | -(A ; NCA), +(n(B,r) ; e(nse(symKey(B), A), NCA ; n(B,r))), *** Simulation: Bob sends session key to Alice +(e(nse(symKey(B), A), sesK(n(B,r), A, B))), 47 CHAPTER 4. PROTOCOLS WITH XOR -(e(nse(symKey(B), A), n(B,r))), nil] & :: nil :: *** Server *** [nil | -(A ; B), +((nse(symKey(B), A) * nse(symKey(A), B)) ; se(symKey(A), (nse(symKey(B), A) * nse(symKey(A), B)) ; B)), nil] where A and B are variables denoting names and NA and NB are variables denoting nonces of A and B respectively. The intruder capabilities are specified by the following strands: eq STRANDS-DOLEVYAO = :: nil ::[nil | -(X), -(Y), +(X ; Y), nil ] & :: nil :: [nil | -(X ; Y), +(X), nil ] & :: nil :: [nil | -(X ; Y), +(Y), nil ] & :: nil :: [nil | -(NSEnc), -(NSEnc’), +(NSEnc * NSEnc’), nil ] & :: nil :: [nil | -(M), -(NSEnc), +(e(NSEnc,M)), nil ] & :: nil :: [nil | -(M), -(NSEnc), +(d(NSEnc,M)), nil ] & :: nil :: [nil | -(M), -(SK), +(se(SK,M)), nil ] & :: nil :: [nil | -(M), -(SK), +(sd(SK,M)), nil ] & :: nil :: [nil | -(SK), +(nse(SK, i)), nil ] & :: nil :: [nil | +(symKey(i)), nil ] & :: nil :: [nil | -(N), +(sesK(N,i,A)), nil ] & :: nil :: [nil | -(N), +(sesK(N,A,i)), nil ] & :: r :: [nil | +(n(i,r)), nil ] & :: nil :: [nil | +(null), nil ] & :: nil :: [nil | +(A), nil ] [nonexec] . where variables X and Y denote messages, variable A denotes a sort name of the participant, variable SK denotes Symkey, variable M denotes Msg, variable N denotes Nonce, and variables NSEnc and NSEnc’ are of sort NSymEnc. The first strand denote concatenation of two messages, whereas the second and third strands denote the ability of deconcatenation. The fourth strand allows the intruder to perform the XOR. The fifth , sixth, seventh and eighth strands allows the intruder to perform different kinds of encryption and decryption. The ninth strand denotes the ability of the intruder to generate any kind of nse encryption with his name. The tenth strand denotes the ability of the intruder to generate his own symmetric key. The eleventh and twelfth strands denote the 48 4.5. SHOUP-RUBIN PROTOCOL ability of the intruder of generate a session key. Finally the three last strands allow the intruder to generate his own nonce, the XOR null element and any name, respectively. 4.5.4 Protocol analysis The number of generated states in the different levels with Maude-NPA tool is as follows: reduce in MAUDE-NPA : summary(1) . result Summary: States>> 4 Solutions>> 0 reduce in MAUDE-NPA : summary(2) . result Summary: States>> 12 Solutions>> 0 reduce in MAUDE-NPA : summary(3) . result Summary: States>> 28 Solutions>> 0 reduce in MAUDE-NPA : summary(4) . result Summary: States>> 51 Solutions>> 0 reduce in MAUDE-NPA : summary(5) . result Summary: States>> 74 Solutions>> 1 reduce in MAUDE-NPA : summary(6) . result Summary: States>> 80 Solutions>> 0 reduce in MAUDE-NPA : summary(7) . result Summary: States>> 70 Solutions>> 0 reduce in MAUDE-NPA : summary(8) . result Summary: States>> 55 Solutions>> 0 reduce in MAUDE-NPA : summary(9) . result Summary: States>> 45 Solutions>> 0 reduce in MAUDE-NPA : summary(10) . result Summary: States>> 46 Solutions>> 0 49 CHAPTER 4. PROTOCOLS WITH XOR reduce in MAUDE-NPA : summary(11) . result Summary: States>> 36 Solutions>> 0 reduce in MAUDE-NPA : summary(12) . result Summary: States>> 43 Solutions>> 0 reduce in MAUDE-NPA : summary(13) . result Summary: States>> 21 Solutions>> 0 reduce in MAUDE-NPA : summary(14) . result Summary: States>> 11 Solutions>> 0 reduce in MAUDE-NPA : summary(5) . result Summary: States>> 1 Solutions>> 0 reduce in MAUDE-NPA : summary(16) . result Summary: States>> 0 Solutions>> 0 The protocol is secure against this attack and, when this protocol is analyzed with Maude-NPA, it generates a finite search state space finding no initial state for the attack pattern above. 4.6 Symmetric Key distribution protocol using Smart Cards (SK3) The Symmetric Key distribution using Smart Cards (SK3) protocol [Bond 01] is a key distribution protocol for smart cards, which uses the XOR operator. This protocol is a version of the Shoup-Rubin protocol of the Section 4.5 . We have specified a simplified version of this protocol. In the original version of the protocol, there were five participants of the protocol: Alice, Bob, the Server and the smart cards of Alice and Bob. The informal description of the protocol in [Bond 01] assumes that the communication between smart cards and participants Alice and Bob is secure and therefore the attacker can not extract anything from that communication. We have made the following simplifications to this protocol: 50 4.6. SYMMETRIC KEY DISTRIBUTION PROTOCOL USING SMART CARDS (SK3) −We have removed the strands of smart cards. −Alice generates its nonce, rather than generate their smart card and send it to her. −Bob generates its nonce, rather than generate their smart card and send it to him. −Bob generates the session key and sends it to Alice. In the original version was one of the smart cards who generated it and is sending his honest participant and this corresponding forward it to the other honest participant. We use these aliases to make easier the understanding of the specification: −SKrepresents {A, B, 1}NB −PAB represents KAB *{B, 1}KA −KAB represents {A, 0}KB The specification using textbook Alice-and-Bob notation would be as follows: 1. A →S : A, B 2. S →A : PAB,{PAB, B, 2}KA 3. A →B : A, NA 4. B →A : NB,{NA, NB,1}KAB 5. B →A : {SK}KAB 6. A →B : {NB,0,1}KAB where A, B denote principal names, NAand NBdenote nonces generated by participants, {M}Kdenotes encryption of message Musing key K, * is the exclusive-or operator and 0 and 1 denote a sortrbitrary padding constants, known by all principals. We use this attack pattern to check if the session key is secure eq ATTACK-STATE(0) = :: r :: *** Bob *** [nil, -(a ; NCA), +(n(b,r) ; e(nse(symKey(b), a), NCA ; n(b,r) ; 1)), *** Simulation: Bob sends session key to Alice +(e(nse(symKey(b), a), sesK(n(b,r), a, b, 1))), 51 CHAPTER 5. THE CCA SERIES OF PROTOCOLS the result that is returned by the command. In the following we test nine protocols: −CCA-0 Original (Section 5.1) −CCA-0 version of K¨uesters and Truderung (Section 5.2) −CCA-1A (Section 5.4) −CCA-1B (Section 5.5) −CCA-1B version of K¨uesters and Truderung Original (Section 5.6) −CCA-2B (Section 5.8) −CCA-2C (Section 5.9) −CCA-2C version of K¨uesters and Truderung Original (Section 5.10) −CCA-2E (Section 5.11) 5.1 CCA-0 Original In this section we describe the specification and analysis of the original CCA protocol (CCA-0). The informal description of the CCA API is as follows: API Operator Description Encipher x, {eK}{KM∗DAT A}→ {x}eK Decipher {x}eK,{eK}{KM∗DAT A}→x Key Export {eK}(KM∗T}, T, {ekek}{KM∗EXP }→ {eK}(ekek∗T) Key Import {eK}(kek∗T}, T, {kek}{KM∗IMP }→ {eK}{KM∗T} Key Part Import First km1, T → {km1}{KM∗KP ∗T} Key Part Import Middle km2, km1{KM∗KP ∗T}, T →(km1 * km2){KM∗KP ∗T} Key Part Import Last km3, km2{KM∗KP ∗T}, T →(km2 * km3){KM∗KP ∗T} Key Translate {eK}ekek1∗T, T, {ekek1}KM∗IMP ,{ekek2}KM∗EXP → {eK}(ekek2∗T) Table 5.1: CCA API operators and description. 58 5.1. CCA-0 ORIGINAL The Encipher rule corresponds to a data encryption command which allows data keys to be used to encrypt any given plaintext. Decipher allows data keys to be used for decryption. Key Export is used to encrypt a working key under a key encrypting key for transport to another HSM (hardware security modules). Key Import allows a key from another 4758 module, encrypted for transport under a Key Encrypting Key (KEK), to be made into a working key for this HSM (Hardware Security Modules). The three Key Part Import commands can then be used one after the other, by three different security officers, each in possession of one key part, to create the working import key. It is this process that is subverted in Bond’ attack to change the type of a key. The last API operator, Key Translate, is used to encrypt a key under a different key-encryption-key. This series of commands builds up a working key from individual parts and can be used in one of two ways. Either the first, the middle and last commands can be used. In order to provide security through separation of duty, the commands are split into three groups, with individuals only allowed access to one, so the combination of these three commands allows more than one individual to obtain completed working keys. The other combination ensures that the people responsible for inserting the key parts cannot obtain a final key and the person who obtains the final key cannot modify it in any way. In this specification Xdenotes a sort Msg,eK, ekek, km1, km2, km3 denote a sort Key and * is the exclusive-or operator. This protocol is insecure. The attack that we found uses the same assumptions as Bond’s attack [Bond 01] in terms of the role played by the intruder and his knowledge, and this attack is the same that found K¨uesters and Truderung in [K¨uesters 11]. As a result of the attack, the intruder obtains a PIN derivation key in clear, like in the IBM attack and hence, can compute PINs from bank account numbers. We use several strands in the attack pattern to prevent the increase of the number of generated states becomes this protocol into unhandled. Since the sequence of exchanged messages of this initial state is quite long, we explain it below step by step. First, the intruder receives {km1∗km2}{IMP ∗KP ∗KM}, then he performs 59 CHAPTER 5. THE CCA SERIES OF PROTOCOLS Key Part Import Last with {k3 * pin}instead of {k3}. In this way he obtains {PIN ∗km1∗km2∗km3}{IMP ∗KM}. Next the intruder uses the same command again, this time with {k3 * pin * exp}, obtaining {PIN ∗km1∗km2∗km3}{IMP ∗KM}. Next, when {PDK}is imported, the intruder uses Key Import twice: The first time with input {PIN ∗km1∗km2∗km3}{IMP ∗KM}and {PDK}{P IN∗km1∗km2∗km3}and the results is the message {PDK}{KM}. The second time the command Key Import is used with input {PIN ∗EXP ∗km1∗km2∗km3}{IMP ∗KM}, and {PDK}{P IN∗km1∗km2∗km3} and {type = exp}, which gives the message {PDK}{EXP ∗KM}. Now, using Key Export with input {PDK}{KM}and {PDK}{EXP ∗KM}, the attacker obtains {PDK}{P DK}. Finally, using Decipher with input {PDK}{P DK}and {P DK}{KM}, the attacker obtains the clear value of PDK, which can be then used to obtain the PIN for any account number: Given an account number, the corresponding PIN is derived by encrypting the account number under PDK. 5.1.1 Symbols In the following we show how to specify the sorts and symbols for this protocol in the Maude-NPA’s syntax. More specifically, we need sorts to denote names, different kinds of keys and encrypted data. This is specified as follows: sorts Name Nonce Key Null type KPdk KData KPin KExp KImp KKek KMaster KKP . subsort Name Nonce Key < Msg . subsort KData KPin KExp KImp < type . subsort KMaster type KKek Null KKP KPdk < Key . subsort Null < KData . subsort Name < Public . subsort Null type < Public . The specification in Maude-NPA of the different key operators is as follows: 60 5.1. CCA-0 ORIGINAL op DATA : -> KData . op PIN : -> KPin . op EXP : -> KExp . op IMP : -> KImp . op KP : -> KKP . op PDK : -> KPdk . op KM : -> KMaster . These operators were previously defined in Chapter 5, We can now specify the different operators needed in CCA-0. We specify some principal names. For XOR-NSL, we have three constants of sort Name, a (for Alice), b (for Bob) and i (for the Intruder). We need two more operators: one for concatenation and one for the XOR. Message concatenation is specified in Maude-NPA via the infix operator ( ; ), which is defined as follows: op _ ; _ : Msg Msg -> Msg [gather (e E) frozen]. Next we define the characteristics of the XOR operator which is need to be define twice, one to be used with variables of type Msg and another to be used with variables of type Key. Also we indicate that both operators have the associative and commutative properties. op _ * _ : Msg Msg -> Msg [assoc comm frozen] . op _ * _ : Key Key -> Key [ditto] . Finally we define a customer’s account number (PAN)), as a constant of sort Msg operator. op PAN : -> Msg . 5.1.2 Algebraic properties In this section we specify the algebraic properties of the symbols defined above for the CCA-0 protocol, using equations apart of associative, commutative and identity properties. In CCA-0, we use two equations specifying the relationship between public and private key encryption, as follows: var X : Msg . var A : Name . eq pk(A,sk(A,X)) = X . eq sk(A,pk(A,X)) = X . 61 CHAPTER 5. THE CCA SERIES OF PROTOCOLS The properties of the XOR operator are denoted by the following equations: vars XN YN : Msg . eq null * XN = XN [variant]. eq XN * XN = null [variant] . eq XN * XN * YN = YN [variant] . Note that the redundant equational property XN ∗XN ∗Y N =Y N is necessary in Maude-NPA for coherence purposes; see [Escobar 09]. Finally as we can see in [K¨uesters 11] we use for DATA operator the following equation: eq DATA = null [variant] . We use two equations specifying the relationship between encryption and decryption, as follows: eq d(K:Key, e(K:Key, Z:Msg)) = Z:Msg [variant] . eq e(K:Key, d(K:Key, Z:Msg)) = Z:Msg [variant] . 5.1.3 Strand specification For this protocol we have followed the original protocol specification instead of the version described in [K¨uesters 11], which is a simplified version of the original protocol. Here we show the strand specification, of the original version of the protocol, in Maude-NPA. eq STRANDS-PROTOCOL ***Strands for the transaction = :: nil :: ***Encryption with data key [nil | -(X), -(e(KM * DATA, eK)), +(e(eK, X)), nil] & :: nil :: ***Decryption with data key [nil | -(e(eK, X)), 62 5.1. CCA-0 ORIGINAL -(e(KM * DATA, eK)), +(X), nil] & :: nil :: ***Key Import [nil | -(e(kek * T, eK)), -(T), -(e(KM * IMP, kek)), +(e(KM * T, eK)), nil] & :: nil :: ***Key Export [nil | -(e(KM * T, eK)), -(T), -(e(KM * EXP, ekek)), +(e(ekek * T, eK)), nil] & :: nil :: ***Key Part Import First [nil | -(km1), -(T), +(e(KM * KP * T, km1)), nil] & :: nil :: ***Key Part Import Middle [nil | -(km2), -(T), -(e(KM * KP * T, km1)), +(e(KM * KP * T, km1 * km2)), nil] & :: nil :: ***Key Part Import Last [nil | -(km3), -(T), -(e(KM * KP * T, km2)), +(e(KM * T, km2 * km3)), nil] [nonexec] . where Xis a variable of sort Msg,K, kek, km1, km2 and km3 are variables of sort Key and Tis a variable of sort Type. The intruder capabilities are specified by the following strands: 63 CHAPTER 5. THE CCA SERIES OF PROTOCOLS eq STRANDS-DOLEVYAO = :: nil :: [nil | -(X), -(Y), +(X * Y), nil ] & :: nil :: [nil | -(X), -(K), +(e(K,X)), nil ] & :: nil :: [nil | -(X), -(K), +(d(K,X)), nil ] & :: nil :: [nil, +(Km3) | nil] & :: nil :: [nil, +(PIN) | nil] & :: nil :: [nil, +(IMP) | nil] & :: nil :: [nil, +(EXP) | nil] & :: nil :: [nil | +(null), nil] & :: nil :: [nil, +(e(KM * KP * IMP, Km1 * Km2)) | nil] & :: nil :: [nil, +(e(Km1 * Km2 * Km3 * PIN, PDK)) | nil] [nonexec] . where variables Xand Ydenote messages and variable Kdenotes a sort key. The first strand allows the intruder to perform the XOR. The second and third strands allows the intruder to perform encryption and decryption. The fourth, fifth, sixth and seventh strands allow the intruder to generate different kind of keys. The eight strand allows the intruder to generate the XOR null element. As we can see in [K¨uesters 11], the ninth and tenth strands show how the intruder can perform KP ILast and how the key kek(Km1∗Km2∗Km3) is used to import a new PIN-derivation key (PDK) to the security module, respectively. 5.1.4 Protocol analysis The specifications of the attack in Maude-NPA is as follows: eq ATTACK-STATE(0) = empty || e(PDK, PDK) inI || nil || nil || NP: NeverPatterns [nonexec] . where NP denotes a set of ?Never patterns? to reduce the search space (See Appendix A). The number of generated states in the different levels with Maude-NPA tool is as follows: 64 5.1. CCA-0 ORIGINAL reduce in MAUDE-NPA : summary(1) . result Summary: States>> 1 Solutions>> 0 reduce in MAUDE-NPA : summary(2) . result Summary: States>> 3 Solutions>> 0 reduce in MAUDE-NPA : summary(3) . result Summary: States>> 5 Solutions>> 0 reduce in MAUDE-NPA : summary(4) . result Summary: States>> 13 Solutions>> 0 reduce in MAUDE-NPA : summary(5) . result Summary: States>> 8 Solutions>> 0 reduce in MAUDE-NPA : summary(6) . result Summary: States>> 7 Solutions>> 1 For this attack pattern Maude-NPA finds an initial state as it was expected. The sequence of exchanged messages of the attack is as follows: +(e(PIN * Km1 * Km2 * Km3, PDK)), +(e(IMP * KM, PIN * EXP * Km1 * Km2 * Km3)), -(e(PIN * Km1 * Km2 * Km3, PDK)), -(EXP), -(e(IMP * KM, PIN * EXP * Km1 * Km2 * Km3)), +(e(EXP * KM, PDK)), +(e(IMP * KM, PIN * Km1 * Km2 * Km3)), -(e(PIN * Km1 * Km2 * Km3, PDK)), -(null), -(e(IMP * KM, PIN * Km1 * Km2 * Km3)), +(e(KM, PDK)), -(e(KM, PDK)), -(null), -(e(EXP * KM, PDK)), +(e(PDK, PDK)) 65 CHAPTER 5. THE CCA SERIES OF PROTOCOLS 5.2 CCA-0 version of K¨uesters and Truderung In this section we describe the specification and analysis of the version of the original CCA-0 protocol they made K¨uesters and Truderung in [K¨uesters 11] (CCA-0 K¨uesters and Truderung). The informal description of the CCA API is as follows: API Operator Description Encipher x, {eK}{KM∗DAT A}→ {x}eK Decipher {x}eK,{eK}{KM∗DAT A}→x Key Export {eK}(KM∗T}, T, {ekek}{KM∗EXP }→ {eK}(ekek∗T) Key Import {eK}(kek∗T}, T, {kek}{KM∗IMP }→ {eK}{KM∗T} KPI-First + KPI-Add/Middle km12, T → {KM * KP * IMP} Key Part Import Last x, T, KM * KP * T →(x){KM∗T} x, IMP →(X * km12){KM∗IMP } The Encipher,Decipher,Key Export and Key Import API operators are the same that the CCA-0 original protocol (see Section 5.1). The KPI-First + KPI-Add/Middle and Key Part Import Last API operators are the equivalent to the original Key Part Import First ,Key Part Import Middle and Key Part Import Last API operators. They do these modifications to the originals API operators because they had problems to manage the entire exclusive-or theory. The way that this version of the protocol works is the same that for original version (see Section 5.1). All the variables are the same that for the CCA-0 original protocol except the km12 variable that denotes a sort Key. This protocol is insecure as the original CCA-0 protocol. The attack is the same that we could found in the original version (see Section 5.1) 5.2.1 Symbols All the symbols are the same that for the original version of the protocol except the one for the km12 variable . This is specified in Maude-NPA as follows: sorts Key Msg . subsort Key < Msg . 66 5.2. CCA-0 VERSION OF K¨ UESTERS AND TRUDERUNG We can now specify the km12 variable as follows: var km12 : Key . The specification in Maude-NPA of the different key operators are the same that for the original version of the protocol (see Section 5.2) 5.2.2 Algebraic properties The algebraic properties of this protocol version are the same than in the original version (see Section 5.1.2). 5.2.3 Strand specification The strand specification is the same than in the original version (see Section 5.1.3) except for the Key Part Import Last operator. Here we show the specification of the K¨uesters and Truderung version of this API operator in Maude-NPA. :: nil :: *** Key Import Last [nil | -(X), -(T), -(KM * KP * T), +(e(KM * T, X)), nil] & :: nil :: *** Key Import Last [nil | -(X), -(IMP), +(e(KM * IMP, X * km12)), nil] [nonexec] . where Xis a variable of sort Msg,km12 is a variable of sort Key and Tis a variable of sort Type. The intruder capabilities are specified by the following strands: eq STRANDS-DOLEVYAO = :: nil :: [nil | -(X), -(Y), +(X * Y), nil ] & :: nil :: [nil | -(X), -(K), +(e(K,X)), nil ] & :: nil :: [nil | -(X), -(K), +(d(K,X)), nil ] & 67 CHAPTER 5. THE CCA SERIES OF PROTOCOLS reduce in MAUDE-NPA : summary(6) . result Summary: States>> 0 Solutions>> 0 The protocol is secure against this attack and, when this protocol is analyzed with Maude-NPA, it generates a finite search state space finding no initial state for the attack pattern above. 5.6 CCA-1B version of K¨uesters and Truderung In this section, we explain the specification and analysis of the the version they made K¨uesters and Truderung in [K¨uesters 11] of the original CCA-1B protocol. In this section we describe the specification and analysis of the version of the CCA-1B protocol they made K¨uesters and Truderung in [K¨uesters 11]. The difference between this version and the original version is that they cannot handle the entire exclusive-or theory and because of that should transform the original Key Translate API operator: {eK}ekek1∗T, T, {ekek1}KM∗IMP ,{ekek2}KM∗EXP → {eK}(ekek2∗T) into these two rules: {eK}ekek1∗T, T, {ekek1}KM∗IMP →transf(eK,T) transf(eK,T), {ekek2}{KM∗EXP }→ {eK}(ekek2∗T) 5.6.1 Symbols The symbols that we use for this version of the protocol are the same that we use for the original one (see Section 5.1.1) except the one for the transf function. This is specified as follows: op transf : Key Tipo -> Tipo [frozen] . This operator is used in Key Translate API operator to translate a key from encryption under one KEK (of import type) to encryption under another (of export type). 74 5.6. CCA-1B VERSION OF K¨ UESTERS AND TRUDERUNG 5.6.2 Algebraic properties The algebraic properties of this protocol version are the same than in the original version (see Section 5.1.2). 5.6.3 Strand specification The strand specification that we use for this subset of the API operators of the protocol are the same that we use for the version of the original one (see Section 5.2.3) made by K¨uesters and Truderung, and two new API operators, one called PKA Symmetric Key Import, and a second one called Key Translate The specification in Maude-NPA of the first one is as follows: :: nil :: ***PKA Symmetric Key Import [nil | -(e(PKA, eK ; T)), +(e(KM * T, eK)), nil] And the specification in Maude-NPA of the second one is as follows: :: nil :: *** Key Translate [nil | -(e(Kek1 * T, eK)), -(T), -(e(KM * IMP, Kek1)), +(transf(eK, T)), nil] & :: nil :: *** Key Translate [nil | -(transf(eK, T)), -(e(KM * IMP, Kek2)), -(e(Kek2 * T, eK)), nil] [nonexec] . The intruder capabilities that we use for this protocol are the same that we use for the CCA-0 protocol (see Section 5.1.3). 5.6.4 Protocol analysis We use the same attack pattern of the CCA-0 protocol in Section 5.1.4, to prove if the recommendation works as it should. 75 CHAPTER 5. THE CCA SERIES OF PROTOCOLS The number of generated states in the different levels with Maude-NPA tool is as follows: reduce in MAUDE-NPA : summary(1) . result Summary: States>> 1 Solutions>> 0 reduce in MAUDE-NPA : summary(2) . result Summary: States>> 0 Solutions>> 0 The protocol is secure against this attack and, when this protocol is analyzed with Maude-NPA, it generates a finite search state space finding no initial state for the attack pattern above. 5.7 IBM’s second recommendations to avoid the attack In order to avoid the attack of the CCA-0 protocol explained in section 5.1.4, IBM suggested another recommendation. This recommendation use the Access Control System. Users of IBMs 4758 HSM are assigned to roles that determine which commands they are allowed to execute. The goal is to prevent one single individual from having access to all the commands required to mount Bonds attack. This is enforced using access controls. IBM provide an example of the KEK transfer process involving five roles (A -E) such that no single role is able to mount the attack, as we can see in the next table 76 5.7. IBM’S SECOND RECOMMENDATIONS TO AVOID THE ATTACK Person Responsibilities Commands A the two clear key parts, using the Random Number Generate command, and the key verification pattern (KVP) for the complete key encryption key (KEK). The First key part is given to person B, the second to person C, and the verification pattern to persons C and E. Not Applicable B Enters the first key part into the destination security module. Key Part Import 1 C Enters the two clear key parts, using the Random Number Generate command, and the key verification pattern (KVP) for the complete key encryption key (KEK). The First key part is given to person B, the second to person C, and the verification pattern to persons C and E. Key Part Import 3 Key Test D Distributes the PIN derivation key (PDK) encrypted under KEK. Not Applicable E Verifies that the KEK is correct, then imports the PDK. Key Import. Key Test Table 5.3: Roles described by IBM in their 2nd recommendation. 77 CHAPTER 5. THE CCA SERIES OF PROTOCOLS The different API operators and their description for the IBM’s second recommendation are as follows: API Operator CCA-2B CCA-2C CCA-2E Encipher X X X Decipher X X X Key Export X X X Key Import X X Key Part Import First X X Key Part Import Last X Key Test X X Table 5.4: CCA Original API operators for the IBM’s second recommendation. API Operator CCA-2B CCA-2C CCA-2E Encipher X X X Decipher X X X Key Export X X X Key Import X X Key Part Import First X X Key Part Import Last X KPI-First + KPI- Add/Middle X X Table 5.5: CCA version of K¨uesters and Truderung API operators for the IBM’s second recommendation. The Key Test API operator command is the equivalent to the KPI-First + KPI-Add/Middle API operator command of the version of the protocol of K¨uesters and Truderung. It’s important to highlight that even though “Key Part Import Last” API operator has the same name in both versions, the specification is different. At the original version, the informal specification is as follows: Key Part Import Last km3, km2{KM∗KP ∗T}, T →(km2 * km3){KM∗KP ∗T} Meanwhile for the second one, the modified version of the protocol that made 78 5.8. CCA-2B K¨uesters and Truderung in [K¨uesters 11], the informal specification is as follows: Key Part Import Last x, T, KM * KP * T →(x){KM∗T} x, IMP →(X * km12){KM∗IMP } To implement this recommendation, additional access control needs to be assumed, to ensure that no single role is able to perform an attack. From Sections 5.8 to the 5.10 we follow these recommendations of the CCA protocol. For this second recommendation, we specify the original CCA-2B, CCA-2C and CCA-2E and a version of CCA-2C they made K¨uesters and Truderung of the original specification of the CCA-2C protocol. This is the only that has different specifications of the original protocol due to their problems to handle the entire exclusive-or theory as you could see in Section 5.7. 5.8 CCA-2B In this section following the second recommendation of IBM we implement the role of person B, who enters the first key part into the destination security module as shown in Table 5.3. 5.8.1 Symbols The symbols that we use for this version of the protocol are the same that we use for the original one (see Section 5.1.1). 5.8.2 Algebraic properties The algebraic properties of this protocol version are the same than in the original version (see Section 5.1.2). 5.8.3 Strand specification The strand specification that we use for this subset of the API operators of the protocol are the same that we use for the original one (see Section 5.1.3). The intruder capabilities that we use for this protocol are the same that we use for the CCA-0 protocol (see Section 5.1.3). 79 CHAPTER 5. THE CCA SERIES OF PROTOCOLS 5.8.4 Protocol analysis We use the same attack pattern of the CCA-0 protocol in Section 5.1.4, but in this case NP denotes a different set of ?Never patterns? to reduce the search space (See Appendix B). The number of generated states in the different levels with Maude-NPA tool is as follows: reduce in MAUDE-NPA : summary(1) . result Summary: States>> 3 Solutions>> 0 reduce in MAUDE-NPA : summary(2) . result Summary: States>> 1 Solutions>> 0 reduce in MAUDE-NPA : summary(3) . result Summary: States>> 3 Solutions>> 0 reduce in MAUDE-NPA : summary(4) . result Summary: States>> 1 Solutions>> 0 reduce in MAUDE-NPA : summary(5) . result Summary: States>> 10 Solutions>> 0 reduce in MAUDE-NPA : summary(6) . result Summary: States>> 7 Solutions>> 0 reduce in MAUDE-NPA : summary(7) . result Summary: States>> 7 Solutions>> 0 reduce in MAUDE-NPA : summary(8) . result Summary: States>> 2 Solutions>> 0 reduce in MAUDE-NPA : summary(9) . result Summary: States>> 10 Solutions>> 0 reduce in MAUDE-NPA : summary(10) . 80 5.9. CCA-2C result Summary: States>> 6 Solutions>> 0 reduce in MAUDE-NPA : summary(11) . result Summary: States>> 0 Solutions>> 0 The protocol is secure against this attack and, when this protocol is analyzed with Maude-NPA, it generates a finite search state space finding no initial state for the attack pattern above. 5.9 CCA-2C In this Section we describe a version of the CCA protocol fulfilling IBM’ second recommendation. This protocol version implements the role of person C, enters the second key part and verifies that the completed KEK is correct by checking the Key Verification Pattern (KVP).Key Test verifies that the completed KEK is correct by checking the key verification pattern (KVP), that can be specified. The informal description of this operator is as follows: Key Test :: nil :: [ nil |+(e(KM * KP * IMP, Km1 * Km2)), nil] 5.9.1 Symbols The symbols that we use for this version of the protocol are the same that we use for the original one (see Section 5.1.1). 5.9.2 Algebraic properties The algebraic properties of this protocol version are the same than in the original version (see Section 5.1.2). 5.9.3 Strand specification The strand specification that we use for this subset of the API operators of the protocol are the same that we use for the original one (see Section 5.2.3), and a new one called Key Test. 81 CHAPTER 5. THE CCA SERIES OF PROTOCOLS The intruder capabilities that we use for this protocol are the same that we use for the CCA-0 protocol (see Section 5.1.3). 5.9.4 Protocol analysis We use the same attack pattern of the CCA-0 protocol in Section 5.1.4, but in this case NP denotes a different set of ?Never patterns? to reduce the search space (See Appendix B). The number of generated states in the different levels with Maude-NPA tool is as follows: reduce in MAUDE-NPA : summary(1) . result Summary: States>> 1 Solutions>> 0 reduce in MAUDE-NPA : summary(2) . result Summary: States>> 3 Solutions>> 0 reduce in MAUDE-NPA : summary(3) . result Summary: States>> 15 Solutions>> 0 reduce in MAUDE-NPA : summary(4) . result Summary: States>> 31 Solutions>> 0 reduce in MAUDE-NPA : summary(5) . result Summary: States>> 38 Solutions>> 0 reduce in MAUDE-NPA : summary(6) . result Summary: States>> 17 Solutions>> 0 reduce in MAUDE-NPA : summary(7) . result Summary: States>> 26 Solutions>> 0 At the original version of the protocol (see Section 5.1.4), the attacker just needs seven steps to find an initial state for the attack-state, so we could assume that if in this version we reached the seventh step without finding an initial state, the tool won’t find a solution for this attack, so the protocol is secure. 82 5.10. CCA-2C VERSION OF K¨ UESTERS AND TRUDERUNG This bound could be set much higher, but informal analysis of the tool’s output, shows that the intruder never would be able to obtain any useful new terms. At TACAS’s paper [Cortier 07] they do the following assumption for the same protocol: Person Bound Analysed States Reachable States Run-Time (s) C 3 413 68 58.22 where they do a similar assumption to ours to arrive to the same conclusion. 5.10 CCA-2C version of K¨uesters and Truderung In this section we describe the specification and analysis of the version of the CCA-2C protocol they made K¨uesters and Truderung in [K¨uesters 11]. 5.10.1 Symbols The symbols that we use for this version of the protocol are the same that we use for the original one (see Section 5.2.1). 5.10.2 Algebraic properties The algebraic properties of this protocol version are the same than in the original version (see Section 5.2.2). 5.10.3 Strand specification The strand specification that we use for this subset of the API operators of the protocol are the same that we use for the original one (see Section 5.2.3), and a new one called Key Test using the same specification that in the original version for this API operator . The difference between this version of K¨uesters and Truderung [K¨uesters 11] and the original version is the specification of the Key Import Last API operator as we could see in Section 5.7. You could see the specification of the Key Import Last API operator in Maude-NPA in Section 5.2.3. 83 BIBLIOGRAPHY R. (ed.) Proceedings of the 20th International Conference on Rewriting Techniques and Applications (RTA2009), Brasilia, Brazil. LNCS. Springer, Heidelberg 2009 [Chevalier 08] Chevalier, Y., Rusinowitch, M.: Hierarchical combination of intruder theories. Inf.Comput. 206(2-4), 352-377 (2008) [Ciobˆaca 09] Ciobˆaca, S., Delaune, S., Kremer, S.: Computing knowledge in security protocols under convergent equational theories. In: Schmidt, R. (ed.) Proceedings of the 22nd International Conference on Automated Deduction (CADE 2009), Montreal, Canada. LNCS (LNAI). Springer, Heidelberg 2009 [Durgin 04] Durgin, N., Lincoln, P., Mitchell, J., Scedrov, A.: Multiset rewriting and the complexity of bounded security. Journal of Computer Security, 677-722 (2004) [Millen 87] Millen, S.F.J.K., Clark, S.C.: The interrogator: Protocol security analysis. IEEE Transactions on Software Engineering, 274-288 (February 1987) [Lowe 96] Lowe, G.: Breaking and fixing the Needham-Schroeder public-key protocol using FDR. Software Concepts and Tools 17, 93-102 (1996) [Meadows 96] Meadows, C.: The NRL protocol analyzer: An overview. Journal of logic program-ming 26(2), 113-131 (1996) [Mitchell 97] Mitchell,J.,Mitchell,M.,Stern,U.:Automated analysis of cryptographic protocols using Murphi. In: IEEE Symposium on Security and Privacy. IEEE Computer Society, Los Alamitos (1997) [Paulson 98] Paulson, L.C.: The inductive approach to verifying cryptographic protocols. Journal of Computer Security 6(1-2), 85-128 (1998) [Rusinowitch 01] Rusinowitch, M., Turuani, M.: Protocol insecurity with a finite number of sessions and composed keys is NP-complete. In: 14th IEEE Computer Security Foundations Workshop, pp. 174-190 (2001) [Ryan 98] Ryan, P.Y.A., Schneider, S.A.: An attack on a recursive authentication protocol. a cautionary tale. Inf. Process. Lett. 65(1), 7-10 (1998) 90 BIBLIOGRAPHY [Stubblebine 00] Stubblebine, S., Meadows, C.: Formal characterization and automated analysis of known-pair and chosen-text attacks. IEEE Journal on Selected Areas in Communications 18(4), 571-581 (2000) [K¨uesters 11] Ralf K¨uesters, Tomasz Truderung: Reducing Protocol Analysis with XOR to the XOR-Free Case in the Horn Theory Based Approach. J. Autom. Reasoning 46(3-4): 325-352 (2011) [Keifgren 07] Gavin Keifgren, Graham Steel and Alan Bundy. Analysing IBMs Common Cryptographic Architecture API with a Protocol Analysis Tool. ACM Journal Name, Vol. V, No. N, May 2007 [Bond 01] Bond, M.: Attacks on cryptoprocessor transaction sets. In: Cryptographic Hardware and Embedded SystemsCHES 2001. Third International Workshop. Lecture Notes in Computer Science, vol. 2162, pp. 220234. Springer, Heidelberg (2001) [Shoup 96] Shoup, V., Rubin, A.: Session key distribution using smart cards. In: Advances in Cryptology EUROCRYPT 96, International Conference on the Theory and Application of Cryptographic Techniques. Lecture Notes in Computer Science, vol. 1070, pp. 321331. Springer, Heidelberg 1996 [Chevalier 05] Chevalier, Y., Ralf K¨uesters, R., Rusinowitch, M., Turuani, M.: An NP decision procedure for protocol insecurity with XOR. Theor. Comput. Sci. 338(1-3): 247-274, 2005 [Dolev 83] D. Dolev, A. Yao. On the security of public key protocols. IEEE Transaction on Information Theory, vol. 29, no. 2, pages 198208, 1983 [Escobar 09] S. Escobar, C. Meadows, J. Meseguer. Maude-NPA: Cryptographic Protocol Analysis Modulo Algebraic properties. In A. Aldini, G. Barthe, R. Gorrieri, editeurs, FOSAD 2008/2009 Tutorial Lectures, volume 5705 of LNCS, pages 150. Springer, 2009. [Escobar 09a] S. Escobar, C. Meadows and J. Meseguer. Maude-NPA: Cryptographic Protocol Analysis Modulo Equational Properties. In A. Aldini, G. Barthe and R. Gorrieri, editeurs, FOSAD 2008/2009 Tutorial Lectures, volume 5705 of LNCS, pages 1-50. Springer, 2009. [Escobar 09b] Santiago Escobar, Catherine Meadows and Jos´e Meseguer. Maude-NPA, version 1.0. University of Illinois at Urbana-Champaign, March 2009. Available at http://maude.cs.uiuc.edu/tools/Maude-NPA. 91 BIBLIOGRAPHY [Escobar 14] S. Escobar, C. Meadows, J. Meseguer, S. Santiago. State Space Reduction in the Maude-NRL Protocol Analyzer, In Information and Computation, to appear, 2014 [Bull 97] Bull, J.A., Otway, D.J.: The authentication protocol. Technical Report. DRA/CIS3/PROJ/ CORBA/SC/1/CSM/436-04/03, Defence Research Agency, Malvern, UK, 1997 [Bella 03] Giampaolo Bella. Inductive verification of smart card protocols, in Journal of Computer Security 11 (2003) 87132 87 IOS Press [Cortier 07] V. Cortier, G. Keighren and G. Steel. Automatic Analysis of the Security of XOR-based Key Management Schemes, in Tools and Algorithms for the Construction and Analysis of Systems (TACAS’07) [Lowe 96] G. Lowe, Breaking and fixing the Needham-Schroeder public-key protocol using FDR, in: Tools and Algorithms for the Construction and Analysis of Systems (TACAS 1996), Lecture Notes in Computer Science, Vol. 1055, Springer, Berlin, 1996, pp. 147-166 [Maude 09] M.Clavel, F.Dur´an, S.Eker, P.Lincoln, N.Mart´ı-Oliet J.Meseguer C.Talcott. Maude Manual (Version 2.4), October 2008 (Revised February 2009) [Comon-Lundh 03] H. Comon-Lundh, V. Shmatikov. Intruder Deductions, Constraint Solving and Insecurity Decision in Presence of exclusive-or. LICS 2003: 271 [K¨usters 08] K¨usters, R., Truderung, T.: Reducing protocol analysis with XOR to the XOR-free case in the Horn theory based approach. In: Proceedings of the 15th ACM Conference on Computer and Communications Security (CCS 2008), pp. 129-138. ACM, New York, 2008 [Meseguer 92] J. Meseguer. Conditional Rewriting Logic as a Unified Model of Concurrency. Theoretical Computer Science, vol. 96, no. 1, pages 73-155, 1992 [TeReSe 03] TeReSe, editor. Term rewriting systems. Cambridge University Press, Cambridge,2003 [Thati 07] P. Thati and J. Meseguer. Symbolic reachability analysis using narrowing and its application verification of cryptographic protocols, J. 92 BIBLIOGRAPHY Higher-Order and Symbolic Computation, 2007, volume 20, number 1- 2, pages 123-160 [Escobar 12] Santiago Escobar, Ralf Sasse and Jos´e Meseguer, Folding Variant Narrowing and Optimal Variant Termination,J. Log. Algebr. Program., 2012, [Keighren 06] Gavin Keighren. Model Checking IBM’s Common Cryptographic Architecture API. Informatics Research Report 862, SCHOOL of INFORMATICS, October 2006 [DES Encryption] Data Encryption Standard (DES), Dec. 1993. Federal Information Processing Standards publication 46-2. Available online at www.itl.nist.gov. [Meseguer 98] J. Meseguer. Membership algebra as a logical framework for equational specification. In F. Parisi-Presicce, editor, Proc. WADT-97, pages 18-61. Springer LNCS 1376, 1998. [Escobar 06] Escobar, S., Meadows, C., Meseguer, J., 2006. A rewriting-based inference system for the NRL protocol analyzer and its meta-logical properties. Theor. Comput. Sci. 367 (1-2), 162–202. [Escobar 09c] Escobar, S., Meadows, C., Meseguer, J., 2009. Maude-NPA : Cryptographic protocol analysis modulo equational properties. In: Aldini, A., Barthe, G., Gorrieri, R. (Eds.), FOSAD 2008/2009 Tutorial Lectures. Vol. 5705 of LNCS. Springer, pp. 1-50. [Maude-NPA 09] Maude-NPA : Escobar, S., Meadows, C., Meseguer, J.: Maude-NPA, version 1.0. University of Illinois at Urbana-Champaign (March 2009) [Chen 09] Xihui Chen, Ton van Deursen, Jun Pang: Improving Automatic Verification of Security Protocols with XOR. ICFEM 2009: 107-126 [Steel 05] Graham Steel: Deduction with XOR Constraints in Security API Modelling. CADE 2005: 322-336 [Proverif 10] ProVerif: Cryptographic protocol verifier in the formal model 93 BIBLIOGRAPHY 94 Appendix A Never Patterns in CCA-0 Protocol (S:StrandSet || (e(#0:Key, KM * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (PDK inI,K:IntruderKnowledge)) (S:StrandSet || (e(EXP,PDK) inI,K:IntruderKnowledge)) (S:StrandSet || (e(Km1 * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(Km2 * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(Km3 * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(EXP * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(PDK * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(PIN * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((Km1 * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((Km2 * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((KM * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((KP * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((PDK * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(#0:Key, IMP * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * Km2 * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * EXP * Km2 * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * Km1 * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * EXP * Km1 * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (#0:Msg * e(IMP * KM, PIN * EXP * Km1 * Km2 * Km3)) inI,K:IntruderKnowledge) (S:StrandSet || (#0:Msg * e(IMP * KM, PIN * Km1 * Km2 * Km3)) inI,K:IntruderKnowledge) (S:StrandSet || (#0:Msg * e(IMP * KP * KM, Km1 * Km2 * #1:Key)) inI,K:IntruderKnowledge) (S:StrandSet || (#0:Msg * e(IMP * KP * KM, Km1 * Km2)) inI,K:IntruderKnowledge) (S:StrandSet || (#0:Msg * e(IMP * KP * KM, Km1 * Km2 * #1:Key)) inI,K:IntruderKnowledge) (S:StrandSet || (Km1 inI,K:IntruderKnowledge)) (S:StrandSet || (Km2 inI,K:IntruderKnowledge)) (S:StrandSet || (Km3 inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * Km1 * Km2 * #0:Key) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, Km1 * Km2 * #1:Key) inI,K:IntruderKnowledge)) (S:StrandSet || ((PIN * EXP) inI,K:IntruderKnowledge)) (S:StrandSet || ((EXP * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (#0:Msg * e(#0:Key, #1:Msg)) inI,K:IntruderKnowledge) 95 APPENDIX A. NEVER PATTERNS IN CCA-0 PROTOCOL (S:StrandSet || (e(KP * KM, #0:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(#0:Key, null) inI,K:IntruderKnowledge)) (S:StrandSet || (e(PIN * EXP * Km1 * Km2 * Km3, PDK) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KM, #0:Tipo * #1:EKey) inI,K:IntruderKnowledge)) (S:StrandSet || (e(null, PDK) inI,K:IntruderKnowledge)) 96 Appendix B Never Patterns for IBM’s recommendations (S:StrandSet || (e(#0:Key, KM * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (PDK inI,K:IntruderKnowledge)) (S:StrandSet || (e(EXP,PDK) inI,K:IntruderKnowledge)) (S:StrandSet || (e(Km1 * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(Km2 * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(Km3 * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(EXP * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(PDK * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(PIN * KP * KM,#1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((Km1 * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((Km2 * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((KM * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((KP * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || ((PDK * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(#0:Key, IMP * #1:Msg) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * Km2 * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * EXP * Km2 * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * Km1 * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * EXP * Km1 * Km3) inI,K:IntruderKnowledge)) (S:StrandSet || (#0:Msg * e(IMP * KM, PIN * EXP * Km1 * Km2 * Km3)) inI,K:IntruderKnowledge) (S:StrandSet || (#0:Msg * e(IMP * KM, PIN * Km1 * Km2 * Km3)) inI,K:IntruderKnowledge) (S:StrandSet || (#0:Msg * e(IMP * KP * KM, Km1 * Km2 * #1:Key)) inI,K:IntruderKnowledge) (S:StrandSet || (#0:Msg * e(IMP * KP * KM, Km1 * Km2)) inI,K:IntruderKnowledge) (S:StrandSet || (#0:Msg * e(IMP * KP * KM, Km1 * Km2 * #1:Key)) inI,K:IntruderKnowledge) (S:StrandSet || (Km1 inI,K:IntruderKnowledge)) (S:StrandSet || (Km2 inI,K:IntruderKnowledge)) (S:StrandSet || (Km3 inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, PIN * Km1 * Km2 * #0:Key) inI,K:IntruderKnowledge)) (S:StrandSet || (e(IMP * KP * KM, Km1 * Km2 * #1:Key) inI,K:IntruderKnowledge)) (S:StrandSet || ((PIN * EXP) inI,K:IntruderKnowledge)) (S:StrandSet || ((EXP * Km3) inI,K:IntruderKnowledge)) 97