CS 556 – Computer Security Spring 2018
Total Page:16
File Type:pdf, Size:1020Kb
CS 556 – Computer Security Spring 2018 Dr. Indrajit Ray Email: [email protected] Department of Computer Science Colorado State University Fort Collins, CO 80523, USA Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 1 / 64 SECRET KEY CRYPTOSYSTEMS SIMPLE CIPHERS STRONGER CIPHERS DATA ENCRYPTION STANDARD DES DESIGN BREAKING DES DES TRIPLE SECRET KEY CRYPTOSYSTEMS ENCRYPTION BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 2 / 64 Secret Key Cryptosystem SECRET KEY Insecure Communications CRYPTOSYSTEMS Channel SIMPLE CIPHERS Encrypt M with Decrypt C with Message M C M Message key K1 key K2 STRONGER CIPHERS Source Destination C = E[M, K1] M = D[C, K2] DATA ENCRYPTION C STANDARD Cryptanalyst DES DESIGN K1 K2 BREAKING DES DES TRIPLE Key Source K1 Key Source ENCRYPTION Generates Provides Or Random Key Secure Key Produces Key BEYOND DES Channel USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 3 / 64 Block Ciphers vs. Stream Ciphers (1) SECRET KEY CRYPTOSYSTEMS Plaintext SIMPLE CIPHERS 64 / 128 bits 64 / 128 bits block block STRONGER CIPHERS DATA ENCRYPTION P1 P2 Pn-1 Pn STANDARD DES DESIGN P1 Pi Pn BREAKING DES Key Encrypt Key Encrypt Key Encrypt DES TRIPLE ENCRYPTION C1 Ci Cn BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Ciphertext C1 Ci Cn Key Decrypt Key Decrypt Key Decrypt P1 Pi Pn Plaintext Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 4 / 64 Block Cipher vs. Stream Ciphers (2) SECRET KEY CRYPTOSYSTEMS Plaintext SIMPLE CIPHERS STRONGER CIPHERS Plaintext byte stream DATA ENCRYPTION STANDARD DES DESIGN Pseudorandom BREAKING DES Key byte generator (key stream + DES TRIPLE generator) Ciphertext ENCRYPTION byte stream BEYOND DES Ciphertext USING SYMMETRIC byte stream KEY CRYPTOSYSTEM Pseudorandom Key byte generator (key stream + generator) Plaintext byte stream Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 5 / 64 Basic Secret-Key Techniques SECRET KEY ● Substitution CRYPTOSYSTEMS ● SIMPLE CIPHERS Permutation or transposition STRONGER CIPHERS ✦ Reverse Cipher DATA ENCRYPTION STANDARD ✦ Column Transposition DES DESIGN ✦ Rail Fence BREAKING DES ✦ Scytale Cipher DES TRIPLE ✦ ENCRYPTION Nihilist Cipher BEYOND DES ● Combination and iterations of these - Product ciphers USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 6 / 64 SECRET KEY CRYPTOSYSTEMS SIMPLE CIPHERS STRONGER CIPHERS DATA ENCRYPTION STANDARD DES DESIGN BREAKING DES DES TRIPLE SIMPLE CIPHERS ENCRYPTION BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 7 / 64 Simple Alphabetic Substitution SECRET KEY CRYPTOSYSTEMS Plaintext ABCDEFGHIJKLMNOPQRSTUVWXYZ SIMPLE CIPHERS Ciphertext PZQSGIMBWXDFKJVCHAOLUTERYN STRONGER CIPHERS DATA ENCRYPTION STANDARD ● Also called Caesar cipher DES DESIGN 26 ● Huge key space: 26! ≫ 10 BREAKING DES ● DES TRIPLE Trivially broken for known plaintext attacks ENCRYPTION ● Easily broken for ciphertext only attacks (for natural language BEYOND DES plaintext) USING SYMMETRIC KEY CRYPTOSYSTEM ● Multiple encipherment does not help (no point in doing two substitutions in sequence) Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 8 / 64 Simple Permutation SECRET KEY CRYPTOSYSTEMS Plaintext 1 2 3 4 5 SIMPLE CIPHERS STRONGER CIPHERS DATA ENCRYPTION Ciphertext5 13 2 4 STANDARD DES DESIGN BREAKING DES ● Key space N! for block size N DES TRIPLE ENCRYPTION ● Trivially broken for known plaintext attack BEYOND DES ● Easily broken for ciphertext only attack (for natural language USING SYMMETRIC KEY CRYPTOSYSTEM plaintext) ● Multiple encipherment does not help Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 9 / 64 Reverse Cipher SECRET KEY ● Reverse the order of the letters in a message CRYPTOSYSTEMS SIMPLE CIPHERS ✦ Plaintext – ICAMEISAWICONQUERED STRONGER CIPHERS ✦ Ciphertext – DERDUQNOCIWASIEMACI DATA ENCRYPTION STANDARD DES DESIGN BREAKING DES DES TRIPLE ENCRYPTION BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 10 / 64 Column Transposition SECRET KEY CRYPTOSYSTEMS 1 2 3 4 5 6 7 SIMPLE CIPHERS Key; 4523617 STRONGER CIPHERS l a s e f b e DATA ENCRYPTION a m s c a n b STANDARD e m o d u l a Ciphertext: DES DESIGN t e d t o c a BREAKING DES ecdtm ecaef auool edsam DES TRIPLE r r y m o r e ENCRYPTION i n t e l l i merne nasso dytnr vbnlc BEYOND DES g e n c e t h rltiq laetr igawe baaei USING SYMMETRIC hox KEY CRYPTOSYSTEM a n r a d i o w a v e s q x Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 11 / 64 Rail Fence Cipher SECRET KEY ● Write the message alternating letters in two rows CRYPTOSYSTEMS ● SIMPLE CIPHERS Write the ciphertext from the rows STRONGER CIPHERS DATA ENCRYPTION STANDARD NTMFRGNWS H LOM Plaintext O I T E I E O A L O D E DES DESIGN BREAKING DES DES TRIPLE ENCRYPTION BEYOND DES Ciphertext NWSHTMFRLGOMNOITEIEOALODE USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 12 / 64 Scytale Cipher SECRET KEY ● A strip of paper was wound round a staff; message written along CRYPTOSYSTEMS SIMPLE CIPHERS staff in rows; then paper removed leaving a strip of seemingly STRONGER CIPHERS random letters DATA ENCRYPTION STANDARD DES DESIGN N O W I S T H BREAKING DES DES TRIPLE ENCRYPTION E T I M E F BEYOND DES USING SYMMETRIC O R A L L G KEY CRYPTOSYSTEM O O D M E N Ciphertext: NEOOOTROWIADIMLMSELETFGNH Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 13 / 64 Nihilist Cipher SECRET KEY ● Combines row and column transposition CRYPTOSYSTEMS ● SIMPLE CIPHERS Write message in rows in order controlled by key, read off by STRONGER CIPHERS rows DATA ENCRYPTION STANDARD Plaintext: NOWISTHETIMEFORALLGOODMEN DES DESIGN Key 2 1 3 5 4 BREAKING DES DES TRIPLE 2 1 3 5 4 ENCRYPTION BEYOND DES 2 HETT I USING SYMMETRIC 1 OWIN S KEY CRYPTOSYSTEM 3 EFOM R 5 DMEO N 4 LLGA O Ciphertext: HTEIT ONWSI EMFRO DOMNE LALOG Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 14 / 64 SECRET KEY CRYPTOSYSTEMS SIMPLE CIPHERS STRONGER CIPHERS DATA ENCRYPTION STANDARD DES DESIGN BREAKING DES DES TRIPLE STRONGER CIPHERS ENCRYPTION BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 15 / 64 Product Ciphers SECRET KEY ● Substitution followed by permutation followed by substitution CRYPTOSYSTEMS ... SIMPLE CIPHERS followed by permutation ● STRONGER CIPHERS Best known example is DES (Data Encryption Standard) DATA ENCRYPTION ● Mathematics to design strong product cipher is classified STANDARD DES DESIGN BREAKING DES DES TRIPLE ENCRYPTION BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 16 / 64 Product Ciphers - (cont’d) SECRET KEY ● For known plaintext/ chosen plaintext/ chosen ciphertext, CRYPTOSYSTEMS SIMPLE CIPHERS breakable by exhaustive search of key space ● STRONGER CIPHERS Therefore security is based on - computational complexity of DATA ENCRYPTION computing the key under these scenarios STANDARD DES DESIGN ✦ size of the key BREAKING DES DES TRIPLE ENCRYPTION BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 17 / 64 Vernam One-time Pad SECRET KEY CRYPTOSYSTEMS Perfect Secrecy SIMPLE CIPHERS AB A + B STRONGER CIPHERS Plaintext Ciphertext Plaintext DATA ENCRYPTION STANDARD + + 0 0 0 DES DESIGN 0 1 1 BREAKING DES DES TRIPLE ENCRYPTION 1 0 1 BEYOND DES Secret KeyKK Secret Key USING SYMMETRIC 1 1 0 KEY CRYPTOSYSTEM Secure Channel Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 18 / 64 Perfect Secrecy SECRET KEY ● The Vernam one-time pad is the ultimate cipher, but impractical CRYPTOSYSTEMS SIMPLE CIPHERS for most situations ● STRONGER CIPHERS Requires a random key longer than the message DATA ENCRYPTION ● The key cannot be reused STANDARD ● Known plaintext reveals the portion of the key that has been DES DESIGN used, but does not reveal anything about the future bits of the BREAKING DES DES TRIPLE key ENCRYPTION BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 19 / 64 SECRET KEY CRYPTOSYSTEMS SIMPLE CIPHERS STRONGER CIPHERS DATA ENCRYPTION STANDARD DES DESIGN BREAKING DES DES TRIPLE DATA ENCRYPTION STANDARD ENCRYPTION BEYOND DES USING SYMMETRIC KEY CRYPTOSYSTEM Dr. Indrajit Ray, Computer Science Department CS 556 - Computer Security - c 2018 Colorado State University – 20 / 64 DES SECRET KEY ● DES is a product cipher with 56 bit key and 64 bit block size for CRYPTOSYSTEMS