Cis5373 - 5-Keydist KMT
Cis5373 - 5-Keydist KMT
Class 5
Stallings: Ch 14
CIS-5373: 10.February.2020 1
Announcement
CIS-5373: 10.February.2020 2
Key Distribution: The Problem
C= Encrypt(pubKeyB, M)
Alice
2
Has message M Bob
Intercept C
pubKeyB - public
privKeyB - private
Cannot Infer privKeyB
from pubKeyB ! M= Decrypt(privKeyB, C)
CIS-5373: 10.February.2020 3
Key Distribution: Symmetric Key Scenario
CIS-5373: 10.February.2020 4
Symmetric Key Scenario
CIS-5373: 10.February.2020 5
How To Distribute Keys
CIS-5373: 10.February.2020 6
Symmetric Crypto Notations
CIS-5373: 10.February.2020 7
Symmetric Key Based Distribution
A and B share secret key A: KA
with KDC ! B: KB
1
“Hi”, A, B
Trent T
2
(KDC)
EA(KAB), EB(KAB)
EB(KAB)
6
EAB(M)
Alice A
3 5
Bob B
DA(EA(KAB)) =KAB DB(EB(KAB)) = KAB
CIS-5373: 10.February.2020 8
Key Distribution Problems
CIS-5373: 10.February.2020 9
How To Distribute Keys
CIS-5373: 10.February.2020 10
Public Key Based Distribution
CIS-5373: 10.February.2020 11
Public Key Crypto Notations
CIS-5373: 10.February.2020 12
KD with Public Key – Direct Exchange
Hi, A, pkA
2
E(pkA, KAB)
3
Alice A EAB(M)
Bob B
CIS-5373: 10.February.2020 13
Man-in-the-Middle Attack
Hi, A, pkA
Alice A Bob B
2
Intercept/Block
5
E(pkA, KAM) 3
“Hi”, A, pkM
6’
EAM(Msg’) 4
E(pkM, KBM)
6
From then on EBM(Msg)
Bob talks to Malory
Malory M
thinking it is Alice !
CIS-5373: 10.February.2020 14
Key Distribution with Public Key and KDC
A: pkA
B: pkB
1
E(pkB, KAB)
6
EAB(M)
Alice A
3
5
Bob B
Generate session D(prB, E(pkB, KAB)) = KAB
key KAB
CIS-5373: 10.February.2020 15
How To Distribute Keys
CIS-5373: 10.February.2020 16
Distribution of Public Keys !
CIS-5373: 10.February.2020 17
Public Announcement
CIS-5373: 10.February.2020 18
Publicly Available Directory
CIS-5373: 10.February.2020 19
Public Key Authority
CIS-5373: 10.February.2020 20
Public Key Crypto Notations
Alice has key pair (pkA, prA)
pkA is the public key
prA is the private key
Encryption/Decryption
EA(M) = E(pkA,M) – anyone can do this
DA(M) = D(prA,M) – only Alice can do this
Signature/Verification
SA(M) : sign message M with private key of A
VA(M, S) : verify that S is a signature for M
Uses A’s public key
CIS-5373: 10.February.2020 21
Public Key Authority (Needham-Schroeder
with Public Keys)
T1 is timestamp A: pkA
prevents replay
attacks ! B: pkB
5
ST(A, pkA ,T2)
1
Req, B, T1 4
Trent T Req, A, T2
2 (KDC)
ST(B, pkB ,T1)
== ?
EB(A, NA)
6
EA(NA, NB)
7
Alice A Bob B
EB(NB)
== ?
CIS-5373: 10.February.2020 22
Public Key Authority Use (cont’d)
CIS-5373: 10.February.2020 23
How To Distribute Keys
CIS-5373: 10.February.2020 24
Public Key Certificates
CIS-5373: 10.February.2020 25
Certificate Requirements
CIS-5373: 10.February.2020 26
How are Certificates Used ?
Using authenticated
channel !
2’
C(B)=ST(B,pkB,T2)
1
Req, pkA 1’
C(A)
4
C(B)
Alice A Bob B
CIS-5373: 10.February.2020 27
How are Certificates Used ? (cont’d)
Certificates issued
Over authenticated channels
In person
Certificates are re-issued infrequently
Steps 1 and 2 are done once
Certificates contain timestamp and validity period
User can verify certificate validity
Example CAs: Symantec (VeriSign), Comodo, GoDaddy
CIS-5373: 10.February.2020 28
Symantec (former VeriSign)
For websites
Examines
Traditional documents like articles of incorporation and
business licenses
Digital verification of each site operated by the
organization
CIS-5373: 10.February.2020 29
WebTrust https://cert.webtrust.org
CIS-5373: 10.February.2020 30
X.509 Certificates
CIS-5373: 10.February.2020 31
X.509 Certificate Generation
CA Priv. Key
Alice ID
Public Key
CA info
Alice ID
Public Key
CA info
Hash H Signature
Algorithm
Alice’s certificate
CIS-5373: 10.February.2020 32
X.509 Certificate Verification
Alice ID
Public Key
Hash H Hash value h1
CA info
CA Pub. Key
Valid?
Verification
Algorithm
Alice’s certificate
CIS-5373: 10.February.2020 33
X.509 Certificate Format
Issued by a Certification Authority (CA), containing:
version (1, 2, or 3)
serial number (unique within CA) identifying certificate
signature algorithm identifier
issuer X.500 name
period of validity (from - to dates)
subject X.500 name (name of owner)
subject public-key info (algorithm, parameters, key)
issuer unique identifier (v2+)
subject unique identifier (v2+)
extension fields (v3)
signature (of hash of all fields in certificate)
CIS-5373: 10.February.2020 34
X.509 Certificate Format (cont’d)
CIS-5373: 10.February.2020 35
X.509 Version 3
CIS-5373: 10.February.2020 36
Obtaining a Certificate
CIS-5373: 10.February.2020 37
Certificate Revocation
CIS-5373: 10.February.2020 38
Certificate Revocation (cont’d)
CA needs to maintain a
certificate in CRL until
certificate expires
CIS-5373: 10.February.2020 40
CA Hierarchy
CIS-5373: 10.February.2020 41
CA Hierarchy Example
A obtains B’s certificate
CU(V)
V
CV(W)
CW(B)
Own: CV(U)
Parent: CU(V) CV(W)
U CW(V)
W
CIS-5373: 10.February.2020 42
Certificate Types
CIS-5373: 10.February.2020 43