The presentation layer performs translation, encryption/decryption, authentication, and compression. Translation converts data between formats like ASCII and EBCDIC. Encryption encodes data using algorithms and keys, while decryption reverses the process. Authentication verifies sender identity using digital signatures that encrypt data in multiple steps. Compression reduces file size using lossless methods that preserve all data or lossy methods that sacrifice some quality.
The presentation layer performs translation, encryption/decryption, authentication, and compression. Translation converts data between formats like ASCII and EBCDIC. Encryption encodes data using algorithms and keys, while decryption reverses the process. Authentication verifies sender identity using digital signatures that encrypt data in multiple steps. Compression reduces file size using lossless methods that preserve all data or lossy methods that sacrifice some quality.
The presentation layer performs translation, encryption/decryption, authentication, and compression. Translation converts data between formats like ASCII and EBCDIC. Encryption encodes data using algorithms and keys, while decryption reverses the process. Authentication verifies sender identity using digital signatures that encrypt data in multiple steps. Compression reduces file size using lossless methods that preserve all data or lossy methods that sacrifice some quality.
The presentation layer performs translation, encryption/decryption, authentication, and compression. Translation converts data between formats like ASCII and EBCDIC. Encryption encodes data using algorithms and keys, while decryption reverses the process. Authentication verifies sender identity using digital signatures that encrypt data in multiple steps. Compression reduces file size using lossless methods that preserve all data or lossy methods that sacrifice some quality.
1. Translation 2. Encryption/Decryption 3. Authentication 4. Compression 1. Translation • The internal representation of a piece of information from one machine to other is called translation • Translation can be done either directly or indirectly. • In direct translation method(whether it is simplex, half duplex or full duplex) ASCII code is translated into EBCDIC code at the receiver. • In the indirect method, ASCII code is translated to a standard format at the sender and translated into EBCDIC at the receiver. • Direct method is not acceptable in most cases. • Indirect method is recommended by the OSI. The recommended model is called abstract syntax notation 1. • This model not only takes care of translation problem but also handles other formatting problems such as diverse nature of data. • It uses the concept of object where an object is defined as an information entity with type and value that can be easily translated from one representation to other. 2. Encryption/Decryption • Encryption means that the sender transforms the original information to another form and sends the resulting unintelligible message out over the network. • Decryption reverses the encryption process in order to transform the message back to its original form. • The Sender uses an encryption algorithm and a key to transform the plain text into a cipher text. • The Receiver uses a decryption algorithm and a key to transform the cipher text back to the original plaintext • Encryption and decryption methods fall into two categories • Conventional method • public key method Conventional methods • Conventional encryption methods are of two types • Character level encryption • Substitutional • Mono alphabetic substitution • Poly alphabetic substitution • transpositional • Bit level encryption • Encoding/decoding • Permutation • Substitution • Product • Exclusive OR • Rotation • Data encryption standard Substitutional Encryption • It is the simplest level of character level encryption • Mono alphabetic encryption replaces each character by another character(some times called as Caesar Cipher) • It simply adds a number to the ASCII code of the character and decryption algorithm simply subtracts the same number. Disadvantage is it can be easily broken by a snooper. • Poly alphabetic encryption technique is to find the position of the character in the text and use that value as the key. Each occurrence of the character can have a different substitute. Even this code can be easily broken by an experienced snooper Transpositional encryption • A more secure method is transpositional encryption. • Here characters retain their plaintext form but change their positions to create a cipher text. • The text is organized into a two dimensional table and the columns are interchanged according to a key. • The key defines which columns should be swapped. • Transpositional encryption is not very secure. • The character frequencies are preserved and the snooper can find the plain text through trial and error. Bit level encryption • In bit level encryption techniques, data as text, graphics, audio or video are first divided into blocks of bits, then altered by encoding/decoding, permutation, substitution, exclusive OR, rotation and so on. • Encoding/Decoding: A decoder changes an input of n bits into an output of 2n bits. The output should have only one single 1, located at the position determined by the input.eg: 01 will be decoded as 0010 • Permutation: it is the fact transposition at bit level. It is done in 3 ways. • Straight permutation: I/O bits are preserved only the positions are changed. • Compressed permutation: No. of bits are reduced by dropping the no.of bits. • Expanded permutation: No. of bits are increased by repeating some bits. • Substitution: n bits are substituted another n bits using combination of P-boxes(a permutation unit that can easily be made as a hardware circuit with internal wiring), encoders and decoders. • Product: The P-boxes and S-boxes can be combined and called a product. A product unit is made of several stages of P-boxes and S-boxes. • Exclusive OR: The input and the key are exclusive ORed together to create the output. (xclusive OR operation on two bits is 0 if the two bits are same and 1 if they are different) • Rotation: it rotates bits to the right or to the left. The key is the number of bits to be rotated. Data Encryption Standard(DES) • One example of bit -level encryption is DES. • It is designed by IBM and adopted by US Govt. for non military and non classified use. • The algorithm encrypts a 64 bit plain text using a 56 bit key. • The text is put through 19 different and very complex procedures to create a 64 bit cipher text. • The first and last two steps are simple, but 2nd and 17th steps are complex. Public Key methods • In conventional method decryption is always inverse of encryption, so anyone who knows encryption algorithm and key can deduce decryption algorithm. The solution to this is public key encryption. • In Public key encryption user has the same encryption algorithm and key. But decryption algorithm and key are kept secret. Only an authorized person can decrypt it( it is not reverse of encryption alg). • Even if the intruder knows encryption algorithm and encryption key he will be still unable to decipher the code. • The next slide illustrates using how encryption algorithm and public keys are announced openly and decryption algorithm and key are kept secretly. Authentication • Authentication means verifying the identity of a sender. • Example of such authentication using public key encryption /decryption is Digital Signature. • In network transactions when you can’t sign personally we can create equivalent of an electronic or digital signature by the way you send data. • One implementation uses the reciprocity of RSA. • Like how Kp and Ks are reciprocal digital signatures add another level of encryption and decryption to the process. Working of Digital Signature • Customer encrypts plain text(P) using a secret key (Ks-1) and creates first level of cipher text (C1). • The first Cipher text is encrypted again using public key (Kp-1) to create second cipher text (C2). • C2 is sent through the network and received by the bank. • Bank uses secret key (Ks-2) to decipher C2 to C1. • It then uses the public key (Kp-2) to decipher C1 to original plain text. • Unless the customer sends Ks-1 and Kp-1 bank would not know Ks-2 and Kp-2. So he cannot say he did not do the transaction Data Compression • Data compression reduces no. of bits sent. • Methods used to compress data are generally divided into two broad categories 1) lossless 2) lossy • Lossless compression: Here compressing and decompressing algorithms are usually the inverse of each other. • Lossy compression: The decompressed information neednot be an exact replica of the original information but some thing very close it is called lossy data compression Loss less compression techniques • Run length Encoding: When data contain strings of repeated symbols the strings can be replaced by a special marker followed by repeated symbol followed by number of occurrences. • Statistical compression: This method uses short codes for frequent symbols and long codes for infrequent symbols. In this way length of total data is reduced tremendously. Three common encoding systems with this principle are • Morse Code: uses variable length combinations of mark(dash) and space(dot) to encode data. • Huffman coding: Uses variable length codes(strings of 0’s and 1’s) to encode the set of symbols. • Limpel-ziv encoding: It looks for repeated strings or words and stores them in variables. It then replaces the occurrences of that string with a pointer to that variable. • Relative of reducing compression: Another way of reducing the number of bits is relative compression or differential encoding. This is useful if we are sending consecutive frames. Lossy Compression • Methods of Lossy compression will lose some of the original data in progress • Methods that have been developed using lossy compression techniques are • Photographic experts group(JPEG) • Motion picture experts group(MPEG)