CSS411 Cryptography

User Authentication

Slide deck 18. Means of user authentication, replay attacks, the Needham-Schroeder protocol and one-way authentication.

13 min read

User authentication basicsSearch on YouTube

DefinitionSearch on YouTube

User authentication is the process of verifying an identity claimed by or for a system entity. It is a fundamental security building block. It is the basis of access control and user accountability.

User authentication has two steps:

  1. Identification: the user specifies an identifier, for example a user name.
  2. Verification: the system binds the entity (the person) and the identifier.

User authentication is distinct from message authentication. Message authentication shows that a message is not changed and comes from the claimed source. User authentication verifies the identity of a user.

A common exam answer: "User authentication has two steps, identification and verification. It is the basis of access control and user accountability."

Means of user authenticationSearch on YouTube

There are four means to authenticate the identity of a user. They are based on something the individual:

MeansExamples
KnowsPassword, PIN
PossessesKey, token, smartcard
Is (static biometrics)Fingerprint, retina
Does (dynamic biometrics)Voice, signature
  • A system can use the means alone or combined, for example a smartcard and a PIN.
  • All four means can provide user authentication.
  • All four have issues. For example, an attacker can guess a password, and a user can lose a token.

Know, Have, Are, Do: password, token, fingerprint, voice.

Do not mix the two biometric types. "Is" means a static physical feature, such as a fingerprint. "Does" means a dynamic action, such as voice or a signature.

Authentication protocolsSearch on YouTube

Purpose and key issuesSearch on YouTube

An authentication protocol convinces the parties of each other's identity. It also exchanges session keys. A protocol can be one-way (one party proves its identity) or mutual (both parties prove their identity).

The key issues are:

  • Confidentiality: the protocol must protect the session keys.
  • Timeliness: the protocol must prevent replay attacks.

Replay attacksSearch on YouTube

In a replay attack, an attacker copies a valid signed message and resends it later. The standard types are:

TypeDescription
Simple replayThe attacker copies a message and replays it later
Repetition that can be loggedThe attacker replays a timestamped message inside its valid time window
Repetition that cannot be detectedThe attacker suppresses the original message, so only the replay arrives
Backward replay without modificationThe attacker replays the message back to its sender

CountermeasuresSearch on YouTube

CountermeasureLimit
Sequence numbersGenerally impractical, because each party must track the last number from each peer
TimestampsNeed synchronized clocks
Challenge/responseUses a unique nonce (a number used once)

In challenge/response, the verifier sends a new nonce NN. The other party returns an answer that depends on NN, for example f(N)f(N). An old answer does not match a new nonce, so a replay fails.

Countermeasures in slide order: S-T-C. Sequence numbers, Timestamps, Challenge/response.

Symmetric key protocolsSearch on YouTube

Two-level key hierarchySearch on YouTube

With symmetric encryption, a system can use a two-level hierarchy of keys. Usually a trusted Key Distribution Center (KDC) controls it:

  • Each party shares its own master key with the KDC.
  • The KDC generates session keys for the connections between parties.
  • The KDC uses the master keys to distribute the session keys.

With nn parties, each party keeps one master key with the KDC. No party needs a secret key with each of the other n−1n - 1 parties.

Needham-Schroeder protocolSearch on YouTube

The Needham-Schroeder protocol is the original third-party key distribution protocol. A KDC mediates a session between AA and BB.

Notation: KaK_a and KbK_b are the master keys of AA and BB. KsK_s is the new session key. N1N_1 and N2N_2 are nonces. ∥\Vert is concatenation.

  1. A→A \to KDC: IDA∥IDB∥N1ID_A \Vert ID_B \Vert N_1
  2. KDC →A\to A: E(Ka,[Ks∥IDB∥N1∥E(Kb,[Ks∥IDA])])E(K_a, [K_s \Vert ID_B \Vert N_1 \Vert E(K_b, [K_s \Vert ID_A])])
  3. A→BA \to B: E(Kb,[Ks∥IDA])E(K_b, [K_s \Vert ID_A])
  4. B→AB \to A: E(Ks,[N2])E(K_s, [N_2])
  5. A→BA \to B: E(Ks,[f(N2)])E(K_s, [f(N_2)])
StepPurpose
1, 2AA gets KsK_s. N1N_1 shows AA that the reply is fresh.
3AA forwards the part for BB. Only BB can decrypt it.
4BB sends a challenge N2N_2 under KsK_s.
5AA returns f(N2)f(N_2). This shows BB that AA holds KsK_s now.

The protocol distributes a new session key securely for communications between AA and BB.

Replay weakness and fixesSearch on YouTube

The protocol is vulnerable to a replay attack if an old session key has been compromised. An attacker who knows an old KsK_s resends message 3. BB then believes that it communicates with AA. The attacker knows KsK_s, so he can also answer step 4.

The modifications that address this require:

  • Timestamps in steps 2 and 3 (Denning, 1981).
  • An extra nonce (Neuman, 1993).

Message 3 is the replay target. It contains nothing new from BB, so BB cannot tell an old copy from a new one.

One-way authenticationSearch on YouTube

RequirementsSearch on YouTube

One-way authentication is necessary when the sender and the receiver are not in communications at the same time, for example email.

  • The header must be in clear, so the email system can deliver the message.
  • The sender may want the contents of the body protected.
  • The receiver may want the sender authenticated.

One-way protocol with a KDCSearch on YouTube

This protocol is a refinement of the KDC protocol for secure email. BB is not online, so the protocol drops steps 4 and 5:

  1. A→A \to KDC: IDA∥IDB∥N1ID_A \Vert ID_B \Vert N_1
  2. KDC →A\to A: E(Ka,[Ks∥IDB∥N1∥E(Kb,[Ks∥IDA])])E(K_a, [K_s \Vert ID_B \Vert N_1 \Vert E(K_b, [K_s \Vert ID_A])])
  3. A→BA \to B: E(Kb,[Ks∥IDA])∥E(Ks,M)E(K_b, [K_s \Vert ID_A]) \Vert E(K_s, M)

The protocol provides encryption and some authentication. Only BB can decrypt KsK_s, so only BB can read MM. The KDC put IDAID_A with KsK_s, so BB knows that the key is for a session with AA.

The one-way protocol does not protect from a replay attack. BB sends no challenge, so BB cannot tell a new message from a replayed copy.

Quick self-testSearch on YouTube

Define user authentication and give its two steps.

User authentication is the process of verifying an identity claimed by or for a system entity. Step 1 is identification: the user specifies an identifier. Step 2 is verification: the system binds the entity and the identifier.

How is user authentication different from message authentication?

User authentication verifies the identity of a user. Message authentication shows that a message is not changed and comes from the claimed source.

Give the four means of user authentication with examples.

Something the individual knows (password, PIN), possesses (key, token, smartcard), is (static biometrics: fingerprint, retina) and does (dynamic biometrics: voice, signature).

What are the two key issues of authentication protocols?

Confidentiality, to protect the session keys. Timeliness, to prevent replay attacks.

Give the four types of replay attack.

Simple replay, repetition that can be logged, repetition that cannot be detected, and backward replay without modification.

Give the three countermeasures to replay attacks and the limit of each.

Sequence numbers are generally impractical. Timestamps need synchronized clocks. Challenge/response uses a unique nonce and needs both parties online.

Write the five steps of the Needham-Schroeder protocol.

(1) A→A \to KDC: IDA∥IDB∥N1ID_A \Vert ID_B \Vert N_1. (2) KDC →A\to A: E(Ka,[Ks∥IDB∥N1∥E(Kb,[Ks∥IDA])])E(K_a, [K_s \Vert ID_B \Vert N_1 \Vert E(K_b, [K_s \Vert ID_A])]). (3) A→BA \to B: E(Kb,[Ks∥IDA])E(K_b, [K_s \Vert ID_A]). (4) B→AB \to A: E(Ks,[N2])E(K_s, [N_2]). (5) A→BA \to B: E(Ks,[f(N2)])E(K_s, [f(N_2)]).

What is the weakness of Needham-Schroeder and how is it fixed?

If an old session key is compromised, an attacker resends message 3 and BB believes it communicates with AA. Fixes: timestamps in steps 2 and 3 (Denning 81), or an extra nonce (Neuman 93).

Why does the one-way protocol drop steps 4 and 5, and what does it lose?

BB is not online, so BB cannot send a challenge. The protocol still gives encryption and some authentication. It does not protect from a replay attack.

  • User authentication has two steps, identification and verification. It is the basis of access control and user accountability.
  • The four means are something the user knows, possesses, is and does.
  • Authentication protocols need confidentiality of session keys and timeliness. Replay countermeasures are sequence numbers, timestamps and challenge/response.
  • Needham-Schroeder uses a KDC and five messages. A replay of message 3 works if an old session key leaks. Timestamps (Denning 81) or an extra nonce (Neuman 93) fix this.
  • The one-way email protocol drops steps 4 and 5. It gives encryption and some authentication, but no replay protection.