mod5 - Module 5: Basic Number Theory Theme 1: Division...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Module 5: Basic Number Theory Theme 1: Division Given two integers, say ½¾ may or may not be an integer (e.g., ½ and , the quotient but ¾ ). Number theory concerns the former case, and discovers criteria upon which one can decide about divisibility of two integers. ¼ we say that More formally, for and we write divides if there is another integer such that . In short: if and only if ¾ This simple definition leads to many properties of divisibility. For example, let us establish the following lemma. Lemma 1 If and , then ´ · µ. Proof. We give a direct proof. From the definition of divisibility and the hypotheses we know that there are integers Ø and × such that Ø × Hence ´× · ص · Since × · Ø is an integer, we prove that ´ · µ. Exercise 5A: Prove the following two facts: 1. If , then 2. If and for all integers . , then . We already noted that an integer may be or not divisible by another integer. However, when dividing one number by another there is always a quotient and a remainder. More precisely, if and are positive integers then there is a unique Õ and Ö such that Õ·Ö where ¼ Ö is a remainder. Observe that the remainder can take only 1 values ¼ ½ ½. Theme 2: Primes Primes numbers occupy very prominent role in number theory. A prime number Ô is an integer greater than ½ that is divisible only by ½ and itself. A number that is not prime is called composite. Example 1: The primes less than ½¼¼ are: ¾ ¿ ½½ ½¿ ½ ½ ¾¿ ¾ ¿½ ¿ ½ ¿ ¿ ½ ½ ¿ ¿ How many primes are there? We first prove that there are infinite number of primes. Theorem 1. There are infinite number of primes. Proof. We provide a proof by contradiction. Actually, it is due to Euclid and it is more than 2000 years old. Let us assume that there is a finite number of primes, say, ¾ ¿ Ô where Ô is the largest prime (there is the largest prime since we assumed there are only finitely many of them). Construct another number ¾¡¿¡ Å ¡¡¡Ô ·½ which is a product of all primes plus one. First, observe that none of the primes ¾ ¿ Ô can divide Å , since the remainder of dividing Å by any of the primes is equal to ½. Since every number, including Å , is divisible by at least two numbers, ½ and itself, there must be another prime, possible Å itself, that is not among the primes ¾ ¿ ¾ ¿ Ô . This contradicts the assumption that Ô are the only primes. But how many primes are there smaller than Ò, where Ò is a fixed number. This is a very difficult problem that was solved only in the last century. Basically, there are approximately about Ò ÐÓ ´Òµ primes smaller than Ò. For example, there are ¾ primes smaller than ½¼¼, and ½¼¼ ÐÓ ´½¼¼µ ¾¾. Primes are important since every integer can be represented as a product of primes. This is known as the Fundamental Theorem of Arithmetics and we will prove it below. Example 2: Observe that ¾¡¾¡ ½¼¼ ¿ ¡ ½¾ ¿ ½ ¡ ¾¾ ¾ ¾¿ ¡ ¿ ¡ ¿ Theorem 2. [Fundamental Theorem of Arithmetics ] Every positive integer can be written uniquely as the product of primes where the prime factors are written in order of increasing size, that is, if Ò is a natural numbers and Ô½ Ô¾ ¡¡¡ Ô are distinct primes, then Ñ Ò Ô½½ ¡ Ô¾¾ ¡ ¡ ¡ Ô Ñ Ñ 2 where are exponents of Ô (i.e., the number of times Ô occurs in the factorization of Ò). Proof. We give an indirect proof. Let us assume that there are two different prime factorizations of Ò, say Ô½½ ¡ Ô¾¾ ¡ ¡ ¡ Ô Ò Õ½ ½ ¡ Õ¾ ¾ ¡ ¡ ¡ Õ Ò where Õ½ ¡¡¡ Ñ Ñ Ö Ö Õ are primes. Since we factorize the same number Ò we must have Ö Ô½½ ¡ Ô¾¾ ¡ ¡ ¡ Ô Õ½ . If Ô½ that Ô½ is relatively prime to all Õ½ Õ½ ½ ¡ Õ¾ ¾ ¡ ¡ ¡ Õ Ñ Ñ Ö Ö We first prove that Ô½ Õ½ , then Ô½ can not divide any of the primes Õ½ Õ (we say Õ ). Indeed, since Ô½ and Õ½ Õ are primes, none of them equal, then they must be relatively prime. But, then Ô½ cannot divide Ò Õ½ ½ ¡ Õ¾ ¾ ¡ ¡ ¡ Õ Ö which is nonsense since Ò Ô½½ ¡ Ô¾¾ ¡ ¡ ¡ Ô Ñ . Thus, we must conclude that Ô½ Õ½ . Now we prove that ½ Õ½ that we just established above. Again, assume ½ provided Ô½ contrary that ½ ¼. Then after dividing everything by Ô½½ we obtain ½ , say ½ ½ · , Ö Ö Ö Ö Ñ Ô¾¾ ¡ ¡ ¡ Ô Ñ Ñ Õ½ ¡ Õ¾ ¾ ¡ ¡ ¡ Õ Ö Ö But then the right-hand side of the above is divisible by Õ½ while the left-hand side is not, which is impossible since there is an equality sign between the left-hand side and the right-hand side of the above. This completes the proof. How to find out whether an integer is a prime or not? Unfortunately, there is no fast way of doing it (i.e., there is no efficient algorithm), but one can use some properties of primes and composite numbers to speed up the process. Here is one useful result. Lemma 2.If Ò is a composite integer, then Ò has a prime divisor less than or equal to Proof. Since Ò is a composite integer, it must have a factor where Ö ½ is an integer. Let us now assume contrary that ¡ Ö ÔÒÔÒ Ò, that is, Ò ÔÒ and Ö ÔÒ. But then ¡Ö Ò which is the desired contradiction since we assumed that Ò Ô least one divisor not exceeding Ò. such that ½ ÔÒ. Ö. We must conclude that Ò has at This divisor is prime or not. If it is not prime, it must have a prime divisor, which certainly must be smaller than ÔÒ. We can use this lemma, in its contrapositive form, to decide whether Ò is a prime or not. Indeed. the above lemma is equivalent to: if Ò has no prime divisor less than or equal to prime number. 3 ÔÒ, then Ò is a Example 3: Let us show that ½¼ is a prime number. If ½¼ would be composite, then it has had prime divisor smaller than Ô ½¼ ½¼ ¿ . Primes smaller than ½¼ are ¾ ¿ , and . None of it divides ½¼ , thus it ½¼ must be a prime number. There were several attempts to find a systematic way of computing prime numbers. Euclid suggested that ´ · ½µ-st prime can be computed recursively as follows: ¾ ½ ½ ¾ ·½ ¡¡¡ ·½ For example, the first few numbers are ¾·½ ¾ ¾¡¿·½ ¿ ¿ ¾¡¿¡ ·½ ¿ This is an example of a recurrence that we already encountered in the previous module. All numbers computed so far are primes. But, unfortunately, ¾¡¿¡ ¡ ¿·½ ½ ¼ ½¿ ¡ ½¿ is not a prime. In the seventeenth century, a French mathematician Marin Marsenne suggested that ¾Ô prime provided Ô is prime. Unfortunately, ¾½½ ½ ¾¼ ½ is ¾¿ ¡ From now on we shall work under the assumption that there is no easy, simple and fast algorithm to compute prime numbers. Theme 3: Greatest Common Divisor The largest divisor that divides both Ñ and Ò is called the greatest common divisor of Ò and Ñ. It is denoted as ´Ñ Òµ. Formally: ´Ñ Òµ Ñ Ü Ñ and Ò Example 4: What is the greatest common divisor of ¾ and ¿ . One way of finding it is to list all divisors of ¾ and ¿ and pick up the largest common to both lists. For example, divisors of ¾ ½ ¾ ¿ ½¾ ¾ divisors of ¿ ½ ¾ ¿ ½¾ ½ ¿ 4 Thus ´¾ ¿ µ ½¾. Another, more systematic way is to do prime factorization of both numbers and pick up the largest common factors. In our case, ¾¿ ¡ ¿ ¾ ¾¾ ¡ ¿¾ ¿ Thus ¾¾ ¡ ¿ ´¾ ¿ µ ½¾ Generalizing the last example, let Ô½½ Ô¾¾ ¡ ¡ ¡ Ô Ñ Ô½½ Ô¾¾ ¡ ¡ ¡ Ô Ò be prime factorizations with possible zero exponents. Then ´Ñ Òµ ÔÑ Ò ½ ÔÑ Ò ¾ ½ ½ ¾ ¾ ¡¡¡Ô ÑÒ where Ñ Ò Ü Ý is the minimum of Ü and Ý . Indeed, take the last example to see that ¾Ñ Ò ´¾ ¿ µ ¾¿ ¿Ñ Ò ½¾ Exercise 5B: Let us define the least common multiple of Ñ and Ò as the smallest positive integer that is divisible by both Ñ and Ò. It is denoted as Ð Ñ´Ñ Òµ (e.g., Ð Ñ´ µ ¼). Prove that for any positive integers Ñ and Ò Ñ¡Ò ´Ñ Òµ ¡ Ð Ñ´Ñ Òµ We need some more definitions. Two integers, say Ñ and Ò, may be composite but the only common divisor of both is ½. In such a case we say that Ñ and Ò are relatively prime. More generally: Definition 1. The integers ½ are pairwise relatively prime if ¾ ´ µ ½ ½ Unlike finding primes, there is an efficient algorithm (a procedure) that finds the greatest common divisor. We start with an example. Example 5: Find ´ ½ ¾ ¼µ. We first divide ¾ ¼ by ½ to find ¾ ¼ ¾¡ ½· 5 Observe that any divisor of ½ and ¾ ¼ must also be a divisor of ¾ ¼ ¾ ¡ ½ divisor of ½ and ¾¡ ½· must be a divisor of ¾ ¼ then there are integers so ¾ ¼ ¾ ¡ ½ ¡ and Ð such that ¾ ¼ is a divisor of ¾ ¼ and ½, ¡ Ð, hence ¾ ¼ ¾ ¡ and ½ ½ ´ ¾Ðµ, is divisible by .) Thus we concluded that ´ ½ ¾ ¼µ ´ We now repeat this procedure: we divide ½ by ½µ to get ½¡ ½ Again any divisor of . (Indeed, if , and vice versa any · ½¿ and ½ must be a divisor of ½ ´ ½ ¾ ¼µ ´ But ½¿, and vice versa. This means that ½µ ´½¿ µ ½¿ ¡ hence finally ´ ½ ¾ ¼µ and we conclude that ´ ½ ¾ ¼µ ´ ½µ ´½¿ µ ´¼ ½¿µ ½¿ ½¿. From the last example, we should conclude that the greatest common divisor of Ñ and Ò Ñ is the same as the greatest common divisor of Ñ and the remainder of the division of Ò by Ñ (i.e., Õ ¡ Ñ · Ö, where Õ is an integer and ¼ Ö Ñ). Indeed, if is a divisor of Ñ and Ò, then it must also divides Ö Ò Õ ¡ Ñ, and vice versa if divides Ñ and Ö , then it divides Ò Ñ ¡ Õ · Ö . Ò Therefore, ´Ñ Òµ ´Ö ѵ In previous modules we have used an abbreviation for a remainder. Indeed, we write Ö Ò ÑÓ Ñ Õ ¡ Ñ · Ö. This is called modular arithmetic and we will be devoted the next section it. For now, we just use the fact that the remainder Ö can be also written as Ò ÑÓ Ñ. Then the last where Ò equation, can be expressed as ´Ñ Òµ ´Ò ÑÓ Ñ Ñµ (1) From the example above, we conclude that we can use (1) successively until we reach In summary, we design the following algorithm that computes A LGORITHM: The Euclidean Algorithm 6 ´Ñ Òµ: ´¼ ѵ Ñ. Ü Ý Ñ Ò while Ý Ü Ý Ý Ö ¼ do Ö Ü ÑÓ Ý end ´Ñ Òµ Ü. Example 6: Find ´ ½ ¾µ ´ ½ ¾µ. According to the Euclidean algorithm we proceed as follows: ´¾ ½ µ ´½ ¾ µ ´ ¾ ½ µ ´ ¾ ¾µ ´¾ ¼µ ¾ Theme 4: Modular Arithmetic We have already seen in previous modules modular arithmetic. It is about the remainder of an integer when it is divided by another specific natural integer. It occurs in many applications (e.g., when counting time over a 24-hour clock since after 24:00 we have ½ am, ¾ am, etc.). We start with a definition. Definition 2. (i) Let Ò be an integer and Å be a positive integer. We denote by Ò ÑÓ Å Ö the remainder Ö when Ò is divided by Å , that is, Õ¡Å ·Ö Ò where Õ is an integer and ¼ Ö Å. (ii) Let Ò and Ñ be integers and Å a positive integer. We say that Ò is congruent to Ñ modulo Å if Å divides Ò Ñ. We shall write Ò Ñ ÑÓ Å Å ´Ò ѵ if and only if Ñ ÑÓ Å . If Ò are Ñ are not congruent modulo Å , then we write Ò Example 7: We have ½ ÑÓ ½ ÑÓ ¿ We also have ½ Exercise 5C: Find ½¿ ÑÓ ÑÓ ¾ . Is ¾¿ ÑÓ ½ ÑÓ ? The following result is useful when computing congruences. 7 ÑÓ Ñ and Theorem 3. Let ÑÓ Ñ. Then ÑÓ Ñ ÑÓ Ñ · ÑÓ Ñ and Proof. Since · (2) (3) ÑÓ Ñ, hence there are integers × and Ø such that ×Ñ · · ØÑ Therefore ´ · µ · Ñ´× · ص · ´ · ×ѵ´ · Øѵ · Ñ´ Ø · × · ×Øѵ which prove (2) and (3). ¾ ÑÓ Example 8: Let and ½½ ½ ÑÓ ½ . Then ¾ · ½ ÑÓ · ½½ and ¡ ½½ ¾ ¡ ½ ÑÓ From Theorem 3 we conclude that ´ · µ ÑÓ Ñ Ñ ¡ µ ÑÓ ´ ÑÓ Ñµ · ´ ÑÓ Ñµ ÑÓ Ñ ÑÓ Ñµ ¡ ´ ÑÓ Ñµ ÑÓ Ñ ´ ´ (4) (5) Identities (4)–(5) are useful when one needs to compute modulo Ñ over large numbers or products of ½¾¿ and large numbers. For example, let ½¾¼ ¡ ¾¿ ÑÓ ´½¾¿ ÑÓ ¾¿ . Then µ ¡ ´¾¿ ÑÓ µ ÑÓ ¿¡ ÑÓ ¾ In fact, (5) is often used in the following form × Let us compute likely occur since ÑÓ ¾¾ ¾ ¾ ÑÓ Ñ ´ ÑÓ Ñµ ÑÓ Ñ × ½¿. If one tries to estimate this directly on a computer, overflow will is a huge number. But let us use (5). We first represent the exponent ¾ as ¾ ¾ · ¾¿ · ¾¾ · ¾¼ 8 We now compute ¾ to each of the powers ½ and ½ modulo ½¿. Here is the calculation (observe how easy it is!): ¾¾ ¾ ¾ ¾½ ¾¾ ÑÓ ÑÓ ÑÓ ÑÓ ÑÓ ÑÓ ¾¾ ÑÓ ¾ ÑÓ ¾ ÑÓ ¾½ ÑÓ ½¿ ¿¾ ½ ½¿ ´ ½¿ ´ ½¿ ´ ½¿ ´ ¿ ½¿ ¿¼ ÑÓ ½¿µ¾ ÑÓ ½¿µ¾ ÑÓ ½¿µ¾ ½¿ ½¿µ ¡ ´ ¾ ¡ ¿¾ ¡ ¾¡ ÑÓ ¾¾ ÑÓ ¿¾ ¾ ÑÓ ¿¼¾ ½¿ ½¿ ½¿ ¾ ½¿ ½¿µ ¡ ´ ¾ ÑÓ ¾ ÑÓ ½¿ ¿¾ ½¿ ¿ ÑÓ ½¿µ ¡ ´ ¾ ÑÓ ½¿µ ÑÓ ½½¿ Theme 5: Applications We shall discuss here some applications of numbers theory, namely, hashing, pseudo random generators, and cryptosystems based on modular arithmetic. Hashing Often one needs a fast methods of locating a given record in a huge set of records. Hashing is a possible solution. It works as follows. Every record has a key, , which uniquely identifies it. A hashing function ´ µ maps the set of keys into the available memory locations. In practice, the most common hashing function is ÑÓ Ñ ´ µ where Ñ is the size of the memory. Example 9: Let Ñ ½½½ and let keys be social security numbers of students. In particular, ´¼ ¾½¾ ´¼¿ ½ µ ¾½¾µ ÑÓ ¾½¾ ÑÓ ¼ ¾½¾ ½½½ ¼¿ ½ ½ ½½½ Observe that hashing is not one-to-one function, hence some records may be hashed into the same location. For example, ´½¼ ¼ ¾¿µ ½¼ ¼ ¾¿ ÑÓ ½½½ ½ Thus two records are mapped into the location ½ . Since this location was already occupied by the previous record, the new collided record is moved to the next empty location modulo Ñ our case, it is at memory location ½ . 9 ½½½. In ½¿ Pseudo Random Number Generators In many applications, including hashing, one needs to generate numbers that look randomly. For example, in hashing we want to spread out uniformly all records over the memory so to minimize the number of collisions. We should point out that most random generators compute deterministically numbers, therefore, we call them pseudo random generators. We require, however, that a statistical test applied to them will not distinguish these numbers from randomly generated numbers. The most common procedure to generate pseudo random numbers is the linear congruential method. In this method we choose (very carefully) the modulus Ñ, multiplier , increment , and seed ܼ with ¾ Ñ, ¼ Ñ, and ¼ ܼ Ñ. Then we generate recursively a sequence Ü Ò as Ü Ò·½ with ܼ given. Observe that ¼ Ü Ò ´ Ü · µ ÑÓ Ñ Ò Ñ, hence at most after Ñ generations a repetition occurs. Of course, this is not good for random generations, and one must select very carefully the parameters , and Ñ (which should be large) to obtain a long sequence without a repetition. The following result is known. Theorem 4. [T. Hull and A. Dobel, 1962]The linear congruential generator has a full period (i.e., there is no repetition in the first Ñ generations) if and only if the following three conditions hold: (i) Both Ñ and are relatively prime, that is, ´Ñ µ (ii) If Õ is a prime number that divides Ñ, then Õ divides (iii) If divides Ñ, then divides ½. ½. ½. Cryptology One of the most important application of congruences is in cryptology, which is a study of secret messages. The first encryption algorithms were very simple. For example, Julius Caesar designed an encryption system by shifting each letter three letters in the alphabet. Mathematically speaking, in this case the encryption function ´Ôµ is defined as ´Ôµ ´Ô · ¿µ ÑÓ ¾ Then decryption is merely finding the inverse function ½ ´Ôµ ½ , which in this case is ´Ô ¿µ ÑÓ ¾ The above encryption system is too easy to break. Therefore, in mid-1970 the concept of public key cryptosystem was introduced. In such a system, every person can have a publicly known encryption key to send encrypted message, but only those who have secret key can decrypt the message. We 10 describe below a system known as the RSA encryption system (RSA name is built from the initials of the inventors Rivest, Shamir and Adleman). In the RSA system, the message Å to be sent is first transformed into an integer representing it (with some abuse of notation we denote such an integer by Å ). The RSA is based on modular exponentiation modulo of the product of two large primes, say Ô and Õ . Define Ò ´Ô ½µ´Õ ½µ. ÔÕ and In practice, Ô and Õ have ½¼¼ digits each, thus Ò has ¾¼¼ digits. Define now an exponent as ´ that is, is relatively prime to ´Ô ½µ´Õ µ ½ ½µ. The cipher text of the original message Å is computed as follows Å ÑÓ Ò (6) The RSA decryption works as follows: We first find a number defined as ´Ô ½µ´Õ ½µ ½ ÑÓ The number is called inverse of modulo . It should be underlined that can be found fast (based on the Euclidean algorithm) only if one knows both primes Ô and Õ , not the product ÔÕ . Then, it can be proved (see below) that Å ÑÓ Ò ÔÕ (7) Example 10: Let us encrypt the message ËÌ ÇÈ using the RSA with Ô Ò ¿¡ ¾ ¿ , and one finds ´½¿ ¾ ¡ ½¿ since µ ¿ and . Thus ½. We now transform the message ËÌ ÇÈ into its numerical equivalent (where ¼¾ Õ ¼¼, ¾ ) and group them in pairs. We obtain ½ ½ ½ ½ We will encrypt each of the two blocks separately. We have ½ ½ ½ ½ Hence, the encrypted message is ÑÓ ½¿ ÑÓ ½¿ ¾ ¿ ¾¼ ½ ¾ ¿ ¾½ ¾ ¾¼ ½ ¾½ ¾. Now, to decrypt it, we first find the inverse . Using the Euclidean algorithm (and knowing Ô ¿ Õ ¿ . Then (with Ò ) we compute that ¾ ¿ ) ¾¼ ½ ¿ ÑÓ ¾ ¿ ½ ½ ¾½ ¾ ¿ ÑÓ ¾ ¿ ½ ½ and hence, we recover the original message. 11 Mathematics behind RSA In this subsection, we present in some details mathematical ideas used in the construction of the RSA algorithm. Our main goal is to justify mathematically the decoding procedure (7). Let us start with introducing an inverse modulo Ñ. We say that ½ ÑÓ is an inverse of modulo Ñ if Ñ In order to compute the inverse, we must plunge into another aspect of number theory. We claim that for any positive and there exist integers × and Ø such that ´ × ·Ø µ (8) We explain how to construct these two numbers on an example. ´¿ Example 11: Let us use Euclidean algorithm to compute ¼ µ. We proceed according to the algorithm as follows: ¼ ¿ ¿ ¡ ½¼ · ¾ ¿ ½¼ ¾·¿ ¾¡¿ ¾ Thus ´¿ ¼ µ · ½¼ ¿ . To find the representation (8) we work backward the Euclidean algorithm starting from the next-to-last devision above, that is, ´¿ where ¿ and ¼ µ ¾ ½¼ ´¿ ¿ ¡ ½¼ ´ ¼ ¿ µ ¿ ´ µ · ´ µ ¿ ¼ . Thus × ½¼ and Ø µ ¡ ½¼ ¿ ¡ ¼ ¡¿ in the representation (8). It is not much harder to prove (8) in general terms. Now we can go back to the inverse modulo Ñ construction. Let us assume that ´ Then from the fact just proved we conclude that there must exist integers × and Ø such that × · ØÑ ½ This certainly implies that × · ØÑ ½ ÑÓ 12 Ñ Ñµ ½. But since Ñ divides ØÑ we conclude that ½ ÑÓ × Consequently × is the inverse of Ñ modulo Ñ. In summary, we’ve just established the following result. Theorem 5. If Ñ Ñµ ½ (i.e., and Ñ are relatively prime), then an inverse of modulo Ñ exists and it is equal to × in the following representation of ´ ѵ ½ ½ and × · ØÑ ½ which can be found efficiently by the Euclidean algorithm. Example 12: Let’s find the inverse of ¿ modulo . Since Euclidean algorithm gives: hence and the inverse of ¿ modulo ´¿ µ ½, the inverse exists, and the ¾¡¿·½ ¾ ¡ ¿ · ½ ¡ is equal to ¾. ½ We need two more results before we can explain the decryption algorithm of RSA. The first one goes back to ancient Chinese and Hindu mathematicians and it is known as the Chinese Remainder Theorem. Here is the problem: let ѽ Ѿ Ñ be pairwise relatively prime positive integers. Ò Ñ½ Ѿ ¡ ¡ ¡ Ñ of the following system; Find a solution Ü modulo Ñ Ò ÑÓ Ñ½ Ѿ ¾ ÑÓ Ü ½ Ü . . . Ü Ò ÑÓ Ñ Ò We now construct a solution to the above system of congruences. Let us define for Å Observe that ´Å ѵ Ñ Ñ Ñ½ ¡ ¡ ¡ Ñ ½ Ñ ·½ ½ Ò ¡¡¡Ñ Ò ½. Therefore, by Theorem 5 there exists inverse Ý of Å modulo Ñ , that is, ÅÝ Let us now define Ü ½ ½ ÑÓ Ñ Å½ ݽ · ¾ ž ݾ · ¡ ¡ ¡ · 13 Ò Å Ý ÑÓ Ñ Ò Ò (9) We claim it is a simultaneous solution of the above system modulo Ñ. Indeed, we first observe that ¼ ÑÓ Å Ñ for . But Ü ½ ÑÓ since Å Ý ÑÓ Ñ ÅÝ Ñ . Thus we have shown that (9) is a simultaneous solution of the above Ò congruences. This is called the Chinese Remainder Theorem. Example 13: Solve Ü Ü of Ž ¿¡ ¡ ½¼ , and Ž ¿ modulo 3, ݾ ¿ ÑÓ Ü We have Ñ ¾ ÑÓ ¿ ¾ ÑÓ ¿ , ž ¾½ and Å¿ ½ . We find that ݽ ½ is inverse of ž modulo , and Ý¿ ¾ is inverse ½ is an inverse of Å¿ modulo . Thus the solution of the above system of congruences ¾¡¿ Ü ¾¿¿ thus the solution Ü ¡ ¾ · ¿ ¡ ¾½ ¡ ½ · ¾ ¡ ½ ¡ ½ ÑÓ ½¼ ¾¿ ÑÓ ½¼ ¾¿. Finally, we quote (without a proof) the Fermat Little Theorem. Theorem 6. [Fermat’s Little Theorem] If Ô is a prime number and Ô, then ½ Ô ½ ÑÓ is an integers not divisible by Ô or equivalently Ô ÑÓ Ô Now, we are ready to explain the decryption procedure (7) of the RSA algorithm. We recall that is inverse of modulo ´Ô ½µ´Õ ½µ, that is, ½ ÑÓ This implies that there is an integer such that ½· Therefore by the Fermat theorem Å Å ¡ ´Å ½ µ ´ ½µ Ô Õ 14 Å ¡½ Å ÑÓ Ô and Å ¡ ´Å ½ µ ´ ½µ Å ¡ ½ Å ÑÓ Õ ½ ÑÓ Ô and Å ½ ½ ÑÓ Õ by Fermat’s theorem. But Õ since Å Ô ½ Ô Õ follows from the Chinese Remainder Theorem that Å ÑÓ ÔÕ as desired. 15 ´Ô Õ µ ½, hence it Assignment 5.1: Basic Number Theory Problems Each assignment is worth 10 points. 1. Show that if and ¼ are integers such that ´ µ ´ µ, then . 2. Find the prime factorization of ½¼ . 3. Use the Euclidean algorithm to find (a) ´½ ¾ ½ ¼¿ µ, (b) ´½½½½ ½½½½½µ. 4. Find an inverse of ¾ modulo ½ . 5. Encrypt the message ATTACK using the RSA system with Ò each letter into integers (where ¼¼, ¼½ did in our Example 10. 16 ¿¡ and ½¿, translating ¾ ) and grouping pairs of integers, as we Solutions to Exercises Solution to Exercise 5A We first prove that if such that ¡ . This implies Now we prove if and Ð such that , then and and ¡ , then for all integers . Indeed, since ¡ ¡ , hence there must be an integer for any integer . . From the hypotheses we conclude that there are integers Ð. Therefore, Ð 17 Ð , hence . ...
View Full Document

Ask a homework question - tutors are online