upper osi layers natawut nupairoj, ph.d. department of computer engineering chulalongkorn university
TRANSCRIPT
![Page 1: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/1.jpg)
Upper OSI Layers
Natawut Nupairoj, Ph.D.
Department of Computer Engineering
Chulalongkorn University
![Page 2: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/2.jpg)
Outline
Session Layer. Presentation Layer. Application Layer.
![Page 3: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/3.jpg)
Overview
![Page 4: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/4.jpg)
Communication Session
![Page 5: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/5.jpg)
Session Layer
Coordinate connection and disconnection between applications Dialog.
Coordinate who sends when. Synchronize data exchange
Allow roll-back to major synchronization point. “Graceful” session close
Transaction-alike: All-or-Nothing.
![Page 6: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/6.jpg)
Synchronization Points
![Page 7: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/7.jpg)
Presentation Layer
Focus on data manipulation Translation. Encryption/Decryption. Authentication. Compression.
![Page 8: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/8.jpg)
Data Translation
![Page 9: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/9.jpg)
Cryptography
![Page 10: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/10.jpg)
Purposes of Cryptography
Confidentiality Only sender and intended receiver “understand”
msg contents. Encryption/Decryption.
Authentication Confirm identities of sender and receiver.
Message Integrity Ensure message not altered (in transit, or
afterwards) without detection.
![Page 11: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/11.jpg)
The language of cryptography
symmetric key crypto: sender, receiver keys identical
public-key crypto: encrypt key public, decrypt key secret
Figure 7.3 goes here
plaintext plaintext
ciphertext
KA
KB
![Page 12: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/12.jpg)
Monoalphabetic Substitution
![Page 13: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/13.jpg)
Polyalphabetic Substitution
![Page 14: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/14.jpg)
Transpositional Encryption
![Page 15: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/15.jpg)
DES: Data Encryption Standard US encryption standard [NIST 1993]. 56-bit symmetric key, 64 bit plaintext input How secure is DES?
DES Challenge: 56-bit-key-encrypted phrase (“Strong cryptography makes the world a safer place”) decrypted (brute force) in 4 months
no known “backdoor” decryption approach making DES more secure
use three keys sequentially (3-DES) on each datum
![Page 16: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/16.jpg)
DES Algorithm
![Page 17: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/17.jpg)
Public Key Cryptography
symmetric key crypto requires sender,
receiver know shared secret key
Q: how to agree on key in first place (particularly if never “met”)?
public key cryptography
sender, receiver do not share secret key
encryption key public (known to all)
decryption key private (known only to receiver)
![Page 18: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/18.jpg)
Public key cryptography
Figure 7.7 goes here
![Page 19: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/19.jpg)
![Page 20: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/20.jpg)
Authentication
Goal: Bob wants Alice to “prove” her identity to him
Protocol ap1.0: Alice says “I am Alice”
Failure scenario??
![Page 21: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/21.jpg)
Authentication: another tryProtocol ap2.0: Alice says “I am Alice” and sends her IP
address along to “prove” it.
Failure scenario??
![Page 22: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/22.jpg)
Authentication: another tryProtocol ap3.0: Alice says “I am Alice” and sends her
secret password to “prove” it.
Failure scenario?
![Page 23: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/23.jpg)
Authentication: yet another tryProtocol ap3.1: Alice says “I am Alice” and sends her
encrypted secret password to “prove” it.
Failure scenario?
I am Aliceencrypt(password)
![Page 24: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/24.jpg)
Authentication: yet another tryGoal: avoid playback attack
Failures, drawbacks?
Figure 7.11 goes here
Nonce: number (R) used only once in a lifetime
ap4.0: to prove Alice “live”, Bob sends Alice nonce, R. Alice
must return R, encrypted with shared secret key
![Page 25: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/25.jpg)
Figure 7.12 goes here
Authentication: ap5.0ap4.0 requires shared symmetric key
problem: how do Bob, Alice agree on key can we authenticate using public key
techniques?
ap5.0: use nonce, public key cryptography
![Page 26: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/26.jpg)
Figure 7.14 goes here
ap5.0: security holeMan (woman) in the middle attack: Trudy
poses as Alice (to Bob) and as Bob (to Alice)
![Page 27: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/27.jpg)
Digital Signatures
Cryptographic technique analogous to hand-written signatures.
Sender (Bob) digitally signs document, establishing he is document owner/creator.
Verifiable, nonforgeable: recipient (Alice) can verify that Bob, and no one else, signed document.
Simple digital signature for message m:
Bob encrypts m with his public key dB, creating signed message, dB(m).
Bob sends m and dB(m) to Alice.
![Page 28: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/28.jpg)
Digital Signatures (more)
Suppose Alice receives msg m, and digital signature dB(m)
Alice verifies m signed by Bob by applying Bob’s public key eB to dB(m) then checks eB(dB(m) ) = m.
If eB(dB(m) ) = m, whoever signed m must have used Bob’s private key.
Alice thus verifies that: Bob signed m. No one else signed m. Bob signed m and not m’.
![Page 29: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/29.jpg)
Message Digests
Computationally expensive to public-key-encrypt long messages
Goal: fixed-length,easy to compute digital signature, “fingerprint”
apply hash function H to m, get fixed size message digest, H(m).
Hash function properties: Many-to-1 Produces fixed-size msg
digest (fingerprint) Given message digest x,
computationally infeasible to find m such that x = H(m)
computationally infeasible to find any two messages m and m’ such that H(m) = H(m’).
![Page 30: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/30.jpg)
Digital signature = Signed message digestBob sends digitally signed
message:Alice verifies signature and
integrity of digitally signed message:
![Page 31: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/31.jpg)
Hash Function Algorithms
MD5 hash function widely used. Computes 128-bit message digest in 4-step
process. arbitrary 128-bit string x, appears difficult to
construct msg m whose MD5 hash is equal to x.
SHA-1 is also used.US standard160-bit message digest
![Page 32: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/32.jpg)
Trusted Intermediaries
Problem: How do two entities
establish shared secret key over network?
Solution: trusted key
distribution center (KDC) acting as intermediary between entities
Problem: When Alice obtains
Bob’s public key (from web site, e-mail, diskette), how does she know it is Bob’s public key, not Trudy’s?
Solution: trusted certification
authority (CA)
![Page 33: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/33.jpg)
Key Distribution Center (KDC) Alice,Bob need shared symmetric key. KDC: server shares different secret key with each
registered user. Alice, Bob know own symmetric keys, KA-KDC KB-KDC ,
for communicating with KDC.
![Page 34: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/34.jpg)
Key Distribution Center (KDC)
KA-KDC(A,B)
KA-KDC(R1, KB-KDC(A,R1) )
KB-KDC(A,R1)
![Page 35: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/35.jpg)
Certification Authorities Certification authority (CA)
binds public key to particular entity.
Entity (person, router, etc.) can register its public key with CA. Entity provides “proof
of identity” to CA. CA creates certificate
binding entity to public key.
Certificate digitally signed by CA.
When Alice wants Bob’s public key:
gets Bob’s certificate (Bob or elsewhere).
Apply CA’s public key to Bob’s certificate, get Bob’s public key
![Page 36: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/36.jpg)
OSI Application Layer
ITU defines standards for common applications Message Handling System: Email. Directory Services. Common Management Information Protocol
(CMIP). File Transfer, Access, and Management (FTAM):
FTP. Virtual Terminal: Telnet.
![Page 37: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/37.jpg)
MHS Structure
![Page 38: Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University](https://reader035.vdocuments.site/reader035/viewer/2022062423/56649f265503460f94c3cedd/html5/thumbnails/38.jpg)
Message Format