Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 Overview. Data Encryption Standard Combination of substitution and transposition – Repeated for 16 cycles – Provides confusion and diffusion.

Similar presentations


Presentation on theme: "Lecture 4 Overview. Data Encryption Standard Combination of substitution and transposition – Repeated for 16 cycles – Provides confusion and diffusion."— Presentation transcript:

1 Lecture 4 Overview

2 Data Encryption Standard Combination of substitution and transposition – Repeated for 16 cycles – Provides confusion and diffusion Product cipher – Two weak but complementary ciphers can be made more secure by being applied together CS 450/650 – Lecture 4: DES 2

3 A High Level Description of DES Input - P 16 Cycles Output - C Key IP Inverse IP 3 CS 450/650 – Lecture 4: DES

4 A Cycle in DES 4 CS 450/650 – Lecture 4: DES

5 E R n-1 E(R n-1 ) Expand each block R n-1 We'll call the use of this selection table the function E. Thus E(R n-1 ) has a 32 bit input block, and a 48 bit output block. 5 CS 450/650 – Lecture 4: DES

6 The Calculation of the function f 1 - Expand R n-1  E(R n-1 ) 2- XOR  K n + E(R n-1 ) = B 1 B 2 B 3 B 4 B 5 B 6 B 7 B 8 3- Substitution S-Boxes  S 1 (B 1 )S 2 (B 2 )S 3 (B 3 )S 4 (B 4 )S 5 (B 5 )S 6 (B 6 )S 7 (B 7 )S 8 (B 8 ) 4- P permutation  f = P(S 1 (B 1 )S 2 (B 2 )...S 8 (B 8 )) 6 CS 450/650 – Lecture 4: DES

7 Types of Permutations CS 450/650 Fundamentals of Integrated Computer Security 7 Pattern of Expansion Permutation

8 Lecture 5 DES & Rivest-Shamir-Adelman CS 450/650 Fundamentals of Integrated Computer Security Slides are modified from Hesham El-Rewini

9 Does DES Work? Differential Cryptanalysis Idea – Use two plaintext that barely differ – Study the difference in the corresponding cipher text – Collect the keys that could accomplish the change – Repeat 9 CS 450/650 – Lecture 5: DES

10 Cracking DES During the period NBS was soliciting comments on the proposed algorithm, the creators of public key cryptography registered some objections to the use of DES. – Hellman wrote: "Whit Diffie and I have become concerned that the proposed data encryption standard, while probably secure against commercial assault, may be extremely vulnerable to attack by an intelligence organization" letter to NBS, October 22, 1975 10 CS 450/650 – Lecture 5: DES

11 Cracking DES (cont.) Diffie and Hellman then outlined a "brute force" attack on DES – By "brute force" is meant that you try as many of the 2 56 possible keys as you have to before decrypting the ciphertext into a sensible plaintext message – They proposed a special purpose "parallel computer using one million chips to try one million keys each" per second 11 CS 450/650 – Lecture 5: DES

12 Cracking DES (cont.) In 1998, Electronic Frontier Foundation spent $220K and built a machine that could go through the entire 56-bit DES key space in an average of 4.5 days – On July 17, 1998, they announced they had cracked a 56-bit key in 56 hours The computer, called Deep Crack – used 27 boards each containing 64 chips – was capable of testing 90 billion keys a second 12 CS 450/650 – Lecture 5: DES

13 Cracking DES (cont.) In early 1999, Distributed. Net used the DES Cracker and a worldwide network of nearly 100K PCs to break DES in 22 hours – combined they were testing 245 billion keys per second It has been shown that a dedicated hardware device with a cost of $1M (is much less in 2010) can search all possible DES keys in about 3.5 hours This just serves to illustrate that any organization with moderate resources can break through DES with very little effort these days 13 CS 450/650 – Lecture 5: DES

14 Triple DES Triple-DES is just DES with two 56-bit keys applied. Given a plaintext message, the first key is used to DES- encrypt the message. The second key is used to DES-decrypt the encrypted message. – Since the second key is not the right key, this decryption just scrambles the data further. The twice-scrambled message is then encrypted again with the first key to yield the final ciphertext. This three-step procedure is called triple-DES. 14 CS 450/650 – Lecture 5: DES

15 Algorithm Background

16 Analysis of Algorithms Algorithms – Time Complexity – Space Complexity An algorithm whose time complexity is bounded by a polynomial is called a polynomial-time algorithm. – An algorithm is considered to be efficient if it runs in polynomial time. CS 450/650 Lecture 5: Algorithm Background 16

17 Time and Space Should be calculated as function of problem size (n) – Sorting an array of size n, – Searching a list of size n, – Multiplication of two matrices of size n by n T(n) = function of n (time) S(n) = function of n (space) 17 CS 450/650 Lecture 5: Algorithm Background

18 Growth Rate We Compare functions by comparing their relative rates of growth. 1000n vs. n 2 18 CS 450/650 Lecture 5: Algorithm Background

19 Definitions  T(n) = O(f(n)): T is bounded above by f The growth rate of T(n) <= growth rate of f(n)  T(n) =  (g(n)): T is bounded below by g The growth rate of T(n) >= growth rate of g(n)  T(n) =  (h(n)): T is bounded both above and below by h The growth rate of T(n) = growth rate of h(n)  T(n) = o(p(n)): T is dominated by p The growth rate of T(n) < growth rate of p(n) 19 CS 450/650 Lecture 5: Algorithm Background

20 Time Complexity  C  O(n)  O(log n)  O(nlogn)  O(n 2 )  …  O(n k )  O(2 n )  O(k n )  O(n n ) 20 CS 450/650 Lecture 5: Algorithm Background Polynomial Exponential

21 P, NP, NP-hard, NP-complete A problem belongs to the class P if the problem can be solved by a polynomial-time algorithm A problem belongs to the class NP if the correctness of the problem’s solution can be verified by a polynomial- time algorithm A problem is NP-hard if it is as hard as any problem in NP – Existence of a polynomial-time algorithm for an NP-hard problem implies the existence of polynomial solutions for every problem in NP NP-complete problems are the NP-hard problems that are also in NP 21 CS 450/650 Lecture 5: Algorithm Background

22 Relationships between different classes NP P NP-complete NP-hard 22 CS 450/650 Lecture 5: Algorithm Background

23 Partitioning Problem Given a set of n integers, partition the integers into two subsets such that the difference between the sum of the elements in the two subsets is minimum 13, 37, 42, 59, 86, 100 23 CS 450/650 Lecture 5: Algorithm Background

24 Bin Packing Problem Suppose you are given n items of sizes s1, s2,..., sn All sizes satisfy 0  si  1 The problem is to pack these items in the fewest number of bins, – given that each bin has unit capacity 24 CS 450/650 Lecture 5: Algorithm Background

25 Bin Packing Problem Example (Optimal; Solution) for 7 items of sizes: 0.2, 0.5, 0.4, 0.7, 0.1, 0.3, 0.8. 25 CS 450/650 Lecture 5: Algorithm Background

26 Rivest-Shamir-Adelman

27 RSA Invented by Cocks (GCHQ), independently, by Rivest, Shamir and Adleman (MIT) – in 1978 Two keys e and d are used for Encryption and Decryption – The keys are interchangeable Based on the problem of factoring large numbers

28 Let p and q be two large prime numbers Let N = pq be the modulus Choose e relatively prime to (p  1)(q  1) – How? Find d such that ed = 1 mod (p  1)(q  1) Public key is (N,e) Private key is d Key Choice

29 RSA To encrypt message M compute – C = M e mod N To decrypt C compute – M = C d mod N

30 RSA Recall that e and N are public If attacker can factor N, he can use e to easily find d – since ed = 1 mod (p  1)(q  1) Factoring the modulus breaks RSA It is not known whether factoring is the only way to break RSA

31 Does RSA Really Work? Given C = M e mod N we must show – M = C d mod N = M ed mod N We’ll use Euler’s Theorem – If x is relatively prime to n then x  (n) = 1 mod n

32 Does RSA Really Work? Facts: – ed = 1 mod (p  1)(q  1) – By definition of “mod”, ed = k(p  1)(q  1) + 1 –  (N) = (p  1)(q  1) – Then ed  1 = k(p  1)(q  1) = k  (N) M ed = M (ed-1)+1 = M  M ed-1 = M  M k  (N) = M  (M  (N) ) k mod N = M  1 k mod N = M mod N


Download ppt "Lecture 4 Overview. Data Encryption Standard Combination of substitution and transposition – Repeated for 16 cycles – Provides confusion and diffusion."

Similar presentations


Ads by Google