Cryptography Part 1: Classical Ciphers Jerzy Wojdyło May 4, 2001.

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Dr. Kalpakis CMSC 421, Operating Systems. Fall 2008 URL: Security – Additional material.
Computer Science CSC 474By Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.1 Introduction to Cryptography.
Fubswrjudskb Frxuvh qxpehu: / Lqvwuxfwru:Lyrqd Ehcdnryd Wrgdb’v Wrslfv: 1.Orjlvwlfv: -Fodvv olvw -Vboodexv 2. Wkh Pdwk 3. Zkdw lv Fubswrjudskb.
Lecture 2.1: Private Key Cryptography -- I CS 436/636/736 Spring 2013 Nitesh Saxena.
Classical Cryptography 1. Introduction: Some Simple Cryptosystems.
Cryptography Cryptography: art or science of keeping messages secret Cryptology: branch of mathematics that studies the mathematical foundations of cryptographic.
Ref. Cryptography: theory and practice Douglas R. Stinson
Network Management and Security
Public Encryption: RSA
ICS 454: Principles of Cryptography
Introduction to Symmetric Block Cipher Jing Deng Based on Prof. Rick Han’s Lecture Slides Dr. Andreas Steffen’s Security Tutorial.
CryptographyPerfect secrecySlide 1 Today What does it mean for a cipher to be: –Computational secure? Unconditionally secure? Perfect secrecy –Conditional.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Chapter 13: Electronic Commerce and Information Security Invitation to Computer Science, C++ Version, Fourth Edition SP09: Contains security section (13.4)
Cryptographic Algorithms Course information General Concepts Introductory examples Terminology Classical cryptography Cryptanalysis.
Computer Security CS 426 Lecture 3
A Cryptography Tutorial Jim Xu College of Computing Georgia Tech
L1.1. An Introduction to Classical Cryptosystems Rocky K. C. Chang, February 2013.
Chapter 2 – Classical Encryption Techniques
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
EE5552 Network Security and Encryption block 4 Dr. T.J. Owens CEng MIET Dr T. Itagaki MIET, MIEEE, MAES.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
CIS 5371 Cryptography Introduction.
Diffusion and Confusion Two properties that a good cryptosystem should have: Diffusion: change of one character in the plaintext results in several characters.
symmetric key cryptography
Introduction to Information Security Chapter II : Classical Ciphers.
Confusion and Diffusion1 Ref: William Stallings, Cryptography and Network Security, 3rd Edition, Prentice Hall, 2003.
Week 2 - Wednesday.  What did we talk about last time?  Encryption  Shift ciphers  Transposition ciphers.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
Lec. 5 : History of Cryptologic Research II
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
Midterm Review Cryptography & Network Security
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Network Security Lecture 11 Presented by: Dr. Munam Ali Shah.
Section 2.7: The Friedman and Kasiski Tests Practice HW (not to hand in) From Barr Text p. 1-4, 8.
Symmetric-Key Cryptography
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
Cryptography Lecture 2: Classic Ciphers Piotr Faliszewski.
Part 9, Basic Cryptography 1. Introduction A cryptosystem is a tuple: ( M,K,C, E,D) where M is the set of plaintexts K the set of keys C the set of ciphertexts.
Introduction to Ciphers Breno de Medeiros. Cipher types From “Cipher”, Wikipedia article.
Some Number Theory Modulo Operation: Question: What is 12 mod 9?
Cryptography Lynn Ackler Southern Oregon University.
11 The evolution of cryptologic machines. TOP: The oldest known cipher wheel, of the type described by Francis Bacon as early as 1605 and later by Thomas.
Cryptograpy By Roya Furmuly W C I H D F O P S L 7.
1 Cryptanalysis Four kinds of attacks (recall) The objective: determine the key ( Herckhoff principle ) Assumption: English plaintext text Basic techniques:
Part 9, Basic Cryptography 1. Introduction A cryptosystem is a tuple: ( M,K,C, E,D) where M is the set of plaintexts K the set of keys C the set of ciphertexts.
Traditional Symmetric-Key Ciphers
Computer Security Cryptography. Cryptography Now and Before  In the past – mainly used for confidentiality  Today –Still used for confidentiality –Data.
1 Information Theory Nathanael Paul Oct. 09, 2002.
24-Nov-15Security Cryptography Cryptography is the science and art of transforming messages to make them secure and immune to attacks. It involves plaintext,
Section 2.2: Affine Ciphers; More Modular Arithmetic Shift ciphers use an additive key. To increase security, we can add a multiplicative parameter. –For.
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
1 CIS 5371 Cryptography 1.Introduction. 2 Prerequisites for this course  Basic Mathematics, in particular Number Theory  Basic Probability Theory 
Network Security Lecture 13 Presented by: Dr. Munam Ali Shah.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
1 Introduction CS 303 Algorithmic Number Theory and Cryptography Jeremy R. Johnson.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
1 CIS 5371 Cryptography 1.Introduction. 2 Prerequisites for this course  Basic Mathematics, in particular Number Theory  Basic Probability Theory 
@Yuan Xue Quick Review.
Chapter 2 Basic Encryption and Decryption
Computer and Data Security 4th Class
Taehyung Kim HPC Lab. POSTECH
Classical Cryptography
Conventional Cryptosystem(I)
Traditional Symmetric-Key Ciphers
Symmetric Encryption or conventional / private-key / single-key
Presentation transcript:

Cryptography Part 1: Classical Ciphers Jerzy Wojdyło May 4, 2001

Cryptography, Jerzy Wojdylo, 5/4/01 Overview  Classical Cryptography –Simple Cryptosystems –Cryptoanalysis of Simple Cryptosystems  Shannon’s Theory of Secrecy  Modern Encryption Systems –DES, Rijndel –RSA  Signature Schemes

Cryptography, Jerzy Wojdylo, 5/4/01 Cryptosystem A cryptosystem is a five-tuple ( P, C, K, E, D ), where the following are satisfied: 1. P is a finite set of possible plaintexts 2. C is a finite set of possible ciphertexts 3. K, the keyspace, is a finite set of possible keys 4.  K  K,  e K  E (encryption rule),  d K  D (decryption rule). Each e K : P  C and d K : C  P are functions such that  x  P, d K (e K (x)) = x.

Cryptography, Jerzy Wojdylo, 5/4/01 Notation  English alphabet  Lower case: a, b, c,…, z for plaintext  Upper case: A, B, C,…, Z for ciphertext  For encryption and decryption algorithms, we will substitute letters a, b, c,…, z with numbers 0, 1, 2,…, 25.

Cryptography, Jerzy Wojdylo, 5/4/01 Classical Cryptography  Monoalphabetic Ciphers Once a key is chosen, each alphabetic character of a plaintext is mapped onto a unique alphabetic character of a ciphertext. –The Shift Cipher (Caesar Cipher) –The Substitution Cipher –The Affine Cipher

Cryptography, Jerzy Wojdylo, 5/4/01 Classical Cryptography  Polyalphabetic Ciphers Each alphabetic character of a plaintext can be mapped onto m alphabetic characters of a ciphertext. Usually m is related to the encryption key. –The Vigenère Cipher –The Hill Cipher –The Permutation Cipher

Cryptography, Jerzy Wojdylo, 5/4/01 The Shift (Caesar) Cipher Let P = C = K = Z 26.  x  P,  y  C,  K  K, define e K (x) = x + K (mod 26) and d K (y) = y - K (mod 26). Example on

Cryptography, Jerzy Wojdylo, 5/4/01 The Substitution Cipher Let P = C = Z 26, let K = S 26  x  P,  y  C,    K, define e  (x) =  (x) and d  (x) =  -1 (x).  Example on

Cryptography, Jerzy Wojdylo, 5/4/01 The Affine Cipher Let P = C = Z 26, let K = {(a, b)  Z 26  Z 26 | gcd(a, 26) = 1}.  x  P,  y  C,  K  K, define e K (x) = ax + b (mod 26) and d K (y) = a -1 (y – b) (mod 26).  Example on www.

Cryptography, Jerzy Wojdylo, 5/4/01 The Vigenère Cipher Let m  Z +, let P = C = K = (Z 26 ) m. For a key K = (k 1, k 2,,…, k m ), we define e K (x 1, x 2,,…, x m ) = (x 1 + k 1, x 2 + k 2,…, x m + k m ) and d K (x 1, x 2,,…, x m ) = (x 1 – k 1, x 1 – k 1,…, x m – k m ) where all operations are modulo 26. This is an example (www) of a block cipher.www

Cryptography, Jerzy Wojdylo, 5/4/01 The Hill Cipher Let m  Z +, let P = C = (Z 26 ) m, let K = {m  m invertible matrices over Z 26 }. For a key K, we define e K (x) = Kx (mod 26) and d K (y) = K -1 y (mod 26).  Example MATLAB.

Cryptography, Jerzy Wojdylo, 5/4/01 The Permutation Cipher Let m  Z +, let P = C = (Z 26 ) m, let K = S m. For a key (i.e. a permutation) π we define e π (x 1, x 2,,…, x m ) = (x π (1), x π (2),…, x π (m) ) and d π (y 1, y 2,,…, y m )=(y π -1 (1), y π -1 (2),…, y π -1 (m) ) where π -1 is the inverse permutation to π. (The Hill Cipher, where K = a permutation matrix.)

Cryptography, Jerzy Wojdylo, 5/4/01 Cryptoanalysis  Kerchkhoff’s Principle: cryptosystem (the algorithm) is NOT secret, the key is secret.  Common attacks to obtain the key –Ciphertext-only –Known plaintext –Chosen plaintext –Chosen ciphertext

Cryptography, Jerzy Wojdylo, 5/4/01 Attack on a Shift Cipher  Ciphertext-only  Exhaustive search  26 cases  Very insecure cipher

Cryptography, Jerzy Wojdylo, 5/4/01 Cryptoanalysis of a Monoalphabetic Cipher  Ciphertext-only attack  Letter frequencies the English language

Cryptography, Jerzy Wojdylo, 5/4/01 Attack on a Substitution Cipher  Insecure cipher, even though the number of possible keys is 26! = (approximately ·10 26 )  Letter frequencies calculator  www www

Cryptography, Jerzy Wojdylo, 5/4/01 Attack on the Vigenère Cipher  Kasiski test (m, length of the key) –Fredrich Wilhelm Kasiski (1863) –Charles Babbage (1854, result remained secret)  Two identical segments of plaintext will be encrypted to the same ciphertext if their occurrence in the plaintext is x position apart, where x is a multiple of m.

Cryptography, Jerzy Wojdylo, 5/4/01 Attack on the Vigenère Cipher CHREEVOAHMAERATBIAXXWTNXBEEOP HBSBQMQEQERBWRVXUOAKXAOSXXWE AHBWGJMMQMNKGRFVGXWTRZXWIAKL XFPSKAUTEMNDCMGTSXMXBTUIADNGM GPSRELXNJELXVRVPRTULHDNQWTWDTY GBPHXTFALJHASVBFXNGLLCHRZBWELE KMSJIKNBHWRJGNMGJSGLXFEYPHAGNR BIEQJTAMRVLCRREMNDGLXRRIMGNSNR WCHRQHAEYEVTAQEBBIPEEWEVKAKOE WADREMXMTBHHCHRTKDNVRZCHRCLQ OHPWQAIIWXNRMGWOIIFKEE

Cryptography, Jerzy Wojdylo, 5/4/01 Attack on the Vigenère Cipher  Positions of CHR: 1, 166, 236, 276, 286.  Differences of positions: 166 – 1 = – 1 = – 1 = – 1 = 285  The gcd of these differences is 5, so the key is most likely of length m = 5.

Cryptography, Jerzy Wojdylo, 5/4/01 Attack on the Vigenère Cipher  Divide the ciphertext into 5 subsrtings (positions 5k, 5k+1, 5k+2, 5k+3, 5k+4)  Analize each substring as a monoalphabetic cipher.  Continue on  Also an insecure cipher

Cryptography, Jerzy Wojdylo, 5/4/01 Cryptonalysis of the Hill Cipher  Number of keys k = number of invertible m  m matrices with coefficients from Z 26. Does anyone know the formula?  If p is prime, the alphabet is Z p then  If p = 29 and m34510 k1.4· · · ·10 146

Cryptography, Jerzy Wojdylo, 5/4/01 Cryptonalysis of the Hill Cipher  Easily broken with known plaintext attack.  Permutation Cipher = Hill Cipher, where the key is a permutation matrix.  Both ciphers are insecure.

Cryptography, Jerzy Wojdylo, 5/4/01 Perfect Secrecy  A cryptosystem is computationally secure if the best algorithm for breaking it requires at least N operations, where N is some specified, very large number. Problems…  A cryptosystem is unconditionally secure if it cannot be broken with infinite computational resources.

Cryptography, Jerzy Wojdylo, 5/4/01 Perfect Secrecy  None of the classical cryptosystems is even computationally secure.  However the Shift Cipher, the Substitution Cipher, and the Vigènere Cipher are unconditionally secure if only one element of plaintext is encrypted with a given key! REALLY???

Cryptography, Jerzy Wojdylo, 5/4/01 Perfect Secrecy  Claude Shannon “Communication Theory of Secrecy Systems”, Bell Systems Technical Journal, (1949).  A cryptosystem has perfect secrecy if p P (x|y) = p P (x) for any x  P and y  C. That is the a posteriori probability that the plaintext is x, given that the ciphertext is y, is identical to the a priori probability that the plaintext is x.

Cryptography, Jerzy Wojdylo, 5/4/01 Perfect Secrecy  Theorem (Shannon). Suppose the 26 keys in the Shift Cipher are used with equal probability 1/26. Then for any plaintext probability distribution, the Shift Cipher has perfect secrecy.  Consequences: One-time Pad Cryptosystem (Gilbert Vernam, 1917). Key, plaintext, and ciphertext have the same length. Problems with keys: very long, distribution. Each key can be used only ONCE!

The End Cryptography, Part 1: Classical Ciphers Cryptography Part 2: Modern Cryptosystems Stay Tuned…