Kerberos
Kerberos
Network Security
8
Digital Signature Algorithm
(DSA)
creates a 320 bit signature
with 512-1024 bit security
smaller and faster than RSA
a digital signature scheme only
security depends on difficulty of computing
discrete logarithms
variant of ElGamal & Schnorr schemes
9
Digital Signature Algorithm
(DSA)
10
DSA Key Generation
have shared global public key values (p,q,g):
choose q, a 160 bit
choose a large prime p = 2L
• where L= 512 to 1024 bits and is a multiple of 64
• and q is a prime factor of (p-1)
choose g = h(p-1)/q
• where h<p-1, h(p-1)/q (mod p) > 1
users choose private & compute public key:
choose x<q
compute y = gx (mod p)
11
DSA Signature Creation
to sign a message M the sender:
generates a random signature key k, k<q
k must be random, be destroyed after use,
and never be reused
then compute signature pair:
r = (gk(mod p))(mod q)
s = (k-1.H(M)+ x.r)(mod q)
sends signature (r,s) with message M
12
DSA Signature Verification
having received M & signature (r,s)
to verify a signature, recipient computes:
w = s-1(mod q)
u1= (H(M).w)(mod q)
u2= (r.w)(mod q)
v = (gu1.yu2(mod p)) (mod q)
if v=r then signature is verified
see book web site for details of proof why
13
Summary
have discussed:
digital signatures
authentication protocols (mutual & one-way)
digital signature algorithm and standard
14
Using Symmetric Encryption
as discussed previously can use a two-
level hierarchy of keys
usually with 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-Schroeder Protocol
original third-party key distribution protocol
for session between A B mediated by KDC
protocol overview is:
1. A->KDC: IDA || IDB || N1
2. KDC -> A: EKa[Ks || IDB || N1 || EKb[Ks||IDA] ]
3. A -> B: EKb[Ks||IDA]
4. B -> A: EKs[N2]
5. A -> B: EKs[f(N2)]
Needham-Schroeder Protocol
used to securely distribute a new session
key for communications between A & B
but is vulnerable to a replay attack if an old
session key has been compromised
then message 3 can be resent convincing B
that is communicating with A
modifications to address this require:
timestamps (Denning 81)
using an extra nonce (Neuman 93)
Using Public-Key Encryption
have a range of approaches based on the
use of public-key encryption
need to ensure have correct public keys
for other parties
using a central Authentication Server (AS)
various protocols exist using timestamps
or nonces
Denning AS Protocol
Denning 81 presented the following:
1. A -> AS: IDA || IDB
2. AS -> A: EPRas[IDA||PUa||T] || EPRas[IDB||PUb||T]
3. A -> B: EPRas[IDA||PUa||T] || EPRas[IDB||PUb||T] ||
EPUb[EPRas[Ks||T]]
note session key is chosen by A, hence AS need
not be trusted to protect it
timestamps prevent replay but require
synchronized clocks
One-Way 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
Using Symmetric Encryption
can refine use of KDC but can’t have final
exchange of nonces, vis:
1. A->KDC: IDA || IDB || N1
2. KDC -> A: EKa[Ks || IDB || N1 || EKb[Ks||IDA] ]
3. A -> B: EKb[Ks||IDA] || EKs[M]
does not protect against replays
could rely on timestamp in message, though
email delays make this problematic
Public-Key Approaches
have seen some public-key approaches
if confidentiality is major concern, can use:
A->B: EPUb[Ks] || EKs[M]
has encrypted session key, encrypted message
if authentication needed use a digital
signature with a digital certificate:
A->B: M || EPRa[H(M)] || EPRas[T||IDA||PUa]
with message, signature, certificate
Digital Signature Standard (DSS)
US Govt approved signature scheme
designed by NIST & NSA in early 90's
published as FIPS-186 in 1991
revised in 1993, 1996 & then 2000
uses the SHA hash algorithm
DSS is the standard, DSA is the algorithm
FIPS 186-2 (2000) includes alternative RSA &
elliptic curve signature variants
Digital Signature Algorithm
(DSA)
creates a 320 bit signature
with 512-1024 bit security
smaller and faster than RSA
a digital signature scheme only
security depends on difficulty of computing
discrete logarithms
variant of ElGamal & Schnorr schemes
Digital Signature Algorithm
(DSA)
DSA Key Generation
have shared global public key values (p,q,g):
choose a large prime p with 2L-1 < p < 2L
• where L= 512 to 1024 bits and is a multiple of 64
choose q with 2159 < q < 2160
• such that q is a 160 bit prime divisor of (p-1)
choose g = h(p-1)/q
• where 1<h<p-1 and h(p-1)/q mod p > 1
users choose private & compute public key:
choose x<q
compute y = gx mod p
DSA Signature Creation
to sign a message M the sender:
generates a random signature key k, k<q
nb. k must be random, be destroyed after
use, and never be reused
then computes signature pair:
r = (gk mod p)mod q
s = [k-1(H(M)+ xr)] mod q
sends signature (r,s) with message M
DSA Signature Verification
having received M & signature (r,s)
to verify a signature, recipient computes:
w = s-1 mod q
u1= [H(M)w ]mod q
u2= (rw)mod q
v = [(gu1 yu2)mod p ]mod q
if v=r then signature is verified
see book web site for details of proof why
Summary
have discussed:
digital signatures
authentication protocols (mutual & one-way)
digital signature algorithm and standard
Authentication Applications
will consider authentication functions
developed to support application-level
authentication & digital signatures
will consider Kerberos – a private-key
authentication service
then X.509 - a public-key directory
authentication service
Kerberos
trusted key server system from MIT
provides centralised private-key third-party
authentication in a distributed network
allows users access to services distributed
through network
without needing to trust all workstations
rather all trust a central authentication server
two versions in use: 4 & 5
Kerberos Requirements
its first report identified requirements as:
secure
reliable
transparent
scalable
implemented using an authentication
protocol based on Needham-Schroeder
Kerberos v4 Overview
a basic third-party authentication scheme
have an Authentication Server (AS)
users initially negotiate with AS to identify self
AS provides a non-corruptible authentication
credential (ticket granting ticket TGT)
have a Ticket Granting server (TGS)
users subsequently request access to other
services from TGS on basis of users TGT
Kerberos v4 Dialogue
1. obtain ticket granting ticket from AS
• once per session
2. obtain service granting ticket from TGT
• for each distinct service required
3. client/server exchange to obtain service
• on every service request
Introduction
Security
The world is full of unscrupulous people, and
we must protect vital data and services.
Many tools exist for system administrators
that provide security.
But, as security increases, so does user
burden.
System administrators need a tool that is
tough and convenient.
Threats in a distributed
environment
Distributed computing model, client/server
1) A user gains access to a WS, and pretend to be another user
operating from that WS.
2) A user alters the network address of a WS so that the request
sent from the altered WS appear to come from impersonate
WS.
3) A user eavesdrops and uses a replay to gain entrance to a
server or disrupt operations.
In any of these case unauthorized user
may gain access to service and data that
he is not authorized to access.
Kerberos
trusted key server system from MIT
provides centralised private-key third-party
authentication in a distributed network
allows users access to services distributed
through network
without needing to trust all workstations
rather all trust a central authentication server
two versions in use: 4 & 5
Kerberos Requirements
first published report identified its requirements as:
security-an eavesdropper shouldn’t be able to get enough
information to impersonate the user
reliability- services using Kerberos would be unusable if
Kerberos isn’t available
transparency-users should be unaware of its presence
scalability- should support large number of users
implemented using a 3rd party authentication scheme
using a protocol proposed by Needham-Schroeder
Kerberos 4 Overview
a basic third-party authentication scheme
uses DES buried in an elaborate protocol
Authentication Server (AS)
user initially negotiates with AS to identify self
AS provides a non-corruptible authentication
credential (ticket-granting ticket TGT)
Ticket Granting server (TGS)
users subsequently request access to other services
from TGS on basis of users TGT
How Kerberos works
In A Simple Scenario kerberos work in
three step
1. C AS : IDc || Pc || IDv
2. AS C : Ticket
3. C V : IDc || Ticket
Authen-
Tication
Service
Alice
Desktop
Alice Computer
BOB Service Represents something
requiring Kerberos
authentication (web
server, ftp server, ssh Key
server, etc…) Distribution
Center
Authen-
Tication
Service
Alice
Desktop
Alice Computer
BOB Service
Key
“I’d like to be allowed to Distribution
get tickets from AS. Center
Authen-
Tication
Service
Alice
Desktop
Alice Computer
BOB Service
“AS checks its database for
proper password and user ID
and whether this user is Key
permitted access the server V Distribution
And if confirm Generate a Center
Ticket .”
Authen-
Tication
Service
Alice
Desktop
Alice Computer
Alice Sends this to
BOB Service BOB
I’m Alice. I’ll prove it.
Here’s a copy of my
ticket and Alice ID for
BOB. Key
Distribution
Center
Authen-
Hey BOB:
Hey BOB: Tication
Alice is Alice.
Alice is Alice.
TGT Service
CONFIRMED: TGS
CONFIRMED:
Alice
Desktop
Alice Computer
That’s Alice alright. Let me
determine if she is
authorized to use me.
BOB Service
Hey BOB:
Alice is Alice. Key
CONFIRMED: Distribution
Center
Authen-
Hey BOB:
Tication
Alice is Alice. TGT Service
CONFIRMED:
Alice
Desktop
Alice Computer
More Secure Authentication
Dialogue
This scenario solve Authentication problem
but there are still some problem:
a) Minimize the no. of time that a user has to
Enter a password.
(1. Make the Ticket , for single Login session
2. It remain case that a user need a new ticket for every new service)