8.7 Authentication Protocols
Authentication is the
technique by which a process verifies that its communication partner is who it
is supposed to be and not an imposter. Verifying the identity of a remote
process in the face of a malicious, active intruder is surprisingly difficult
and requires complex protocols based on cryptography. In this section, we will
study some of the many authentication protocols that are used on insecure
computer networks.
As an aside, some people confuse authorization with
authentication. Authentication deals with the question of whether you are
actually communicating with a specific process. Authorization is concerned with
what that process is permitted to do. For example, a client process contacts a
file server and says: I am Scott's process and I want to delete the file cookbook.old. From the file server's point of view,
two questions must be answered:
1. Is
this actually Scott's process (authentication)?
2. Is
Scott allowed to delete cookbook.old
(authorization)?
Only after both of these questions have been unambiguously
answered in the affirmative can the requested action take place. The former
question is really the key one. Once the file server knows to whom it is
talking, checking authorization is just a matter of looking up entries in local
tables or databases. For this reason, we will concentrate on authentication in
this section.
The general model that all authentication protocols use is
this. Alice starts out by sending a message either to Bob or to a trusted KDC (Key Distribution
Center), which is expected to be honest. Several other message exchanges
follow in various directions. As these messages are being sent Trudy may
intercept, modify, or replay them in order to trick Alice and Bob or just to
gum up the works.
Nevertheless, when the protocol has been completed, Alice is
sure she is talking to Bob and Bob is sure he is talking to Alice. Furthermore,
in most of the protocols, the two of them will also have established a secret session key for use in the upcoming conversation. In
practice, for performance reasons, all data traffic is encrypted using
symmetric-key cryptography (typically AES or triple DES), although public-key
cryptography is widely used for the authentication protocols themselves and for
establishing the session key.
The point of using a new, randomly-chosen session key for each
new connection is to minimize the amount of traffic that gets sent with the
users' secret keys or public keys, to reduce the amount of ciphertext an
intruder can obtain, and to minimize the damage done if a process crashes and
its core dump falls into the wrong hands. Hopefully, the only key present then
will be the session key. All the permanent keys should have been carefully
zeroed out after the session was established.
8.7.1 Authentication Based on a Shared Secret Key
For our first authentication protocol, we will assume that
Alice and Bob already share a secret key, KAB
. This shared key might have been agreed upon on the telephone or in person,
but, in any event, not on the (insecure) network.
This protocol is based on a principle found in many
authentication protocols: one party sends a random number to the other, who
then transforms it in a special way and then returns the result. Such protocols
are called challenge-response protocols. In
this and subsequent authentication protocols, the following notation will be
used:
A, B
are the identities of Alice and Bob.
Ri's are the
challenges, where the subscript identifies the challenger.
Ki are keys, where i indicates the owner.
KS is the session
key.
The message sequence for our first shared-key authentication
protocol is illustrated in Fig.
8-32. In message 1, Alice sends her identity, A,
to Bob in a way that Bob understands. Bob, of course, has no way of knowing
whether this message came from Alice or from Trudy, so he chooses a challenge,
a large random number, RB, and sends
it back to ''Alice'' as message 2, in plaintext. Random numbers used just once
in challenge-response protocols like this one are called nonces. Alice then encrypts the message with the key
she shares with Bob and sends the ciphertext, KAB
(RB), back in message 3. When Bob
sees this message, he immediately knows that it came from Alice because Trudy
does not know KAB and thus could not
have generated it. Furthermore, since RB
was chosen randomly from a large space (say, 128-bit random numbers), it is
very unlikely that Trudy would have seen RB
and its response from an earlier session. It is equally unlikely that she could
guess the correct response to any challenge.
Figure 8-32. Two-way authentication using a challenge-response protocol.
At this point, Bob is sure he is talking to Alice, but Alice
is not sure of anything. For all Alice knows, Trudy might have intercepted
message 1 and sent back RB in
response. Maybe Bob died last night. To find out to whom she is talking, Alice
picks a random number, RA and sends
it to Bob as plaintext, in message 4. When Bob responds with KAB (RA),
Alice knows she is talking to Bob. If they wish to establish a session key now,
Alice can pick one, KS, and send it
to Bob encrypted with KAB.
The protocol of Fig.
8-32 contains five messages. Let us see if we can be clever and eliminate
some of them. One approach is illustrated in Fig.
8-33. Here Alice initiates the challenge-response protocol instead of
waiting for Bob to do it. Similarly, while he is responding to Alice's
challenge, Bob sends his own. The entire protocol can be reduced to three
messages instead of five.
Figure 8-33. A shortened two-way authentication protocol.
Is this new protocol an improvement over the original one? In
one sense it is: it is shorter. Unfortunately, it is also wrong. Under certain
circumstances, Trudy can defeat this protocol by using what is known as a reflection attack. In particular, Trudy can break it
if it is possible to open multiple sessions with Bob at once. This situation
would be true, for example, if Bob is a bank and is prepared to accept many
simultaneous connections from teller machines at once.
Trudy's reflection attack is shown in Fig.
8-34. It starts out with Trudy claiming she is Alice and sending RT. Bob responds, as usual, with his own
challenge, RB. Now Trudy is stuck.
What can she do? She does not know KAB
(RB).
Figure 8-34. The reflection attack.
She can open a second session with message 3, supplying the RB taken from message 2 as her challenge.
Bob calmly encrypts it and sends back KAB
(RB)in message 4. We have shaded the
messages on the second session to make them stand out. Now Trudy has the
missing information, so she can complete the first session and abort the second
one. Bob is now convinced that Trudy is Alice, so when she asks for her bank
account balance, he gives it to her without question. Then when she asks him to
transfer it all to a secret bank account in Switzerland, he does so without a
moment's hesitation.
The moral of this story is:
Designing a correct authentication
protocol is harder than it looks.
The following four general rules often help:
1. Have
the initiator prove who she is before the responder has to. In this case, Bob
gives away valuable information before Trudy has to give any evidence of who
she is.
2. Have
the initiator and responder use different keys for proof, even if this means
having two shared keys, KAB and K'AB .
3. Have
the initiator and responder draw their challenges from different sets. For
example, the initiator must use even numbers and the responder must use odd
numbers.
4. Make
the protocol resistant to attacks involving a second parallel session in which
information obtained in one session is used in a different one.
If even one of these rules is violated, the protocol can
frequently be broken. Here, all four rules were violated, with disastrous
consequences.
Now let us go back and take a closer look at Fig.
8-32. Surely that protocol is not subject to a reflection attack? Well, it
depends. It is quite subtle. Trudy was able to defeat our protocol by using a
reflection attack because it was possible to open a second session with Bob and
trick him into answering his own questions. What would happen if Alice were a
general-purpose computer that also accepted multiple sessions, rather than a
person at a computer? Let us take a look what Trudy can do.
To see how Trudy's attack works, see Fig.
8-35. Alice starts out by announcing her identity in message 1. Trudy
intercepts this message and begins her own session with message 2, claiming to
be Bob. Again we have shaded the session 2 messages. Alice responds to message
2 by saying: You claim to be Bob? Prove it. in message 3. At this point Trudy
is stuck because she cannot prove she is Bob.
Figure 8-35. A reflection attack on the protocol of Fig. 8-32.
What does Trudy do now? She goes back to the first session,
where it is her turn to send a challenge, and sends the RA she got in message 3. Alice kindly
responds to it in message 5, thus supplying Trudy with the information she
needs to send message 6 in session 2. At this point, Trudy is basically home
free because she has successfully responded to Alice's challenge in session 2.
She can now cancel session 1, send over any old number for the rest of session
2, and she will have an authenticated session with Alice in session 2.
But Trudy is nasty, and she really wants to rub it in. Instead
of sending any old number over to complete session 2, she waits until Alice
sends message 7, Alice's challenge for session 1. Of course, Trudy does not
know how to respond, so she uses the reflection attack again, sending back RA2 as message 8. Alice conveniently
encrypts RA2 in message 9.
Trudy now switches back to session 1 and sends Alice the number she wants in
message 10, conveniently copied from what Alice sent in message 9. At this
point Trudy has two fully authenticated sessions with Alice.
This attack has a somewhat different result than the attack on
the three-message protocol shown in Fig.
8-34. This time, Trudy has two authenticated connections with Alice. In the
previous example, she had one authenticated connection with Bob. Again here, if
we had applied all the general authentication protocol rules discussed above,
this attack could have been stopped. A detailed discussion of these kind of
attacks and how to thwart them is given in (Bird et al., 1993). They also show
how it is possible to systematically construct protocols that are provably
correct. The simplest such protocol is nevertheless a bit complicated, so we
will now show a different class of protocol that also works.
The new authentication protocol is shown in Fig.
8-36 (Bird et al., 1993). It uses an HMAC of the type we saw when studying
IPsec. Alice starts out by sending Bob a nonce, RA
as message 1. Bob responds by selecting his own nonce, RB,
and sending it back along with an HMAC. The HMAC is formed to building a data
structure consisting of the Alice's nonce, Bob's nonce, their identities, and
the shared secret key, KAB. This data
structured is then hashed into the HMAC, for example using SHA-1. When Alice
receives message 2, she now has RA
(which she picked herself), RB, which
arrives as plaintext, the two identities, and the secret key, KAB, which has known all along, so she can
compute the HMAC herself. If it agrees with the HMAC in the message, she knows
she is talking to Bob because Trudy does not know KAB
and thus cannot figure out which HMAC to send. Alice responds to Bob with an
HMAC containing just the two nonces.
Figure 8-36. Authentication using HMACs.
Can Trudy somehow subvert this protocol? No, because she
cannot force either party to encrypt or hash a value of her choice, as happened
in Fig.
8-34 and Fig. 8-(Fo. Both HMACs include values chosen by the sending party,
something which Trudy cannot control.
Using HMACs is not the only way to use this idea. An
alternative scheme that is often used instead of computing the HMAC over a
series of items is to encrypt the items sequentially using cipher block
chaining.
8.7.2 Establishing a Shared Key: The Diffie-Hellman Key Exchange
So far we have assumed that Alice and Bob share a secret key.
Suppose that they do not (because so far there is no universally accepted PKI
for signing and distributing certificates). How can they establish one? One way
would be for Alice to call Bob and give him her key on the phone, but he would
probably start out by saying: How do I know you are Alice and not Trudy? They
could try to arrange a meeting, with each one bringing a passport, a drivers'
license, and three major credit cards, but being busy people, they might not be
able to find a mutually acceptable date for months. Fortunately, incredible as
it may sound, there is a way for total strangers to establish a shared secret key
in broad daylight, even with Trudy carefully recording every message.
The protocol that allows strangers to establish a shared
secret key is called the Diffie-Hellman key exchange
(Diffie and Hellman, 1976) and works as follows. Alice and Bob have to agree on
two large numbers, n and g, where n is a prime,
(n - 1)/2 is also
a prime and certain conditions apply to g. These
numbers may be public, so either one of them can just pick n and g and tell the
other openly. Now Alice picks a large (say, 512-bit) number, x, and keeps it secret. Similarly, Bob picks a large
secret number, y.
Alice initiates the key exchange protocol by sending Bob a
message containing (n, g,
gx mod n),
as shown in Fig.
8-37. Bob responds by sending Alice a message containing gy mod n.
Now Alice raises the number Bob sent her to the xth
power modulo n to get (gy
mod n)x
mod n. Bob performs a similar operation to get (gx mod n)y mod n. By
the laws of modular arithmetic, both calculations yield gxy mod n.
Lo and behold, Alice and Bob suddenly share a secret key, gxy mod n.
Figure 8-37. The Diffie-Hellman key exchange.
Trudy, of course, has seen both messages. She knows g and n from message 1.
If she could compute x and y, she could figure out the secret key. The trouble
is, given only gx mod n, she cannot find x.
No practical algorithm for computing discrete logarithms modulo a very large
prime number is known.
To make the above example more concrete, we will use the
(completely unrealistic) values of n = 47 and g = 3. Alice picks x =
8 and Bob picks y = 10. Both of these are kept
secret. Alice's message to Bob is (47, 3, 28) because 38 mod 47 is
28. Bob's message to Alice is (17). Alice computes 178 mod 47, which
is 4. Bob computes 2810 mod 47, which is 4. Alice and Bob have
independently determined that the secret key is now 4. Trudy has to solve the
equation 3x mod 47 = 28, which can be
done by exhaustive search for small numbers like this, but not when all the
numbers are hundreds of bits long. All currently-known algorithms simply take
too long, even on massively parallel supercomputers.
Despite the elegance of the Diffie-Hellman algorithm, there is
a problem: when Bob gets the triple (47, 3, 28), how does he know it is from
Alice and not from Trudy? There is no way he can know. Unfortunately, Trudy can
exploit this fact to deceive both Alice and Bob, as illustrated in Fig.
8-38. Here, while Alice and Bob are choosing x
and y, respectively, Trudy picks her own random
number, z. Alice sends message 1 intended for
Bob. Trudy intercepts it and sends message 2 to Bob, using the correct g and n (which are
public anyway) but with her own z instead of x. She also sends message 3 back to Alice. Later Bob
sends message 4 to Alice, which Trudy again intercepts and keeps.
Figure 8-38. The bucket brigade or man-in-the-middle attack.
Now everybody does the modular arithmetic. Alice computes the
secret key as gxz mod n, and so does Trudy (for messages to Alice). Bob
computes gyz mod n and so does Trudy (for messages to Bob). Alice
thinks she is talking to Bob so she establishes a session key (with Trudy). So
does Bob. Every message that Alice sends on the encrypted session is captured
by Trudy, stored, modified if desired, and then (optionally) passed on to Bob.
Similarly, in the other direction. Trudy sees everything and can modify all
messages at will, while both Alice and Bob are under the illusion that they
have a secure channel to one another. This attack is known as the bucket brigade attack, because it vaguely resembles
an old-time volunteer fire department passing buckets along the line from the
fire truck to the fire. It is also called the man-in-the-middle
attack.
8.7.3 Authentication Using a Key Distribution Center
Setting up a shared secret with a stranger almost worked, but
not quite. On the other hand, it probably was not worth doing in the first
place (sour grapes attack). To talk to n people
this way, you would need n keys. For popular
people, key management would become a real burden, especially if each key had
to be stored on a separate plastic chip card.
A different approach is to introduce a trusted key
distribution center (KDC). In this model, each user has a single key shared
with the KDC. Authentication and session key management now goes through the
KDC. The simplest known KDC authentication protocol involving two parties and a
trusted KDC is depicted in Fig.
8-39.
Figure 8-39. A first attempt at an authentication protocol using a KDC.
The idea behind this protocol is simple: Alice picks a session
key, KS, and tells the KDC that she
wants to talk to Bob using KS. This
message is encrypted with the secret key Alice shares (only) with the KDC, KA. The KDC decrypts this message,
extracting Bob's identity and the session key. It then constructs a new message
containing Alice's identity and the session key and sends this message to Bob.
This encryption is done with KB, the
secret key Bob shares with the KDC. When Bob decrypts the message, he learns
that Alice wants to talk to him and which key she wants to use.
The authentication here happens for free. The KDC knows that
message 1 must have come from Alice, since no one else would have been able to
encrypt it with Alice's secret key. Similarly, Bob knows that message 2 must
have come from the KDC, whom he trusts, since no one else knows his secret key.
Unfortunately, this protocol has a serious flaw. Trudy needs
some money, so she figures out some legitimate service she can perform for
Alice, makes an attractive offer, and gets the job. After doing the work, Trudy
then politely requests Alice to pay by bank transfer. Alice then establishes a
session key with her banker, Bob. Then she sends Bob a message requesting money
to be transferred to Trudy's account.
Meanwhile, Trudy is back to her old ways, snooping on the
network. She copies both message 2 in Fig.
8-39 and the money-transfer request that follows it. Later, she replays
both of them to Bob. Bob gets them and thinks: Alice must have hired Trudy
again. She clearly does good work. Bob then transfers an equal amount of money
from Alice's account to Trudy's. Some time after the 50th message pair, Bob
runs out of the office to find Trudy to offer her a big loan so she can expand
her obviously successful business. This problem is called the replay attack.
Several solutions to the replay attack are possible. The first
one is to include a timestamp in each message. Then if anyone receives an
obsolete message, it can be discarded. The trouble with this approach is that
clocks are never exactly synchronized over a network, so there has to be some
interval during which a timestamp is valid. Trudy can replay the message during
this interval and get away with it.
The second solution is to put a nonce in each message. Each
party then has to remember all previous nonces and reject any message
containing a previously-used nonce. But nonces have to be remembered forever,
lest Trudy try replaying a 5-year-old message. Also, if some machine crashes
and it loses its nonce list, it is again vulnerable to a replay attack.
Timestamps and nonces can be combined to limit how long nonces have to be
remembered, but clearly the protocol is going to get a lot more complicated.
A more sophisticated approach to mutual authentication is to
use a multiway challenge-response protocol. A well-known example of such a
protocol is the Needham-Schroeder authentication
protocol (Needham and Schroeder, 1978), one variant of which is shown in Fig.
8-40.
Figure 8-40. The Needham-Schroeder authentication protocol.
The protocol begins with Alice telling the KDC that she wants
to talk to Bob. This message contains a large random number, RA, as a nonce. The KDC sends back message
2 containing Alice's random number, a session key, and a ticket that she can
send to Bob. The point of the random number, RA,
is to assure Alice that message 2 is fresh, and not a replay. Bob's identity is
also enclosed in case Trudy gets any funny ideas about replacing B in message 1 with her own identity so the KDC will
encrypt the ticket at the end of message 2 with KT
instead of KB. The ticket encrypted
with KB is included inside the
encrypted message to prevent Trudy from replacing it with something else on the
way back to Alice.
Alice now sends the ticket to Bob, along with a new random
number, RA2, encrypted
with the session key, KS. In message
4, Bob sends back KS(RA2 - 1) to prove to Alice that
she is talking to the real Bob. Sending back KS(RA2) would not have worked,
since Trudy could just have stolen it from message 3.
After receiving message 4, Alice is now convinced that she is
talking to Bob and that no replays could have been used so far. After all, she
just generated RA2 a few
milliseconds ago. The purpose of message 5 is to convince Bob that it is indeed
Alice he is talking to, and no replays are being used here either. By having
each party both generate a challenge and respond to one, the possibility of any
kind of replay attack is eliminated.
Although this protocol seems pretty solid, it does have a
slight weakness. If Trudy ever manages to obtain an old session key in
plaintext, she can initiate a new session with Bob by replaying the message 3
corresponding to the compromised key and convince him that she is Alice
(Denning and Sacco, 1981). This time she can plunder Alice's bank account
without having to perform the legitimate service even once.
Needham and Schroeder later published a protocol that corrects
this problem (Needham and Schroeder, 1987). In the same issue of the same
journal, Otway and Rees (1987) also published a protocol that solves the
problem in a shorter way. Figure
8-41 shows a slightly modified Otway-Rees protocol.
Figure 8-41. The Otway-Rees authentication protocol (slightly simplified).
In the Otway-Rees protocol, Alice starts out by generating a
pair of random numbers, R, which will be used as
a common identifier, and RA, which
Alice will use to challenge Bob. When Bob gets this message, he constructs a
new message from the encrypted part of Alice's message and an analogous one of
his own. Both the parts encrypted with KA
and KB identify Alice and Bob,
contain the common identifier, and contain a challenge.
The KDC checks to see if the R
in both parts is the same. It might not be because Trudy tampered with R in message 1 or replaced part of message 2. If the
two Rs match, the KDC believes that the request
message from Bob is valid. It then generates a session key and encrypts it
twice, once for Alice and once for Bob. Each message contains the receiver's
random number, as proof that the KDC, and not Trudy, generated the message. At
this point both Alice and Bob are in possession of the same session key and can
start communicating. The first time they exchange data messages, each one can
see that the other one has an identical copy of KS,
so the authentication is then complete.
8.7.4 Authentication Using Kerberos
An authentication protocol used in many real systems
(including Windows 2000) is Kerberos, which is
based on a variant of Needham-Schroeder. It is named for a multiheaded dog in
Greek mythology that used to guard the entrance to Hades (presumably to keep undesirables
out). Kerberos was designed at M.I.T. to allow workstation users to access
network resources in a secure way. Its biggest difference from
Needham-Schroeder is its assumption that all clocks are fairly well
synchronized. The protocol has gone through several iterations. V4 is the
version most widely used in industry, so we will describe it. Afterward, we
will say a few words about its successor, V5. For more information, see
(Steiner et al., 1988).
Kerberos involves three servers in addition to Alice (a client
workstation):
Authentication Server (AS): verifies users during login
Ticket-Granting Server (TGS): issues ''proof of identity
tickets''
Bob the server: actually does the work Alice wants performed
AS is similar to a KDC in that it shares a secret password
with every user. The TGS's job is to issue tickets that can convince the real
servers that the bearer of a TGS ticket really is who he or she claims to be.
To start a session, Alice sits down at an arbitrary public
workstation and types her name. The workstation sends her name to the AS in
plaintext, as shown in Fig.
8-42. What comes back is a session key and a ticket, KTGS(A, KS), intended for the TGS. These items are
packaged together and encrypted using Alice's secret key, so that only Alice
can decrypt them. Only when message 2 arrives does the workstation ask for
Alice's password. The password is then used to generate KA in order to decrypt message 2 and obtain
the session key and TGS ticket inside it. At this point, the workstation
overwrites Alice's password to make sure that it is only inside the workstation
for a few milliseconds at most. If Trudy tries logging in as Alice, the
password she types will be wrong and the workstation will detect this because
the standard part of message 2 will be incorrect.
Figure 8-42. The operation of Kerberos V4.
After she logs in, Alice may tell the workstation that she
wants to contact Bob the file server. The workstation then sends message 3 to the
TGS asking for a ticket to use with Bob. The key element in this request is KTGS(A, KS), which is encrypted with the TGS's
secret key and used as proof that the sender really is Alice. The TGS responds
by creating a session key, KAB, for
Alice to use with Bob. Two versions of it are sent back. The first is encrypted
with only KS, so Alice can read it.
The second is encrypted with Bob's key, KB,
so Bob can read it.
Trudy can copy message 3 and try to use it again, but she will
be foiled by the encrypted timestamp, t, sent
along with it. Trudy cannot replace the timestamp with a more recent one,
because she does not know KS, the
session key Alice uses to talk to the TGS. Even if Trudy replays message 3
quickly, all she will get is another copy of message 4, which she could not
decrypt the first time and will not be able to decrypt the second time either.
Now Alice can send KAB
to Bob to establish a session with him. This exchange is also timestamped. The
response is proof to Alice that she is actually talking to Bob, not to Trudy.
After this series of exchanges, Alice can communicate with Bob
under cover of KAB. If she later
decides she needs to talk to another server, Carol, she just repeats message 3
to the TGS, only now specifying C instead of B. The TGS will promptly respond with a ticket
encrypted with KC that Alice can send
to Carol and that Carol will accept as proof that it came from Alice.
The point of all this work is that now Alice can access
servers all over the network in a secure way and her password never has to go
over the network. In fact, it only had to be in her own workstation for a few
milliseconds. However, note that each server does its own authorization. When
Alice presents her ticket to Bob, this merely proves to Bob who sent it. Precisely
what Alice is allowed to do is up to Bob.
Since the Kerberos designers did not expect the entire world
to trust a single authentication server, they made provision for having
multiple realms, each with its own AS and TGS.
To get a ticket for a server in a distant realm, Alice would ask her own TGS
for a ticket accepted by the TGS in the distant realm. If the distant TGS has
registered with the local TGS (the same way local servers do), the local TGS
will give Alice a ticket valid at the distant TGS. She can then do business
over there, such as getting tickets for servers in that realm. Note, however,
that for parties in two realms to do business, each one must trust the other's
TGS.
Kerberos V5 is fancier than V4 and has more overhead. It also
uses OSI ASN.1 (Abstract Syntax Notation 1) for describing data types and has
small changes in the protocols. Furthermore, it has longer ticket lifetimes,
allows tickets to be renewed, and will issue postdated tickets. In addition, at
least in theory, it is not DES dependent, as V4 is, and supports multiple
realms by delegating ticket generation to multiple ticket servers.
8.7.5 Authentication Using Public-Key Cryptography
Mutual authentication can also be done using public-key
cryptography. To start with, Alice needs to get Bob's public key. If a PKI
exists with a directory server that hands out certificates for public keys,
Alice can ask for Bob's, as shown in Fig.
8-43 as message 1. The reply, in message 2, is an X.509 certificate
containing Bob's public key. When Alice verifies that the signature is correct,
she sends Bob a message containing her identity and a nonce.
Figure 8-43. Mutual authentication using public-key cryptography.
When Bob receives this message, he has no idea whether it came
from Alice or from Trudy, but he plays along and asks the directory server for
Alice's public key (message 4) which he soon gets (message 5). He then sends
Alice a message containing Alice's RA,
his own nonce, RB, and a proposed session
key, KS, as message 6.
When Alice gets message 6, she decrypts it using her private
key. She sees RA in it, which gives
her a warm feeling inside. The message must have come from Bob, since Trudy has
no way of determining RA.
Furthermore, it must be fresh and not a replay, since she just sent Bob RA. Alice agrees to the session by sending
back message 7. When Bob sees RB
encrypted with the session key he just generated, he knows Alice got message 6
and verified RA.
What can Trudy do to try to subvert this protocol? She can
fabricate message 3 and trick Bob into probing Alice, but Alice will see an RA that she did not send and will not
proceed further. Trudy cannot forge message 7 back to Bob because she does not
know RB or KS
and cannot determine them without Alice's private key. She is out of luck.
No comments:
Post a Comment
silahkan membaca dan berkomentar