1 Codes, Ciphers, and Cryptography-Ch 3.1 Michael A. Karls Ball State University.

Slides:



Advertisements
Similar presentations
390 Codes, Ciphers, and Cryptography
Advertisements

1 390-Elliptic Curves and Elliptic Curve Cryptography Michael Karls.
COUNTING AND PROBABILITY
1 Codes, Ciphers, and Cryptography-Ch 3.2 Michael A. Karls Ball State University.
1 Codes, Ciphers, and Cryptography-Ch 2.3 Michael A. Karls Ball State University.
1 Codes, Ciphers, and Cryptography-Ch 2.1 Michael A. Karls Ball State University.
FUNCTIONS AND MODELS Chapter 1. Preparation for calculus :  The basic ideas concerning functions  Their graphs  Ways of transforming and combining.
Block ciphers 1 Session 3. Contents Design of block ciphers Non-linear transformations 2/25.
ICS 454: Principles of Cryptography
Chapter 2 Basic Encryption and Decryption (part B)
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Section 4.1 Finite Permutation Groups Permutation of a Set Let A be the set { 1, 2, …, n }. A permutation on A is a function f : A  A that is both one-to-one.
Chapter 5: z-scores.
L1.1. An Introduction to Classical Cryptosystems Rocky K. C. Chang, February 2013.
Codes, Ciphers, and Cryptography-RSA Encryption
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
Section 2.3: Substitution Ciphers Practice HW from Barr Textbook (not to hand in) p. 92 # 1, 2 # 3-5 (Use Internet Site)Use Internet Site.
Polyalphabetic Substitution Ciphers. First Steps Towards Complexity  If one alphabet is good, then two alphabets must be better!  By doubling the number.
Cycle Notation. Cycle notation  Compute:  Alternative notation: (1 3)(2 5)( ) = (1 5)(3 4)
Cryptanalysis of the Vigenere Cipher Using Signatures and Scrawls To break a Vigenere cipher you need to know the keyword length. – The Kasiski and Friedman.
Section 2.4 Transposition Ciphers Practice HW (not to hand in) From Barr Text p. 105 #
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
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.
Continuity ( Section 1.8) Alex Karassev. Definition A function f is continuous at a number a if Thus, we can use direct substitution to compute the limit.
Computer System Security CSE 5339/7339
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
CSCI 115 Chapter 5 Functions. CSCI 115 §5.1 Functions.
Security in Computing Chapter 12, Cryptography Explained Part 6
9.3 Addition Rule. The basic rule underlying the calculation of the number of elements in a union or difference or intersection is the addition rule.
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Pseudo-Random Functions 1/22 Encryption as Permutation Assume cryptosystem correct and P = C If x  x’ then E K (x)  E K (x’) So, no y is hit by more.
Section 2.1: Shift Ciphers and Modular Arithmetic Practice HW from Barr Textbook (not to hand in) p.66 # 1, 2, 3-6, 9-12, 13, 15.
30.1 Chapter 30 Cryptography Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Permutation Groups Part 1. Definition A permutation of a set A is a function from A to A that is both one to one and onto.
Chapter 1 Section 4 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Cryptography (Traditional Ciphers)
1 Cryptanalysis Four kinds of attacks (recall) The objective: determine the key ( Herckhoff principle ) Assumption: English plaintext text Basic techniques:
Security in Computing Cryptography (Traditional Ciphers)
1 Codes, Ciphers, and Cryptography-Ch 2.2 Michael A. Karls Ball State University.
Data Security and Encryption (CSE348) 1. Lecture # 3 2.
Chapter 9 Functions Let A and B be nonempty sets. A function f from A to B, written f: A  B is a relation from A to B with the property that every element.
Functions Reading: Chapter 6 (94 – 107) from the text book 1.
Chapter 5: Permutation Groups  Definitions and Notations  Cycle Notation  Properties of Permutations.
1 Data Encryption Standard (DES) An example of secret key (i.e., symmetric) encryption system Note: These figures are meant to help illustrating a few.
CHAPTER 3 NUMERICAL METHODS
Copyright © Cengage Learning. All rights reserved. 6 Inverse Functions.
Chapter 1 Section 4. Objectives 1 Copyright © 2012, 2008, 2004 Pearson Education, Inc. Real Numbers and the Number Line Classify numbers and graph them.
Section 2.3: Substitution Ciphers
BY J.STEPHY GRAFF IIMSC(C.S). 1.Inroduction 2.What is a columnar transposition? 3. Methods of Transposition 4.Colunmar transposition ciphers 5.Double.
Section 2.1 Notes: Relations and Functions
Block Ciphers and the Advanced Encryption Standard
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 17 part 2 By Herbert I. Gross and Richard A. Medeiros next.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Functions (Mappings). Definitions A function (or mapping)  from a set A to a set B is a rule that assigns to each element a of A exactly one element.
CSNB 143 Discrete Mathematical Structures
SECTION 9 Orbits, Cycles, and the Alternating Groups Given a set A, a relation in A is defined by : For a, b  A, let a  b if and only if b =  n (a)
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
Section 7.6 Functions Math in Our World. Learning Objectives  Identify functions.  Write functions in function notation.  Evaluate functions.  Find.
Infinite Sequences and Series 8. Sequences Sequences A sequence can be thought of as a list of numbers written in a definite order: a 1, a 2, a.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Substitution Ciphers.
History and Background Part 4: Transposition Ciphers
Computer and Data Security 4th Class
Lecture 2.2: Private Key Cryptography II
ICS 454: Principles of Cryptography
4.1 Inverse Functions.
ICS 555: Block Ciphers & DES Sultan Almuhammadi.
Presentation transcript:

1 Codes, Ciphers, and Cryptography-Ch 3.1 Michael A. Karls Ball State University

2 Substitution and Permutation Ciphers In Chapter 1 we looked at various examples of monoalphabetc substitution ciphers. A convenient way to describe these ciphers is via permutations!

3 Functions A function f is a rule that assigns to each element x in a set A exactly one element, called f(x), in a set B. Notation: f: A  B; y = f(x) A B x f(x) f

4 One-to-One Function We say a function f: A  B is one-to-one (1-1) if f(x 1 )  f(x 2 ) whenever x 1  x AB f f is 1-1

5 Onto Function We say f: A  B is onto if given y in B, there is an element x in A such that f(x) = y AB g g is onto

6 “Neither” Function Not all functions are 1-1 or onto! AB h h is neither 1-1 nor onto

7 Example 1: Some functions! (a) f: A  B where A = (- 1, 1), B = [0, 1), and f(x) = x 2. f(1) = 1 2 = 1 f(2) = 2 2 = 4 f(-2) = (-2) 2 = 4 … f is onto, not 1-1

8 Example 1: Some functions! (b) f: A  B where A = {books in library}, B = {possible call numbers}, and f is the rule “call number on book spine”. f is 1-1, but not onto (different books have different call numbers).

9 Example 1: Some functions! (c) Permutations: Let A = Z n and B = Z n where Z n = {0, 1, 2, …, n}. Then a 1-1, onto function f: Z n  Z n is called a permutation. Example: Z 6 = {0, 1, 2, 3, 4, 5}.  is the permutation given by the table below. Notation: instead of  (x), we use x  – it will be useful later! x xx

10 Cycle Notation We can use cycle notation to describe a permutation! A cycle is a process that repeats itself. As an example,  in Example 1(c) would be written as  = (012)(3)(45), a 3-cycle, followed by a 1-cycle, followed by a 2-cycle. Here, (012) represents the cycle 0  1  2  0 (3) represents the cycle 3  3 (45) represents the cycle 4  5  4. Notice that the cycles of  are disjoint, i.e. no symbol appears in more than one cycle.

11 Cycle Notation Fact 1: Every permutation can be written as a product of disjoint cycles.

12 Cycle Notation Example 2: Write the permutation  : Z 6  Z 6 given by (01)(2453) in table form. Solution: x (01)(2453) x  0  1  1 1  0  0 2  2  4 3  3  2 4  4  5 5  5  3

13 Cycle Notation Example 2 (cont.) Thus, the table form of the permutation  = (01)(2453) is given by: x xx

14 Operations on Permutations Given two permutations  : Z n  Z n and  : Z n  Z n, we can form new permutations! Given a permutation , the inverse of  is the permutation  -1 defined by: x = y  ^(-1) if and only if y = x . A B x  y  -1

15 Operations on Permutations Example 3: For Example 1(c),  -1 is given by the table below. Therefore,  -1 = (021)(3)(45) in cycle form. x x  ^(-1)

16 Operations on Permutations Note: If  is a 1-cycle or a 2-cycle, then  -1 = . If  = (x 1 x 2 … x n ), then  -1 = (x 1 x n … x 2 ). “Proof”: For  = (1234), we have 1  2  3  4  1. For  -1, we have 1  4  3  2  1, which is (1432) in cycle notation.

17 Operations on Permutations Given permutations  : Z n  Z n and  : Z n  Z n, the product  is the permutation obtained by applying  first, then . Notation: x  = (x  ) .

18 Operations on Permutations Example 4: Find  if  = (012)(3)(45) and  = (01)(2453). Solution: x (012)(3)(45) x  (01)(2453) (x  )  0  1  1  1  0  0 1  2  2  2  2  4 2  0  0  0  1  1 3  3  3  3  3  2 4  4  4  5  5  3 5  5  5  4  4  5 Thus,  = (0)(1432)(5) (or we could write (1432)).

19 Operations on Permutations Fact 2: The inverse of a product of permutations is given by (  ) -1 =  -1  -1.

20 Operations on Permutations Example 5: Let  and  be as in the last example. Then  = (0)(1432)(5), so it follows from the Note above that (  ) -1 = (0)(1234)(5). Now,  -1 = (021)(3)(45) and  -1 = (01)(2354), so by Fact 2, (  ) -1 =  -1  -1 = (01)(2354) (021)(3)(45). Check that we get the same result!

21 Operations on Permutations Example 5(cont.) x (01)(2354) x  ^(-1) (021)(3)(45) (x  ^(-1) )  ^(-1) 0  1  0 1  0  2 2  3  3 3  5  4 4  2  1 5  4  5 Thus,  -1  -1 = (0)(1234)(5), so (  ) -1 =  -1  -1 for this example!

22 Substitution Ciphers (Revisited) By labeling the letters A, B, C, …, Y, Z as 0, 1, 2, …, 24, 25, any substitution cipher is equivalent to some permutation  : Z 26  Z 26. Usually we just write the letters instead of the numbers!

23 Substitution Ciphers (Revisited) Example 6: Use the substitution cipher:  = (APHITX)(BERC)(DNZFVM)(GJKWLOYQSU) to encipher the plaintext “BSUMATH”. x (APHITX)(BERC)(DNZFVM)(GJKWLOYQSU) x  B  B  E  E  E S  S  S  S  U U  U  U  U  G

24 Substitution Ciphers (Revisited) Example 6 (cont.) x (APHITX)(BERC)(DNZFVM)(GJKWLOYQSU) x  M  M  M  D  D A  P  P  P  P T  X  X  X  X H  I  I  I  I Thus, “BSUMATH” is encrypted as “EUGDPXI”.

25 Permutation Ciphers Another way to make a cipher with a permutation is to use a fixed-length permutation to rearrange blocks of text of the same length. We illustrate this method with the next example!

26 Permutation Ciphers Example 7 (a permutation cipher) First, choose a permutation of the numbers 1-9. For example,  = (147)(238956). Next, break up plaintext into blocks of length 9: this is a form of a transposition cipher

27 Permutation Ciphers Example 7 (a permutation cipher) First, choose a permutation of the numbers 1-9. For example,  = (147)(238956). Next, break up plaintext into blocks of length 9: this is a fo|rm of a tran|sposition| cipherabc

28 Permutation Ciphers THISISAFO SIFASHTOI

29 Permutation Ciphers RMOFATRAN FOARTMRNA

30 Permutation Ciphers SPOSITION SOOITPSNI

31 Permutation Ciphers CIPHERABC HPBARICCE

32 Permutation Ciphers For Example 7, the ciphertext is SIFASHTOI FOARTMRNA SOOITPSNI HPBARICCE

33 Permutation Ciphers Remark: The cipher in Example 7 is known as a stream cipher. Such ciphers can be used for high speed encryption with computers. Flaw: The Friedman Test can be used to guess it is a transposition cipher.