Burrows–Abadi–Needham logic (also known as the BAN logic) is –Abadi–a set of rules for defining and analyzing information exchange protocols. Specifically, BAN logic helps its users determine whether exchanged information is trustworthy, secured against eavesdropping, or both. BAN logic starts with the assumption that all information exchanges happen on media vulnerable to tampering and public monitoring. This has evolved into the popular security mantra, "Don't trust the network."
A typical BAN logic sequence includes three steps: Verification of message origin Verification of message freshness Verification of the origin's trustworthiness.
BAN logic uses postulates and definitions – like all axiomatic systems – to analyze authentication protocols. Use of the BAN logic often accompanies a security protocol notation formulation of a protocol and is sometimes given in papers.
Language type
BAN logic, and logics in the same family, are decidable: there exists an algorithm taking BAN hypotheses and a purported conclusion, and that answers whether or not the conclusion is derivable from the hypotheses. The proposed algorithms use a variant of magic sets.
Alternatives and criticism
BAN logic inspired many other similar formalisms, such as GNY logic. Some of these try to repair one weakness of BAN logic: the lack of a good semantics with a clear meaning in terms of knowledge and possible universes. However, starting in the mid-1990s, crypto protocols were analyzed in operational models (assuming perfect cryptography) using model checkers, and numerous bugs were found in protocols that were "verified" with BAN logic and related formalisms. In some cases a protocol was reasoned as secure by the BAN analysis but were in fact insecure. This has led to the abandonment of BAN-family logics in favor of proof methods based on standard invariance reasoning.
Basic rules
The definitions and their implications are below (P and Q are network agents, X is a message, and K is an encryption key):
P believes X: P acts as if X is true, and may assert X in other messages. P has jurisdiction over X: P's beliefs about X should be trusted. P said X: At one time, P transmitted (and believed) message X, although P might no longer believe X. P sees X: P receives message X, and can read and repeat X. { X}K: X is encrypted with key K. fresh(X): X has not previously been sent in any message. key(K, P↔Q): P and Q may communicate with shared key K
The meaning of these definitions is captured in a series of postulates:
If P believes key(K, P↔Q), and P sees { X}K, then P believes (Q said X) If P believes (Q said X) and P believes fresh(X), then P believes (Q believes X).
P must believe that X is fresh here. If X is not known to be fresh, then it might be an obsolete message, replayed by an attacker.
If P believes (Q has jurisdiction over X) and P believes (Q believes X), then P believes X There are several other technical postulates having to do with composition of messages. For example, if P believes that Q said <X, Y>, the concatenation of X and Y, then P also believes that Q said X, and P also believes that Q said Y.
Using this notation, the assumptions behind an authentication protocol
can be formalized. Using the postulates, one can prove that certain
agents believe that they can communicate using certain keys. If the
proof fails, the point of failure usually suggests an attack which
compromises the protocol.
BAN logic analysis of the Wide Mouth Frog protocol
A very simple protocol — the Wide Mouth Frog protocol — allows two agents, A and B, to establish secure communications, using a trusted authentication server, S, and synchronized clocks all around. Using standard notation the protocol can be specified as follows:
Agents A and B are equipped with keys Kas and Kbs, respectively, for communicating securely with S. So we have assumptions:
A believes key(Kas, A↔S) S believes key(Kas, A↔S) B believes key(Kbs, B↔S) S believes key(Kbs, B↔S)
Agent A wants to initiate a secure conversation with B. It therefore invents a key, Kab, which it will use to communicate with B. A believes that this key is secure, since it made up the key itself:
A believes key(Kab, A↔B)
B is willing to accept this key, as long as it is sure that it came from A:
B believes (A has jurisdiction over key(K, A↔B))
Moreover, B is willing to trust S to accurately relay keys from A:
B believes (S has jurisdiction over (A believes key(K, A↔B)))
That is, if B believes that S believes that A wants to use a particular key to communicate with B, then B will trust S and believe it also.