Download presentation
Presentation is loading. Please wait.
Published byKimberly Anderson Modified over 8 years ago
1
Dr. Saatchi, Seyed Mohsen 1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Sixth Session
2
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: – http://www.cacr.math.uwaterloo.ca/hac/ http://www.cacr.math.uwaterloo.ca/hac/ – http://en.wikipedia.org/wiki/Cryptography http://en.wikipedia.org/wiki/Cryptography Reference Material
3
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
4
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 3.1.10 ‘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
5
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
6
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 × 15 255 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: 255 255 – 26 229 mod 26 – Subtracting another 26 gives: 229 229 – 26 203 mod 26 Continue
7
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
8
Dr. Saatchi, Seyed Mohsen 8 Continue ABCDEFGHIJKLMNOPQRSTUVWXYZ 012345678910111213141516171819202122232425 015419823121165209241321762110251431872211 APETIXMBQFUJYNCRGVKZODSHWL Table 1 An encryption table for the multiplication process with a key of 15 working modulo 26
9
Dr. Saatchi, Seyed Mohsen 9 Example 2: – For example ‘ CAT ’ would be encoded as ‘ 2 0 19 ’, encrypted as ‘ 4 0 25 ’ 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
10
Dr. Saatchi, Seyed Mohsen 10 ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 111213141516171819202122232425 015419823121165209241321762110251431872211 APETIXMBQFUJYNCRGVKZODSHWL Table 2 An encryption table for the multiplication process of word CAT with a key of 15 working modulo 26
11
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 = 12.115385 – 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 – 312 3 mod 26 Topic 2: (M.3.1.2) Using a calculator
12
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
13
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
14
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
15
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
16
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
17
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
18
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
19
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
20
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
21
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
22
Dr. Saatchi, Seyed Mohsen 22 n 8 x n mod 29 11 × 8 8 mod 29 22 × 8 16 mod 29 3(2 + 1) × 8 16 + 8 24 mod 29 44 × 8 3 mod 29 5(4 + 1) × 8 3 + 8 11 mod 29 6(4 + 2) × 8 3 + 16 19 mod 29 7(4 + 2 + 1) × 8 3 + 16 + 8 27 mod 29 88 × 8 6 mod 29 9(8 + 1) × 8 6 + 8 14 mod 29 10(8 + 2) × 8 6 + 16 22 mod 29 11(8 + 2 + 1) × 8 6 + 16 + 8 1 mod 29 Table 3 A search for the decryption key
23
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
24
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
25
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
26
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
27
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
28
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
29
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
30
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
31
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
32
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
33
Dr. Saatchi, Seyed Mohsen 33 – Continue reading about Module 5 – The due date of TMA04 is Apr. 16 Topic 11: Preparation for next session
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.