Classical Cryptography 1. Introduction: Some Simple Cryptosystems.

Slides:



Advertisements
Similar presentations
Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Advertisements

CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
5.4. Additional properties Cofactor, Adjoint matrix, Invertible matrix, Cramers rule. (Cayley, Sylvester….)
Fubswrjudskb Frxuvh qxpehu: / Lqvwuxfwru:Lyrqd Ehcdnryd Wrgdb’v Wrslfv: 1.Orjlvwlfv: -Fodvv olvw -Vboodexv 2. Wkh Pdwk 3. Zkdw lv Fubswrjudskb.
22C:19 Discrete Math Integers and Modular Arithmetic Fall 2010 Sukumar Ghosh.
1.5 Elementary Matrices and a Method for Finding
SYMMETRIC CRYPTOSYSTEMS Symmetric Cryptosystems 10/06/2015 | pag. 2.
Foundations of Network and Computer Security J J ohn Black Lecture #10 Sep 18 th 2009 CSCI 6268/TLEN 5550, Fall 2009.
Stream cipher diagram + + Recall: One-time pad in Chap. 2.
Cryptography Cryptography: art or science of keeping messages secret Cryptology: branch of mathematics that studies the mathematical foundations of cryptographic.
ENGG2013 Unit 10 n  n determinant and an application to cryptography Feb, 2011.
Cryptography Kinder Garden Number theory and Classical Cryptosystems Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 10/10/2010 INCS.
Classical Cryptography. p2. Outline [1] Introduction: Some Simple Cryptosystems The Shift Cipher The Substitution Cipher The Affine Cipher The Vigen è.
Section 2.9 The Hill Cipher; Matrices
An Introduction to Hill Ciphers Using Linear Algebra Brian Worthington University of North Texas MATH /10/2010.
L1.1. An Introduction to Classical Cryptosystems Rocky K. C. Chang, February 2013.
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
CSE 504 Discrete Mathematics & Foundations of Computer Science
Section 2.2: Affine Ciphers; More Modular Arithmetic Practice HW (not to hand in) From Barr Textbook p. 80 # 2a, 3e, 3f, 4, 5a, 7, 8 9, 10 (Use affinecipherbreaker.
3.1 SERVICES AND MECHANISMS SERVICES AND MECHANISMS The International Telecommunication Union- Telecommunication Standardization Section (ITU-T) provides.
Mathematics of Cryptography Modular Arithmetic, Congruence,
Diffusion and Confusion Two properties that a good cryptosystem should have: Diffusion: change of one character in the plaintext results in several characters.
 Row and Reduced Row Echelon  Elementary Matrices.
symmetric key cryptography
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
8.1 Matrices & Systems of Equations
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
Symmetric-Key Cryptography
Cryptography Lecture 2: Classic Ciphers Piotr Faliszewski.
Session 1 Stream ciphers 1.
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?
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.
Cryptography Part 1: Classical Ciphers Jerzy Wojdyło May 4, 2001.
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.
CRYPTANALYSIS OF STREAM CIPHER Bimal K Roy Cryptology Research Group Indian Statistical Institute Kolkata.
Traditional Symmetric-Key Ciphers
CSCI 391: Practical Cryptology Substitution Monoalphabetic Ciphers.
Introduction to Modern Symmetric-key Ciphers
Section 2.2: Affine Ciphers; More Modular Arithmetic Shift ciphers use an additive key. To increase security, we can add a multiplicative parameter. –For.
Section 2.3: Substitution Ciphers
Properties of Inverse Matrices King Saud University.
1 The Data Encryption Standard. 2 Outline 4.1 Introduction 4.4 DES 4.5 Modes of Operation 4.6 Breaking DES 4.7 Meet-in-the-Middle Attacks.
Chapter 2 Determinants. With each square matrix it is possible to associate a real number called the determinant of the matrix. The value of this number.
Introduction to Cryptology Fall Definitions Digital encryption techniques are used to protect data in two ways: to maintain privacy and to prove.
Encryption and Encryption and Decryption Speaker:Tsung Ray Wang Advisor:Prof.Li-Chun Wang.
Introduction to Cryptography Hyunsung Kim, PhD University of Malawi, Chancellor College Kyungil University February, 2016.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 3. Mathematics of Cryptography.
Information and Network Security Lecture 2 Dr. Hadi AL Saadi.
3.1 Chapter 3 Traditional Symmetric-Key Ciphers Part2.
@Yuan Xue Quick Review.
Substitution Ciphers.
3.1 Introduction to Determinants
Asad Gondal Ali Haider Mansoor
Prelude to Public-Key Cryptography
Introduction to Modern Symmetric-key Ciphers
Computer and Data Security 4th Class
Some of this slide set is from Section 2,
Classical Cryptography
Classical Cryptography
Classical Ciphers – 2 CSCI284 Spring 2004 GWU
Conventional Cryptosystem(I)
Information and Computer Security CPIS 312 Lab 4 & 5
Symmetric Encryption or conventional / private-key / single-key
Florida State University
Presentation transcript:

Classical Cryptography 1. Introduction: Some Simple Cryptosystems

p2. Outline [1] Introduction: Some Simple Cryptosystems The Shift Cipher The Substitution Cipher The Affine Cipher The Vigen è re Cipher The Hill Cipher The Permutation Cipher Stream Ciphers [2] Cryptanalysis Cryptanalysis of the Affine Cipher Cryptanalysis of the Substitution Cipher Cryptanalysis of the Vigen è re Cipher Cryptanalysis of the Hill Cipher Cryptanalysis of the LFSR Stream Cipher

p3. Introduction: Some Simple Cryptosystems [1] Introduction AliceencrypterdecrypterBob Oscar secure channel key source xx K y

p4. Introduction: Some Simple Cryptosystems Definition 1.1: A cryptosystem is a five-tuple ( P, C, K, E, D ) satisfies P is a finite set of possible plaintexts C is a finite set of possible ciphertexts K, the keyspace, is a finite set of possible keys For each K ∈ K, there is an encryption rule e K ∈ E and a corresponding decryption rule d K ∈ D d K (e K (x))=x for every plaintext x ∈ P

p5. Introduction: Some Simple Cryptosystems Definition 1.2: a and b are integers, m is a positive integer congruence: a ≡ b (mod m) if m divides b-a Z m : the set {0,1,…,m-1} with 2 operations + and ☓ 10+20=4 in Z 26 (10+20 mod 26=4) 10 ☓ 20=18 in Z 26 (10 ☓ 20 mod 26=18)

p6. Introduction: Some Simple Cryptosystems Shift Cipher Cryptosystem 1.1: Shift Cipher P = C = K = Z 26 K, x, y ∈ Z 26 e K (x)=(x+K) mod 26 d K (y)=(y-K) mod 26 ABCDEFGHIJKLM NOPQRSTUVWXYZ

p7. Introduction: Some Simple Cryptosystems eg.: Suppose K=11 Plaintext: student Ciphertext: DEFOPZE plaintext student K ciphertextDEFOPZE

p8. Introduction: Some Simple Cryptosystems Substitution Cipher Cryptosystem 1.2: Substitution Cipher P=C=Z 26 K: all possible permutations of the 26 symbols For each  ∈ K e  (x)=  (x) d  (y)=  -1 (y) where  -1 is the inverse permutation to 

p9. Introduction: Some Simple Cryptosystems eg.: Plaintext: student Ciphertext: VMUSHSM xabCdefghijklm e  (x)XNYAHPOGZQWBT xnopqrstuvwxyz SFLRCVMUEKJDI

p10. Introduction: Some Simple Cryptosystems Affine Cipher Theorem 1.1: ax ≡ b (mod m) has a unique solution x ∈ Z m for every b ∈ Z m iff gcd(a,m)=1 Definition 1.3: Suppose a≥1 and m≥2 are integers a and m are relatively prime if gcd(a,m)=1  (m): the number of integers in Z m that are relatively prime to m Theorem 1.2: Suppose

p11. Introduction: Some Simple Cryptosystems Definition 1.4: Suppose a ∈ Z m a -1 mod m: the multiplicative inverse of a modulo m aa -1 ≡ a -1 a ≡ 1 (mod m) Cryptosystem 1.3: Affine Cipher P = C = Z 26 K ={(a,b) ∈ Z 26 ☓ Z 26 : gcd(a,26)=1} For K=(a,b) ∈ K ; x, y ∈ Z 26 e K (x)=(ax+b) mod 26 d K (y)=a -1 (y-b) mod 26

p12. Introduction: Some Simple Cryptosystems e.g.: Suppose K=(7,3) 7 -1 mod 26 = 15 Plaintext: student Ciphertext: ZGNYFQG e K (x)=(7x+3) mod 26 d K (y)=15(y-3) mod 26 plaintext student e K (x) ciphertextZGNYFQG

p13. Introduction: Some Simple Cryptosystems Vigenère Cipher Cryptosystem 1.4: Vigenère Cipher m: a positive integer P = C = K = (Z 26 ) m For a key K=(k 1,k 2, …,k m ) e K (x 1,x 2, …,x m )=(x 1 +k 1,x 2 +k 2, …,x m +k m ) d K (y 1,y 2, …,y m )=(y 1 -k 1,y 2 -k 2, …,y m -k m )

p14. Introduction: Some Simple Cryptosystems e.g.: Suppose m=4 and K=(2,8,15,7) Plaintext: student Ciphertext: UBJKGVI plaintext student K ciphertext

p15. Introduction: Some Simple Cryptosystems Hill Cipher Definition 1.5: Suppose A=(a i,j ) is an m ☓ m matrix A i,j : the matrix obtained from A by deleting the ith row and the jth column det A: the determinant of A m=1: det A=a 1,1 m>1: for any fixed i A * =(a * i,j ): the adjoint matrix of A a * i,j =(-1) i+j det A j,i

p16. Introduction: Some Simple Cryptosystems Theorem 1.3: Suppose K=(k i,j ) is an m ☓ m invertible matrix over Zn K -1 =(det K) -1 K * e.g.: det K=11 ☓ 7-8 ☓ 3 mod 26=1 K- 1 =(det K) -1 K * =

p17. Introduction: Some Simple Cryptosystems Cryptosystem 1.5: Hill Cipher M ≥ 2 is an integer P = C = (Z 26 ) m K = {m ☓ m invertible matrices over Z 26 } For a key K e K (x)=xK d K (y)=yK -1 where K -1 is the inverse of K

p18. Introduction: Some Simple Cryptosystems e.g.: Plaintext: GOD (6 14 3) Ciphertext: WTJ ( )

p19. Introduction: Some Simple Cryptosystems Permutation Cipher Cryptosystem 1.6: Permutation Cipher m is a positive integer P = C = (Z 26 ) m K consist of all permutations of {1, …,m} For a key(a permutation)  e  (x 1, …,x m )=(x  (1), …,x  (m) ) where  -1 is the inverse permutation to 

p20. Introduction: Some Simple Cryptosystems e.g.: Suppose m=6 Plaintext: CYBERFORMULA Ciphertext: BRCFEYMLOAUR x  (x) plaintextCYBERFORMULA ciphertextBRCFEYMLOAUR

p21. Introduction: Some Simple Cryptosystems Stream Ciphers Block ciphers Plaintext string x =x 1 x 2 … (each x i is a plaintext) Ciphertext string y =y 1 y 2 … = e K (x 1 )e K (x 2 ) … Stream ciphers Plaintext string x =x 1 x 2 … Generate a keystream (by using some K) z =z 1 z 2 … Ciphertext string y =y 1 y 2 … = e z1 (x 1 )e z2 (x 2 ) …

p22. Introduction: Some Simple Cryptosystems Definition 1.6: A synchronous stream cipher is a tuple ( P, C, K, L, E, D ) with a function g P : a finite set of possible plaintexts C : a finite set of possible ciphertexts K : a finite set of possible keys L : a finite set called the keystream alphabet g: the keystream generator Input: K g generates an infinite string z 1 z 2 …

p23. Introduction: Some Simple Cryptosystems Definition 1.6 (cont.) For each z ∈ L, there is an encryption rule e z ∈ E and a corresponding decryption rule d Z ∈ D d z (e z (x))=x for every plaintext x ∈ P

p24. Introduction: Some Simple Cryptosystems Vigenère Cipher can be defined as a synchronous stream cipher K = (Z 26 ) m P = C = L = Z 26 e z (x)=(x+z) mod 26 d z (y)=(y-z) mod 26 Keystream z 1 z 2 … = k 1 k 2..k m k 1 k 2..k m k 1 k 2..k m …

p25. Introduction: Some Simple Cryptosystems Keystream can be produced efficiently in hardware using a LFSR (Linear Feedback Shift Register) k 1 would be tapped as the next keystream bet k 2, … k m would each be shifted 1 stage to the left The new value of km would be this is “ linear feedback “ (see Figure 1.2) This system is modulo 2

p26. Introduction: Some Simple Cryptosystems e.g.: in Figure 1.2,suppose K=(1,0,0,0) c 0 =1, c 1 =1, c 2 =0, c 3 =0 The keystream is … k1k1 k2k2 k3k3 k4k4 + Figure 1.2

p27. Introduction: Some Simple Cryptosystems Non-synchronous stream cipher: Each keystream element zi depends on previous plaintext or ciphertext elements Cryptosystem 1.7: Autokey Cipher P = C = K = L = Z 26 z 1 =K, z i =x i-1 for all i>1 For x, y, z ∈ Z 26 e z (x)=(x+z) mod 26 d z (y)=(y-z) mod 26

p28. Introduction: Some Simple Cryptosystems e.g.: Suppose K=8 Plaintext: student Ciphertext: ALNXHRG plaintext student keystream ciphertext ALNXHRG