Exploring The Ban Approach To Protocol Analysis
Exploring The Ban Approach To Protocol Analysis
Einar Snekkenes
Alcatel Telecom Norway AS
P.B 60, Bkern, 0508 Oslo 5
Norway
171
CH2986-8/91/0000/0171$01.OO 0 1991 IEEE
2 Analysis of Authentication Proto- P has said X then you also ought to believe that P
cols believes X . This is stated as :
The general idea of the BAN approach[l, 2, 3, 6, 81
to protocol analysis is to translate protocol messages,
assumptions and goals to formulae of a belief logic. A more complete collection of postulates can be found
Assumptions a,messages Xi’s and the goal I’are then in [2].
written down in the following form:
2.2 Annotated Protocols
To prove properties about protocols one employs the
notion of an annotated protocol written:
Our analysis is complete if we mana e to construct a
purely formal proof of our protocol tescription. {A}Sli * - 9 {xi}, * . Sn,{GI
2.1 Formulae and Postulates where A , Si, Xi,G are called assumption, step, asser-
Below we give an indication of the semantics of some tion and goal respectively. Occasionally, assumptions
and goals are called assertions.
of the frequently used symbols, see [2] for details.
Assume P,Q are entity identifiers, K is a key and Below we give the annotation rules of [3] formalised
X is a formula then in [SI. The effect of a protocol step is that its message
becomes visible to the recipient:
P F X : P believes X and will continue to do so A1 I- {Y}Ui + Uj : X{Y,(Vj 0X)}
for the remainder of the protocol. Entities
are assumed not to discard beliefs during a “Matching” protocol annotations can be sequentially
protocol run’. composed:
PFX: The entity P has uttered the formula X
either in the current run or in some previous
run.
A2 -w
x
t- s1 ... Y
I...
,l- Y SI... z
I...
172
_. ~
Definition 2 Ifs denotes the proiocol, Let A denote some annotation rule (typically A l l A2
or A3). Then
A1 +B1 : Xi;
...
... stands for the annotation rule instance A' obtained
An* Bn : Xn by a simultaneous substitution of X I , .. .,Xn by
Y1,...,Yn in A. Due to the column width, substi-
then S denotes ihe formula tutions of the above form may sometimes have to be
broken across lines.
(B1 0 x 1 , OXi, OXn) The next lemma states that rather than first estab-
lishing { X } S { Y } and then weakening the assumption
Let IS1 stand for the number of protocol steps in S. usin A4 to obtain { X ' , X } S { Y } (assuming X I- XI),
we &ow that we could have constructed the proof
without A4. We simply "redon the proof adding X'
Definition 3 A proofP is minimal with respect to to each assertion. Finally we apply A3 to remove ex-
a proof P' iff P and P' prove ihe same theorem, P cess instances of XI.
is some projeciion of P' and P is isomorphic t o some
labeled connected graph. Lemma 3 The rule A4' is derivable from A l , A2,
A 8.
Informally, transforming a proof to a corresponding
minimal proof removes "unnecessaryn parts of the Assume P is some proof that I-
proof. Note that a minimal proof is not unique since { Y ) where P only contains applications of
we allow annotations referenced, say n times to be 1 , A2, A3. We give a procedure for transformin P
derived m times for any m 5 n. to P' such that P' is a proof that I- { X ,X ' } S . . .f Y }
If P is a proof, then P ( i ) denotes the i'th annotation and P' only contains instances of A l l A2, AX If AX
rule application of P . is an annotation rule, then let AXk be a particular
instance of AX as shown below. In 1 we extract the
old values of the variables and in 2 we construct a new
Lemma 1 For all proofs P', there is some proof P instance of the rule from old variable values and new
such that P is minimal with respect to P'. formulae.
For each instance
Proof : We give the outline of a procedure for
transforming an arbitrary proof to some correspond-
ing minimal proof. Assume P' proves T . Since P' is
a proof, it corresponds to some finite forest where at
least one of the trees in the forest, say a has the root of A1 in P use instead the instance
T. Finally, a can be linearised to some proof P such
that P is a projection of P'.
0
Similarly, for each instance of A2 in P
Lemma 2 I f P = P<P2'XP32 is a proof ofT, >
0 , A is the instance ofsome annotation rule and each
premise of A occurs in the conclusion of some rule
instance in P I , then P' = PlnKP2-P3 is also a proof use instead the instance
of T .
A4'
~ ~~ ~
.
I- { W y l . .{Xl 1 . . .{Xn) ,
A3: X1 I- 1 , . . .,Xn I- Xn
. .
I- {W}Sl.. {XI}..{Xj}. {Xn}
Proof : First A3 from A3'. For all Xj I- Xj where Lemma 11 If P = Pl^PZ is a proof of T =
i # j in A3' choose Xj = Xj,then A3' from A3, {Xo}Si{Xi}. . .{Xn-I}Sn{Xn} where Pi, P 2 consists
apply A3 n times. of applications of Al,A2 respectively, then Xn =
0 XOl&l...l&.
175
Proof: We first establish that all annotations occur- 4.1 An Example
ring in P are of the form {Xi}Si+l{Xi+l}. ..Sj{Xj} Consider a realtime monitoring application employ-
for some i ,j where Xi+l = Xi, si+l. ing a master computer M , and a collection of micro-
If Ali is the instance annotating Sj, then Ali = .
processor controlled sensors S I , . . ,s,. Several times
{Xi-l}Si{Xi} = {Xi-l}Si{Xi-l,%} since all A1 each day M requires information from the sensors.
instances are of the form {A}Sj (A, Sj}. Otherwise, For security reasons, sensor responses have to be giv-
en a timely digital signature such that M can be sure
no A l , A2 proof of {Xo} . . .{X,,} canxe constructed. that the response correctly reflects the sensors state.
Let P2(k) denote the k’th ste of Pa. By induction Consider the protocol PR1 stated below.
on k it is easy to show that goth premises and the
conclusion of 4 ( k ) are of the form
1. M -+ Si : Questionif
2. Si -+ M : {(Rsij,Questioni,j,Answeri,j)},-*
{Xi}si+l.. .Sj{Xj} Si
3. M + Si : { R ~ ~ j } , ; i
for some i , j . But then T also is of the form
{Xi}Si+l.. .Sj{Xj} for i = 1 , j = n. First M sends a numbered request to Si. Then Si
Finally, by induction we have that Xi = Xo,&, . . ., responds by sending a nonce (Rsi,j) together with the
so x, =XI),$,...,s,. question and answer pair, all signed with Si’s private
0 key. Finally, M sends Rsi,j (signed with M’s private
key) to Si.
Theorem 1 For all assumpfions, protocols and goals To prevent replay, M keeps track of those Rs,,j’s
A, S, G: (nonces) previously received. The last message tells Si
that M received message 2. Thus, making the usual
t- {A)S{G) iff AS I- G cryptographic assumptions we have3
Mb#(Rsi,j)
1
Proof : We first show if t- {A S{G} then A , S t- G.
Assume there is a proof P o {A}S{G}, then by
lemma 10 there is some minimal proof P’ = P,^p,^p,
a1 :
a2 : M b h Si
~3 : MESi 4 (Questioni,j, Answerif)
such that lP31 = 1 and PI,Pa, P3 contains solely
applications of A l , A2, A3’ respectively. But then by
lemma 11 PlAP2is a proof that t- {A}S{A,S}. Since At the end of the protocol, M should believe the
by lemma 10 we know the structure of 4,it follows question, answer pair.
that A, S I- G.
What remains is to show is that if A , S I- G fhen r: Mb(Questionij, Answerj,j)
I- {A}S{G}. By IS1 applications of A1 and IS1 - 1
applications of A2, we obtain a proof that Let o = al,a2,o3 then one can construct a purely
formal proof that
t- {A}S{A,Sl
t- {a}PRi{r}
By applying A3 once, using the assumptions A , S I- G,
we immediately obtain Unfortunately, in spite of the existence of a formal
proof, the protocol does not quite work as expected.
Consider the threat where a process C is inserted
t- {AlS{G} between M and Si. Then C may interact with Si
several times, obtaining a collection of formulae
0 { (Rsi,j, Questionij, Answeri,j))ksi, j = 1,. ..,n
This theorem applies to any reasonable extension of
BAN. This is enough information for C to violate the
security5 of the system since he has a choice of
responses he can make.
4 The Permutation Problem
3a1 : M believes that R s i , j is fresh. a1 : M believes that
In this section we first give an example illustrating Ki is a good public key for Si and that Si’s private key will
that the BAN approach cannot detect flaws caused never be discovered by any principal except Si or a principal
solely by step permutations. We then give a theorem trusted by Si. a3 : M believes that Si is competent to provide
to the effect that this applies to any protocol. By correct question and answer pairs.
means of an example we also show that it is likely ‘If the assumptiomai,a4,a3 don’t hold, some of the BAN
that any proposed zero knowledge [5, 7] extension inference rules will fail to be applicable resulting in a possible
to BAN will fail in detecting serious flaws in such failure of the god of the protocol.
authentication protocols. 5We use the term recvrity in a broad sense.
176
By a slight modification of the message orderin (in- 1 . Choose k random numbers S I , ...,Sk in 2,.
terchange messages 2 and 3 and letting M decik the
2. Choose each I j (randomly and independently) as
6
value of each I& * this new and more dependable)
protocol PR2 wid essentially ave the same idealiza-
tion as P R I . Furthermore, we may construct a purely
f l / q ( m o d n).
formal proof that I- { ~ Y } P R ~ { I ' } . 3. Publish I = 1 1 , .. .,I k and keep S = S I , .. .,Sk
secret.
4.1.1 A Generalisation where n is the product of two primes of the form 4n+3.
The actual authentication protocol (FFS)is:
The step permutation problem is in fact applicable to
any protocol. Repeat 1 - 4 t times:
in
5 The Termination Problem where A , S is in some sense inconsistent. From
theorem 1 it follows that { A } S { G } is provable.
Now we turn t o a slightly different problem, highlight- However, the solution to the above problems is well
ed in [19]. Consider the idealized protocol P: known: a statement or protocol siep S terminates
after finite iime only if FALSE is not a derivable
M1 A+B assertion succeeding S.
We now present a partial solution to the above
M2 B 4 A problem. Let F denote some formula of BAN logic,
P , Q be entity identifiers and K be a key. Then we
Let a = 01,. . . , a 5 denote the assumptions of the have
protocol where:
Definition 5 Let A : Formula Formula where
a1 :
a2 :
P A Q
when K is a symmetric k e y
as : when K is a public key
a4 : F when K" is a private key
cy5 :
P 0A ( F )
Let r = I'll.. .,r4 denote the goals of the protocol
where:
rl : A~A~*B
r2 : B F A E A ~ B
r3 : B ~ A - B 6
Informally, A F) projects out the parts of F observ-
able without aving access to private or symmetric
keys.
r4 : A E B E A&
K B
Definition 6 When X is a subformula of Y we write
Then it is easy to show that I- { a } P { r }is derivable in x 5Y.
the BAN lo ic presented in[2]. It is noted in [19] that
in spite of &e existence of a "BAN security proof", We now introduce the termination rules T1 and T2.
the protocol P is obviously insecure6. Intuitively, TI corresponds to the requirement that
In the remainder of this section we take the view only the owner of the session key K and trusted
that the above problem occurs since BAN logic only entities should be able to derive formulae in which
considers partial correctness. K occurs non-encrypted.
Consider the annotation rule of the assignment Rule T1 states that if from the assumption that P
statement believes a can derive that P believes that some
{P,X}X := e { P } (where Q is not known to be trusted wrt. the key 18
can observe K and that P believes that K is a good
stated in [lo]. Since we have key, then we can derive Ifrom a.
-
~1 c--)
178
reflecting the assumption that sent messages are Proof : From theorem 3 it suffices to show
visible to some arbitrary large finite collection of cu,
Ml+m,M2" I-L.
entities. Assume
a,Ml". M2" (4)
Let S" denote the protocol S modified such that
all messages are observable by at least all parties From 4
participating in the protocol.
C 0 {N*,A B}K~-I for C # A , B (5)
Definition 7 Let From definition 5
*m
: Idealized protocol + Idealized protocol
A((NA,A Ka } ( N A , AK
B } K ~ - I= a
B) (6)
where: From the assumptions in 4
Sm= S When (SI= O
(Pi + Pj : Xi;S)" = (Pi + PI : X i ; A F A KABB (7)
From T2,4,5
179
rules Al(Al’), A2, A3, A4 and is almost independent [7] S. Goldwasser, S . Micali, and C. Rackoff. Knowl-
of the logic. However, the step permutation problem edge complexity of interactive proof system-
can be reatly reduced by only allowing the first s. SIAM Journal of Computing, 18(1):186-208,
sender o f a nonce n t o assume the freshness of n. 1989.
We have suggested that an apparent flaw in the BAN
logic[l9] is due to BAN 1oe;icbeing restricted to partial [8] L. Gong, R. Needham, and R.Yahalom. Reason-
correctness and not termmation. By introducing an ing about belief in cryptographic protocols. In
extra termination proof obligation, we have indicated Proceedings of the IEEE Computer Society Sym-
how the BAN logic can be used to detect a broader posium on Security and Privacy, pages 234-248,
class of security flaws. Employing the notion of 1990.
termination, it has been shown that the protocol due
to D.Nessett does not terminate. [9] Joseph Y. Halpern and Michael 0. Rabin. A logic
to reason about likehood. Ariifical Intelligence,
Work suggests that termination proofs are more com- 32(3):379-405, July 1987.
plicated than the usual BAN correctness proofs.
Thus, when combining the complexity of BAN cor- [lo] C.A.R. Hoare. An axiomatic basis for computer
rectness and termination proofs with other a proach- programming. CACM,12(10):576-580,1969.
es to protocol analysis, see eg.[15, 11, 14, 12rit is by
no means obvious that the BAN approach is simpler. [ll] Tad0 Kasami, Saburo Yamamura, and Kenichi
However, in practice it may well be the case that se- Mori. A key management scheme for end-to-
curity flaws manifest themselves as partial correctneas end encryption and a formal verification of its
flaws giving the BAN approach a very attractive flaw
detection over effort ratio. -
security. Systems- Comput. Conirols, 13(3):59-
69, 1982.
Acknowledgements [12] Richard A. Kemmerer. Analyzing encryption
I would like to thank Klaus Gaarder for several helpful protocols using formal verification techniques.
comments and K t e Presttun for his encouragement IEEE Journal on Selected areas in Communica-
and continued support. Comments by the anonymous tions, 7(4):448-457, May 1989.
referees helped in improving the presentation.
[13] Dennis Longley. Expert systems applied to the
analysis of key management schemes. Computers
References and Security, 6(1):54-67, February 1987.
Michael Burrows, Martin Abadi, and Fbger
Needham. Authentication: A practical study [14] Wen-Pai Lu and Malur K. Sundareshan. Secure
in belief and action. Technical Report 138, communication in internet environments: A hier-
University of Cambridge Computer Laboratory, archical key management scheme for end-to-end
1988. encryption. IEEE Tkansactions on communica-
tions, 37(10):1014-23, October 1989.
Michael Burrows, Martin Abadi, and Roger
Needham. A logic of authentication. Technical [15] Catherine Meadows. Using narrowing in the anal-
Report 39, Digital Systems Research Center, ysis of key management protocols. In Proceedings
1989. of the IEEE Computer Society Symposium on Se-
curity and Privacy, pages 138-147, 1989.
Michael Burrows, Martin Abadi, and Ro er
Needham. A logic of authentication. A8M [16] J.K. Millen, S.C. Clark, and S.B. Freedman.
Zhnsactions on Computer Systems, 8( 1):1&36, The interrogator: Protocol security analysis.
February 1990. IEEE Tkansactions on Sofiware Engineering,
Paul-Chen Cheng and Virgil D. Gligor. On
13(2):186-208, February 1987.
the formal specification and verification of a
multiparty session protocol. In Proceedings of the [17] J.H. Moore. Protocol failures in crypto systems.
IEEE Computer Society Symposium on Security Proceedings of the IEEE, 76(5):594-602, May
and Privacy, pages 216-233,1990. 1988.
U. Feige, A.Fiat, and A. Shamir. Zero-knowledge [18] L.E. Moser. A logic of knowledge and belief
proofs of identity. Journal of Cryptology, 1(2):77- for re-ning about computer security. In Pro-
94, 1988. ceedings of the Computer Security Foundations
Workshop II, pages 57-63. IEEE Computer Soci-
K. Gaarder and E. Snekkenes. On the formal ety Press, 1989.
analysis of PKCS authentication protocols. In
-
Advances in Crypiology Auscrypt’90, Lecture [19] Dan M. Nessett. A Critique of the Burrows,
Notes in Computer Science, pages 106 - 121. Abadi and Needham Logic. Operating System
Springer, 1990. no. 453. Review, 24(2), April 1990.
180
[20] Jean-Jacques Quisquater and Louis Claude Guil- We then show that if a,S+" I-BANJ r then I-BAN'UA~
lou. Des procddb d'authentification bas& sur {a)S{I'). First construct I-BAN'UA' {a)S{p, S*m)
une publication de problbmes complexes et per-
sonnali& dont les solutions maintenues secretes
constituent autant d'accr/'editations. In Proceed-
by IS1 applications of All and IS
of A2. From the premise and 3
~nB A N W A{a)S*m{r).
~
d- 1 applications
it follows that
ings of SECURICOM, pages 149 -158,1989. U
181