Presentation is loading. Please wait.

Presentation is loading. Please wait.

8. Cryptography1 ISA 562 Information Security Theory & Practice Introduction to Cryptography.

Similar presentations


Presentation on theme: "8. Cryptography1 ISA 562 Information Security Theory & Practice Introduction to Cryptography."— Presentation transcript:

1 8. Cryptography1 ISA 562 Information Security Theory & Practice Introduction to Cryptography

2 8. Cryptography2 Agenda Basics & Definitions Classical Cryptography Symmetric (Secret Key) Cryptography DES (Data Encryption Standard) Multiple Encryptions Modes of Block Cipher Operations Math Essential Asymmetric (Public Key) Cryptography

3 8. Cryptography3 Basic Definitions Cryptography –Crypt = secret –Graph = writing science / art of transforming meaningful information into unintelligible text Relies on mathematics (number theory, algebra) Cryptanalysis science / art of breaking cryptographic codes Cryptology science / art / study of cryptography and cryptanalysis

4 8. Cryptography4 Applications of Cryptography Assuring document integrity Assuring document confidentiality Authenticating parties Document signature Non-repudiation Secure transactions Exchanging keys Sharing Secrets Digital cash Preserving anonymity Copyright protection …

5 8. Cryptography5 Cryptographic Services (I) Starting from Basics A BA B C a) Source Integrity b) Data Confidentiality Normal Flow Eavesdropping A BA B CC c) Data Integrityd) Source Authentication ModificationFabrication

6 8. Cryptography6 Cryptographic Services (II) ABAB c e) Dropf) Replay AB C f) Denial of Service

7 8. Cryptography7 Encryption/Decryption Plaintext ciphertextPlaintext encryptiondecryption key key Plaintext: message in original form Ciphertext: message in the transformed, unrecognized form Encryption: process that transforms a plaintext into a ciphertext Decryption: process that transforms a ciphertext back to plaintext Key: value used to control encryption/decryption.

8 8. Cryptography8 Cryptanalytic Attack Attacker only knows Ciphertext – Tries to reveal plaintext and/or key Attacker Knows Plaintext, Ciphertext Pairs – Cryptanalysis tries to reveal the key – Relevant when plaintext is known or can be obtained Attacker chooses a Plaintext –and receives the Ciphertext – Cryptanalysis tries to reveal the key – Relevant when attacker can “inject” a plaintext message

9 8. Cryptography9 Classical Cryptography Cryptography used by early civilizations (including Egyptians, Greeks, Romans) for Secrecy Confidentiality now includes Integrity, Authentication & Authenticity, and in sometimes Non-Repudiation. Early cryptography mainly encryption by substitution and/or transposition methods – They were simple because of the lack of computing engines – Could easily be attacked Same ideas in use today but with stronger properties and powerful computing engines

10 8. Cryptography10 Substitution Ciphers (1) Caesar Cipher: fixed permutation (move 3 up in the alphabet) 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 d 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 Algorithm is: C = ENC( P ) = P + 3 (mod 26) For example: GMU →JPX The secrecy is in the algorithm ! There is one key (fixed permutation) Easy to break

11 8. Cryptography11 Substitution Ciphers (2) Shift Cipher similar to Caesar Cipher, but there is a cyclic shift of the 26 letters of the alphabet by key K, where 0 ≤ K < 26. Algorithm: C = ENCK( P ) = P + K (mod 26) There are 26 different keys Easy to break – check which of 26 possible keys returns the a meaningful plaintext Decipher HAL (the computer from the movie 2001: A Space Odyssey) using a shift cipher of one. – So the shift variable n=1. HAL ?

12 8. Cryptography12 Mono-Alphabetic Ciphers Generalization: arbitrary mapping of one letter to another One of N! permutations on N letters of the alphabet The key is the index of the permutation Key is secret (one of N! options) Example: – N = 26 letters of the English alphabet – N! = 26! ≈ 4 1026 ≈ 288 permutations or 309 Septillion – ≈ 309,485,009,821,345,000,000,000,000 permutations IS IT SECURE? Not with Frequency Analysis

13 8. Cryptography13 Cryptanalysis  Attacking Mono- Alphabetic Ciphers Began in later part of the first millennium AD in the Middle East. Frequency analysis is the study of the frequency of occurrence of letters. (statistics) First treatise on it was written by Ab‾uY‾us‾uf Ya‘q‾ub ibn Is-h‾aq ibn as-Sabb‾ah ibn ‘omr‾an ibn Isma‾il al-Kind‾i, the “philosopher of the Arabs.”

14 8. Cryptography14 Letter Frequency Western Languages are redundant, they have a non-uniform distribution of about 26 letters. Each symbol of ciphertext depends on only one symbol of plaintext and one value of the permutation key, so guessing part of the key gives part of the plaintext. Attack proceeds by guessing parts of key corresponding to most common letters, which makes it possible to decipher an entire message.

15 8. Cryptography15 Letter frequency in English

16 8. Cryptography16 Attacking Mono-Alphabetic Ciphers in English Appearance frequency of letters (in long texts) in a language is well known. Appearance frequency of pairs of letters in a language is also well known: th, ee, oo, tt, qu, is, ae,... Not zq, kv, etc Appearance frequency of certain words is also well defined: the ≈ 6.4% a ≈ 2.1% i ≈ 0.9% of ≈ 4.0% in ≈ 1.8% it ≈ 0.9% and ≈ 3.2% that ≈ 1.2% for ≈ 0.8% to ≈ 2.4% is ≈ 1.0% as ≈ 0.8%

17 8. Cryptography17 Attacking Mono-Alphabetic Ciphers Using the appearance frequencies of letters, words, and pairs-of-letters – accelerates the identification of certain letter substitutions (part of the key) Identification of word patterns, vowels, and consonants helps in finding parts of the text The identification of the remaining parts of the key now reduces the search space dramatically (from N!) Using heuristics and associative word-completions, the rest of the key can be easily revealed –In English the most common letters: are E, T, A, O, I, N, S, H. more than half of all words end in E, T, D, S. Q is always followed by U. –most common word is “THE.” and most common doublets are EE, TT, OO, SS, LL, FF. –most common 2-letter combos: HE, RE, AN, TH, ER,IN. –most common 3-letter combos: ION, AND, ING, THE, ENT.

18 8. Cryptography18 Possible solutions Do not use redundant letters, like the letter e –Done by French writer Georges Perec in 1969. He published a 300-page novel La Disparition (The Disappearance)…translated into English by Gilbert Adair and called “A Void” Or use different Mono-Alphabetic Ciphers in different parts of the plaintext:“Poly-Alphabetic Ciphers”. Quite strong Or group plaintext into blocks that go through a transformation

19 8. Cryptography19 Vig`enere Cipher (I) Blaise de Vig`enere: (1523) Created the cipher but unused almost 200 years. One type of Poly-Alphabetic Cipher The collection of Mono-Alphabetic Ciphers consists of the 26 options for Caesar Cipher (with K = 0, 1, 2,..., 25) where each of the 26 is given a letter, which is the ciphertext letter that replaces the letter ‘a’ In practice: A table of 26 rows by 26 columns is built. Row i in the table contains the 26 letters of the alphabet circularly shifted by i. A keyword is used (over and over again) to select which of the mono-alphabetic ciphers to use. The cipher used is selected by the current letter in the keyword.

20 8. Cryptography20 The Cipher 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 A 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 B 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 A C C D E F G H I J K L M N O P Q R S T U V W X Y Z A B D D 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 E 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 D F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z Z 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

21 8. Cryptography21 Class Exercise using Vig`enere Cipher Keyword: GMU Plaintext: SECURITY Ciphertext:

22 8. Cryptography22 Attacking Vig`enere Cipher Check whether the cipher is Mono-Alphabetic – Check whether the appearance frequency of letters in the ciphertext complies with that of a Mono-Alphabetic cipher Determine the length of the keyword – If two identical sequences of plaintext letters occur at a distance that is an integer multiple of the keyword length – than the two corresponding sequences of ciphertext letters will be identical – Detect identical sequences of ciphertext letters – Conjecture that the keyword length is the GCD (greatest common divisor) of distances between identical sequences of ciphertext Neutralize shifts and break each of the suspected Mono-Alphabetic Ciphers independently

23 8. Cryptography23 Running Key Cipher One Time Pads Running Key Does not use mathematical formula, instead uses everyday item such as a set of books – Numbers give the book, page number, line number, and word number One Time Pad Cipher only used for a small message and then destroyed

24 8. Cryptography24 Transposition Methods Letters rearranged in particular fashion Plaintext buffered in size N bufer Plaintext scrambled to a defiined order in buffer Key is the transposition mapping

25 8. Cryptography25 Spartan Scytale

26 8. Cryptography26 Rail-Fence Cipher Method: Plaintext written as a sequence of diagonals and read as a sequence of rows memtdyt eteoaa9

27 8. Cryptography27 Row-Column Cipher Key is 24153 ATTAC KFROM EASTA TDAWN Ciphertext is TRSAAKETCMANTFADAOTW

28 8. Cryptography28 Attacking Transposition Methods Pure Transposition Cipher easily recognized: it has same letter frequencies as original text Di-grams and tri-grams also are visible Arrange text in rectangle and move rows and columns

29 8. Cryptography29 Rotor Machines Combine Substitution and Transposition Methods produce ciphers that are very difficult to break Rotor Machines in World War II: German “Enigma” and Japanese “Purple” Breaking by the Allies was a significant factor in the outcome of the war (Turing)

30 8. Cryptography30 Example of Rotor Machine


Download ppt "8. Cryptography1 ISA 562 Information Security Theory & Practice Introduction to Cryptography."

Similar presentations


Ads by Google