classical ciphers
play

Classical Ciphers Playfair Cipher Polyalphabetic Ciphers - PowerPoint PPT Presentation

Cryptography Classical Ciphers Caesar Cipher Monoalphabetic Ciphers Classical Ciphers Playfair Cipher Polyalphabetic Ciphers Cryptography Vigen` ere Cipher Vernam Cipher One Time Pad School of Engineering and Technology CQUniversity


  1. Cryptography Classical Ciphers Caesar Cipher Monoalphabetic Ciphers Classical Ciphers Playfair Cipher Polyalphabetic Ciphers Cryptography Vigen` ere Cipher Vernam Cipher One Time Pad School of Engineering and Technology CQUniversity Australia Transposition Techniques Prepared by Steven Gordon on 19 Feb 2020, classical.tex, r1789 1/64

  2. Cryptography Contents Classical Ciphers Caesar Cipher Caesar Cipher Monoalphabetic Ciphers Monoalphabetic Ciphers Playfair Cipher Polyalphabetic Ciphers Playfair Cipher Vigen` ere Cipher Vernam Cipher Polyalphabetic Ciphers One Time Pad Transposition Vigen` ere Cipher Techniques Vernam Cipher One Time Pad Transposition Techniques 2/64

  3. Cryptography Caesar Cipher (algorithm) Classical Ciphers To encrypt with a key k , shift each letter of the plaintext k Caesar Cipher positions to the right in the alphabet, wrapping back to the Monoalphabetic start of the alphabet if necessary. To decrypt, shift each Ciphers letter of the ciphertext k positions to the left (wrapping if Playfair Cipher Polyalphabetic necessary). Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 3/64

  4. Cryptography Caesar Cipher Encryption (exercise) Classical Ciphers Using the Caesar cipher, encrypt plaintext hello with key 3 . Caesar Cipher Monoalphabetic Ciphers Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 4/64

  5. Cryptography How many keys are possible in the Caesar Classical Ciphers cipher? (question) Caesar Cipher If the Caesar cipher is operating on the characters a–z, then Monoalphabetic Ciphers how many possible keys are there? Is a key of 0 possible? Is Playfair Cipher it a good choice? What about a key of 26 ? Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 5/64

  6. Cryptography Caesar Cipher Decryption (exercise) Classical Ciphers You have received the ciphertext TBBQOLR . You know the Caesar Cipher Caesar cipher was used with key n . Find the plaintext. Monoalphabetic Ciphers Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 6/64

  7. Cryptography Caesar Cipher, formal (algorithm) Classical Ciphers Caesar Cipher C = E ( K , P ) = ( P + K ) mod 26 (1) Monoalphabetic Ciphers P = D ( K , C ) = ( C − K ) mod 26 (2) Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 7/64

  8. Cryptography Caesar Cipher, formal (exercise) Classical Ciphers Consider the following mapping. Caesar Cipher a b c d e f g h i j k l m Monoalphabetic 0 1 2 3 4 5 6 7 8 9 10 11 12 Ciphers Playfair Cipher n o p q r s t u v w x y z Polyalphabetic 13 14 15 16 17 18 19 20 21 22 23 24 25 Ciphers Use the the formal (mathematical) algorithm for Caesar Vigen` ere Cipher cipher to decrypt SDV with key p . Vernam Cipher One Time Pad Transposition Techniques 8/64

  9. Cryptography Caesar Encrypt and Decrypt (python) Classical Ciphers 1 >>> pycipher.Caesar(3).encipher("hello") Caesar Cipher 2 ’KHOOR’ Monoalphabetic 3 >>> pycipher.Caesar(3).decipher("khoor") Ciphers 4 ’HELLO’ Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 9/64

  10. Cryptography Brute Force Attack (definition) Classical Ciphers Try all combinations (of keys) until the correct plaintext/key Caesar Cipher is found. Monoalphabetic Ciphers Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 10/64

  11. Cryptography Caesar Brute Force (exercise) Classical Ciphers The ciphertext FRUURJVBCANNC was obtained using the Caesar Cipher Caesar cipher. Find the plaintext using a brute force attack. Monoalphabetic Ciphers Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 11/64

  12. Cryptography Caesar Brute Force (python) Classical Ciphers 1 for k in range(0,26): Caesar Cipher 2 pycipher.Caesar(k).decipher("FRUURJVBCANNC") Monoalphabetic Ciphers Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 12/64

  13. Cryptography Caesar Brute Force Results (text) Classical Ciphers 0: FRUURJVBCANNC 13: SEHHEWIOPNAAP Caesar Cipher 1: EQTTQIUABZMMB 14: RDGGDVHNOMZZO Monoalphabetic 2: DPSSPHTZAYLLA 15: QCFFCUGMNLYYN Ciphers 3: CORROGSYZXKKZ 16: PBEEBTFLMKXXM Playfair Cipher 4: BNQQNFRXYWJJY 17: OADDASEKLJWWL Polyalphabetic 5: AMPPMEQWXVIIX 18: NZCCZRDJKIVVK Ciphers 6: ZLOOLDPVWUHHW 19: MYBBYQCIJHUUJ Vigen` ere Cipher 7: YKNNKCOUVTGGV 20: LXAAXPBHIGTTI Vernam Cipher 8: XJMMJBNTUSFFU 21: KWZZWOAGHFSSH One Time Pad 9: WILLIAMSTREET 22: JVYYVNZFGERRG Transposition 10: VHKKHZLRSQDDS 23: IUXXUMYEFDQQF Techniques 11: UGJJGYKQRPCCR 24: HTWWTLXDECPPE 12: TFIIFXJPQOBBQ 25: GSVVSKWCDBOOD 13/64

  14. Cryptography How many attempts for Caesar brute force? Classical Ciphers (question) Caesar Cipher What is the worst, best and average case of number of Monoalphabetic Ciphers attempts to brute force ciphertext obtained using the Caesar Playfair Cipher cipher? Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 14/64

  15. Cryptography Recognisable Plaintext upon Decryption Classical Ciphers (assumption) Caesar Cipher The decrypter will be able to recognise that the plaintext is Monoalphabetic Ciphers correct (and therefore the key is correct). Decrypting Playfair Cipher ciphertext using the incorrect key will not produce the Polyalphabetic original plaintext. The decrypter will be able to recognise Ciphers that the key is wrong, i.e. the decryption will produce Vigen` ere Cipher Vernam Cipher unrecognisable output. One Time Pad Transposition Techniques 15/64

  16. Cryptography Is plaintext always recognisable? (question) Classical Ciphers Caesar cipher is using recognisably correct plaintext, i.e. Caesar Cipher English words. But is the correct plaintext always Monoalphabetic recognisable? What if the plaintext was a different Ciphers language? Or compressed? Or it was an image or video? Or Playfair Cipher Polyalphabetic binary file, e.g. .exe? Or a set of characters chosen Ciphers randomly, e.g. a key or password? Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 16/64

  17. Cryptography How to improve upon the Caesar cipher? Classical Ciphers 1. Increase the key space so brute force is harder Caesar Cipher Monoalphabetic 2. Change the plaintext (e.g. compress it) so harder to Ciphers recognise structure Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 17/64

  18. Cryptography Contents Classical Ciphers Caesar Cipher Caesar Cipher Monoalphabetic Ciphers Monoalphabetic Ciphers Playfair Cipher Polyalphabetic Ciphers Playfair Cipher Vigen` ere Cipher Vernam Cipher Polyalphabetic Ciphers One Time Pad Transposition Vigen` ere Cipher Techniques Vernam Cipher One Time Pad Transposition Techniques 18/64

  19. Cryptography Permutation (definition) Classical Ciphers A permutation of a finite set of elements is an ordered Caesar Cipher sequence of all the elements of S , with each element Monoalphabetic appearing exactly once. In general, there are n ! Ciphers permutations of a set with n elements. Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 19/64

  20. Cryptography Permutation (example) Classical Ciphers Consider the set S = { a , b , c } . There are six permutations Caesar Cipher of S : Monoalphabetic abc, acb, bac, bca, cab, cba Ciphers This set has 3 elements. There are 3! = 3 × 2 × 1 = 6 Playfair Cipher Polyalphabetic permutations. Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 20/64

  21. Cryptography Monoalphabetic (Substitution) Cipher Classical Ciphers (definition) Caesar Cipher Given the set of possible plaintext letters (e.g. English Monoalphabetic Ciphers alphabetc, a–z), a single permutation is chosen and used to Playfair Cipher determine the corresponding ciphertext letter. Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 21/64

  22. Cryptography Monoalphabetic (Substitution) Cipher (example) Classical Ciphers In advance, the sender and receiver agree upon a Caesar Cipher permutation to use, e.g.: Monoalphabetic P: a b c d e f g h i j k l m n o p q r s t u v w Ciphers Playfair Cipher x y z Polyalphabetic C: H P W N S K L E V A Y C X O F G T B Q R U I D Ciphers J Z M Vigen` ere Cipher To encrypt the plaintext hello , the agreed upon Vernam Cipher permutation (or mapping) is used to produce the ciphertext One Time Pad ESCCF . Transposition Techniques 22/64

  23. Cryptography Decrypt Monoalphabetic Cipher (exercise) Classical Ciphers Decrypt the ciphertext QSWBSR using the permutation Caesar Cipher chosen in the previous example. Monoalphabetic Ciphers Playfair Cipher Polyalphabetic Ciphers Vigen` ere Cipher Vernam Cipher One Time Pad Transposition Techniques 23/64

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend