Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prepared by: Eng. Ali H. Elaywe 1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Third Session.

Similar presentations


Presentation on theme: "Prepared by: Eng. Ali H. Elaywe 1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Third Session."— Presentation transcript:

1 Prepared by: Eng. Ali H. Elaywe 1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Third Session

2 Prepared by: Eng. Ali H. Elaywe 2 This session is based on the following references: – Module 5: Security, Book S: Security – Module 5: Security, Book N: Numeracy Skills 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 Prepared by: Eng. Ali H. Elaywe 3 Part 2 (Encryption) of Book S – 1. (2.1) Introduction – 2. (2.2) Keeping things secret (2.2.1) Codes and ciphers (2.2.2) A simple cipher – 3. (2.3) Mathematical concepts (mainly from Book N) Book N: Numeracy Skills – 4. (N.1) Introduction to Book N: Numeracy skills – 5. (N.2) Numbers, Factorization and Powers Topics to be covered in this session

4 Prepared by: Eng. Ali H. Elaywe 4 In the second part of Book S some of the methods used to ensure secrecy are introduced, with a particular emphasis on present-day systems The work is split into three main divisions which are presented in Sections 2.2, 2.3 and 2.4 – Section 2.2 ‘Keeping things secret’ provides a short introduction to codes and ciphers and to the language used to describe them. You won’t need to refer to any other materials for your study of this section Topic 1: (2.1) Introduction Continue

5 Prepared by: Eng. Ali H. Elaywe 5 – Section 2.3 ‘Mathematical concepts’ holds the bulk of the work for Part 2. It introduces the mathematical concepts underpinning modern cryptographic techniques and it will involve you in reading all of Chapter 2 and most of Chapter 3 of the Monograph, as well as working through all of Section 3 of Book N Numeracy. In addition there are Book E Experiments designed to demonstrate some of the concepts you’ll be meeting – Section 2.4 introduces you to a branch of cryptography known as public key cryptography. In this section you’ll be asked to read a few more pages from the Monograph and carry out some Book E Experiments where you’ll be using a software application to exchange encrypted messages with other members of your tutor group

6 Prepared by: Eng. Ali H. Elaywe 6 The Science of concealing the existence of a message is called steganography The Science of obfuscating (confusing, concealing, disguising, complicating etc etc ) the meaning of a message is called cryptography Topic 2: (2.2) Keeping things secret Continue

7 Prepared by: Eng. Ali H. Elaywe 7 Coding: A code is the replacement of symbols, or groups of symbols, with alternative symbols, or groups of symbols Decoding: In order to decode the coded message it is necessary to have some sort of look-up table – rather like a dictionary – which provides a list of replacements for all the possible symbols or groups of symbols in the original message. Such a list is often known as a codebook The use of a code does not, however, always imply a requirement for secrecy: – often it’s done because the transmission medium used cannot convey the message in its original form, or because a code might enable the information to be transmitted more efficiently Continue Sub-Topic 2.1: (2.2.1) Codes and ciphers

8 Prepared by: Eng. Ali H. Elaywe 8 Activity 2.1 (exploratory) – Try to think of some examples where codes are used for reasons other than secrecy? – 1- ASCII (American Standard Code for Information Interchange) This is a standard for substituting binary codes for alphabetic characters and other symbols. The use of binary codes means that the information can be represented by just two coding symbols (usually referred to as 1 and 0) – 2- Morse code This is a standard for substituting groups of long and short pulses (or groups of dots and dashes) for alphabetic characters and other symbols. Morse code has been used extensively in telegraphy because of its resistance to corruption from other signals during transmission, and because of its efficiency Continue

9 Prepared by: Eng. Ali H. Elaywe 9 Cipher: A cipher is also a code in which the original symbols or groups of symbols are replaced by alternatives. In this case though, the intention is to obscure the original message so the list of substitutions is created by some procedure that has a secret element. This section of the module is concerned solely with ciphers. The terms ‘code’ and ‘cipher’, in practice are used interchangeably

10 Prepared by: Eng. Ali H. Elaywe 10 A simple code wheel cipher is shown in Figure 1 The wheel is made up of two discs, one slightly smaller than the other The alphabet is written around the circumference of both disks and the disks are fitted together at their centers in such a way that they can rotate relative to one another Any letter on the outer wheel can be aligned with any letter on the inner wheel Sub-Topic 2.2: (2.2.2) A simple cipher Continue

11 Prepared by: Eng. Ali H. Elaywe 11 Continue Figure 1 A cipher wheel

12 Prepared by: Eng. Ali H. Elaywe 12 Encoding: To encode a message the sender and recipient first agree on the relative displacement of the disks. For example, a displacement of 7 would result in the letter A on the outer wheel being aligned with the 7th letter of the alphabet (G) on the inner wheel. The message is then encoded by locating each of its letters on the outer wheel and writing down the corresponding letter from the inner wheel Decoding: The recipient reverses the action to decode the message Continue

13 Prepared by: Eng. Ali H. Elaywe 13 Caesar cipher : This type of code is often called the Caesar cipher, though strictly speaking the Caesar cipher is one that uses only a shift of 3 for encryption. When we refer to the Caesar cipher in the sections that follow you should interpret this in its wider meaning – that is, a code that uses any straightforward alphabetic shift Cipher Algorithm: However simple, the creation of this cipher relies on some procedure that has a secret element. When an encryption method can be carried out systematically by following some sort of set pattern or procedure, such a pattern is known as an algorithm Continue

14 Prepared by: Eng. Ali H. Elaywe 14 Cipher Key: When the algorithm includes a variable that can be altered to produce a different outcome, such a variable is called a key Example: For the simple cipher wheel we’ve been describing, the algorithm is the direction of rotation of the disks and the key is the number of shifts

15 Prepared by: Eng. Ali H. Elaywe 15 Good Cipher algorithms are based on difficult mathematical computations etc. Hence study of Cipher involves the study of Mathematical concepts Modular arithmetic: Before mathematical machines can perform the computational tasks of encryption and decryption they need to have a logical and unambiguous mathematical description of the encryption algorithm – modular arithmetic is a particular branch of mathematics that you will need to be familiar with in order to follow the encryption techniques used Continue Topic 3: (2.3) Mathematical concepts

16 Prepared by: Eng. Ali H. Elaywe 16 As a general rule, ciphers that are easy to use are also fairly easy to decrypt, even by someone who has no knowledge of the algorithm used, or of the key. In the language of cryptography, this is often referred to as breaking or cracking the cipher Since the main purpose of cryptography is to keep things secret, some extremely complex ciphers have been developed to minimize the possibility of them being broken (or cracked). However, the result of this is that these ciphers become very difficult and time-consuming to carry out by hand, and they also become more prone to human error during the encryption and decryption processes Continue

17 Prepared by: Eng. Ali H. Elaywe 17 The Famous Enigma Machine: – Warfare inevitably increases the need for secret communications, and during the Second World War various cipher machines were employed to provide ways of rapidly encrypting and decrypting messages using ciphers that would have been time-consuming to carry out accurately by hand – The Germans used a machine code-named ‘Enigma’ by the British – The Japanese used one code-named ‘Purple’ by the British – Not only did these machines provide a much quicker method of producing encrypted messages, they also reduced the risk of error Continue

18 Prepared by: Eng. Ali H. Elaywe 18 Cryptanalysts: When, at the end of the war, the electronic computer began to emerge as a practical machine, it provided both cryptographers and cryptanalysts (those who break codes) with the tools to work with increasingly more convoluted algorithms You can use the Windows calculator for your Cipher related calculations. Instructions on how to use the Windows calculator to a level sufficient for this module are given in Book E Part 2 ‘Using the Windows calculator’ Before starting you’ll find it helpful to be familiar with some mathematical language and to be able to handle factorization and powers

19 Prepared by: Eng. Ali H. Elaywe 19 N.1 Introduction – Book N is a resource to help you develop the numeracy skills you will need to study the module – Section 2, Numbers, factorization and powers, is included for you to draw on if needed, and it starts with some self-assessment activities. These will help you to evaluate how much, if anything, you need to study from Section 2 – Section 3, Modular arithmetic, is an important component of the module and you will need to study it all, but not in one go. You should work through the relevant sections when you are directed to them from Book S, Security Topic 4: (N.1) Introduction to Book N: Numeracy skills

20 Prepared by: Eng. Ali H. Elaywe 20 This section aims to introduce you to some common terms and notation used to describe numbers It explains how numbers can be represented by their prime factors and how these can be simplified and manipulated by expressing them as powers Topic 5: (N.2) Numbers, Factorization and Powers Continue

21 Prepared by: Eng. Ali H. Elaywe 21 You should start by working through the self- assessment activities (From 1 to 4) in Section N 2.1 Sub-Topic 5.1: (N 2.1) Self-Assessment activities

22 Prepared by: Eng. Ali H. Elaywe 22 Natural numbers: – The history of mathematics begins with numbers that were used for counting things and adding things like sacks of grain, cattle in a field and fish in a pond. These numbers are called natural numbers or sometimes counting numbers. They are all the whole positive numbers greater than zero. Mathematically we can write these numbers as: 1, 2, 3, …, n – where the three dots (…) mean a continuing sequence up to n. For the natural numbers n has no upper limit Set: – When we define numbers in this way it is useful to refer to them as a set of numbers. For example, Natural numbers are the set of whole numbers greater than 0 Sub-Topic 5.2: (N 2.2) The language of numbers Continue

23 Prepared by: Eng. Ali H. Elaywe 23 Integer: – Integers are the set of negative and positive whole numbers including zero. Mathematically we can write these numbers as: –n, …, –3, –2, –1, 0, 1, 2, 3, …, n where n has no upper limit and –n has no lower limit Subset: – From this I hope you can see that natural numbers are a subset of integers (where a subset is a set contained within a larger set). That is, every natural number is also an integer, but every integer is not always a natural number Continue

24 Prepared by: Eng. Ali H. Elaywe 24 Factor: – When one number divides exactly into another number leaving no remainder it is said to be a factor of that number – Mathematically we can express this as: a | b (a is a factor of b) – A natural number may have several factors. For example, 12 has factors 1, 2, 3, 4, 6 and 12 since all of these will divide it exactly leaving no remainder Continue

25 Prepared by: Eng. Ali H. Elaywe 25 Activity 5 (self-assessment) – What are the factors of the following? (a) 9 : 1, 3, 9 (b) 15 : 1, 3, 5, 15 (c) 17 : 1, 17 (d) 32 : 1, 2, 4, 8, 16, 32 Notes: – You should notice that in every case: one of the factors was always 1 every natural number is a factor of itself every natural number has at least two factors (1 and itself). – These rules apply for any natural number with the exception of 1. (The number 1 is unique in that it has only the single factor of 1.) Continue

26 Prepared by: Eng. Ali H. Elaywe 26 Prime numbers and compound numbers: – A number that has exactly two factors (no more and no less) is known as a prime number (often referred to simply as a prime). This is a number that is divisible only by 1 and itself – All other numbers are called compound numbers. (Note that 1 is not a prime number since it has only one factor.) – Prime numbers have a great significance in cryptography (the science of secret codes), so it’s worthwhile spending some time to become familiar with them and with their properties Continue

27 Prepared by: Eng. Ali H. Elaywe 27 Activity 6 (exploratory) – What are the first ten prime numbers? These can be found by checking each number in turn starting from 1 and finding those that have exactly two factors. They are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 If you were to carry on checking every natural number it is believed that you would find the list of primes continues indefinitely Continue

28 Prepared by: Eng. Ali H. Elaywe 28 Large Prime Numbers: – Even though a prime has only two factors this does not imply that a prime is itself a small number. Primes can be very large indeed though they start to become more difficult to find as we move upwards on the number scale. For example, there are 25 primes between 1 and 100, but only 168 altogether between 1 and 1000 and then only 135 between 1001 and 2000

29 Prepared by: Eng. Ali H. Elaywe 29 Any number except 1 can be expressed as a product of two or more of its factors. (For primes, of course, there will only ever be two factors.) For example: – 8 can be expressed as: 1 × 8 or 2 × 4 or 2 × 2 × 2 – 12 can be expressed as: 1 × 12 or 3 × 4 or 2 × 6 or 2 × 2 × 3 Continue Sub-Topic 5.3: (N 2.3) Factorization

30 Prepared by: Eng. Ali H. Elaywe 30 Activity 7 (exploratory) – Express each of the following natural numbers as the product of two or more of its factors:(a) 9, (b) 10, (c) 16 None of these numbers is prime, so we would expect to be able to express each of them in more than one way as a product of factors. This turns out to be true: for both 9 and 10 there are two alternative forms I can use, and for 16 there are five. (a) 9 can be expressed as: 1×9 or 3×3 (b) 10 can be expressed as: 1×10 or 2×5 (c) 16 can be expressed as: 1×16 or 2×8 or 4×4 or 2×2×4 or 2×2×2×2 Continue

31 Prepared by: Eng. Ali H. Elaywe 31 Prime factorization – In the answer to Activity 7 notice that in one of the alternative combinations for each number all the factors are themselves primes – For 9 it is 3 × 3, for 10 it is 2 × 5 and for 16 it is 2 × 2 × 2 × 2. It turns out that every compound number can be expressed as a product of prime factors: this process is known as prime factorization – However, there is one, and only one, unique combination of primes that will multiply together to give a particular compound number. (This theory of prime factorization is one of the fundamental theories of arithmetic, and was discovered by Euclid in the 4th century BC.) This is true for all natural numbers. – For example: 18 = 2×3×3, 24 = 2×2×2×3, 40 = 2×2×2×5, 85 = 5×17 Continue

32 Prepared by: Eng. Ali H. Elaywe 32 Activity 8 (exploratory) – Look at the factors given for 8 and 12 at the beginning of Section 2.3. Which combination results in prime factorization? For 8 it is 2 × 2 × 2, and for 12 it is 2 × 2 × 3 The following answer would be incorrect: – 1 × 8 – or 2 × 4 and – 1 × 12 – or 3 × 4 – or 2 × 6 Continue

33 Prepared by: Eng. Ali H. Elaywe 33 Activity 9 (exploratory) – Look at the factors given below for 36, 54 and 90, respectively. Which combinations result in prime factorization? – (a) 36 = (i) 2 × 2 × 9, (ii) 3 × 3 × 4, (iii) 2 × 3 × 6, (iv) 2 × 2 × 3 × 3 – (b) 54 = (i) 6 × 9, (ii) 2 × 3 × 3 × 3, (iii) 2 × 3 × 9, (iv) 3 × 3 × 6 – (c) 90 = (i) 2 × 5 × 9, (ii) 2 × 3 × 15, (iii) 3 × 5 × 6, (iv) 2 × 3 × 3 × 5 Continue

34 Prepared by: Eng. Ali H. Elaywe 34 Method for finding the prime factors of a number: – Up to now we’ve been dealing with small numbers, and it has been relatively easy to work out their factors – When we start to deal with larger numbers, however, it becomes more difficult – The method for finding the prime factors of a number is to divide it by the lowest possible prime that leaves no remainder, and to continue doing this until it can no longer be divided. Then move to the next lowest prime and so on – Of course, for any even number, the lowest prime will be 2. For odd numbers we have to use a method of trial and error, starting with 3 and working upwards through the primes until we find one that is a factor Continue

35 Prepared by: Eng. Ali H. Elaywe 35 Using this method with 360: 360 ÷ 2 = 180 180 ÷ 2 = 90 90 ÷ 2 = 45 45 ÷ 3 = 15 15 ÷ 3 = 5 5 ÷ 5 = 1 – We can now list the prime factors of 360 as 2 × 2 × 2 × 3 × 3 × 5 Continue

36 Prepared by: Eng. Ali H. Elaywe 36 Using the same method for 875 we can see that there is no point in trying to start with 2 since 875 is an odd number. we’ll start by trying 3 but this leaves me a remainder of 2, so 3 cannot be a prime factor. The next prime to try is 5 and we know that this will work because any integer that ends with either a 0 or a 5 is divisible by 5 – 875 ÷ 5 = 175 – 175 ÷ 5 = 35 – 35 ÷ 5 = 7 – 7 ÷ 7 = 1 we can now list the prime factors of 875 as 5 × 5 × 5 × 7 Continue

37 Prepared by: Eng. Ali H. Elaywe 37 Activity 10 (self-assessment) – Find the prime factors of the following numbers: – (a) 144 2 × 2 × 2 × 2 × 3 × 3 – (b) 420 2 × 2 × 3 × 5 × 7 – (c) 768 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 × 3 – (d) 1215 3 × 3 × 3 × 3 × 3 × 5 Continue

38 Prepared by: Eng. Ali H. Elaywe 38 Basic building blocks for numbers: – It is hoped that the previous activity has helped you to see that all compound numbers can be made from multiplying together primes, so primes can be thought of as basic building blocks for numbers – However, the bigger the number the longer it takes to factorize it – You probably also noticed that you had to work harder to factorize some numbers than others, for example, 143

39 Prepared by: Eng. Ali H. Elaywe 39 Highest common factor: The highest common factor (HCF) of two or more numbers is the largest number which will divide into each of them exactly (that is, without leaving any remainder). The HCF can be found by calculating the prime factors of each of the numbers, then finding the product of those prime factors that are common Example1: Find the HCF of 48 and 252: – 48 = 2 × 2 × 2 × 2 × 3 – 252 = 2 × 2 × 3 × 3 × 7 – The common factors are those I have highlighted: 2 × 2 × 3 = 12. So the highest common factor is 12 Continue Sub-Topic 5.4: (N 2.4) Highest Common Factors (HCF)

40 Prepared by: Eng. Ali H. Elaywe 40 Example2: Find the HCF of 60, 84 and 150: – 60 = 2 × 2 × 3 × 5 – 84 = 2 × 2 × 3 × 7 – 150 = 2 × 3 × 5 × 5 – The common factors are those I have highlighted: 2 × 3 = 6. So the highest common factor is 6 Continue

41 Prepared by: Eng. Ali H. Elaywe 41 Activity 11 (self-assessment) – What is the highest common factor of: (a) 68 and 128 – 68 = 2 × 2 × 17 128 = 2 × 2 × 2 × 2 × 2 × 2 × 2 – The common factors are those that I have highlighted: 2 × 2 = 4. So the highest common factor is 4 (b) 27 and 90 – 27 = 3 × 3 × 3 90 = 2 × 3 × 3 × 5 – The common factors are those that I have highlighted: 3 × 3 = 9. So the highest common factor is 9 (c) 46 and 72 – 46 = 2 × 23 72 = 2 × 2 × 2 × 3 × 3 – I have highlighted the only common factor here, which is 2. So the highest common factor is 2

42 Prepared by: Eng. Ali H. Elaywe 42 Consider the following shorthand notation: – 2 8 – This is read as ‘2 to the power of 8’ – The above notation indicates that 2 is multiplied by itself 8 times. The above way of writing a number which is repeatedly multiplied by itself is called index notation. The number at the bottom (the 2 in my example) is called the base. The number at the top (the 8 in my example) is called the power or index. The power tells you how many times the base has been multiplied by itself Continue Sub-Topic 5.5: (N 2.5) Powers and Indices

43 Prepared by: Eng. Ali H. Elaywe 43 Activity 12 (self-assessment) – Express the prime factors of the following numbers in index notation. Note that you’ve already calculated the prime factors of these numbers in Activity 10 – (a) 144 2 4 × 3 2 – (b) 420 2 2 × 3 × 5 × 7 – (c) 1215 3 5 × 5 Continue

44 Prepared by: Eng. Ali H. Elaywe 44 Activity 13 (exploratory) – Consider the sequence of numbers below: 2 8 = 2 × 2 × 2 × 2 × 2 × 2 × 2 × 2 = 256 2 7 = 2 × 2 × 2 × 2 × 2 × 2 × 2 = 128 2 6 = 2 × 2 × 2 × 2 × 2 × 2 = 64 2 5 = 2 × 2 × 2 × 2 × 2 = 32 2 4 = 2 × 2 × 2 × 2 = 16 2 3 = 2 × 2 × 2 = 8 – Can you say what is happening from one number in the sequence to the next? – Each number is the result of dividing the previous one by 2 Continue

45 Prepared by: Eng. Ali H. Elaywe 45 Activity 14 (self-assessment) – Extend the sequence shown in Activity 8 to find the values of 2 2, 2 1 and 2 0 2 2 = 2 × 2 = 4 2 1 = 2 = 2 2 0 = 1

46 Prepared by: Eng. Ali H. Elaywe 46 Rule 1: A 0 = 1 Rule 2: A 1 = A Rule 3: A x × A y = A x+y – where x and y can represent any number. Example: Consider the result of multiplying 10 4 by 10 3 : – 10 4 × 10 3 = (10 × 10 × 10 × 10) × (10 × 10 × 10) – = 10 × 10 × 10 × 10 × 10 × 10 × 10 – = 10 7 – Put another way, 10 4 × 10 3 = 10 4+3 Rule 4: A x ÷ A y = A x–y Rule 5: (A x ) y = A x×y Continue Sub-Topic 5.6: (N 2.6) Rules of indices

47 Prepared by: Eng. Ali H. Elaywe 47 Notes: – These five rules of indices are very useful when using certain mathematical operations to combine numbers which have the same base – However they cannot be used for mathematically combining numbers with different bases, neither can they be used for combining numbers by addition or subtraction – For example, I can use Rule 3 to combine 5 7 × 5 3 giving 5 10, but I cannot use the same rule to work out the result of 3 9 × 2 7, and I cannot use any of the rules to help me combine 6 7 – 6 3 or 5 7 + 5 3 Continue

48 Prepared by: Eng. Ali H. Elaywe 48 Activity 16 (self-assessment) – Use the five rules of indices above to find shorter ways, if possible, of writing the following: (a) 7 3 × 7 4 = 7 3 × 7 4 = 7 3 + 4 = 7 7 (b) 4 8 ÷ 4 6 = 4 8 ÷ 4 6 = 4 8 – 6 = 4 2 (c) (3 2 ) 3 = (3 2 ) 3 = 3 2×3 = 3 6 (d) 5 4 × 5 6 ÷ 5 2 = 5 4 × 5 6 ÷ 5 2 = 5 4+6–2 = 5 8 (e) 6 8 – 6 2 – This problem cannot be solved using the five rules of indices introduced. Each term would have to be separately evaluated and the solution derived in the conventional way: 6 8 – 6 2 = (6 × 6 × 6 × 6 × 6 × 6 × 6 × 6) – (6 × 6) \ = 1 679 616 – 36 = 1 679 580

49 Prepared by: Eng. Ali H. Elaywe 49 – Continue reading about Module 5 – The due date of TMA04 is Apr. 16 Topic 6: Preparation for next session


Download ppt "Prepared by: Eng. Ali H. Elaywe 1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Third Session."

Similar presentations


Ads by Google