Docsity

Symmetric Encryption: Lecture Notes on Classical Substitution Ciphers and Cryptanalysis, Slides of Computer Security

Partial preview of the text

Download Symmetric Encryption: Lecture Notes on Classical Substitution Ciphers and Cryptanalysis and more Slides Computer Security in PDF only on Docsity!

Lecture Outline (1/2)  Symmetric Encryption  Some Basic Terminology  Symmetric Cipher Model  Classical Substitution Ciphers  Caesar Cipher  Monoalphabetic Cipher  Playfair Cipher  Hill Ciphers (Self Study)  Polyalphabetic Ciphers  Vernam Cipher  One-Time Pad

Dr. Hanif Durad^

Lecture Outline (2/2)  Transposition Ciphers  Rail Fence cipher  Row Transposition Ciphers  Product Ciphers  Rotor Machines  Steganography

Dr. Hanif Durad^

Some Basic Terminology (1/2)  Plaintext^ - original message  Ciphertext^ - coded message  Cipher^ - algorithm for transforming plaintextto ciphertext  Key^ - info used in cipher known only tosender/receiver  Encipher (encrypt)

- converting plaintext to

ciphertext

Dr. Hanif Durad^

Some Basic Terminology (2/2)  Decipher (Decrypt)^ - Recovering Plaintext FromCiphertext  Cryptography^ - Study Of EncryptionPrinciples/Methods  Cryptanalysis (Codebreaking)

- Study Of

Principles/ Methods Of Deciphering Ciphertext Without^ Knowing Key  Cryptology^ - Field Of Both Cryptography AndCryptanalysis

Dr. Hanif Durad^

Requirements (2/2)  Two requirements for secure use of symmetricencryption:  A strong encryption algorithm  A secret key known only to sender / receiver  Mathematically have: Y^ = e( x ) k X^ = d( y ) k  Assume encryption algorithm is known  Implies a secure channel to distribute key

Dr. Hanif Durad^

2.1.1 Cryptography  Characterize cryptographic system by:  Type of encryption operations used ^ Substitution / transposition / product  Number of keys used ^ Single-key or private / two-key or public  Way in which plaintext is processed ^ Block / stream

Dr. Hanif Durad^

2.1.3 Cryptanalytic Attacks (1/2)  Ciphertext attack only  Only know algorithm & ciphertext  May use^ brute-force but^ if key space large?  Use^ statistical^ tests  Analyst know or can identify plaintext e.G. English, french,exe , java or accounting file  Known plaintext/probable-word attack  Know/suspect plaintext & cipher text e.g. Post script orcompany logo  Chosen plaintext attack  Select plaintext and obtain ciphertext e.g. differentialcryptanalysis (chapter-3)

Dr. Hanif Durad^

Cryptanalytic Attacks (2/2)  Chosen ciphertext attack  Select ciphertext and obtain plaintext  Chosen plain text attack  Select plaintext or ciphertext to en/decrypt  Both are not commonly used

Dr. Hanif Durad^

Brute Force Search  always possible to simply try every key  most basic attack, proportional to key size  assume either know / recognize plaintext Key Size (bits)^ Number of AlternativeKeys

Time required at 1Time required at 10decryption/μs

(^6) decryptions/μs 32 9 32 2 = 4.3^ ^10 31 2 μs^ = 35.8 minutes^ 2.15 milliseconds 56 16 56 2 = 7.2^ ^10 55 2 μs^ = 1142 years^ 10.01 hours 128 38 128 2 = 3.4^ ^10 127 24 2 μs^ = 5.4^ ^10 years^ 5.4^ ^10 18 years 168 50 168 2 = 3.7^ ^10 167 36 2 μs^ = 5.9^ ^10 years^ 5.9^ ^10 30 years (^26) 26 characters26! = 4  (^10) (permutation) (^26 12 2)  10 μs^ = 6.4^ ^10 years^ 6.4^ ^10 6 years

Dr. Hanif Durad^

2.3 Classical Substitution Ciphers  Where letters of plaintext are replaced by otherletters or by numbers or symbols  Or if plaintext is viewed as a sequence of bits,then substitution involves replacing plaintext bitpatterns with ciphertext bit patterns

Dr. Hanif Durad^

Caesar Cipher (2/3)  Can define transformation as: a b c d e f g h i j k l m n o p q r s t u v w x y zD E F G H I J K L M N O P Q R S T U V W X Y Z A B C  Mathematically give each letter a number a b c d e f g h i j^ k^ l^ m^

n^ o^ p^ q^ r^ s^ t^ u^ v^ w

x^ y^ z

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25  Then have caesar cipher as: c^ = E( p ) = ( p^ +^ k ) mod (26) p^ = D(c) = (c –^ k ) mod (26)

Dr. Hanif Durad^

Cryptanalysis of Caesar Cipher(3/3)^ ^ Only have 26 possible ciphers^ ^ A maps to A,B,..Z^ ^ Could simply try each in turn^ ^ A^ brute force search^ ^ Given ciphertext, just try all shifts of letters^ ^ Do need to recognize when have plaintexte.g. Break ciphertext "GCUA VQ DTGCM"

Monoalphabetic Cipher (2/7)  Rather than just shifting the alphabet  Could shuffle (jumble) the letters arbitrarily  Each plaintext letter maps to a different randomciphertext letter  Hence key is 26 letters long Plain:^ abcdefghijklmnopqrstuvwxyzCipher: DKVQFIBJWPESCXHTMYAUOLRGZNPlaintext:^ ifwewishtoreplacelettersCiphertext: WIRFRWAJUHYFTSDVFSFUUFYA

Dr. Hanif Durad^

Monoalphabetic Cipher Security(3/7)  Now have a total of 26! = 4 x 10^26 keys  With so many keys, might think is secure  But would be^ !!!WRONG!!!  Problem is language characteristics