Dr. Saatchi, Seyed Mohsen 1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Sixth Session.

Slides:



Advertisements
Similar presentations
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesThe Mighty Mod.
Advertisements

Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Mathematics of Cryptography Part II: Algebraic Structures
Cryptography and Network Security
Copyright © Cengage Learning. All rights reserved. 6 Equations and Formulas.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (4) Information Security.
Section 4.1: Primes, Factorization, and the Euclidean Algorithm Practice HW (not to hand in) From Barr Text p. 160 # 6, 7, 8, 11, 12, 13.
KS3 Mathematics N4 Powers and roots
1.2 Row Reduction and Echelon Forms
Linear Equations in Linear Algebra
Session 4 Asymmetric ciphers.
MTH070 Elementary Algebra Chapter 1 Review of Real Numbers and Problem Solving Copyright © 2010 by Ron Wallace, all rights reserved.
The Algebra of Encryption CS 6910 Semester Research and Project University of Colorado at Colorado Springs By Cliff McCullough 20 July 2011.
TECHNIQUES OF INTEGRATION
Copyright © Cengage Learning. All rights reserved.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Exam 3 Material Formulas, Proportions, Linear Inequalities
Tallinn University of Technology Quantum computer impact on public key cryptography Roman Stepanenko.
 Introduction  Requirements for RSA  Ingredients for RSA  RSA Algorithm  RSA Example  Problems on RSA.
BY MISS FARAH ADIBAH ADNAN IMK
The RSA Algorithm Rocky K. C. Chang, March
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,

Slide 5-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
Basic Concepts of Algebra
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.
Mathematics of Cryptography Part I: Modular Arithmetic
3.1 SERVICES AND MECHANISMS SERVICES AND MECHANISMS The International Telecommunication Union- Telecommunication Standardization Section (ITU-T) provides.
MATH 224 – Discrete Mathematics
Section 4.3: Fermat’s Little Theorem Practice HW (not to hand in) From Barr Text p. 284 # 1, 2.
Copyright © Cengage Learning. All rights reserved.
RSA and its Mathematics Behind
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
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.
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
Prerequisites: Fundamental Concepts of Algebra
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.
Basic Concepts in Number Theory Background for Random Number Generation 1.For any pair of integers n and m, m  0, there exists a unique pair of integers.
Implementing RSA Encryption in Java
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
NUMBER SYSTEMS. Objectives  Identify some different number systems  Round-up numbers and correct them to significant figures  Carry out calculations.
Section 4.4: The RSA Cryptosystem Practice HW Handwritten and Maple Exercises p at end of class notes.
P.1 Real Numbers. 2 What You Should Learn Represent and classify real numbers. Order real numbers and use inequalities. Find the absolute values of real.
Equations, Inequalities, and Mathematical Models 1.2 Linear Equations
Some Number Theory Modulo Operation: Question: What is 12 mod 9?
Copyright © Cengage Learning. All rights reserved. CHAPTER 7 FUNCTIONS.
CSCI 391: Practical Cryptology Substitution Monoalphabetic Ciphers.
RSA and its Mathematics Behind July Topics  Modular Arithmetic  Greatest Common Divisor  Euler’s Identity  RSA algorithm  Security in RSA.
Alternative Wide Block Encryption For Discussion Only.
Copyright © 2009 Pearson Education, Inc. Chapter 5 Section 1 - Slide 1 Chapter 1 Number Theory and the Real Number System.
Chinese Remainder Theorem Dec 29 Picture from ………………………
Section 2.2: Affine Ciphers; More Modular Arithmetic Shift ciphers use an additive key. To increase security, we can add a multiplicative parameter. –For.
Elements of Coding and Encryption 1. Encryption In the modern word, it is crucial that the information is transmitted safely. For example, Internet purchases,
Lecture 6.1: Misc. Topics: Number Theory CS 250, Discrete Structures, Fall 2011 Nitesh Saxena.
Chapter 2 Real Numbers and algebraic expressions ©2002 by R. Villar All Rights Reserved Re-engineered by Mistah Flynn 2015.
Copyright © Cengage Learning. All rights reserved. Fundamental Concepts of Algebra 1.1 Real Numbers.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
9.1 Primes and Related Congruence Equations 23 Sep 2013.
1 1.2 Linear Equations in Linear Algebra Row Reduction and Echelon Forms © 2016 Pearson Education, Ltd.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 3. Mathematics of Cryptography.
Slide Copyright © 2009 Pearson Education, Inc. Slide Copyright © 2009 Pearson Education, Inc. Chapter 1 Number Theory and the Real Number System.
Precalculus Fifth Edition Mathematics for Calculus James Stewart Lothar Redlin Saleem Watson.
Substitution Ciphers.
Affine Cipher.
May 2008 Prepared by Dr. Abdulrahman Awadhi
Linear Equations in Linear Algebra
Linear Equations in Linear Algebra
Presentation transcript:

Dr. Saatchi, Seyed Mohsen 1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Sixth Session

Dr. Saatchi, Seyed Mohsen 2 This session is based on the following references: – Module 5: Security, Book S: Security – Module 5: Security, Book E: Experiments – Module 5: Security, (Text Book) Monograph: Security Techniques in Digital Systems More references: – – Reference Material

Dr. Saatchi, Seyed Mohsen 3 Chapter 3 (More encryption) of Book M (Monograph) – (M.3.1) Multiplication 1- (M.3.1.1) Encryption using multiplication 2- (M.3.1.2) Using a calculator 3- (M.3.1.3) Decryption 4- (M.3.1.4) Some problems 5- (M.3.1.5) Coprime numbers 6- (M.3.1.6) Working with a prime number 7- (M.3.1.7) Finding the decryption key 8- (M.3.1.8) Groups and multiplication 9- (M.3.1.9) Digraphs Part 2 (Encryption) of Book S – 10. Solve some activities in (S.2.3.3) Topics to be covered in this session

Dr. Saatchi, Seyed Mohsen 4 Book E: – You should work through all of Section 3.5 in Book E, Part 3. The activities in this section should help to develop the understanding of modular multiplication Monograph: – You should read from the beginning of Chapter 3 ‘More encryption’, to the end of Section ‘Summary’ – In this reading Monk introduces the idea of encryption using multiplication, and he explores the problems arising from ambiguities that result from using certain keys – He also introduces the Euler Totient Function (ø) as a means of expressing the quantity of smaller coprimes associated with any number. A summary follows Chapter 3 (More encryption) of Book M (Monograph) (M.3.1) Multiplication Continue

Dr. Saatchi, Seyed Mohsen 5 Instead of using modulo 26 addition it is possible to use modulo 26 multiplication At first sight this would appear to be straightforward. By treating encryption using multiplication as an analogue of encryption using addition, then with plaintext p and a key K the ciphertext c would be given by the expression: c p × K mod 26 Topic 1: (M.3.1.1) Encryption using multiplication Continue

Dr. Saatchi, Seyed Mohsen 6 Example1: – For instance if the key K is 15 and the letter of the plaintext message being encrypted is ‘R’, which is encoded by the number 17, then the ciphertext is given by the calculation: 17 × mod 26 – The result, 255, is larger than 26. Working modulo 26, means that 26 can be subtracted repeatedly until the result is in the range 0 to 25. Thus: – mod 26 – Subtracting another 26 gives: – mod 26 Continue

Dr. Saatchi, Seyed Mohsen 7 – This process can be continued until the result is less than 26. After subtracting 26 nine times the final result is 21, which corresponds to the letter ‘V’ – With a key of 15, therefore, the letter ‘R’ is encrypted as the letter ‘V’ – A complete table (see Table 1) can be drawn up which shows how the alphabet could be encrypted using multiplication modulo 26 and a key of 15: 1- The first row of Table 1 gives the alphabet 2- The second row is a numerical coding of each letter 3- the third row is the result of the encryption using modular multiplication 4- The last row shows the encrypted numerical code translated back into letters Continue

Dr. Saatchi, Seyed Mohsen 8 Continue ABCDEFGHIJKLMNOPQRSTUVWXYZ APETIXMBQFUJYNCRGVKZODSHWL Table 1 An encryption table for the multiplication process with a key of 15 working modulo 26

Dr. Saatchi, Seyed Mohsen 9 Example 2: – For example ‘ CAT ’ would be encoded as ‘ ’, encrypted as ‘ ’ and the ciphertext would be ‘ EAZ ’ (see Table 2) A defect of this particular encryption table that will be attended to later is that the encryption process does not modify the letter ‘ A ’ or the letter ‘ N ’ Continue

Dr. Saatchi, Seyed Mohsen 10 ABCDEFGHIJKLMNOPQRSTUVWXYZ APETIXMBQFUJYNCRGVKZODSHWL Table 2 An encryption table for the multiplication process of word CAT with a key of 15 working modulo 26

Dr. Saatchi, Seyed Mohsen 11 Example: the calculation to find 315 mod 26 can be performed by using a calculator: – 1- Dividing the number by the modulus 315 ÷ 26 = – 2- Take the whole number part and multiply by the modulus 12 × 26 = 312 – 3- Subtract the result from the original number to find the remainder, which is the required result 315 – mod 26 Topic 2: (M.3.1.2) Using a calculator

Dr. Saatchi, Seyed Mohsen 12 Decryption formula: – If the asymmetric decryption key is then the decryption operation would be expected to be of the form: Topic 3: (M.3.1.3) Decryption Continue

Dr. Saatchi, Seyed Mohsen 13 Finding Decryption Key: – The ciphertext in above formula can be replaced by p × K and the result describes the encryption operation followed by the decryption operation, which should reconstitute the plaintext: – Because multiplication is associative, the composite formula can be rearranged to give: Continue

Dr. Saatchi, Seyed Mohsen 14 – Because multiplication by one does not alter a number, then, provided the condition is true, the result of encryption and then decryption will give the original plaintext – For the key K 15 the decryption key is and, as required, their product is: – The decryption key is, therefore, the number that when multiplied, modulo 26, by the encryption key gives the answer 1

Dr. Saatchi, Seyed Mohsen 15 The Problems: – Unfortunately, encryption using multiplication has some peculiarities – The key 13 and even-numbered keys such as 8 (the alphabet Q appearing twice) generate encryption tables containing ambiguities when working with modulo 26 multiplication The Solution: – Such ambiguities during encryption restricts the choice of key and makes it necessary to choose the modulus and the key carefully – One way to ensure that multiplication can be used as an encryption operation for any key is to choose the modulus of the operation as a prime number Topic 4: (M.3.1.4) Some problems

Dr. Saatchi, Seyed Mohsen 16 There is a theorem, a mathematical finding, that says: – ‘If you take a set of distinct numbers and multiply, using modular multiplication, each of them by a particular number then the collection of results will contain no repeats provided the particular number that was used in the multiplication was either 1 or has no factors in common with the modulus.’ Topic 5: (M.3.1.5) Coprime numbers Continue

Dr. Saatchi, Seyed Mohsen 17 Two numbers that have no factors in common are said to be coprime – The even numbers are not coprime with 26 because the even numbers and 26 can both be divided by 2. And 13 and 26 are not coprime because they both have the factor 13 and can therefore be divided exactly by 13. It should, therefore, be expected, from a knowledge of the theorem, that even numbered keys or the key of 13 will create ambiguities when encrypting using multiplication modulo 26 – For any number it is straightforward, but often tedious, to work out how many smaller numbers have no factors in common with the original choice Continue

Dr. Saatchi, Seyed Mohsen 18 – If the number is 26 then only the odd numbers below 26 except 13 are coprime with it. This gives 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23 and 25 or a total of 12 smaller numbers which are coprime with 26. This characteristic of a number has been given a special status by being associated with the oddly named Euler Totient Function – The Euler Totient Function is usually denoted by the Greek letter ø (called ‘phi’). For 26, we have discovered that ø(26) = 12. This means that there are twelve numbers smaller than 26 which are coprime with it and implies, in the encryption scheme using modulo 26 multiplication, there are twelve keys that will not generate ambiguous results

Dr. Saatchi, Seyed Mohsen 19 We said earlier that, one way to ensure that multiplication can be used as an encryption operation for any key is to choose the modulus of the operation as a prime number This works because prime numbers have no factors other than one and themselves This is to say, all the numbers smaller than a prime number are coprime with that prime number Because given a prime number q there are q – 1 smaller numbers that are all coprime with q, the Euler Totient Function for a prime number is ø(q) = q – 1 Topic 6: (M.3.1.6) Working with a prime number

Dr. Saatchi, Seyed Mohsen 20 Consider modulo 29 instead of 26 (29 is the nearest prime number to 26 since 26 had ambiguities). Individual letters can be decrypted using an asymmetric decryption key. Encryption with a key of 8 modulo 29 is the operation: p × 8 mod 29 If the asymmetric decryption key is then the decryption operation would be expected to be of the form: Continue Topic 7: (M.3.1.7) Finding the decryption key

Dr. Saatchi, Seyed Mohsen 21 – Substituting the ciphertext derived from encryption in this formula produces the result – Provided then the result of the decryption operation will be the plaintext – Finding is not so easy (see Table 3) Continue

Dr. Saatchi, Seyed Mohsen 22 n 8 x n mod × 8 8 mod × 8 16 mod 29 3(2 + 1) × mod × 8 3 mod 29 5(4 + 1) × mod 29 6(4 + 2) × mod 29 7( ) × mod × 8 6 mod 29 9(8 + 1) × mod 29 10(8 + 2) × mod 29 11( ) × mod 29 Table 3 A search for the decryption key

Dr. Saatchi, Seyed Mohsen 23 The properties of the Caesar code that made it useful as an encryption scheme were the same as the generalized properties of a Group. Encryption using multiplication with a modulus given by a prime number has similar properties: – Firstly, a Group consists of a number of elements and an operation that can be performed on those elements. For modulo 29 multiplication the numbers from 1 to 28 are the elements of the Group. Zero (0) causes complications and is omitted. The operation modulo 29 multiplication was denoted by ×, which can be put in place of the symbol used in the general description of a Group Continue Topic 8: (M.3.1.8) Groups and multiplication

Dr. Saatchi, Seyed Mohsen 24 – Secondly, when the operation is performed on a pair of elements in the Group, the result is also an element of the Group. Modulo 29 multiplication ensures that the encryption and decryption operations give results in the range 1 to 28 and that there is, therefore, closure – Thirdly, there is an element of the Group that is called the identity, symbolized by e, which ensures that for any element of the Group a, and. For encryption using modulo 29 multiplication the identity is 1 since for any number denoted by a in the range 1 to 28, a × 1 a mod 29 and 1 × a a mod 29 Continue

Dr. Saatchi, Seyed Mohsen 25 – Fourthly, if the operation is denoted by and a, b and c are elements of the Group then This associative property is required to prove that encryption followed by decryption regenerates the plaintext. Multiplication is associative and, for example, is the same as Continue

Dr. Saatchi, Seyed Mohsen 26 – Fifthly, for any element, a for instance, in the Group there is one other corresponding element, denoted by, which can be combined using the operation to give the identity. If the operation is denoted by then and For the Group used above this means that any number in the range 1 to 29 denoted by a has a unique partner denoted by that ensures that and Strictly speaking it is not possible to find a number that when multiplied by zero gives the result 1. With 0 included Z 29 and multiplication do not constitute a Group. A Group can only be formed if 0 is omitted. The symbol refers to the integers up to 28 with zero omitted and thus with modulo 29 multiplication forms a Group Continue

Dr. Saatchi, Seyed Mohsen 27 The ambiguity found when dealing with modulo 26 reveals that working with a modulus that is not a prime number means that the number a does not always have a unique partner for. A Group cannot, therefore, be formed using modulo 26 multiplication, even with 0 omitted from the calculations Sometimes, the suffix p is used to indicate that a prime modulus is required Thus with modulo p multiplication constitutes a Group

Dr. Saatchi, Seyed Mohsen 28 As with addition, strings of letters can be combined before encryption is performed. Digraphs, for example can be formed and then encrypted End of Monograph summary Topic 9: (M.3.1.9) Digraphs

Dr. Saatchi, Seyed Mohsen 29 Activity 2.16 (self-assessment) – When modular multiplication is used as a method of encryption, why should zero be avoided in the both the coding scheme and the key? – Modular multiplication is performed by the operation p × K mod n. If zero is used to encode p then the result of the operation will always be zero regardless of what values K and n take. This means that p would remain unaltered following the encryption process – If zero is used for the key K then the result of the operation will always be zero regardless of the values that p and n take. This would mean that the original message is lost following the encryption process Continue Topic 10: Solve some activities in (S.2.3.3) Encryption using modular multiplication

Dr. Saatchi, Seyed Mohsen 30 Activity 2.18 (self-assessment) – What is the Euler Totient Function of: (a) 15? – There are 8 smaller numbers that are coprime with 15. These are the numbers 1, 2, 4, 7, 8, 11, 13 and 14. So the Euler Totient Function ø (15) = 8 (b) 47? – 47 is a prime number and for any prime number n the Euler Totient Function is ø (n) = n-1 (from the Monograph, Section 3.1.6). So ø (47) = 47-1 = 46 Continue

Dr. Saatchi, Seyed Mohsen 31 Activity 2.19 (exploratory) – In the equation K× 1 mod n, what is the relationship between K and ? (To answer this question you may need to refer back to Section 3.3 ‘Modular multiplication’ in Book N.) – K and are a multiplicative inverse pair – If consecutive multiplications are made using these numbers they have the effect of canceling each other out. This means that K and are asymmetric keys – One key can be used to encrypt a message and the other can be used to decrypt it Continue

Dr. Saatchi, Seyed Mohsen 32 Activity 2.20 (self-assessment) – Working with a modulus of 29, what is the multiplicative inverse of 13? – To find the multiplicative inverse we need to solve the equation 13× 1 mod 29 – One way of doing this is to use Monk’s method of reducing the calculation to a set of multiplications by 1, 2, 4, 8 etc. and then trying successive values until we come to one that gives the required result? – So the multiplicative inverse of 13 mod 29 is 9 mod 29, because we can substitute 9 for in the equation 13× 1 mod 29

Dr. Saatchi, Seyed Mohsen 33 – Continue reading about Module 5 – The due date of TMA04 is Apr. 16 Topic 11: Preparation for next session