Download presentation
Presentation is loading. Please wait.
1
Presentation Layer Network Format Local Format Information Transformation “few standards, but a lot of ideas”
2
Presentation Functions These are examples! Syntax (format) conversion Compression Encryption –Sub-issue: Does it belong here?
3
Presentation Layer, cont. Providing a way to specify complex data structures Managing the set of data structures required Converting data between internal and external form
4
Data Representation ASCII vs. EBCDIC two’s complement vs. one’s complement FFF0 hex is -15 1’s complement; -16 2’s complement byte order right left vs. left right Text File formats
5
Abstract Syntax Notation 1 (ASN.1) Data Structures Abstract Syntax Transfer Syntax International Standard 8825 Notation used to encode, transfer and decode data structures across a wide range of applications Both connection-oriented and connectionless primitives
6
Data Compression Encoding a Finite Set of Equally Likely Symbols –Finiteness of the set of symbols. Frequency Dependent Coding –The relative frequencies with which the symbols are used. Context Dependent Encoding –The context in which a symbol appears.
7
Compression Elimination of Redundancy –(increased susceptibility to error) Examples –Run Length Encoding –Predictive Codes –Huffman –LZW
8
Frequency Dependent Coding In English, “E” occurs ~100 times more than the letter “Q” So give common symbols short codes and longer symbols longer codes. Theoretical minimum encoding often requires fractional bits, but close approximations available.
9
Huffman Coding 1. Write down all symbols and associated probability of each. Eventually a binary tree is built on these nodes, with the symbols representing terminal nodes. 2. Find the two smallest nodes and mark them. Add a new node with arcs to each of the nodes just marked. Set the probability of the new node to the sum of the probabilities of the two nodes connected to the new node. 3. Repeat until all symbols are marked except one. The probability of the unmarked node will always be 1.0. 4. The encoding for each symbol is found by tracing the path from the unmarked symbol to that symbol, recording the sequence of left and right branches taken. The code is the path, left = 0, right = 1.
10
Context Dependent Encoding Uses conditional probability instead of independent probability. What is P(u|q)? So determine the conditional probability for each possible predecessor and store in a table. For k symbols this requires k 2 entries.
11
Network Security and Privacy Protecting data from being read by unauthorized persons. Preventing unauthorized persons from inserting and deleting messages. Verifying the sender of each message. Allowing electronic signatures on documents.
12
Cryptography Traditional Cryptography –Substitution Ciphers –Codes –Transposition Ciphers Data Encryption Standard Key Distribution Public Key Crytography –MIT Algorithm Authentication & Digital Signatures –Federal Standards
13
Cryptography Users Military Diplomatic Diarists Lovers Curmugdeons
14
Cyptography Terms Ciphertext or Cryptogram -- encrypted message Cryptanalysis -- breaking ciphers Cryptography -- devising ciphers Cryptology := Cryptanalysis and Cryptography
15
Encryption Model Plaintext Key-1 Key-2 Ciphertext Passive Listener Active Intruder
16
Keys If Key-1 is the same as Key-2, then it has to be a secret key process. They can differ, making it a Public Key Process. Big Problems: key distribution and key security
17
Fundamental Truths of Cryptology Potential intruders know the general encryption method. Message contents may be guessed. Cryptographic systems may be changed, but rarely are. Non-technical compromises always outnumber successful cryptanalysis.
18
Ciphers Substitution (preserve order, disquise) –Caesar code = “shift 4” –Alphabet shifted by k letters --”enigma” –Exhaustive search infeasible –Words and phrases may be guessed Codes –Purple code, Japanese translated into Latin –Navajo talkers Transposition Ciphers (reorder, do not disguise) –Game is up when key length is guessed –Once close, easy to guess
19
Data Encryption Standard Developed by IBM in 1977 Implemented in hardware Widely used 128 bit key proposed, 56 bit key specified Any guesses why?
20
Public Key Encryption Applying the decryption key to an encrypted message must return the plaintext message. The decryption key can’t be guessed from an encyption key. The encryption key cannot be broken by a plaintext attack. Key Point: the decryption key must be privately held.
21
RSA Algorithm 1. Choose two large primes, p and q, each greater than 10 100. 2. Compute n = p * q and z = (p - 1) * (q - 1). 3. Choose a number relatively prime to z and call it d. 4. Find e such that e * d = 1 mod z.
22
Implementation of the MIT Algorithm To encrypt –divide plaintext P into k bits where k is the largest integer for 2 k < n. –compute C = P e (mod n) To decrypt –P = C d (mod n) Encryption requires e and n (public key) Decryption requires d and n (private key) If n can be factored, then this yields p an q, then z. Euclid’s Algorithm will derive e and d from z.
23
Digital Signatures A’s secret key must remain secret B has A’s public key and A has B’s public key B received a encypted message from A that he decypts with A’s public key B can later show that lacking A’s private key that he could not have produced the encrypted message
24
Politics of Cryptography Software as Munition “Clipper” Chip Digital Telephony Bill Digital Signature Standard Other Countries Current Legislation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.