Cryptography: Computer Science and Engineering
Cryptography: Computer Science and Engineering
Cryptography: Computer Science and Engineering
PIET-PIT,CSE IT TEAM
Computer Science and Engineering
CHAPTER-8
User Authentication
Content
• Principles
• Remote user authentication with symmetric encryption
• Remote user authentication with asymmetric encryption
• Kerberos
User Authentication
⮚fundamental security building block
●basis of access control & user accountability
⮚It is the process of verifying an identity claimed by or for a system entity
⮚has two steps:
●identification - specify identifier
●verification - bind entity (person) and identifier
Way to Achieve User Authentication
⮚four means of authenticating user's identity
⮚based one something the individual
●Something the individual knows - e.g. password, PIN
●Something the individual possesses- e.g. key, token, smartcard
●Something the individual is (static biometrics)- e.g. fingerprint, retina
●Something the individual does (dynamic biometrics) - e.g. voice, sign
⮚can use alone or combined
⮚all can provide user authentication
⮚all have issues
Protocol For User Authentication
used to convince parties of each others identity and to exchange session keys
may be one-way or mutual
key issues are
confidentiality – to protect session keys
timeliness – to prevent replay attacks
Types of Replay Attack
1. The simplest replay attack is one in which the opponent simply copies a
message and replays it later.
2. An opponent can replay a timestamped message within the valid time window.
If both the original and the replay arrive within then time window, this incident
can be logged.
3. As with example (2), an opponent can replay a timestamped message within
the valid time window, but in addition, the opponent suppresses the original
message. Thus, the repetition cannot be detected.
4. Another attack involves a backward replay without modification. This is a
replay back to the message sender. This attack is possible if symmetric encryp-
tion is used and the sender cannot easily recognize the difference between
messages sent and messages received on the basis of content.
How to avoid Replay Attack
• Timestamps: Party A accepts a message as fresh only if the message contains a
timestamp that, in A’s judgment, is close enough to A’s knowledge of current
time. This approach requires that clocks among the various participants be
synchronized.
• Challenge/response: Party A, expecting a fresh message from B, first sends B a
nonce (challenge) and requires that the subsequent message (response)
received from B contain the correct nonce value.
One way User Authentication
required when sender & receiver are not in communications at same time
(eg. email)
have header in clear so can be delivered by email system
may want contents of body protected & sender authenticated
Symmetric Encryption User Authentication
A two-level hierarchy of symmetric encryption keys can be used to provide
confidentiality for communication in a distributed environment.
Usually involves the use of a trusted key distribution center (KDC). Each party
shares own master key with KDC
• KDC generates session keys used for connections between parties
• master keys used to distribute these to them
Needham-Scroeder Protocol
original third-party key distribution protocol
for session between A B mediated by KDC
protocol overview is:
Mutual Authentication
1. A ---> KDC
IDa || IDb || N1
2. KDC ---> A
E(Ka, [Ks || IDb || N1 || E(Kb,[Ks || IDa)])
3. A ---> B
E(Kb, [Ks || IDa])
4. B ---> A
E(Ks, N2)
5. A ---> B
E(Ks, f(N2))
One way Authentication
use refinement of KDC to secure email
since B no online, drop steps 4 & 5
One-way Authentication
1. A ---> KDC
IDa || IDb || N1
2. KDC ---> A
E(Ka, [Ks || IDb || N1 || E(Kb, [Ks || IDa])])
3. A ---> B
E(Kb, [Ks || IDa]) || E(Ks, M)
C--->AS : IDc||IDtgs||TS1
Step-2
The AS finds the keys corresponding to the login name and the TGS name.
The AS creates a ticket:
Login name
TGS name
Client network address
TGS session key
The AS seals the ticket with the TGS secret key.
Fig-8.2 Kerberos Protocol(Image Source: Ref[1])
AS--->C: E(Kc, [Kc,tgs||IDtgs||TS2||Lifetime2||
Tickettgs])
Tickettgs=E(Ktgs, [Kc,tgs||IDc||ADc||IDtgs||TS2||
Lifetime2])
Step-3
The client decrypts the message using the user’s password as the secret key.
The client now has a session key and ticket that can be used to contact the TGS.
The client cannot see inside the ticket, since the client does not know the TGS
secret key.
When a client wants to start using a server (service), the client must first obtain a
ticket.
The client composes a request to send to the TGS
C--->TGS: Idv||Tickettgs||
Authenticatorc
Step-4
Tickettgs=E(Ktgs, [Kc,tgs||IDc||ADc||IDtgs||TS2||Lifetime2])
AuthenticatorC=E(Kc,tgs, [IDc||ADc||TS3])
Step-4
The TGS decrypts the ticket using it’s secret key. Inside is the TGS session key.
The TGS decrypts the authenticator using the session key.
The TGS check to make sure login names, client addresses and TGS server name
are all ok.
TGS makes sure the authenticator is recent.
Builds a ticket for the client and requested server. The ticket is sealed with the
server key.Creates a session key.Seals the entire message with the tgs session key
and sends it to the client.
Tickettgs=E(Ktgs, [Kc,tgs||IDc||ADc||IDtgs||TS2||Lifetime2])
TicketV=E(KV, [Kc,V||IDc||ADc||IDV||TS4||Lifetime4])
AuthenticatorC=E(Kc,tgs, [IDc||ADc||TS3])
Step-5
The client now decrypts the TGS response using the TGS session key.
The client now has a session key for use with the new server, and a ticket to use
with that server.
The client can contact the new server using the same format used to access the
TGS.
TicketV=E(KV, [Kc,V||IDc||
ADc||IDV||TS4||Lifetime4])
AuthenticatorC=E(Kc,v,
[IDc||ADc||TS5])
Step-6
Server verifies the ticket and authentication matches then grant the service to
client.
What is Ticket
• Each request for a service requires a ticket.
• A ticket provides a single client with access to a single server.
• Tickets are dispensed by the “ticket granting server” (TGS), which has
knowledge of all the encryption keys.
• Tickets are meaningless to clients, they simply use them to gain access to
servers.
• The TGS seals (encrypts) each ticket with the secret encryption key of the
server.
• Sealed tickets can be sent safely over a network - only the server can make
sense out of it.
• Each ticket has a limited lifetime (a few hours).
Content of Ticket
• Client name (user login name)
• Server name
• Client host network address
• Session key for client/server
• Ticket lifetime
• Creation timestamp
Let’s Recap