Download presentation
Presentation is loading. Please wait.
Published byBarbra George Modified over 9 years ago
1
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University wenbing@ieee.org
2
2 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Outline Introduction to cryptography –Terminology –Basic encryption methods –Characteristics of "Good" Ciphers
3
3 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptography Terminology Encryption is the process of encoding a message so that its meaning is not obvious –Equivalent terms: encode, encipher Encryption addresses the need for confidentiality of data Encryption can also be used to ensure integrity (i.e., unauthorized change can be detected) Encryption is the basis of protocols that enable us to provide security while accomplishing system or network tasks
4
4 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptography Terminology Decryption is the reverse process, transforming an encrypted message back into its normal, original form –Equivalent terms: decode, decipher A system for encryption and decryption is called a cryptosystem
5
5 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptography Terminology The encryption and decryption rules are called encryption and decryption algorithms Encryption/decryptions algorithms often use a device called a key, denoted by K, so that the resulting ciphertext depends on the original plaintext message, the algorithm, and the key value An encryption scheme that does not require the use of a key is called a keyless cipher
6
6 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptography Terminology Plaintext: message to be encrypted Ciphertext: encrypted message D K (E K (P)) = P
7
7 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Symmetric Encryption The encryption and decryption keys are the same, so P = D(K, E(K,P)) D and E are closely related. They are mirror- image processes The symmetric systems provide a two-way channel to their users The symmetry of this situation is a major advantage of this type of encryption, but it also leads to a problem: key distribution
8
8 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Asymmetric Encryption Encryption and decryption keys come in pairs. The decryption key, K D, inverts the encryption of key K E, so that P = D(K D, E(K E,P)) Asymmetric encryption systems excel at key management
9
9 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptology Cryptology is the research into and study of encryption and decryption; it includes both cryptography and cryptanalysis Cryptography – art of devising ciphers –Comes from Greek words for “secret writing”. It refers to the practice of using encryption to conceal text Cryptanalysis – art of breaking ciphers –Study of encryption and encrypted messages, hoping to find the hidden meanings
10
10 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptanalysis Attempt to break a single message Attempt to recognize patterns in encrypted messages, to be able to break subsequent ones Attempt to deduce the key, in order to break subsequent messages easily Attempt to find weaknesses in the implementation or environment of use of encryption
11
11 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptanalysis Attempt to find general weaknesses in an encryption algorithm Traffic analysis: attempt to infer some meaning without even breaking the encryption, e.g., –Noticing an unusual frequency of communication –Determining something by whether the communication was short or long
12
12 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Basic Encryption Methods Substitution ciphers: one letter is exchanged for another Transposition ciphers: order of letters is rearranged
13
13 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Substitution Ciphers Idea: each letter or group of letters is replaced by another letter or group of letters Caesar cipher – circularly shift by 3 letters –a -> D, b -> E, … z -> C –More generally, shift by k letters, k is the key Monoalphabetic cipher – map each letter to some other letter –A b c d e f … w x y z –Q W E R T Y … V B N M <= the key
14
14 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptanalysis of Substitution Ciphers Brute force cryptanalysis would have to try 26! permutations of a particular ciphertext message In practice, it is not difficult to determine the key using frequencies of letters, pairs of letter etc., or by guessing a probable word or phrase –Most frequently occurred Letters: e, t, o, a, n, … Digrams: th, in, er, re, an, … Trigrams: the, ing, and, ion, ent Words: the, of, and, to, a, in, that, … When messages are long enough, the frequency distribution analysis quickly betrays many of the letters of the plaintext
15
15 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Substitution Ciphers - Summary Substitution cipher – preserves order of plaintext symbols but disguises them The goal of substitution is confusion –The encryption method is an attempt to make it difficult for a cryptanalyst or intruder to predict what will happen to the ciphertext by changing one character in the plaintext
16
16 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Transposition Ciphers Transposition cipher – reorders (rearrange) symbols but does not disguise them. It is also called permutation With transposition, the cryptography aims for diffusion –Widely spreading the information from the message or the key across the ciphertext –Transpositions try to break established patterns
17
17 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Columnar Transposition Plaintext written in rows, number of columns = key length Key is used to number the columns Ciphertext read out by columns, starting with column whose key letter is lowest
18
18 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Columnar Transposition A transposition cipher example
19
19 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptanalysis of Transposition Ciphers by Digram Analysis Step 1: compute the letter frequencies. If all letters appear with their normal frequencies, we can infer that a transposition has been performed Step 2: break the ciphertext into columns –Two different strings of letters from a transposition ciphertext can represent pairs of adjacent letters from the plaintext –The problem is to find where in the ciphertext a pair of adjacent columns lies and where the ends of the columns are
20
20 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Cryptanalysis of Transposition Ciphers by Digram Analysis In step 2, we must do an exhaustive comparison of strings of ciphertext –The process compares a block of ciphertext characters against characters successively farther away in the ciphertext –To see how this works, imagine a moving window that locates a block of characters for checking
21
21 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Moving Comparisons A F L L S K S O S E L A W I A T O O S S C T A F L L S K S O S E L A W I A T O O S S C T A F L L S K S O S E L A W I A T O O S S C T A F L L S K S O S E L A W I A T O O S S C T A F L L S K S O S E L A W I A T O O S S C T
22
22 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao One-Time Pads One-time pad: construct an unbreakable cipher –Choose a random bit string as the key –Convert the plaintext into a bit string –Compute the XOR of these two strings, bit by bit –The resulting ciphertext cannot be broken, because in a sufficiently large sample of ciphertext, each letter will occur equally often, as will every digram, every trigram, and so on => There is simply no information in the message because all possible plaintexts of the given length are equally likely
23
23 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao The Vernam Cipher The Vernam Cipher is a type of one-time pad devised by Gilbert Vernam for AT&T
24
24 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao The Vernam Cipher The encryption involves an arbitrarily long nonrepeating sequence of numbers that are combined with the plaintext Assume that the alphabetic letters correspond to their counterparts in arithmetic notation mod 26 –That is, the letters are represented with numbers 0 through 25 To use the Vernam cipher, we sum this numerical representation with a stream of random two-digit numbers
25
25 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao The Vernam Cipher - Example Plaintext VERNAMCIPHER Numeric Equivalent 214171301228157417 + Random Number 7648168244358116054788 = Sum 9752339544156019751251105 = mod 26 19071718158192312251 Ciphertext tahrspitxmzb
26
26 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao The Vernam Cipher - Observations The repeated letter t comes from different plaintext letters Duplicate ciphertext letters are generally unrelated when this encryption algorithm is used => there is no information in the message to be exploited
27
27 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao The Vernam Cipher - Decryption To decrypt: (C i – K i ) mod 26 –Note on rules of mod on negative number: “The mod function is defined as the amount by which a number exceeds the largest integer multiple of the divisor that is not greater than that number” ( http://mathforum.org/library/drmath/view/52343.html) –Modula op always return non-negative number –E.g., (19-76) mod 26 = (-57) mod 26 = (-78+21) mod 26 = 21
28
28 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao The Vernam Cipher - Decryption Ciphertext tahrspitxmzb Numeric equivalent 19071718158192312251 - One-time pad 7648168244358116054788 = Difference -57-48-9-65-2612-508-377-22-87 = mod 26 214171301228157417 Plaintext VERNAMCIPHER
29
29 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao One-Time Pads Disadvantages –The key cannot be memorized, both sender and receiver must carry a written copy with them –Total amount of data can be transmitted is limited by the amount of key available –Sensitive to lost or inserted characters
30
30 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Characteristics of "Good" Ciphers -- Claude Shannon (1949) The amount of secrecy needed should determine the amount of labor appropriate for the encryption and decryption The set of keys and the enciphering algorithm should be free from complexity The implementation of the process should be as simple as possible Errors in ciphering should not propagate and cause corruption of further information in the message The size of the enciphered text should be no larger than the text of the original message
31
31 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Shannon's Characteristics of "Good" Ciphers The amount of secrecy needed should determine the amount of labor appropriate for the encryption and decryption –Even a simple cipher may be strong enough to deter the casual interceptor or to hold off any interceptor for a short time
32
32 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Shannon's Characteristics of "Good" Ciphers The set of keys and the enciphering algorithm should be free from complexity –We should restrict neither the choice of keys nor the types of plaintext on which the algorithm can work –For example, an algorithm that works only on plaintext having an equal number of As and Es is useless
33
33 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Shannon's Characteristics of "Good" Ciphers Errors in ciphering should not propagate and cause corruption of further information in the message –One error early in the process should not throw off the entire remaining ciphertext
34
34 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Shannon's Characteristics of "Good" Ciphers The size of the enciphered text should be no larger than the text of the original message –A ciphertext that expands dramatically in size cannot possibly carry more information than the plaintext, yet it gives the cryptanalyst more data from which to infer a pattern –A longer ciphertext implies more space for storage and more time to communicate
35
35 Spring 2007EEC693: Secure & Dependable ComputingWenbing Zhao Properties of "Trustworthy" Encryption Systems It is based on sound mathematics It has been analyzed by competent experts and found to be sound It has stood the "test of time"
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.