Alice Who? · Authentication happens between two or more parties and is the process of convincing...

161
0/41 Alice Who? Authentication Protocols Andreas Zeller/Stephan Neuhaus Lehrstuhl Softwaretechnik Universit¨ at des Saarlandes, Saarbr¨ ucken

Transcript of Alice Who? · Authentication happens between two or more parties and is the process of convincing...

Page 1: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

0/41

Alice Who?Authentication Protocols

Andreas Zeller/Stephan NeuhausLehrstuhl SoftwaretechnikUniversitat des Saarlandes, Saarbrucken

Page 2: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

1/41

The Menu

• Simple Authentication Protocols

Page 3: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

1/41

The Menu

• Simple Authentication Protocols

• Common Pitfalls

Page 4: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

1/41

The Menu

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

Page 5: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

1/41

The Menu

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

• Login-only protocols

Page 6: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

1/41

The Menu

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

• Login-only protocols

• Mutual authentication

Page 7: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

1/41

The Menu

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

• Login-only protocols

• Mutual authentication with Key Distribution Center

Page 8: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

1/41

The Menu

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

• Login-only protocols

• Mutual authentication with Key Distribution Center

• Needham-Schroeder

Page 9: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

2/41

Basics (1)

Authentication happens between two or more parties and isthe process of convincing another party that one party hasindeed the identity it claims to have.

Page 10: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

2/41

Basics (1)

Authentication happens between two or more parties and isthe process of convincing another party that one party hasindeed the identity it claims to have.

Meet Alice and Bob:

Page 11: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

2/41

Basics (1)

Authentication happens between two or more parties and isthe process of convincing another party that one party hasindeed the identity it claims to have.

Meet Alice and Bob:

Alice Bob

Page 12: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

2/41

Basics (1)

Authentication happens between two or more parties and isthe process of convincing another party that one party hasindeed the identity it claims to have.

Meet Alice and Bob:

Alice Bob

Alice and Bob want to communicate, but can’t really be surethat the other is really who he/she says he/she is.

Page 13: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

2/41

Basics (1)

Authentication happens between two or more parties and isthe process of convincing another party that one party hasindeed the identity it claims to have.

Meet Alice and Bob:

Alice Bob

Alice and Bob want to communicate, but can’t really be surethat the other is really who he/she says he/she is. So theyexchange a series of messages ⇒ a protocol.

Page 14: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

3/41

Basics (2)

• May be one-sided: Alice may be a computer and Bob maybe a user. Bob logs in to Alice; Alice then knows it’s Bob,but Bob doesn’t (in general) know it’s Alice.

Page 15: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

3/41

Basics (2)

• May be one-sided: Alice may be a computer and Bob maybe a user. Bob logs in to Alice; Alice then knows it’s Bob,but Bob doesn’t (in general) know it’s Alice.

• May be mutual: Bob logs in to Alice so that both of themare convinced of the other’s identity afterwards.

Page 16: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

3/41

Basics (2)

• May be one-sided: Alice may be a computer and Bob maybe a user. Bob logs in to Alice; Alice then knows it’s Bob,but Bob doesn’t (in general) know it’s Alice.

• May be mutual: Bob logs in to Alice so that both of themare convinced of the other’s identity afterwards.

• May use trusted third parties, online (Bob asks the trustedparty—Trent—to establish a conversation with Alice) oroffline (Alice could present a certificate signed by Trent).

Page 17: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

3/41

Basics (2)

• May be one-sided: Alice may be a computer and Bob maybe a user. Bob logs in to Alice; Alice then knows it’s Bob,but Bob doesn’t (in general) know it’s Alice.

• May be mutual: Bob logs in to Alice so that both of themare convinced of the other’s identity afterwards.

• May use trusted third parties, online (Bob asks the trustedparty—Trent—to establish a conversation with Alice) oroffline (Alice could present a certificate signed by Trent).

• There might be an eavesdropper—Eve—that can listen toand/or modify messages as they are exchanged betweenAlice and Bob.

Page 18: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

3/41

Basics (2)

• May be one-sided: Alice may be a computer and Bob maybe a user. Bob logs in to Alice; Alice then knows it’s Bob,but Bob doesn’t (in general) know it’s Alice.

• May be mutual: Bob logs in to Alice so that both of themare convinced of the other’s identity afterwards.

• May use trusted third parties, online (Bob asks the trustedparty—Trent—to establish a conversation with Alice) oroffline (Alice could present a certificate signed by Trent).

• There might be an eavesdropper—Eve—that can listen toand/or modify messages as they are exchanged betweenAlice and Bob.

• There might be an intruder—Trudy—that can listen to andinject messages.

Page 19: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

4/41

Basics (3): Protocol Notation

Alice −→ Bob : N, {M,N}K

This notation means that the principal Alice transmits to theprincipal Bob a message containing a nonce N, and theplaintext M concatenated with N, encrypted under the key K.

Page 20: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

4/41

Basics (3): Protocol Notation

Alice −→ Bob : N, {M,N}K

This notation means that the principal Alice transmits to theprincipal Bob a message containing a nonce N, and theplaintext M concatenated with N, encrypted under the key K.

A nonce is anything that guarantees the freshness of amessage, such as a random number, a serial number, or achallenge received from a third party.

We’ll usually distinguish between a principal “Bob” and theidentifying information that he sends over the wire, “Bob”.

Page 21: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

5/41

Basics (4)

Alice Bob

N, {M, N}_K

Page 22: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

5/41

Basics (4)

Alice Bob

N, {M, N}_K

We won’t use this often, because it’s often easier to see whathappens when using the formula notation, especially whenthere are more than two parties involved.

Page 23: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

6/41

The Simplest Protocol

The simplest authentication protocol has no name.

Page 24: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

6/41

The Simplest Protocol

The simplest authentication protocol has no name.

Alice −→ Bob : “Hi, I’m Alice.”

Page 25: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

6/41

The Simplest Protocol

The simplest authentication protocol has no name.

Alice −→ Bob : “Hi, I’m Alice.”

It can be extended into a mutual protocol:

Page 26: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

6/41

The Simplest Protocol

The simplest authentication protocol has no name.

Alice −→ Bob : “Hi, I’m Alice.”

It can be extended into a mutual protocol:

Alice −→ Bob : “Hi, I’m Alice.”

Bob −→ Alice : “Hi, I’m Bob.”

Page 27: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

6/41

The Simplest Protocol

The simplest authentication protocol has no name.

Alice −→ Bob : “Hi, I’m Alice.”

It can be extended into a mutual protocol:

Alice −→ Bob : “Hi, I’m Alice.”

Bob −→ Alice : “Hi, I’m Bob.”

The problem is of course that Eve can successfully pretend tobe Alice:

Page 28: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

6/41

The Simplest Protocol

The simplest authentication protocol has no name.

Alice −→ Bob : “Hi, I’m Alice.”

It can be extended into a mutual protocol:

Alice −→ Bob : “Hi, I’m Alice.”

Bob −→ Alice : “Hi, I’m Bob.”

The problem is of course that Eve can successfully pretend tobe Alice:

Eve −→ Bob : “Hi, I’m Alice.”

Page 29: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

7/41

Usage of this Protocol

This protocol is actually in widespread use:

Page 30: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

7/41

Usage of this Protocol

This protocol is actually in widespread use:

• TCP connections are generally not authenticated. This is aproblem with mitigating factors, because if you spoof thesender address, you usually won’t get the return packets;also, if you are on the same Ethernet, you have to dosomething about the other party’s ARP daemon. But it’spossible.

Page 31: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

7/41

Usage of this Protocol

This protocol is actually in widespread use:

• TCP connections are generally not authenticated. This is aproblem with mitigating factors, because if you spoof thesender address, you usually won’t get the return packets;also, if you are on the same Ethernet, you have to dosomething about the other party’s ARP daemon. But it’spossible.

• Telephone calls are usually not (properly) authenticated;otherwise Kevin Mitnlick couldn’t have been as successfulas he was. (Remember the very first lecture in this course?)

Page 32: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

8/41

Threats Against Authentication Protocols

The basic threat is always that it is possible for Trudy or Eveeventually to impersonate Alice or Bob. They can accomplishthis for example by:

Page 33: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

8/41

Threats Against Authentication Protocols

The basic threat is always that it is possible for Trudy or Eveeventually to impersonate Alice or Bob. They can accomplishthis for example by:

• Replaying all or part of a previously recorded conversation;

Page 34: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

8/41

Threats Against Authentication Protocols

The basic threat is always that it is possible for Trudy or Eveeventually to impersonate Alice or Bob. They can accomplishthis for example by:

• Replaying all or part of a previously recorded conversation;

• Eavesdropping on a conversation and learning secrets;

Page 35: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

8/41

Threats Against Authentication Protocols

The basic threat is always that it is possible for Trudy or Eveeventually to impersonate Alice or Bob. They can accomplishthis for example by:

• Replaying all or part of a previously recorded conversation;

• Eavesdropping on a conversation and learning secrets;

• Modifying messages en route to their destination;

Page 36: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

8/41

Threats Against Authentication Protocols

The basic threat is always that it is possible for Trudy or Eveeventually to impersonate Alice or Bob. They can accomplishthis for example by:

• Replaying all or part of a previously recorded conversation;

• Eavesdropping on a conversation and learning secrets;

• Modifying messages en route to their destination;

• Modifying the message flow by inserting or deletingmessages in the network.

Page 37: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

8/41

Threats Against Authentication Protocols

The basic threat is always that it is possible for Trudy or Eveeventually to impersonate Alice or Bob. They can accomplishthis for example by:

• Replaying all or part of a previously recorded conversation;

• Eavesdropping on a conversation and learning secrets;

• Modifying messages en route to their destination;

• Modifying the message flow by inserting or deletingmessages in the network.

• Assuming another’s identity (e.g., using the other’snetwork address).

Page 38: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

8/41

Threats Against Authentication Protocols

The basic threat is always that it is possible for Trudy or Eveeventually to impersonate Alice or Bob. They can accomplishthis for example by:

• Replaying all or part of a previously recorded conversation;

• Eavesdropping on a conversation and learning secrets;

• Modifying messages en route to their destination;

• Modifying the message flow by inserting or deletingmessages in the network.

• Assuming another’s identity (e.g., using the other’snetwork address).

• Stealing another’s databases, to steal keys.

Page 39: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

8/41

Threats Against Authentication Protocols

The basic threat is always that it is possible for Trudy or Eveeventually to impersonate Alice or Bob. They can accomplishthis for example by:

• Replaying all or part of a previously recorded conversation;

• Eavesdropping on a conversation and learning secrets;

• Modifying messages en route to their destination;

• Modifying the message flow by inserting or deletingmessages in the network.

• Assuming another’s identity (e.g., using the other’snetwork address).

• Stealing another’s databases, to steal keys.

As you can see, we’ll encounter pretty powerful adversaries.

Page 40: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

9/41

But we’ll not defend against all threats. For example, we’llusually not defend against deleted messages (for the practicalreason that there’s not much that we can do about it).

Page 41: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

10/41

Improvements

How can this protocol be improved?

Page 42: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

10/41

Improvements

How can this protocol be improved?

• Alice and Bob could share a secret. Alice could present thatsecret to show that she really is Alice. (Who you are is whatyou know.)

Page 43: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

10/41

Improvements

How can this protocol be improved?

• Alice and Bob could share a secret. Alice could present thatsecret to show that she really is Alice. (Who you are is whatyou know.)

• Variation: Alice claims that she knows a secret that isunique to her. Instead of presenting the secret, Alice couldprove that she knows the secret without divulging it(zero-knowledge-proof ).

Page 44: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

10/41

Improvements

How can this protocol be improved?

• Alice and Bob could share a secret. Alice could present thatsecret to show that she really is Alice. (Who you are is whatyou know.)

• Variation: Alice claims that she knows a secret that isunique to her. Instead of presenting the secret, Alice couldprove that she knows the secret without divulging it(zero-knowledge-proof ).

• Alice could be in the posession of a unique token that shepresents to Bob. (Who you are is what you have.)

Page 45: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

10/41

Improvements

How can this protocol be improved?

• Alice and Bob could share a secret. Alice could present thatsecret to show that she really is Alice. (Who you are is whatyou know.)

• Variation: Alice claims that she knows a secret that isunique to her. Instead of presenting the secret, Alice couldprove that she knows the secret without divulging it(zero-knowledge-proof ).

• Alice could be in the posession of a unique token that shepresents to Bob. (Who you are is what you have.)

• Alice could agree on submitting to a biometric scan, e.g., afingerprint scan or face scan. (Who you are is what you are.)

Page 46: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

11/41

. . . What You Know (aka Passwords)

The protocol goes like this: Bob maintains a database of secretpasswords. Alice then authenticates herself to Bob like this:

Alice −→ Bob : “Hi, I’m Alice, and my password is ‘x&8e;pqA’.”

Page 47: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

11/41

. . . What You Know (aka Passwords)

The protocol goes like this: Bob maintains a database of secretpasswords. Alice then authenticates herself to Bob like this:

Alice −→ Bob : “Hi, I’m Alice, and my password is ‘x&8e;pqA’.”

Eve can break this protocol if we assume that she can listen tothe conversation between Alice and Bob. She simply capturesthe password and replays it:

Eve −→ Bob : “Hi, I’m Alice, and my password is ‘x&8e;pqA’.”

Page 48: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

11/41

. . . What You Know (aka Passwords)

The protocol goes like this: Bob maintains a database of secretpasswords. Alice then authenticates herself to Bob like this:

Alice −→ Bob : “Hi, I’m Alice, and my password is ‘x&8e;pqA’.”

Eve can break this protocol if we assume that she can listen tothe conversation between Alice and Bob. She simply capturesthe password and replays it:

Eve −→ Bob : “Hi, I’m Alice, and my password is ‘x&8e;pqA’.”

Note that this is independent of the guessablity of thepassword.

Page 49: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

11/41

. . . What You Know (aka Passwords)

The protocol goes like this: Bob maintains a database of secretpasswords. Alice then authenticates herself to Bob like this:

Alice −→ Bob : “Hi, I’m Alice, and my password is ‘x&8e;pqA’.”

Eve can break this protocol if we assume that she can listen tothe conversation between Alice and Bob. She simply capturesthe password and replays it:

Eve −→ Bob : “Hi, I’m Alice, and my password is ‘x&8e;pqA’.”

Note that this is independent of the guessablity of thepassword.

This attack is not always feasible, but it’s feasible enough in somany environments that you must abstain from using thisprotocol.

Page 50: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

12/41

Encrypting the Exchange

Assume Alice and Bob share a secret K that can be used as acryptographic key.

Page 51: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

12/41

Encrypting the Exchange

Assume Alice and Bob share a secret K that can be used as acryptographic key.

Alice −→ Bob : {“Hi, I’m Alice, and my password is ‘x&8e;pqA’.”}K

Page 52: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

12/41

Encrypting the Exchange

Assume Alice and Bob share a secret K that can be used as acryptographic key.

Alice −→ Bob : {“Hi, I’m Alice, and my password is ‘x&8e;pqA’.”}K

That’s much better. An eavesdropper couldn’t decrypt themessage and therefore wouldn’t be able to recover thepassword.

Page 53: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

12/41

Encrypting the Exchange

Assume Alice and Bob share a secret K that can be used as acryptographic key.

Alice −→ Bob : {“Hi, I’m Alice, and my password is ‘x&8e;pqA’.”}K

That’s much better. An eavesdropper couldn’t decrypt themessage and therefore wouldn’t be able to recover thepassword.

But is this really necessary?

Page 54: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

12/41

Encrypting the Exchange

Assume Alice and Bob share a secret K that can be used as acryptographic key.

Alice −→ Bob : {“Hi, I’m Alice, and my password is ‘x&8e;pqA’.”}K

That’s much better. An eavesdropper couldn’t decrypt themessage and therefore wouldn’t be able to recover thepassword.

But is this really necessary?

No, because Eve can still just capture the entire encryptedmessage and replay it to Bob.

Page 55: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

13/41

Challenge-Response

Alice −→ Bob : “Hi, I’m Alice.”

Page 56: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

13/41

Challenge-Response

Alice −→ Bob : “Hi, I’m Alice.”

Bob −→ Alice : “Hi Alice, please encrypt 0x67f810a762df5e.”

Page 57: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

13/41

Challenge-Response

Alice −→ Bob : “Hi, I’m Alice.”

Bob −→ Alice : “Hi Alice, please encrypt 0x67f810a762df5e.”

Alice −→ Bob : {0x67f810a762df5e}K

Page 58: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

13/41

Challenge-Response

Alice −→ Bob : “Hi, I’m Alice.”

Bob −→ Alice : “Hi Alice, please encrypt 0x67f810a762df5e.”

Alice −→ Bob : {0x67f810a762df5e}K

Or, more formally,

Alice −→ Bob : Alice

Bob −→ Alice : RAlice −→ Bob : {R}K,

where R is a random challenge.

Page 59: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

14/41

Problems with C-R

• It’s one-sided: Bob knows about Alice, but not vice versa.

Page 60: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

14/41

Problems with C-R

• It’s one-sided: Bob knows about Alice, but not vice versa.

• Somehow Bob needs to maintain a database of secrets andkeep it secure. In practice, that’s bloody difficult.

Page 61: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

14/41

Problems with C-R

• It’s one-sided: Bob knows about Alice, but not vice versa.

• Somehow Bob needs to maintain a database of secrets andkeep it secure. In practice, that’s bloody difficult.

• Trudy could hijack the connection after the initialexchange.

Page 62: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

14/41

Problems with C-R

• It’s one-sided: Bob knows about Alice, but not vice versa.

• Somehow Bob needs to maintain a database of secrets andkeep it secure. In practice, that’s bloody difficult.

• Trudy could hijack the connection after the initialexchange.

• If K is derived from a password (that only Alice needs toknow), then Eve could mount an offline password-guessingattack.

Page 63: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

15/41

Variation 1

Alice −→ Bob : Alice

Bob −→ Alice : {R}KAlice −→ Bob : R,

where R is a random challenge.

Page 64: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

15/41

Variation 1

Alice −→ Bob : Alice

Bob −→ Alice : {R}KAlice −→ Bob : R,

where R is a random challenge.

• Requires reversible cryptography.

Page 65: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

15/41

Variation 1

Alice −→ Bob : Alice

Bob −→ Alice : {R}KAlice −→ Bob : R,

where R is a random challenge.

• Requires reversible cryptography.

• If K is derived from password, and if R is distinguishablefrom random bits, Eve can mount a password-guessingattack without snooping, by initiating the protocol as Alice.

Page 66: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

15/41

Variation 1

Alice −→ Bob : Alice

Bob −→ Alice : {R}KAlice −→ Bob : R,

where R is a random challenge.

• Requires reversible cryptography.

• If K is derived from password, and if R is distinguishablefrom random bits, Eve can mount a password-guessingattack without snooping, by initiating the protocol as Alice.

• Authentication is mutual if R is a recognizable quantitywith a limited lifetime.

Page 67: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

16/41

Variation 2

Alice −→ Bob : Alice, {t}K,

where t is a timestamp.

Page 68: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

16/41

Variation 2

Alice −→ Bob : Alice, {t}K,

where t is a timestamp.

• One-sided (Bob authenticates Alice, not vice versa).

Page 69: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

16/41

Variation 2

Alice −→ Bob : Alice, {t}K,

where t is a timestamp.

• One-sided (Bob authenticates Alice, not vice versa).

• Requires clocks to be reasonably synchronized.

Page 70: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

16/41

Variation 2

Alice −→ Bob : Alice, {t}K,

where t is a timestamp.

• One-sided (Bob authenticates Alice, not vice versa).

• Requires clocks to be reasonably synchronized.

• When using the same secret K for multiple servers, Eve canimpersonate Alice at the other servers (if she’s fastenough).

Page 71: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

16/41

Variation 2

Alice −→ Bob : Alice, {t}K,

where t is a timestamp.

• One-sided (Bob authenticates Alice, not vice versa).

• Requires clocks to be reasonably synchronized.

• When using the same secret K for multiple servers, Eve canimpersonate Alice at the other servers (if she’s fastenough).

• Replay possible if Eve can cause Bob’s clock to be turnedback.

Page 72: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

16/41

Variation 2

Alice −→ Bob : Alice, {t}K,

where t is a timestamp.

• One-sided (Bob authenticates Alice, not vice versa).

• Requires clocks to be reasonably synchronized.

• When using the same secret K for multiple servers, Eve canimpersonate Alice at the other servers (if she’s fastenough).

• Replay possible if Eve can cause Bob’s clock to be turnedback.

• Time setting and login are now coupled.

Page 73: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

17/41

Mutual Authentication

Alice −→ Bob : Alice

Bob −→ Alice : R1

Alice −→ Bob : {R1}K, R2

Page 74: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

17/41

Mutual Authentication

Alice −→ Bob : Alice

Bob −→ Alice : R1

Alice −→ Bob : {R1}K, R2

Bob −→ Alice : {R2}K

Page 75: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

18/41

Mutual Authentication “Optimized”

We attempt to optimize this protocol:

Alice −→ Bob : Alice, R2

Bob −→ Alice : {R2}K, R1

Alice −→ Bob : {R1}K

Page 76: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

18/41

Mutual Authentication “Optimized”

We attempt to optimize this protocol:

Alice −→ Bob : Alice, R2

Bob −→ Alice : {R2}K, R1

Alice −→ Bob : {R1}K

We eliminated 25% of all messages. Not bad!

Page 77: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

18/41

Mutual Authentication “Optimized”

We attempt to optimize this protocol:

Alice −→ Bob : Alice, R2

Bob −→ Alice : {R2}K, R1

Alice −→ Bob : {R1}K

We eliminated 25% of all messages. Not bad!

What’s wrong with this protocol?

Page 78: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

19/41

Reflection Attack

This protocol suffers from a reflection attack:

Trudy −→ Bob : Alice, R2

Bob −→ Trudy : {R2}K, R1

Page 79: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

19/41

Reflection Attack

This protocol suffers from a reflection attack:

Trudy −→ Bob : Alice, R2

Bob −→ Trudy : {R2}K, R1

Trudy −→ Bob : Alice, R1

Page 80: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

19/41

Reflection Attack

This protocol suffers from a reflection attack:

Trudy −→ Bob : Alice, R2

Bob −→ Trudy : {R2}K, R1

Trudy −→ Bob : Alice, R1

Bob −→ Trudy : {R1}K, R3

Page 81: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

19/41

Reflection Attack

This protocol suffers from a reflection attack:

Trudy −→ Bob : Alice, R2

Bob −→ Trudy : {R2}K, R1

Trudy −→ Bob : Alice, R1

Bob −→ Trudy : {R1}K, R3

Trudy −→ Bob : {R1}K

Page 82: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

20/41

Rules

• Don’t use the same key K for Alice and Bob. Instead, useK + 1, K ⊕ 0x0F0F0F0F, ¬K, or something like this.

Page 83: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

20/41

Rules

• Don’t use the same key K for Alice and Bob. Instead, useK + 1, K ⊕ 0x0F0F0F0F, ¬K, or something like this.

• Different challenges. Either remember past challenges anddecline to encrypt known challenges, or insist that thechallenges must be different for Alice and Bob (seeexercises).

Page 84: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

20/41

Rules

• Don’t use the same key K for Alice and Bob. Instead, useK + 1, K ⊕ 0x0F0F0F0F, ¬K, or something like this.

• Different challenges. Either remember past challenges anddecline to encrypt known challenges, or insist that thechallenges must be different for Alice and Bob (seeexercises).

• Let the initiator of a protocol be the first to prove hisidentity.

Page 85: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

21/41

Authentication With Public Key

Alice −→ Bob : Alice

Bob −→ Alice : RAlice −→ Bob : [R]Alice

Page 86: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

21/41

Authentication With Public Key

Alice −→ Bob : Alice

Bob −→ Alice : RAlice −→ Bob : [R]Alice

• Bob’s database doesn’t contain secrets anymore ⇒ neednot be protected against theft.

Page 87: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

21/41

Authentication With Public Key

Alice −→ Bob : Alice

Bob −→ Alice : RAlice −→ Bob : [R]Alice

• Bob’s database doesn’t contain secrets anymore ⇒ neednot be protected against theft.

• Database must still be protected against modification(much easier).

Page 88: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

22/41

Variation and Criticism (1)

Alice −→ Bob : Alice

Bob −→ Alice : {R}Alice

Alice −→ Bob : R

Page 89: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

22/41

Variation and Criticism (1)

Alice −→ Bob : Alice

Bob −→ Alice : {R}Alice

Alice −→ Bob : R

• Needs encryption in addition to signature.

Page 90: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

22/41

Variation and Criticism (1)

Alice −→ Bob : Alice

Bob −→ Alice : {R}Alice

Alice −→ Bob : R

• Needs encryption in addition to signature.

• Both protocols have the flaw that if Eve can impersonateBob, she can get arbitrary values signed (or encrypted).

Page 91: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

22/41

Variation and Criticism (1)

Alice −→ Bob : Alice

Bob −→ Alice : {R}Alice

Alice −→ Bob : R

• Needs encryption in addition to signature.

• Both protocols have the flaw that if Eve can impersonateBob, she can get arbitrary values signed (or encrypted).

• This is a serious flaw if the Alice’s key pair is used forthings other than authentication (e.g., for signing banktransfers).

Page 92: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

23/41

Criticism (2)

This problem can be solved if we stipulate that

• keys are never reused for different applications; or

Page 93: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

23/41

Criticism (2)

This problem can be solved if we stipulate that

• keys are never reused for different applications; or

• the system is coordinated that it’s not possible to use oneprotocol to break another (for example by formatting the Rvalues differently for different applications).

Page 94: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

23/41

Criticism (2)

This problem can be solved if we stipulate that

• keys are never reused for different applications; or

• the system is coordinated that it’s not possible to use oneprotocol to break another (for example by formatting the Rvalues differently for different applications).

Also note what this means:

Page 95: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

23/41

Criticism (2)

This problem can be solved if we stipulate that

• keys are never reused for different applications; or

• the system is coordinated that it’s not possible to use oneprotocol to break another (for example by formatting the Rvalues differently for different applications).

Also note what this means:

By combining two protocols that are secure in themselves,you get a system that is not secure at all; and you can

design protocols whose deployment threatens the securityof a system that is already in place!

Page 96: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

23/41

Criticism (2)

This problem can be solved if we stipulate that

• keys are never reused for different applications; or

• the system is coordinated that it’s not possible to use oneprotocol to break another (for example by formatting the Rvalues differently for different applications).

Also note what this means:

By combining two protocols that are secure in themselves,you get a system that is not secure at all; and you can

design protocols whose deployment threatens the securityof a system that is already in place!

For people who like to sound clever, we can also say thatsecurity isn’t closed under composition.

Page 97: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

24/41

Mutual Authentication With Public Key

Alice −→ Bob : Alice, {R2}Bob

Bob −→ Alice : R2, {R1}Alice

Alice −→ Bob : R1

Page 98: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

24/41

Mutual Authentication With Public Key

Alice −→ Bob : Alice, {R2}Bob

Bob −→ Alice : R2, {R1}Alice

Alice −→ Bob : R1

In an obvious variation, Alice could send R2 and Bob couldreturn [R2]Bob; Bob would then send R1 and Alice would return[R1]Alice.

Here the obvious problem is, how do Alice and Bob obtain theother’s public key?

Page 99: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

24/41

Mutual Authentication With Public Key

Alice −→ Bob : Alice, {R2}Bob

Bob −→ Alice : R2, {R1}Alice

Alice −→ Bob : R1

In an obvious variation, Alice could send R2 and Bob couldreturn [R2]Bob; Bob would then send R1 and Alice would return[R1]Alice.

Here the obvious problem is, how do Alice and Bob obtain theother’s public key?

• With a Key Distribution Center (KDC);

Page 100: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

24/41

Mutual Authentication With Public Key

Alice −→ Bob : Alice, {R2}Bob

Bob −→ Alice : R2, {R1}Alice

Alice −→ Bob : R1

In an obvious variation, Alice could send R2 and Bob couldreturn [R2]Bob; Bob would then send R1 and Alice would return[R1]Alice.

Here the obvious problem is, how do Alice and Bob obtain theother’s public key?

• With a Key Distribution Center (KDC);

• With Public Key Infrastructure (PKI)

Page 101: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

25/41

How Does Alice Obtain Her Private Key?

Assume Alice is sitting at her workstation. Can we really makeher type in a 512-bit RSA private key?

Page 102: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

25/41

How Does Alice Obtain Her Private Key?

Assume Alice is sitting at her workstation. Can we really makeher type in a 512-bit RSA private key?

• She can carry her key with her on a USB stick or otherportable device.

Page 103: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

25/41

How Does Alice Obtain Her Private Key?

Assume Alice is sitting at her workstation. Can we really makeher type in a 512-bit RSA private key?

• She can carry her key with her on a USB stick or otherportable device.

• She can obtain an encrypted version of her key from a KDC(or even from Bob) and decrypt it using a password.

Page 104: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

25/41

How Does Alice Obtain Her Private Key?

Assume Alice is sitting at her workstation. Can we really makeher type in a 512-bit RSA private key?

• She can carry her key with her on a USB stick or otherportable device.

• She can obtain an encrypted version of her key from a KDC(or even from Bob) and decrypt it using a password.

At the same place, one can store information that wouldenable Alice to learn Bob’s public key:

Page 105: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

25/41

How Does Alice Obtain Her Private Key?

Assume Alice is sitting at her workstation. Can we really makeher type in a 512-bit RSA private key?

• She can carry her key with her on a USB stick or otherportable device.

• She can obtain an encrypted version of her key from a KDC(or even from Bob) and decrypt it using a password.

At the same place, one can store information that wouldenable Alice to learn Bob’s public key:

• Encrypted with a key derived from Alice’s password;

Page 106: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

25/41

How Does Alice Obtain Her Private Key?

Assume Alice is sitting at her workstation. Can we really makeher type in a 512-bit RSA private key?

• She can carry her key with her on a USB stick or otherportable device.

• She can obtain an encrypted version of her key from a KDC(or even from Bob) and decrypt it using a password.

At the same place, one can store information that wouldenable Alice to learn Bob’s public key:

• Encrypted with a key derived from Alice’s password;

• Signed with Alice’s private key.

Page 107: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

26/41

Mediated Authentication

Mediated authentication happend when Alice first asks atrusted intermediary, Trent, to introduce her to Bob.

Page 108: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

26/41

Mediated Authentication

Mediated authentication happend when Alice first asks atrusted intermediary, Trent, to introduce her to Bob.

Because Trent is trusted by both Alice and Bob, authenticationis mutual.

Page 109: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

26/41

Mediated Authentication

Mediated authentication happend when Alice first asks atrusted intermediary, Trent, to introduce her to Bob.

Because Trent is trusted by both Alice and Bob, authenticationis mutual.

Does not need public key cryptography!

Page 110: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

26/41

Mediated Authentication

Mediated authentication happend when Alice first asks atrusted intermediary, Trent, to introduce her to Bob.

Because Trent is trusted by both Alice and Bob, authenticationis mutual.

Does not need public key cryptography!

Alice −→ Trent : Alice wants Bob

Trent : Invents KABTrent −→ Alice : {Use KAB for Bob}Alice

Trent −→ Bob : {Use KAB for Alice}Bob

Page 111: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

26/41

Mediated Authentication

Mediated authentication happend when Alice first asks atrusted intermediary, Trent, to introduce her to Bob.

Because Trent is trusted by both Alice and Bob, authenticationis mutual.

Does not need public key cryptography!

Alice −→ Trent : Alice wants Bob

Trent : Invents KABTrent −→ Alice : {Use KAB for Bob}Alice

Trent −→ Bob : {Use KAB for Alice}Bob

After this exchange, Alice and Bob can (must) authenticatethemselves.

Page 112: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

27/41

Mediated Authentication in Practice

In practice, it’s impractical to use the protocol like this:

• Alice’s first message to Bob (encrypted with KAB) mightarrive at Bob before Trent’s message that contains KAB.

Page 113: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

27/41

Mediated Authentication in Practice

In practice, it’s impractical to use the protocol like this:

• Alice’s first message to Bob (encrypted with KAB) mightarrive at Bob before Trent’s message that contains KAB.

• It’s impractical for Trent to open a connection to Bob.

Page 114: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

27/41

Mediated Authentication in Practice

In practice, it’s impractical to use the protocol like this:

• Alice’s first message to Bob (encrypted with KAB) mightarrive at Bob before Trent’s message that contains KAB.

• It’s impractical for Trent to open a connection to Bob.

Therefore, Trent will in general return to Alice not only{Use KAB for Bob}Alice, but also t = {Use KAB for Alice}Bob,which is called a ticket.

Page 115: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

27/41

Mediated Authentication in Practice

In practice, it’s impractical to use the protocol like this:

• Alice’s first message to Bob (encrypted with KAB) mightarrive at Bob before Trent’s message that contains KAB.

• It’s impractical for Trent to open a connection to Bob.

Therefore, Trent will in general return to Alice not only{Use KAB for Bob}Alice, but also t = {Use KAB for Alice}Bob,which is called a ticket.

Alice will then present t when she initiates a connection to Bob.

Page 116: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

27/41

Mediated Authentication in Practice

In practice, it’s impractical to use the protocol like this:

• Alice’s first message to Bob (encrypted with KAB) mightarrive at Bob before Trent’s message that contains KAB.

• It’s impractical for Trent to open a connection to Bob.

Therefore, Trent will in general return to Alice not only{Use KAB for Bob}Alice, but also t = {Use KAB for Alice}Bob,which is called a ticket.

Alice will then present t when she initiates a connection to Bob.

Both will then have to complete a mutual authentication.

Page 117: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

28/41

Needham-Schroeder (1)

• It’s a classic mediated authentication protocol with mutualauthentication.

Page 118: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

28/41

Needham-Schroeder (1)

• It’s a classic mediated authentication protocol with mutualauthentication.

• It’s been a model for many other protocols.

Page 119: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

28/41

Needham-Schroeder (1)

• It’s a classic mediated authentication protocol with mutualauthentication.

• It’s been a model for many other protocols.

• It’s used in Kerberos

Page 120: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

28/41

Needham-Schroeder (1)

• It’s a classic mediated authentication protocol with mutualauthentication.

• It’s been a model for many other protocols.

• It’s used in Kerberos and Kerberos is used in ActiveDirectory

Page 121: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

28/41

Needham-Schroeder (1)

• It’s a classic mediated authentication protocol with mutualauthentication.

• It’s been a model for many other protocols.

• It’s used in Kerberos and Kerberos is used in ActiveDirectory =⇒ huge installed base.

Page 122: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

28/41

Needham-Schroeder (1)

• It’s a classic mediated authentication protocol with mutualauthentication.

• It’s been a model for many other protocols.

• It’s used in Kerberos and Kerberos is used in ActiveDirectory =⇒ huge installed base.

• We’ll analyze this protocol in some detail in order tounderstand its strengths and weaknesses.

Page 123: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

29/41

Needham-Schroeder (2)

Alice −→ Trent : N1,Alice wants Bob

Trent : Invents KABTrent −→ Alice : {N1,Bob, KAB, {KAB,Alice}Bob}Alice

Alice : Verifies N1, extracts KAB and ticket

Alice −→ Bob : {KAB,Alice}Bob, {N2}ABBob : Extracts KAB from ticket

Bob −→ Alice : {N2 − 1, N3}ABAlice −→ Bob : {N3 − 1}AB

where {KAB,Alice}Bob is Trent’s ticket for Alice’s conversationwith Bob and the Ni are nonces, i.e., quantities used only once.

Page 124: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

30/41

Analysis of Needham-Schroeder (1)

Why the Nonce in the first message?

Page 125: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

30/41

Analysis of Needham-Schroeder (1)

Why the Nonce in the first message?

Otherwise, the protocol could be susceptibe to a replay attack.Assume that Eve has captured a previous exchange of thismodified Needham-Schroeder protocol and has, by someeffort, broken KAB:

Page 126: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

30/41

Analysis of Needham-Schroeder (1)

Why the Nonce in the first message?

Otherwise, the protocol could be susceptibe to a replay attack.Assume that Eve has captured a previous exchange of thismodified Needham-Schroeder protocol and has, by someeffort, broken KAB:

Alice −→ Eve : Alice wants Bob

Eve −→ Alice : {Bob, KAB, {KAB,Alice}Bob}Alice

and Eve will now be able to decrypt the conversation betweenAlice and Bob.

Page 127: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

30/41

Analysis of Needham-Schroeder (1)

Why the Nonce in the first message?

Otherwise, the protocol could be susceptibe to a replay attack.Assume that Eve has captured a previous exchange of thismodified Needham-Schroeder protocol and has, by someeffort, broken KAB:

Alice −→ Eve : Alice wants Bob

Eve −→ Alice : {Bob, KAB, {KAB,Alice}Bob}Alice

and Eve will now be able to decrypt the conversation betweenAlice and Bob. This can’t happen with N1 used in the first step,because Eve can’t encrypt N1.

Page 128: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

31/41

Analysis of Needham-Schroeder (2)

Why is Bob in the message from the KDC to Alice?

Page 129: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

31/41

Analysis of Needham-Schroeder (2)

Why is Bob in the message from the KDC to Alice?

To make it impossible for Trudy to substitute her own namefor Bob’s:

Page 130: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

31/41

Analysis of Needham-Schroeder (2)

Why is Bob in the message from the KDC to Alice?

To make it impossible for Trudy to substitute her own namefor Bob’s:

Alice −→ Trudy : Alice wants Bob

Trudy : Intercepts and changes the message

Trudy −→ Trent : Alice wants Trudy

Trent −→ Trudy : {KAB, {KAB}Trudy}Alice

Trudy −→ Alice : {KAB, {KAB}Trudy}Alice

Trudy : Impersonates Bob

Page 131: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

32/41

Nonces

As we have said, a nonce is a number used only once.

Page 132: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

32/41

Nonces

As we have said, a nonce is a number used only once.

It is possible to introduce weaknesses into protocols if thenonces have the wrong properties.

Page 133: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

32/41

Nonces

As we have said, a nonce is a number used only once.

It is possible to introduce weaknesses into protocols if thenonces have the wrong properties.

Nonce types are:

• a timestamp;

Page 134: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

32/41

Nonces

As we have said, a nonce is a number used only once.

It is possible to introduce weaknesses into protocols if thenonces have the wrong properties.

Nonce types are:

• a timestamp;

• a sequence number;

Page 135: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

32/41

Nonces

As we have said, a nonce is a number used only once.

It is possible to introduce weaknesses into protocols if thenonces have the wrong properties.

Nonce types are:

• a timestamp;

• a sequence number; and

• a large random number.

Page 136: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

33/41

Large Random Numbers as Nonces (1)

Why can we use a random number as a nonce when there is achance that it would be reused?

Page 137: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

33/41

Large Random Numbers as Nonces (1)

Why can we use a random number as a nonce when there is achance that it would be reused?

Back-of-envelope-calculation: Assume n-bit random numbers;there are N = 2n of them. The probability that k independentdraws out of N numbers yield all different numbers isN(N − 1) · · · (n− k+ 1)/Nk.

The relative difference between N and N − k+ 1 isδ = (k− 1)/N. (I.e., N − k+ 1 = (1− δ)N.) Let’s assume wegenerate a 128-bit nonce every millisecond for 1000 years.That will be 1000 · 366 · 24 · 3600 · 1000 = 31622400000000or about 245 nonces. With N = 2128 and k = 245, we haveδ ≈ 245/2128 = 2−83.

Page 138: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

34/41

Large Random Numbers as Nonces (2)

N − k+ 1 ≈ (1− 2−83)N; therefore

N(N − 1) · · · (N − k+ 1)/Nk ≥ (N − k+ 1)k/Nk

≈ (1− 2−83)kNk/Nk

≈ (1− 2−83)k

≈ 1− k · 2−83

≈ 1− 245 · 2−83

= 1− 2−38.

Therefore, it is practically certain that all nonces are different.(2−38 ≈ 3.6 · 10−12.)

Page 139: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

35/41

Timestamps and Sequence Numbers

• Timestamps require synchronized clocks.

Page 140: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

35/41

Timestamps and Sequence Numbers

• Timestamps require synchronized clocks.

• A sequence number requires that at least one partyremembers the last sequence number it has handed out

Page 141: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

35/41

Timestamps and Sequence Numbers

• Timestamps require synchronized clocks.

• A sequence number requires that at least one partyremembers the last sequence number it has handed out.

Alice −→ Bob : Alice

Bob −→ Alice : {R}ABAlice −→ Bob : R

Page 142: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

36/41

Breaking The Protocol

If Bob used sequence numbers, Eve could listen in to only oneexchange between Alice and Bob. Then she would know thecurrent value of R and could impersonate Alice:

Eve −→ Bob : Alice

Bob −→ Eve : {R + 1}ABEve −→ Bob : R + 1

Eve can answer “R+1” in step 3, even though she can’t decrypt{R + 1}AB, because she can predict what the challenge will be.

Page 143: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

37/41

Random Numbers

If you use random numbers for nonces, be sure to pick goodones. We’ve had two lectures on how to do that, so we won’ttalk about that any further.

Page 144: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

38/41

Performance

In order to evaluate a protocol’s performance, the followingfactors must be checked:

Page 145: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

38/41

Performance

In order to evaluate a protocol’s performance, the followingfactors must be checked:

• Number of signatures

Page 146: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

38/41

Performance

In order to evaluate a protocol’s performance, the followingfactors must be checked:

• Number of signatures

• Number of public-key encryptions

Page 147: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

38/41

Performance

In order to evaluate a protocol’s performance, the followingfactors must be checked:

• Number of signatures

• Number of public-key encryptions

• Number of bytes encrypted with a secret key

Page 148: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

38/41

Performance

In order to evaluate a protocol’s performance, the followingfactors must be checked:

• Number of signatures

• Number of public-key encryptions

• Number of bytes encrypted with a secret key

• Number of bytes to be hashed

Page 149: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

38/41

Performance

In order to evaluate a protocol’s performance, the followingfactors must be checked:

• Number of signatures

• Number of public-key encryptions

• Number of bytes encrypted with a secret key

• Number of bytes to be hashed

• Number and size of messages transmitted

Page 150: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

38/41

Performance

In order to evaluate a protocol’s performance, the followingfactors must be checked:

• Number of signatures

• Number of public-key encryptions

• Number of bytes encrypted with a secret key

• Number of bytes to be hashed

• Number and size of messages transmitted

• Number of connection buildups and teardowns

Page 151: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

39/41

Checklist

A checklist can be found in Charlie Kaufman, Radia Perlman,Mike Speciner, Network Security, Prentice-Hall. (The secondedition has the list on p. 285f.)

Page 152: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

40/41

Summary

• Simple Authentication Protocols

Page 153: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

40/41

Summary

• Simple Authentication Protocols

• Common Pitfalls

Page 154: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

40/41

Summary

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

Page 155: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

40/41

Summary

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

• Login-only protocols

Page 156: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

40/41

Summary

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

• Login-only protocols

• Mutual authentication

Page 157: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

40/41

Summary

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

• Login-only protocols

• Mutual authentication with Key Distribution Center

Page 158: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

40/41

Summary

• Simple Authentication Protocols

• Common Pitfalls

• Ways to Analyze Protocols

• Login-only protocols

• Mutual authentication with Key Distribution Center

• Needham-Schroeder

Page 159: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

41/41

Resources

• Ross Anderson, Security Engineering, John Wiley & Sons

Page 160: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

41/41

Resources

• Ross Anderson, Security Engineering, John Wiley & Sons

• Bruce Schneier, Applied Cryptography, John Wiley & Sons

Page 161: Alice Who? · Authentication happens between two or more parties and is the process of convincing another party that one party has indeed the identity it claims to have. Meet Alice

41/41

Resources

• Ross Anderson, Security Engineering, John Wiley & Sons

• Bruce Schneier, Applied Cryptography, John Wiley & Sons

• Charlie Kaufman, Radia Perlman, Mike Speciner, NetworkSecurity, Prentice-Hall