Presentation is loading. Please wait.

Presentation is loading. Please wait.

Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications.

Similar presentations


Presentation on theme: "Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications."— Presentation transcript:

1 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications (ITA) 2 Introduction to Cryptology

2 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 2 What is Cryptology? Cryptology is a branch of mathematics !! Cryptology Cryptography „Art and science of keeping messages secure“ Cryptanalysis „Art and science of breaking ciphertext“

3 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 3 Cipher Cryptography – Basic Terminology Encryption E K (P) = C plaintext we attack at dawn P sorqjz plvnwk ghanqd C ciphertext we attack at dawn P sorqjz plvnwk ghanqd C Decryption D K (C) = P key K

4 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 4 Cryptanalysis – Fundamental Assumptions Attacker knows every detail of the cryptographical algorithm Attacker is in possession of encryption / decryption equipment (HW machine or SW implementation) Attacker has access to an arbitrary number of plaintext / ciphertext pairs generated with the same (unknown) key. Strong cipher: Best attack should be brute force key search! The security of a cipher should rely on the secrecy of the key only! Auguste Kerckhoffs, „La Cryptographie militaire“, 1883

5 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 5 Cryptanalysis – Types of Attacks Ciphertext-Only Attack Attacker knows ciphertext of several messages encrypted with the same key and/or several keys Recover the plaintext of as many messages as possible or even better deduce the key (or keys) Known-Plaintext Attack Known ciphertext / plaintext pair of several messages Deduce the key or an algorithm to decrypt further messages Chosen-Plaintext Attack Attacker can choose the plaintext that gets encrypted thereby potentially getting more information about the key Adaptive Chosen-Plaintext Attack Attacker can choose a series of plaintexts, basing the choice on the result of previous encryption  differential cryptanalysis!

6 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 6 How to construct a Secure Cipher? World War II German Enigma Machine Thomas Jefferson‘s Cipher Wheel 1 0 1 0 0 1 1 1 0 1...

7 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 7 Claude Shannon 1916 - 2001 The Father of Information Theory Information Theory Worked at MIT / Bell Labs „The Mathematical Theory of Communication“ (1948) Maximum capacity of a noisy transmission channel Definition of the „binary digit“ (bit) as a unit of information Definition of „entropy“ as a measure of information Cryptography Model of a secrecy system Definition of perfect secrecy Basic principles of „confusion“ and „diffusion“

8 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 8 Internet Security 1 (IntSi1) 2.1 Basic Cryptographic Principles

9 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 9 Mary Stuart 1516 - 1558 Famous Victim of Successful Cryptanalysis Mary Stuart Queen of Scotland Elizabeth I Queen of England

10 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 10 History of Cryptography - Literature History of Cryptography David Kahn, "The Codebreakers: The Comprehensive History of Secret Communication from Ancient Times to the Internet", 1181 pages, 1996, Scribner Book Company, ISBN 0-684-83130-9 The Code Book Simon Singh, "The Code Book : The Science of Secrecy from Ancient Egypt to Quantum Cryptography", 402 pages, 2000, Fourth Estate, ISBN 1-857-02889-9

11 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 11 ABCDEFGHIJKLMNOPQRSTUVWXYZ DEFGHIJKLMNOPQRSTUVWXYZABC Substitution Table - Caesar‘s Cipher Shannon‘s Principle of Confusion Caesar Monoalphabetic Substitution Cipher MESSAGE FROM MARY STUART KILL THE QUEEN PHVVD JHIUR PPDUB VWXDU WNLOO WKHTX HHQPHVVD JPHVVDPHVVPHP key = 3 cyclic shifts ABCDEFGHIJKLMNOPQRSTUVWXYZ EYUOBMDXVTHIJPRCNAKQLSGZFW General Substitution Table 26! possible keys JBKKE DBMAR JJEAF KQLEA QHVII QXBNL BBP

12 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 12 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 plaintext 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 H I T W Shannon‘s Principle of Confusion Vigenère Polyalphabetic Substitution Cipher E MESSAGE FROM... Keyword: WHITE MESSAGE FROM... WHITEWH ITEW ILALECL NKSI MESSAGE FROM... WHITEWH ITEW MESSAGE FROM... WHITEWH ITEW I MESSAGE FROM... WHITEWH ITEW IL MESSAGE FROM... WHITEWH ITEW ILA MESSAGE FROM... WHITEWH ITEW ILAL MESSAGE FROM... WHITEWH ITEW ILALE MESSAGE FROM... WHITEWH ITEW ILALEC MESSAGE FROM... WHITEWH ITEW ILALECL MESSAGE FROM... WHITEWH ITEW ILALECL N MESSAGE FROM... WHITEWH ITEW ILALECL NK MESSAGE FROM... WHITEWH ITEW ILALECL NKS Vigenère square

13 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 13 4 9 1 7 5 3 2 8 6 Extended key: order of columns 9! = 362‘880 keys Shannon‘s Principle of Diffusion Transposition Cipher MESSAGE FROM MARY STUART KILL THE QUEEN M E S S A G E F R O M M A R Y S T U A R T T H E K I L L Q U E E N Plaintext in Ciphertext out MOAEE MRQMOAEMOAEE MRQSM TUMOAEE MRQSM TUSAK EMOAEE MRQSM TUSAK EARIE RUHMOAEE MRQSM TUSAK EARIE GYLNMOAEE MRQSM TUSAK EARIE GYLNE SL FTT Diffusion means permutation of bit or byte positions ! 1 2 3 4 5 6 7 8 9 Key = 9 columns SMTUE SLGYL NMOAE ARIER UHSAK EFTTE MRQ

14 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 14 Data Encryption Standard (DES) Rounds of Confusion and Diffusion Initial Permutation Strip Parity (56 bits) Key (64 bits) Round 1 Round 2 Round 16 Reverse Permutation Plaintext Block (64 bits) Ciphertext Block (64 bits)

15 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 15 One Round of DES Expansion Permutation 48 P-Box Permutation S-Box Substitution 32 Shift 48 Compression Permutation Feistel Network 56 32 Key i-1 R i-1 L i-1 Key i RiRi RiRi LiLi LiLi 32 56

16 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 16 Internet Security 1 (IntSi1) 2.2 Plaintext and Key Entropy

17 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 17 Most Cryptoanalytic Attacks base on the Redundancy of Natural Language Texts E 26 T 18 A 16 O N 14 I 13 R S 12 H high frequency group D 8 L 7 U 6 C 6 M 6 medium frequency group P 4 F 4 Y 4 W 3 G 3 B 3 V 2 low frequency group J 1 K 1 X 1 ½ QZ ½ rare group Frequency table of 200 English letters

18 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 18 Georges Perec, „La disparition“, 1969 Book of 280 pages without a single letter e...Anton Voyl n'arrivait pas à dormir. Il alluma. Son Jaz marquait minuit vingt. Il poussa un profond soupir, s'assit dans son lit, s'appuyant sur son polochon. Il prit un roman, il l'ouvrit, il lut ; mais il n'y saisit qu'un imbroglio confus, il butait à tout instant sur un mot dont il ignorait la signification. Il abandonna son roman sur son lit. Il alla à son lavabo ; il mouilla un gant qu'il passa sur son front, sur son cou. Son pouls battait trop fort. Il avait chaud... Excerpt from „La disparition“ © Editions Denöel

19 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 19 Entropy of the English Language Single character statistics Entropy H = 4 bits / character Written English taking into account the full context Shannon (1950): Entropy H = 0.6... 1.3 bits / character Simulations (1999): Entropy H = 1.1 bits / character What about the entropy of C source code? for (c = 0; c < 256; c++) { i2 = (key_data_ptr[i1] + state[c] + i2) % 256; swap_byte(&state[c], &state[i2]); i1 = (i1 + 1) % key_data_len; } Compression before encryption increases security Good data compression algorithms (e.g. Lempel-Ziv) remove all redundancy and come very close to the entropy of the plaintext.

20 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 20 Random Passwords with 128 Bits of Entropy Digits (0..9): 39 digits  3.3 bits/digits 39475 10485 98021 43380 05872 49759 70291 2634 Hexadecimal (0..F): 32 nibbles  4 bits/nibble 3F8A 84D1 EA7B 5092 C64F 8EA6 73BD F01B Alphabet (A..Z): 28 characters  4.7 bits/character AWORH GHJBP IUCMX MLZFQ TZDOP ZJV Alphabet & Digits (A..Z, 0..9): 25 symbols  5.2 bits/symbol E5RGL UPQ7A 8F3ZP NWTIC 22JBM Base64 (A..Z, a..z, 0..9, /, +): 22 symbols  6 bits/symbol y5GNa Riq92 VCm4Q 1BOKl x0

21 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 21 Shannon‘s Definition of Perfect Secrecy The One-Time Pad m bits of plaintext P with entropy H(P) m bits of plaintext P with entropy H(P) Compression Algorithm C(P) = Z Compression Algorithm C(P) = Z H(P)  k  m bits of compressed plaintext Z k bits of ciphertext C One-Time Pad k bits of random key K One-Time Pad k bits of random key K 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 0 0 0 1 1 1 use random key sequence only once and then discard it !

22 Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 22 open channel Shannon‘s Model of a Secrecy System Symmetric or Secret-Key Cryptosystems Same key used for encryption and decryption Key must be kept absolutely secret Same key can be used for several messages, but should be changed periodically  secure key distribution problem! Encryption E K (P) = C plaintext P Decryption D K (C) = P ciphertextplaintext PC key K distribution of secret-key over secure channel


Download ppt "Andreas Steffen, 3.10.2011, 2-Cryptology.pptx 1 Internet Security 1 (IntSi1) Prof. Dr. Andreas Steffen Institute for Internet Technologies and Applications."

Similar presentations


Ads by Google