1 / 23

Classical Encryption Techniques Week 6 - Sun

Classical Encryption Techniques Week 6 - Sun. Three Techniques in Encryption. Shift Cipher each letter is translated to a letter a fixed number of places after it in the alphabet. ( Caesar Cipher ) Substitution

kasi
Download Presentation

Classical Encryption Techniques Week 6 - Sun

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Classical Encryption TechniquesWeek 6 - Sun

  2. Three Techniques in Encryption • Shift Cipher • each letter is translated to a letter a fixed number of places after it in the alphabet. (Caesar Cipher) • Substitution • One symbol is exchanged for another, This technique is called a monoalphabetic cipher or simple substitution. only one alphabet substitution was used to encrypt the whole alphabet. • Polyalphabetic substitution cipher, encrypt each letter with a different alphabet (Vigenere Cipher) • Transposition (Permutation) • The order of the symbols is rearranged (Row Transposition Cipher) • Product Ciphers • Uses both techniques, substitution and transposition.

  3. Shift Cipher • The Caesar Cipher: A shiff of 3: ci=e(mi)=mi+3 mod 26 • Plaintext ABCDEFGHIJKLMNOPQRSTUVWXYZ • Ciphertext defghijklmnopqrstuvwxyzabc • Using this encryption, the message TREATY IMPOSSIBLE would be encoded as • PLESE CALL ME • w u h d w b l p s r v v l e o h • There are only 26 possible keys, so the time for this exhaustive key search is very small.

  4. The Caesar Cipher • A shift may be of any amount, so that the general Caesar algorithm is ci=e(mi)=( mi+k) mod 26 • Where k takes on a value in the range 1 to 25.The decryption algorithm is simply mi=d(ci )= ( ci-k )mod 26 • Three important characteristics of this problem enabled us to use a bruteforcecryptanalysis: • 1. The encryption and decryption algorithms are known. • 2. There are only 25 keys to try. • 3. The language of the plaintext is known and easily recognizable.

  5. Substitution Ciphers / monoalphabetic • To write down a key for the substitution cipher we first write down the alphabet, and then a permutation of the alphabet directly below it. This mapping gives the substitution we make between the plaintext and the ciphertext • Plaintext ABCDEFGHIJKLMNOPQRSTUVWXYZ • Ciphertext GOYDSIPELUAVCRJWXZNHBQFTMK • Encryption involves replacing each letter in the top row by its value in the bottom row. • Decryption involves first looking for the letter in the bottom row and then seeing which letter in the top row maps to it. Hence, the plaintext word HELLO would encrypt to the Ciphertext ESWjif we used the substitution given above. The number of possible keys is equal to the total number of permutations on 26 letters, namely the size of the group 526, which is 26! ≈4 ×1026 ≈ 288

  6. Monoalphabetic Cipher Security • now have a total of 26! = 4 x 1026 keys • with so many keys, might think is secure • but would be !!!WRONG!!! • problem is language characteristics

  7. Language Redundancy and Cryptanalysis • human languages are redundant • eg "th lrd s m shphrd shll nt wnt" • letters are not equally commonly used • in English E is by far the most common letter • followed by T,R,N,I,O,A,S • other letters like Z,J,K,Q,X are fairly rare • have tables of single, double & triple letter frequencies for various languages

  8. English Letter Frequencies

  9. Substitution Ciphers / Hill cipher

  10. Substitution Ciphers / Hill cipher

  11. Substitution Ciphers / Hill cipher

  12. Substitution Ciphers / Hill cipher

  13. Substitution Ciphers / Hill cipher

  14. Security of Hill Cipher • Completely hides single-letter frequencies • Large matrix hides more frequency information • Very strong against ciphertext-only attack • Easy to break using known-plaintext attack • Compute matrix. • Although the Hill cipher is strong against a ciphertext-only attack, it is • easily broken with a known plaintext attack. • Suppose we have n plaintext–ciphertext pairs. • m = (m1j, m2j, m3j , …, mnj) • c = (c1j, c2j, c3j , …, cnj) • Cj = mjk for 1 ≤ j ≥ n • If m has an inverse, then we can determine k = m-1 c

  15. Types of Attacks on Encrypted Messages

  16. Substitution Ciphers Discussion Advantage: simple, easy to implement Disadvantage: simple, obvious pattern. 1 3

  17. Polyalphabetic Ciphers • polyalphabetic substitution ciphers • improve security using multiple cipher alphabets • make cryptanalysis harder with more alphabets to guess and flatter frequency distribution • use a key to select which alphabet is used for each letter of the message • use each alphabet in turn • repeat from start after end of key is reached

  18. Substitution Cypher / polyalphabetic (Vigenère Cipher) • VIGENERE CIPHER • Plaintext alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ • Ciphertext alphabet one TMKGOYDSIPELUAVCRJWXZNHBQF • Ciphertext alphabet two DCBAHGFEMLKJIZYXWVUTSRQPON • Then the plaintext letters in an odd position we encrypt using the first ciphertext alphabet, whilst the plaintext letters in even positions we encrypt using the second alphabet. For example the plaintext wordHELLO, using the above alphabets would encrypt toSHLJV. Notice that the two occurrences of L in the plaintext encrypt to two different Ciphertext characters. • We essentially are encrypting the message two letters at a time, hence we have a block cipher with block length two English characters. (26!)2 ≈ 2176 • In real life one may round five rather than just two alphabets and the resulting key becomes very large • indeed. With five alphabets the total key space is (26!)5 ≈ 2441

  19. Vigenère Cipher • simplest polyalphabetic substitution cipher • effectively multiple caesar ciphers • key is multiple letters long K = k1 k2 ... kd • ith letter specifies ith alphabet to use • use each alphabet in turn • repeat from start after d letters in message • decryption simply works in reverse

  20. Example of Vigenère Cipher • write the plaintext out • write the keyword repeated above it • use each key letter as a caesar cipher key • encrypt the corresponding plaintext letter • eg using keyword deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ

  21. The Vigenere cipher uses this table together with a keyword to encipher a message. For example, suppose we wish to encipher the plaintext message: • TO BE OR NOT TO BE THAT IS THE QUESTION using the keyword RELATIONS. We begin by writing the keyword, repeated as many times as necessary, above the plaintext message. To derive the ciphertext using the tableau, for each letter in the plaintext, one finds the intersection of the row given by the corresponding keyword letter and the column given by the plaintext letter itself to pick out the ciphertext letter. • Keyword: RELATIONSRELATIONSRELATIONSREL • Plaintext: TOBEORNOTTOBETH ATISTHEQUESTION • Ciphertext: KSMEH ZBBLK SMEMP OGAJX SEJCS FLZSY • Decipherment of an encrypted message. writes the keyword repeatedly above the message: • Keyword: RELAT IONSR ELATI ONSRE LATIO NSREL • Ciphertext: KSMEH ZBBLK SMEMP OGAJX SEJCS FLZSY • Plaintext: TOBEO RNOTT OBETH ATIST HEQUE STION • This time one uses the keyword letter to pick a column of the table and then traces down the column to the row containing the ciphertext letter. The index of that row is the plaintext letter.

  22. The Vigenere Table

  23. Security of Vigenère Ciphers • have multiple ciphertext letters for each plaintext letter • hence letter frequencies are obscured • but not totally lost

More Related