1 / 26

Classic Cryptography

Classic Cryptography. History. Some Basic Terminology. plaintext - original message ciphertext - coded message cipher - algorithm for transforming plaintext to ciphertext key - info used in cipher known only to sender/receiver Key space – number of possible keys

chavez
Download Presentation

Classic Cryptography

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. Classic Cryptography History

  2. Some Basic Terminology • plaintext - original message • ciphertext - coded message • cipher - algorithm for transforming plaintext to ciphertext • key - info used in cipher known only to sender/receiver • Key space – number of possible keys • encipher (encrypt) - converting plaintext to ciphertext • decipher (decrypt) - recovering ciphertext from plaintext • cryptography - study of encryption principles/methods • cryptanalysis (codebreaking) - study of principles/ methods of deciphering ciphertextwithout knowing key • cryptology - field of both cryptography and cryptanalysis

  3. Atbash Cipher Hebrew scribes copying the book of Jeremiah used this cipher. It is very simple, just reverse the alphabet. This is, by modern standards, a very primitive and easy to break cipher. But it will help you get a feel for how cryptography works. The ATBASH cipher is a Hebrew code which substitutes the first letter of the alphabet for the last and the second letter for the second to the last, etc. It simply reverses the alphabet. A becomes Z, B becomes Y, C becomes X, etc.

  4. Atbash Cipher Example A cat sleeps Becomes Z xzghovvkh This is obviously a rather simple cipher and not used in modern times. However it illustrates the basic concept of cryptography. That is to perform some permutation on the plain text to render it difficult to read by those who don’t have the key to ‘un scramble’ the cipher text.

  5. Caesar Cipher This cipher was first used by Julius Caesar. Every letter is shifted a fixed number of spaces to the left or the right in the alphabet. Caesar purportedly shifted 3 to the right, but you can apply this with any type of shift you prefer. The shifting is the ‘key’ for this algorithm The shift is often called the ‘alphabet’ being used. So the Caesar Cipher is an example of a single alphabet substitution since all letters are shifted the same amount.

  6. Caesar Cipher Example Example: Shifting One to the Left

  7. ROT 13 This is another single alphabet substitution cipher. All characters are rotated 13 characters through the alphabet. The phrase A CAT Becomes N PNG

  8. Scytale • A cylinder tool used by Spartans for substitution encryption.

  9. Playfair The Playfair cipher is a bit more complex than most historical ciphers. It also encrypts two letters rather than one. It was invented in 1854 by Charles Wheatstone. It was named after Lord Playfair who promoted the use of the cipher. The Playfair cipher uses a 5 by 5 table containing a key word or phrase. To generate the key table, one would first fill in the spaces in the table with the letters of the keyword (dropping any duplicate letters), then fill the remaining spaces with the rest of the letters of the alphabet in order. People often omitted Q from the list. To encrypt a message, youwould break the message into groups of 2 letters. For example, “CheeseBurger" becomes “Ch ee se Bu rg er", and map them out on the key table. If both letters are the same (or only one letter is left), add an "X" after the first letter. Encrypt the new pair and continue. If the letters appear on the same row of your table, replace them with the letters to their immediate right . If the letters appear on the same column of your table, replace them with the letters immediately below . While this is rather complex and cumbersome it is not any more secure then other classic ciphers such as Vigenere.

  10. Playfair Cipher • not even the large number of keys in a monoalphabetic cipher provides security • one approach to improving security was to encrypt multiple letters • the Playfair Cipher is an example • invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair

  11. Playfair Key Matrix • a 5X5 matrix of letters based on a keyword • fill in letters of keyword (sans duplicates) • fill rest of matrix with other letters • eg. using the keyword MONARCHY

  12. Encrypting and Decrypting • plaintext is encrypted two letters at a time • if a pair is a repeated letter, insert filler like 'X’ • if both letters fall in the same row, replace each with letter to right (wrapping back to start from end) • if both letters fall in the same column, replace each with the letter below it (wrapping to top from bottom) • otherwise each letter is replaced by the letter in the same row and in the column of the other letter of the pair

  13. The Playfair Cipher The Playfair Cipher was invented around 1854 by Sir Charles Wheatstone. It was used by the British in WWI. It makes use of a 55 matrix containing the letters of the alphabet, with i and j treated as one character. You start with a keyword, remove repeated letters and write them into the matrix by filling the first row from left to right, then continuing on to the next row, etc. Now you fill in the rest of the entries with the remaining letters of the alphabet. Example Keyword playfair playfir

  14. The Playfair Cipher Keyword playfair playfir We may use other patterns in filling the matrix in a Playfair Cipher. The pattern we used in our example may be expressed by a diagram: Denotes the start Denotes the end

  15. The Playfair Cipher Encryption is now done in two-letter blocks as follows: First remove spaces and divide into two letter groups; if a group contains repeated letters, insert an x between them and regroup, adding an x at the end if needed. • If the two letters are in different rows and in different columns of the matrix, replace each letter by the letter that is in its row and the other letter’s column. • If the two letters are in the same row, replace each letter with the letter immediately to its right, wrapping around if needed. • If the two letters are in the same column, replace each letter with the letter immediately below it, wrapping around if needed. meet at the school house me et at th es ch ox ol ho us ex m and e are in the same row, so mE, eG e and t are separated, so e M, t N o and l are in the same column, so oV, lr Encrypted message: EG MN FQ QM KN BK SV VR GQ XN KU

  16. The Playfair Cipher meet at the school house me et at th es ch ox ol ho us ex m and e are in the same row, so m E, eG me  EG me et at th es ch ox ol ho us ex e and t are separated, so e  M, t N et  MN me et at th es ch ox olho us ex o and l are in the same column, so o V, lR oi  VR Encrypted message: EG MN FQ QM KN BK SV VR GQ XN KU

  17. Poly-alphabetic Substitution The obvious way to make substitution ciphers (like atbash and Caesar) stronger, is to rotate through various alphobets. Any substitution using multiple alphabets. Such using three alphabets like: +1 -1 +2. Then the phrase A CAT Becomes B BCA The first letter is add 1, then the second is subtract 1 the third is add two then for the fourth letter you start over.

  18. Poly-alphabetic Subsitution These ciphers break up the letter and word frequency making them harder to break than single substitution ciphers. In fact for a human using a pen and paper, it may be too difficult to crack. Examples of poly-alphabetic substitution include: • Cipher Disk • Vigenère Cipher • Enigma Machine

  19. Cipher Disk The cipher disk was invented by Leon Alberti in 1466. The cipher disk was polyalphabetic, each time you turned the disk you used a new cipher. It was literally a disk you turned to encrypt plain text.

  20. Vigenère Cipher Perhaps the most widely known poly-alphabet cipher is the Vigenère cipher. This cipher was invented in 1553 by Giovan Battista Bellaso. It is a method of encrypting alphabetic text by using a series of different mono-alphabet ciphers selected based on the letters of a keyword. This algorithm was later misattributed to Blaise de Vigenère, and so it is now known as the "Vigenère cipher“, even though Vigenère did not really invent it.

  21. Vigenère Cipher Example Match the letter of your keyword on the top with the letter of your Plain text on the left to find the cipher text.

  22. Vigenère Cipher Example Using the previous chart if you are encrypting the word ‘cat’ and your key word is ‘horse’ then: the cipher text is jok

  23. Vigenère Cipher Example This is a very effective multi-alphabet cipher and prior to the advent of computers was considered quite strong. It should be noted that the longer the keyword, the more alphabets used to encrypt the message, and thus the stronger the encryption. In fact one does not even need to use a real word. Any serious of letters will work.

  24. Breaking the Vigenère Cipher In 1863 Friedrich Kasiski was the first person to publish a successful general attack on the Vigenère cipher. Previous attacks on this cipher relied on knowledge of the plaintext (i.e. they where ‘known plaintext’ attacks, which we will discuss in depth in cryptanalysis).

  25. Rail Fence cipher • write message letters out diagonally over a number of rows • then read off cipher row by row • eg. write message out as: m e m a t r h t g p r y e t e f e t e o a a t • giving ciphertext MEMATRHTGPRYETEFETEOAAT

  26. The Enigma Machine In World War II, the Germans made use of an electromechanical rotor based cipher system known as Enigma machine. There were multiple variations on this machine. The machine was designed so that when the operator pressed a key the encrypted cipher text for that plain text was altered each time. So if the operator pressed the A key, he or she might generate an F in the cipher text, and the next time it might be a D. Essentially this was a multi-alphabet cipher consisting of 26 possible alphabets.

More Related