User Authentication
Slide deck 18. Means of user authentication, replay attacks, the Needham-Schroeder protocol and one-way authentication.
Key Management in Cryptography | Symmetric Key Distribution | Needham Schroeder Protocol | KDCT V Nagaraju Technical · symmetric key distribution, KDC and Needham-Schroeder, 16 min
Needham and Schroeder Protocol (English Version)WorthWatching · Needham-Schroeder protocol messages, 12 min
How NOT to Store Passwords! - ComputerphileComputerphile · how not to store passwords: hashing and salts, 9 minUser 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:
- Identification: the user specifies an identifier, for example a user name.
- 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:
| Means | Examples |
|---|---|
| Knows | Password, PIN |
| Possesses | Key, 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:
| Type | Description |
|---|---|
| Simple replay | The attacker copies a message and replays it later |
| Repetition that can be logged | The attacker replays a timestamped message inside its valid time window |
| Repetition that cannot be detected | The attacker suppresses the original message, so only the replay arrives |
| Backward replay without modification | The attacker replays the message back to its sender |
CountermeasuresSearch on YouTube
| Countermeasure | Limit |
|---|---|
| Sequence numbers | Generally impractical, because each party must track the last number from each peer |
| Timestamps | Need synchronized clocks |
| Challenge/response | Uses a unique nonce (a number used once) |
In challenge/response, the verifier sends a new nonce . The other party returns an answer that depends on , for example . 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 parties, each party keeps one master key with the KDC. No party needs a secret key with each of the other parties.
Needham-Schroeder protocolSearch on YouTube
The Needham-Schroeder protocol is the original third-party key distribution protocol. A KDC mediates a session between and .
Notation: and are the master keys of and . is the new session key. and are nonces. is concatenation.
- KDC:
- KDC :
- :
- :
- :
| Step | Purpose |
|---|---|
| 1, 2 | gets . shows that the reply is fresh. |
| 3 | forwards the part for . Only can decrypt it. |
| 4 | sends a challenge under . |
| 5 | returns . This shows that holds now. |
The protocol distributes a new session key securely for communications between and .
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 resends message 3. then believes that it communicates with . The attacker knows , 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 , so 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. is not online, so the protocol drops steps 4 and 5:
- KDC:
- KDC :
- :
The protocol provides encryption and some authentication. Only can decrypt , so only can read . The KDC put with , so knows that the key is for a session with .
The one-way protocol does not protect from a replay attack. sends no challenge, so 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) KDC: . (2) KDC : . (3) : . (4) : . (5) : .
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 believes it communicates with . 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?
is not online, so 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.