chapter ten the application and presentation layers

20
Chapter Ten The Application and Presentation Layers

Upload: solomon-hood

Post on 01-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Chapter Ten

The Application and Presentation Layers

Objectives• To look at how data packaging is selected• To learn about the different syntaxes used in network

transmission• To examine some common file formats• To get a brief introduction to file compression and

encryption• To examine the differences between applications and

processes

OSI and the Real World

• Most companies these days don’t follow OSI to the letter.

• The Application and Presentation layers are mostly historical artifacts and not used much in real-world networking.

The Presentation Layer

• The responsibilities of the Presentation layer are:– Deals with file formats– File compression– Encryption– Character set

Abstract Syntax vs. Transfer Syntax• Abstract syntax

– The form that data takes while it is being used• Audio• Graphics• Video• Binary executables

• Transfer syntax– The form that data takes as it travels over the wire

• Audio – mp3, mp4 • Graphics – bmp, jpg• Video – mp4, rmvb, avi• Binary executables - exe

Example

Presentation Context• A large amount of data transfer involves multiple

message types (multiple abstract syntax)– Such as in a multimedia presentation, there will be audio,

video, plain text, etc• In order to transmit such complex data, the

presentation layer negotiates the specific transfer syntax for each abstract syntax involved– The overall package, including audio, video, text, and

executable code makes up the presentation context.– The collection of abstract and transfer syntax is the

defined context set.

File Compression• Choice of a transfer syntax is made by the user and

the choice should be made carefully.• File compression is a major issue to consider. There

are two types of compressions:– Lossy ((.jpg, .gif for image compression)• In reducing file size, some information is permanently

lost.• This loss is considered to be acceptable loss.

– Lossless (.bmp, .tif for image compression)• No loss of information is allowed.• All data arrives intact.

Data Encryption• Data security is a main issue in network. Therefore,

certain protocol employ schemes of data encryption.

• Data encryption occurs when one device scrambles the bit order of data before transmitting it, the device on the other end has a key for putting the data back.

Data Encryption• The three most commonly used encryption methods are:

– Substitution cipher • One character is replaced by another, but the entire character set

is used.• Easily hacked

– Transposition cipher• The characters in a block of data are put in a different order,

based on a predefined sequence.– DES encryption

Substitution Ciphers•Substitution cipher: substituting one thing for another•Monoalphabetic cipher: substitute one letter for another

plaintext: abcdefghijklmnopqrstuvwxyzciphertext: mnbvcxzasdfghjklpoiuytrewq

E.g.:Plaintext: bob. i love you. aliceciphertext: nkn. s gktc wky. mgsbc

▪26! = 4x1024 even at 1 ns per try will take 1010 years

▪Broken: use statistical property of the English language

▸Most common letter is e, follow by t, o, a, n, i, etc▸Most common two letters (digrams) th, in, etc▸Most common three letters (trigrams) the, ing,

etc

Transposition Ciphers

▪MEGABUCK is the Key and sort by alphabet (numbers in the second row)

▪Ciphertext is sent one column at a time staring with the lowest key which is 1 (column A), then 2 (column B), and so on.

▪Broken: frequency of letters does not change

DES Controversy•DES was based on cipher developed and patented by IBM•IBM uses 128 bit key instead of 56 bit (Lucifer)•When US government want to standardize on one cipher, NSA

invited IBM to “talk” •After that IBM reduced the key length from 128 to 56 (??)–Many suggested that to make sure NSA can break DES–NSA wants a backdoor?

•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

Data Encryption Standard▪The data encryption standard. (a) General outline.▪(b) Detail of one iteration. The circled + means exclusive OR.

The Application Layer•The purpose of application layer is

simply to take the user’s data and convert it into a message that the lower layers are able to process.

– FTP– DNS– Email– HTTP– TELNET

application

transport

network

data link

physical

application

transport

network

data link

physical

application

transport

network

data link

physical

application

transport

network

data link

physical

application

transport

network

data link

physical

application

transport

network

data link

physical

application

transport

network

data link

physical

application

transport

network

data link

physical

application

transport

network

data link

physical

Applications and Processes

• Applications are programs running on a computer that a user launches to perform a certain task.

• Processes are tasks running within an application that perform a specific function to make the application do what it’s supposed to do.

Application Process

• Application processes fall under the category of either a Common Application-specific Element (CASE) or a Specific Application-Specific Element (SASE).

• SASE is processes that would be called specifically by the programmer only when needed.

• CASE processes are those whose services are likely to be required regardless of the type of communication.

• Some example of CASE processes are:– Association control (ACSE)– Reliable transfer (RTSE)– Remote operations (ROSE)– Commitment, concurrency, and recovery (CCR)

Application Process

• ACSE is the process by which the two devices are able to establish and then subsequently terminate a logic connection between two application processes.

• RTSE assures that the data moved from one device to another gets there safely and intact.

• CCR is the process by which a transaction is either finished or it never happened.