Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 6 Introduction to Cryptography --- Foundations of computer security ---

Similar presentations


Presentation on theme: "Lecture 6 Introduction to Cryptography --- Foundations of computer security ---"— Presentation transcript:

1 Lecture 6 Introduction to Cryptography --- Foundations of computer security ---

2 CPE5200 Semester 2 - 20012 Outline n Why study cryptology n basic terms in cryptology n classic secret key ciphers n modern secret key ciphers çDES (Data Encryption Standard) çPrinciple of DES

3 CPE5200 Semester 2 - 20013 Why Study cryptology(1) AB Intruder Communications security

4 CPE5200 Semester 2 - 20014 Why Study cryptology(2) Customer Merchant TTP Electronic Commerce Security

5 CPE5200 Semester 2 - 20015 Why Study cryptology(3) A B LEA Law enforcement

6 CPE5200 Semester 2 - 20016 The Basic Problem n We consider the confidentiality goal: çAlice and Bob are Friends çMarvin is a rival çAlice wants to send secret messages (M 1,M 2,…) to Bob over a network such as Internet çRival Marvin wants to read the messages (M 1,M 2,…) - Alice and Bob want to prevent this! çAssumption: The network is OPEN: Marvin is able to eavesdrop and read all data sent from Alice to Bob. çConsequence: Alice must not send messages (M 1,M 2,…) directly – they must be “scrambled” or encrypted using a ‘secret code’ unknown to Marvin but known to Bob.

7 CPE5200 Semester 2 - 20017 Basic terms n cryptology (to be very precise) çcryptography --- designing çcryptanalysis --- code breaking n cryptologist çcryptographer çcryptanalyst n encryption/encipherment çscrambling data into unintelligible to unauthorised parties

8 CPE5200 Semester 2 - 20018 Basic terms (2) n decryption/decipherment çun-scrambling n cipher/cryptosystem

9 CPE5200 Semester 2 - 20019 A short history n dividing line is 1976/77 çclassic~1976/77 l1976: Diffie & Hellman discovered public key cryptography l1977: National Bureau of Standards published DES (Data Encryption Standard) çmodern1976/77 ~ today

10 CPE5200 Semester 2 - 200110 History (2) n the word of “cipher”--- from Greek (secret writing) n ancient Egypt, Julius Caesar,... n WWII çEnigma cipher machine lbroken by British team including Alan Turing çPurple cipher lbroken by US, led to the death of Yamamoto n Mainly for war, diplomacy & politics

11 CPE5200 Semester 2 - 200111 Best book on history of crypto n David Kahn, Macmillan, New York, 1972. n David Kahn, The Codebreakers, Macmillan, New York, 1972. n PS: a revised edition has been published in 1996.

12 CPE5200 Semester 2 - 200112 Types of ciphers n private key cryptosystems/ciphers çNext few lectures. n public key cryptosystems/ciphers çLater!

13 CPE5200 Semester 2 - 200113 Examples of “Messages” n Types of secret “Messages” Alice might want to send Bob (in increasing length): çDecision (yes/no), eg as answer to the question “Are we meeting tommorow?” çNumerical Value, eg as answer to the question “at what hour are we meeting?” çDocument çSoftware, çImages etc.

14 CPE5200 Semester 2 - 200114 Representation of Data (1) n Before encryption, messages must be represented in a standard way. n A representation code for a set of messages is: çA code which associates each possible message to a unique representing string of symbols çThe symbols are elements of an “alphabet” lEnglish Letter alphabet = {A,B,C,…,X,Y,Z} (26 elements) lDecimal digit alphabet = {0,1,…,9} (10 elements) lBinary digit (bit) alphabet = {0,1} (2 elements) çAssumption: The message representation code is NOT secret and is known to everyone, including Marvin!

15 CPE5200 Semester 2 - 200115 Representation of Data (2) n Example 1: çSet of Messages = {yes, no} (Decisions) çSymbol Alphabet = {0,1} (bit alphabet) çRepresentation Code: l 0 = yes, 1 = no n Example 2: çSet of messages = {English text} çSymbol alphabet = {A,B,…,Y,Z} (letters) çRepresentation code: Leave as is.

16 CPE5200 Semester 2 - 200116 Representation of Data (3) n Example 3: çSet of Messages = {English text} çSymbol Alphabet = {0,1} (bits) çRepresentation Code: l Convert each english letter in text to an 8-bit ASCII code, and concatanate the 8-bit codes. n Example 4: çSet of Messages = {0,1,…,1000} çSymbol Alphabet = {0,1} (bits) çRepresentation code: binary base system lRepresent number x as string of 10 bits where: lEg x = 734 is encoded as 1011011110

17 CPE5200 Semester 2 - 200117 Private key cipher E Network or Storage Plain Text Cipher Text D Original Plain Text Bob Secret Key Alice Secret Key

18 CPE5200 Semester 2 - 200118 Concepts n a private key cipher is composed of two algorithms çencryption algorithm E çdecryption algorithm D n the same key K is used for encryption & decryption n K has to be distributed beforehand

19 CPE5200 Semester 2 - 200119 Notations n encrypt a plaintext P using a key K & an encryption algorithm E C = E(K,P) n decrypt a ciphertext C using the same key K and the matching decryption algorithm D P = D(K,C) n Note: P = D(K,C) = D(K, E(K,P))

20 CPE5200 Semester 2 - 200120 Classic ciphers n substitution ciphers çmonoalphabetic ciphers çpolyalphabetic ciphers n transposition (permutation) ciphers n product ciphers çusing both lsubstitution, and ltransposition

21 CPE5200 Semester 2 - 200121 The Caesar cipher n The Caesar cipher is a substitution cipher, named after Julius Caesar. n Operation principle: each letter is translated into the letter a fixed number of positions after it in the alphabet table. n the fixed number of positions is a key both for encryption and decryption.

22 CPE5200 Semester 2 - 200122 The Caesar cipher (cnt’d) Outer: plaintext Inner: ciphertext

23 CPE5200 Semester 2 - 200123 The Caesar cipher (cnt’d) K=3

24 CPE5200 Semester 2 - 200124 An example for a key K=3, plaintext letter: ABCDEF...UVWXYZ ciphtertext letter: DEF...UVWXYZABC for a key K=3, plaintext letter: ABCDEF...UVWXYZ ciphtertext letter: DEF...UVWXYZABC Hence TREATY IMPOSSIBLE is translated into WUHDWB LPSRVVLEOH Hence TREATY IMPOSSIBLE is translated into WUHDWB LPSRVVLEOH

25 CPE5200 Semester 2 - 200125 An exercise Using the Caesar cipher to encode the following message under a key K=5 WAR STARTS TOMORROW Using the Caesar cipher to encode the following message under a key K=5 WAR STARTS TOMORROW

26 CPE5200 Semester 2 - 200126 Breaking the Caesar cipher n by trial-and error n by using statistics on letters çfrequency distributions of letters letterpercent A7.49% B1.29% C3.54% D3.62% E14.00%..................................

27 CPE5200 Semester 2 - 200127 4 types of cryptanalysis n depending on what a cryptanalyst has to work with, attacks can be classified into çciphertext only attack çknown plaintext attack çchosen plaintext attack çchosen ciphertext attack (most severe)

28 CPE5200 Semester 2 - 200128 4 types of attacks (2) n ciphertext only attack çthe only data available is a target ciphertext n known plaintext attack ça target ciphertext çpairs of other ciphertext and plaintext (say, previously broken)

29 CPE5200 Semester 2 - 200129 4 types of attacks (3) n chosen plaintext attacks ça target ciphertext çcan feed encryption algorithm with plaintexts and obtain the matching ciphertexts n chosen ciphertext attack ça target ciphertext çcan feed decryption algorithm with ciphertexts and obtain the matching plaintexts

30 CPE5200 Semester 2 - 200130 Two Main Types of Secrecy n Types of secrecy a cipher can offer: çPerfect Secrecy: For these ciphers Marvin cannot determine the message M even with unlimited computation time lDecrypting C with all possible keys K gives many possible messages, all reasonable candidates for the actual message M lOne of the decrypted messages is M, but Marvin has no way to tell which one is the actual message encrypted by Alice! lExample: Caesar cipher with all 26 possible keys equally likely and message being just ONE letter (26 possible messages). ¥Eg Given ciphertext A, corresponding plaintexts under keys {0,1,2,…,25} are {A,B,C,…,X,Y,Z}.

31 CPE5200 Semester 2 - 200131 Two Main Types of Secrecy (2) çUnfortunately, ciphers achieving perfect secrecy are not practical in most cases: l May require very long keys (eg as long as message) l Cannot withstand known plaintext attacks (or stronger) n Instead, most common are ciphers aiming to achieve: çComputational Secrecy: Marvin cannot determine the message M unless he performs an unfeasible amount of computation (eg it would take 10,000 years for Marving to determine M using the fastest supercomputer!) çThis can be achieved under all 4 possible attack scenarios, and using quite short keys!

32 CPE5200 Semester 2 - 200132 Breaking classic ciphers n with the help of fast computers, 99.99% ciphers used before 1976 are breakable by using one of the 4 types of attacks. n The first computer designed by Alan Turing was used to break the Enigma cipher in WWII.

33 CPE5200 Semester 2 - 200133 Modern private key ciphers n DES (US, 1977) çkey -- 56 bits, plaint/ciphertext -- 64 bits n IDEA (Lai & Massey, Swiss, 1991) çkey -- 128 bits, plaint/ciphertext -- 64 bits n LOKI (ADFA, Australia, 1989) çkey, plaint/ciphertext -- 64 bits n FEAL (NTT, Japan, 1990) çkey -- 128 bits, plaint/ciphertext -- 64 bits

34 CPE5200 Semester 2 - 200134 DES Encryption

35 CPE5200 Semester 2 - 200135 Encryption using DES n a 56-bit key K is expanded into 16 subkeys, each 48 bits (K 1, K 2,..., K 16 ) n Encryption consists of 16 rounds, each using a different 48-bit subkey n Both a plaintext & a ciphertext are 64 bits long

36 CPE5200 Semester 2 - 200136 Decryption using DES n Similar to encryption, except that the order in which the subkeys are used is reversed, namely, (K 16, K 15,..., K 2, K 1 )

37 CPE5200 Semester 2 - 200137 DES Decryption


Download ppt "Lecture 6 Introduction to Cryptography --- Foundations of computer security ---"

Similar presentations


Ads by Google