Docsity

Security Case Studies: Needham-Schroeder, Kerberos, SSL, and Public Key Encryption, Study notes of Operating Systems

Toggle sidebar
bg1
1
CS 5523 Lecture 25:
Security Case Studies
❚Review scenarios
❚Needham-Schroede r
❚Brief summary of common algorithms
❚Kerberos
❚Secure Socket Layer
Simplified overview of secret key encryption:
Encrypted message:
E(K, M) = {M}K
Decrypted message:
D(K, E(K, M)) = D(K, {M}K) = M
It is hard to get M from {M}K without knowing K
Scenario 1.
Secret communication with shared secret key
Alice and Bob share a sec ret key KAB. Alice wants to send a secret
message M to Bob.
1. Alice uses KAB and an agreed encr yption function E(KAB, M) to
encrypt and send mess age M to Bob
2. Bob reads the encrypte d messages using t he corresponding
decryption functio n D(KAB, M)
How can Bob and Alice safely get the shared key KAB?
How can Bob know that M w asn’t a replay?
pf3
pf4
pf5
pf8

Partial preview of the text

Download Security Case Studies: Needham-Schroeder, Kerberos, SSL, and Public Key Encryption and more Study notes Operating Systems in PDF only on Docsity!

CS 5523 Lecture 25:

Security Case Studies

❚ Review scenarios ❚ Needham-Schroeder ❚ Brief summary of common algorithms ❚ Kerberos ❚ Secure Socket Layer

Simplified overview of secret key encryption:

Encrypted message: E(K, M) = {M}K

Decrypted message:

D(K, E(K, M)) = D(K, {M}K ) = M

It is hard to get M from {M}K without knowing K

Scenario 1.

Secret communication with shared secret key

Alice and Bob share a secret key K (^) AB. Alice wants to send a secret message M to Bob.

  1. Alice uses K (^) AB and an agreed encryption function E(K (^) AB , M) to encrypt and send message M to Bob
  2. Bob reads the encrypted messages using the corresponding decryption function D(K (^) AB , M)

How can Bob and Alice safely get the shared key K (^) AB?

How can Bob know that M wasn’t a replay?

Scenario 2.

Authenticated communication with a server

Alice wants to access Bob’s files on a local file server. Sara is a trusted authentication server that holds passwords and current secret keys.

  1. Alice sends a message to Sara asking for a ticket to access Bob
  2. Sara sends Alice a response encrypted with K (^) A that is a ticket encrypted with K (^) B and a new secret key K (^) AB for communication: {{ticket}KB , KAB } KA
  3. Alice decrypts response with K (^) A
  4. Alice sends ticket, her ID and request R to Bob: {ticket} (^) KB , Alice, R
  5. Bob decrypts ticket using KB (the ticket was {K (^) AB , Alice} (^) KB ) This is the simplified scenario for Kerberos. K (^) AB is the session key.

Simplified overview of public key encryption:

Keys come in pairs K 1 and K 2. Keep one public and one private. If you encrypt with K 1 , you can decrypt with K 2 and vice versa:

D(K 2 , E(K 1 , M)) = M

and D(K 1 , E(K 2 , M)) = M

Scenario 3.

Authenticated communication with public keys

Bob has generated a public/private key pair. There is a trusted authority that gives out key certificates

  1. Alice accesses a key distribution center to obtain a public key certificate with Bob’s public key. Alice extracts Bob’s public key K (^) B pub
  2. Alice creates a new secret key K (^) AB and encrypts {K (^) AB , known string} with K (^) B pub

3. Alice sends {{unique keyname}, {K AB, known string} KB pub } to Bob.

  1. Bob decrypts {K (^) AB, known string} (^) KB pub using K (^) B priv
  2. Bob and Alice now communicate with K (^) AB

This is the scenario for the widely used hybrid cryptographic protocol.

Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3

Figure 7. X509 Certificate format

Subject (^) Distinguished Name, Public Key Issuer Distinguished Name, Signature Period of validity Not Before Date, Not After Date Administrative information Version, Serial Number Extended Information

Some popular encryption schemes:

❚ TEA = tiny encryption algorithm – Wheeler and Needham, 1994 uses 32 rounds with combinations of XOR, text shifts ❚ DES = Data Encryption Standard – National Bureau of Standards 1977 – obsolete because of short keys – successfully cracked by brute force attacks in 1997 and a machine was built in 1998 that could crack keys in 3 days. Replaced by AES (Advanced Encryption Standard, NIST 1999) ❚ RSA – Rivest Shamir and Adelman – public key encryption based on factoring products of large primes – widely used (RSA’s patent just expired)

Some popular encryption schemes (continued):

❚ 3DES = triple-DES – ANSI 1985 – apply DES 3 times with two keys – very slow ❚ IDEA = International Data Encryption Algorithm – Lai and Massey, 1990 – based on group algebra with 8 rounds of XOR ❚ MD5 = used for data digests – Rivest 1992 – four rounds applying 4 nonlinear functions to each of 16 32-bit segments ❚ SHA - NIST 1995 – based on Rivest’s MD4 algorithm to produce a 160 bit digest

Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3

Figure 7. Performance of encryption and secure digest algorithms

Key size/hash size (bits)

Extrapolated speed (kbytes/sec.)

PRB optimized (kbytes/s)

TEA 128 700 - DES 56 350 7746 Triple-DES 112 120 2842 IDEA 128 700 4469 RSA 512 7 - RSA 2048 1 - MD5 128 1740 62425 SHA 160 750 25162

Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3

Figure 7. The Needham–Schroeder secret-key authentication protocol

Header Message Notes

  1. A->S: (^) A, B, NA A requests S to supply a key for communication with B.
  2. S->A: { NA , B, K (^) AB, { KAB, A } K B } K A

S returns a message encrypted in A’s secret key, containing a newly generated key KAB and a ‘ticket’ encrypted in B’s secret key. The nonce NA demonstrates that the message was sent in response to the preceding one. A believes that S sent the message because only S knows A’s secret key.

  1. A->B: A sends the ‘ticket’ to B.
  2. B->A: B decrypts the ticket and uses the new keyencrypt another nonce N^ KAB to B.
  3. A->B: A demonstrates to B that it was the sender of theprevious message by returning an agreed transformation of N (^) B.

{ KAB, A } K B { NB } K AB { NB - 1} K AB

Kerberos:

❚ Follows Needham and Schroeder very closely

❚ Uses time values as nonces ❚ When user logs in, the login program sends user’s name to the kerberos authentication server ❚ If user is known, server replies with a session key and a nonce encrypted in the user’s password and a ticket for TGS

❚ After login program authenticates the information, it can erase the user’s password from memory

Secure socket layer (SSL) - continued

❚ SSL Record Protocol layer implements a secure channel that encrypts and authenticates message through any connection- oriented protocol ❚ SSL Handshake Layer – has three modules: ❙ SSL handshake protocol ❙ SSL change cipher specification ❙ SSL alert protocol ❚ Implemented as application level libraries

❚ Widely uses as a session-layer protocol ❚ In web servers the https URLs initiate a SSL connection ❚ Provides a practical hybrid security scheme

❚ Requires public-key certificates issued by a recognized authority

Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3

Figure 7. SSL protocol stack

SSL Handshake protocol

SSL Change Cipher Spec

SSL Alert Protocol

Transport layer (usually TCP)

Network layer (usually IP)

SSL Record Protocol

HTTP Telnet

SSL protocols: Other protocols:

Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3

Figure 7. SSL handshake protocol

Client Server

ClientHello ServerHello Certificate Certificate Request ServerHelloDone Certificate Certificate Verify Change Cipher Spec Finished Change Cipher Spec Finished

Establish protocol version, session ID, cipher suite, compression method,exchange random values

Optionally send server certificate and request client certificate

S end client certificate response if requested

Change cipher suite and finishhandshake

Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3

Figure 7. SSL handshake configuration options

Component Description Example Key exchange method

the method to be used for exchange of a session key

RSA with public-key certificates Cipher for data transfer

the block or stream cipher to be used for data

IDEA

Message digest function

for creating message authentication codes (MACs)

SHA

Instructor’s Guide for Coulouris, Dollimore and Kindberg© Addison-Wesley Publishers 2000 Distributed Systems: Concepts and Design Edn. 3

Figure 7. SSL record protocol

Application data abcdefghi

Record protocol units abc^ def^ ghi

Compressed units

MAC

Encrypted

TCP packet

Fragment/combine

Compress

Hash

Encrypt

Transmit

For next time:

❚ Review