MATH 145 Algebra, Solutions to Assignment 4

Size: px
Start display at page:

Download "MATH 145 Algebra, Solutions to Assignment 4"

Transcription

1 MATH 145 Algebra, Solutions to Assignment 4 1: a) Find the inverse of 178 in Z 365. Solution: We find s and t so that 178s + 365t = 1, and then = s. The Euclidean Algorithm gives 365 = = = = = so gcd178, 365) = 1, then back substitution gives u k = 1, 3, 4, 79, 16, so 178)16) + 365) 79) = 1 and hence = 16. b) Solve the linear congruence 356 x = 8 mod 730. Solution: Notice that by dividing all terms by, we have 356 x = 8 mod x = 14 mod 375. Working in Z 365, we multiply both sides of the equation 178 x = 14 by = 16 to get x = = 68 = 78. Thus for x Z we have 356 x = 8 mod 730 x = 78 mod 365. c) Find mod 37. Solution: Note that 53 = 5 mod 37, so = mod 37. Since φ37) = 36, the list of powers of 5 modulo 37 repeats every 36 terms, and so we wish to find mod 36. Since 470 = mod 36 we have = 654 mod 36. We make a list of powers of modulo 36: k k The table shows that the list of powers of modulo 36 repeats every 6 terms beginning with the term = 4 this also follows from Part b) of Problem 3). Since 654 = 0 = 6 mod 6 we have 654 = 6 = 8 mod 36. Thus = = = 5 6 = 5 8 mod 37. We make a list of powers of 5 modulo 37: We remark that a calculator is not needed because k k = = = = 3)16) 4) = 16 1 = 3 6 = 5)6) = 30 = 7 mod 37. Thus = 5 8 = 7 mod 37. d) Solve the pair of congruences 5x = 9 mod 14 and 17x = 3 mod 30. Solution: We have 5x = 9 mod 14 5x {, 5, 9, 3, }. By inspection, one solution to the first congruence is given by x = 1 and, since gcd5, 14) = 1, the general solution is given by x = 1 mod 14. To get 17x = 3 mod 30 we need 17x + 30y = 3 for some y Z. The Euclidean Algorithm gives 30 = , 17 = , 13 = so that d = gcd17, 30) = 1, and then Back-Substitution gives the sequence 1, 3, 4, 7 so that 17 7)+304) = 1. Multiply by 3 to get 17 1)+301) = 3, and so one solution to the second congruence is x = 1 and the general solution is x = 1 = 9 mod 30. Thus the two given congruences are equivalent to the two congruences x = 1 mod 14 1) and x = 9 mod 30 ). To solve these two congruences we try to find k, l Z so that x = k = l. We need 14k 30l = 10. Divide by to get 7k 15l = 5. By inspection, one solution is given by k, l) = 10, 5). Put k = 10 into the equation x = k toget x = 141, and so x = 141 is one solution to the pair of congruences 1) and ). Since gcd14, 30) = so that lcm14, 30) = = 10, the general solution is x = 141 mod 10, or equivalently x = 69 mod 10.

2 : Let a, b and c be non-zero integers. The greatest common divisor d = gcda, b, c) is the largest positive integer d such that d a, d b and d c, and the least common multiple m = lcma, b, c) is the smallest m Z + such that a m, b m and c m. a) Show that gcda, b, c) = gcd gcda, b), c ) and lcma, b, c) = lcm lcma, b), c ). Solution: Let d = gcda, b, c), e = gcda, b) and f = gcde, c). Since d is a common divisor of a and b and e = gcda, b), we have d e. Thus d is a common divisor of e and c, so since f is the greatest common divisor of e and c) we must have d f. On the other hand, since f e and e a we have f a, and since f e and e b we have f b. Thus f is a common divisor of a and b, and f also divides c, so since d is the greatest common divisor of a, b and c), we must have f d. Thus d = f, that is gcda, b, c) = gcd gcda, b), c ). We claim that for nonzero integers a and b and for l = lcma, b), if m is a common multiple of a and b then l m I think we proved this in one of the two sections of the class, but here is an alternate proof. Let d = gcda, b) and recall that ab = ld and that gcd a d, d) b = 1. Let m be a common multiple of a and b and choose integers s and t so that m = as = bt. Divide through by d to get a d s = b d t. Since a b d d t and gcd a d, ) b d = 1 it follows that a d t, say t = a d r. Then we have m = bt = b a d r = ab d r = lr and so l ) m, as required. The proof that lcma, b, c) = lcm lcma, b), c is now very similar to the proof that gcda, b, c) = gcd gcda, b), c ), and we omit it. b) Show that for any integers a, b, c, e, the linear diophantine equation ax + by + cz = e has a solution if and only if gcda, b, c) e. Solution: Suppose first that ax + by + cz = e has a solution, say as + bt + cu = e, and let d = gcda, b, c). Since d a, d b and d c, we can choose k, l and m so that a = dk, b = dl and c = dm. Then as + bt + cu = e = dks + dlt + dmu = e = dks + lt + mu) = e and so d e. Conversely, suppose that d e where again we let d = gcda, b, c). By Bézout s Lemma that is by the Euclidean Algorithm with Back-Substitution), we can choose integers s and t such that as + bt = gcda, b). Since d e, by Part a), we have gcd gcda, b), c) e, and so, by the Linear Diophantine Equation Theorem, we can choose integers u and v so that gcda, b)u + cv = e. Since as + bt = gcda, b) and gcda, b)u + cv = e, we have asu + btu + cv = e, so the diophantine equation ax + by + cz = e does indeed have a solution. c) Show that for any integers a 1, a, a 3 and for any positive integers n 1, n, n 3, the system of three congruences x = a k mod n k for k = 1,, 3 has a solution if and only if gcdn k, n l ) al a k ) for all k, l and that if x 0 is one solution then the general solution is x = x 0 mod lcmn 1, n, n 3 ). Solution: We shall need a formula. Let p be a prime. Let k i = e p n i ) for i = 1,, 3. Then e p gcd ) ) lcmn 1, n ), n 3 = min e p lcmn1, n ) ) ), k 3 = min ) maxk 1, k ), k 3 { } mink1, k 3 ) if k 1 k = = max mink 1, k 3 ), mink, k 3 ) ) mink, k 3 ) if k 1 k = max e p gcdn1, n 3 ) ), e p gcdn, n 3 ) )) = e p lcm gcdn 1, n 3 ), gcdn, n 3 ) )). Since this holds for all primes p, we obtain the formula gcd lcmn 1, n ), n 3 ) = lcm gcdn1, n 3 ), gcdn, n 3 ) ). 1) If the system of 3 congruences x = a i mod n i has a solution, then each pair of congruences x = a k mod n k and x = a l mod n l has a solution, and it follows from the version of the CRT that we proved in class that gcdn k, n l ) al a k ) for all k, l. Conversely, suppose that gcdn k, n l ) al a k ) for all k, l. By the version of the CRT that we proved in class, the pair of congruences x = a 1 mod n 1 and x = a mod n has a solution, say x = b, and the general solution is x = b mod lcmn 1, n ). Thus the original system of 3 congruences is equivalent to the pair of congruences x = b mod lcmn 1, n ) and x = a 3 mod n 3. Since b = a 1 mod n 1 we have a 3 b = a 3 a 1 mod n 1 and hence a 3 b = a 3 a 1 mod gcdn 1, n 3 ). Since gcdn 1, n 3 ) a3 a 1 ) we have a 3 b = a 3 a 1 = 0 mod gcdn 1, n 3 ) and so gcdn 1, n 3 ) a3 b). Similarly gcdn, n 3 ) a 3 b). Since a 3 b is a common multiple of gcdn 1, n 3 ) and gcdn, n 3 ) it follows that lcm gcdn 1, n 3 ), gcdn, n 3 ) ) a3 b). By Formula 1), we have gcd ) lcmn 1, n ), n a3 3 b). By the version of the CRT that we proved in class, the pair of congruences x = b mod lcmn 1, n ) and x = a 3 mod n 3, and hence the original system of 3 congruences, does have a solution, and if x 0 is one solution then the general solution is x = x 0 mod lcm ) lcmn 1, n ), n 3 = x0 mod lcmn 1, n, n 3 ).

3 3: a) Solve the following system of congruences. Solution: Modulo 10 we have x = x + 6 mod 10 x 3 = 7 mod 9 x = 11 mod 4 x x x so x = x + 6 mod 10 x = 3 or 8 mod 10 x = 3 mod 5. Modulo 9 we have x x x x so x 3 = 7 mod 9 x =, 5 or 8 mod 9 x = mod 3. Thus we need to solve the 3 equations x = 3 mod 5 x = mod 3 x = 11 mod 4 By inspection, one solution to the first two of these equations is x 0 = 8, so by the C.R.T. the complete solution is x = 8 mod 15. Thus we need to solve the pair of equations x = 8 mod 15 x = 11 mod 4 We need x = k = l 1) for some k, l, so we solve 15k 4l = 3. Divide this equation by 3 to get 5k 8l = 1. By inspection, one solution is k 0, l 0 ) = 3, ). Put k 0 or l 0 ) into 1) to get one solution x 0 = k 0 = 8 45 = 37. Also, lcm15, 4) = 10, so by the C.R.T the complete solution is x = 37 = 83 mod 10. k b) Let n = p 1 k k 1 p p r r where the p i are distinct primes and each k i 1. Let Show that a l+m = a m mod n for all a Z. l = lcm φ p 1 k 1 ),, φ pr k r )) and m = max { k1,, k r }. Solution: Let a Z. Fix an index i with 1 i r. If p i k a then p i i a ki k and hence p i i a m since m k i. Thus in this case we have a m k = 0 mod p i i and so a l+m = a l a m = 0 = a m k mod p i i. If p i a then by the Euler-Fermat Theorem we have a φpik i ) k = 1 mod p i i and so a c k = 1 mod p i k i for every multiple c of φp i i ). In particular a l k = 1 mod p i i and hence a l+m = a l a m = a m k mod p i i. In either case, we have a l+m = a m k mod p i i. Since a l+m = a m k mod p i i for every i with 1 i r, it follows from the Chinese Remainder Theorem that a l+m = a m mod n.

4 4: For n, b Z + with gcdb, n) = 1, if n is composite and b n 1 = 1 mod n, then we say b is a Fermat liar and we say n is a base b pseudo-prime. For n Z +, we say n is a Carmichael number when n is a base b pseudo-prime for every b Z + with gcdb, n) = 1. a) Show that 91 is a base 3 pseudo-prime. Solution: Note that 91 = 7 13, so 91 is composite. Since lcm φ7), φ13) ) = lcm6, 1) = 1, powers repeat every 1 terms modulo 91. Since 90 = 6 mod 1 we have 3 91 = 3 6 = 79 = 1 mod 91. b) Show that if n = p 1 p p l where l and the p i are distinct primes which satisfy p i 1) n 1) for all indices i, then n is a Carmichael number we remark that the converse is also true). Solution: Suppose that n = p 1 p p l where the p i are distinct primes with p i 1) n 1). Let b Z + with gcdb, n) = 1. Fix an index i. Since gcdb, n) = 1 we have p i b and so b p i 1 = 1 mod p i by Fermat s Little Theorem. Since b pi 1 = 1 mod p i and p i 1) n 1), we also have b n 1 = 1 mod p i. Since b n 1 = 1 mod p i for every index i, it follows from the Chinese Remainder Theorem that b n 1 = 1 mod n. Thus n is a base b pseudo prime. Since b was an arbitrary integer with gcdb, n) = 1, n is a Carmichael number. c) Show that if n = p 1 p p l where l and the p i are distinct primes which satisfy p i 1) n 1) for all indices i so that n is a Carmichael number, by Part b)) then n is odd and l 3. Solution: Since l, at least one of the primes p i is odd, say p k is odd. Since p k 1 is even and p k 1) n 1), it follows that n 1) is even and so n is odd. Suppose, for a contradiction, that n is a Carmichael number of the form n = pq where p and q are primes with p < q and we have p 1) n 1) and q 1) n 1). Note that n 1 = pq 1 = pq 1) + p 1). Since q 1) n 1) we have q 1) n 1) pq 1), that is p 1) p 1). But this implies that q p. d) Find distinct primes p and q such that 145 p and 145 q are both Carmichael numbers. Solution: We try to obtain n = 5 9 p with 4 n 1), 8 n 1) and p 1) n 1). Note that 4 n 1) = n = 1 mod 4 = 5 9 p = 1 mod 4 = p = 1 mod 4, and 8 n 1) = n = 1 mod 8 = 5 9 p = 1 mod 8 = 5p = 1 mod 8 = p = 17 mod 8 so we need to have p = 17 mod 8, that is p = 17, 45, 73, 101, 19,. By trying some of the primes in this list we find that p = 17 and p = 73 both satisfy p 1) n 1), so they both yield Carmichael numbers, so we can take p = 17 and q = 73. The corresponding Carmichael numbers are n = = 7395 and n = = 10585). Alternatively, rather than simply trying some of the infinitely many) primes in the list, we can be more selective as follows. Note that n 1 = 5 9 p 1 = 145 p 1 = 145p 1) and so p 1) n 1) p 1) 145p 1)+144 ) p 1) 144. Thus it is enough to test each of the finitely many) primes p = 17 mod 8 with p 145 = 5 9 to see whether p 1) 144. According to the remark at the end of Part b), this implies that p = 17 and q = 73 are the only two primes for which 145 p and 145 q are Carmichael numbers.

5 5: a) Let n = pq where p and q are large distinct primes. Recall that if we write n 1 = s k with k odd, then a Z is called a strong) witness for n when a k 1 mod n and a rk 1 mod n for all r with 0 r < s. i) Show that, given φn), we can find the values of p and q using an efficient algorithm). Solution: Using n = pq we have Also, assuming p > q, we have p 1)q 1) = φn) pq p q + 1 = φn) n p q + 1 = φn) q + p = n φn) + 1. q p) = q + p) 4pq p q = q + p) 4n Note that once we have determined the values of u = p + q and v = p q we have p = u+v and q = u v. ii) Show that, given that p q r for some fixed and fairly small value of r, we can find p and q. Solution: Suppose that p q = r with r fairly small. Since p + q) p q) = 4pq = 4n, it follows that p + q) is a perfect square between 4n and 4n + r, and that p q) = p + q) 4n. Since r is fairly small, there are not many such perfect squares. For each positive integer u with 4n < u 4r + r, we test to see if u 4n is a perfect square and if it is, say u 4n = v with v > 0, then we let p = u+v and q = u v and check to see whether pq = n. iii) Show that, given a Z with a = 1 mod n and a ±1 mod n, we can find p and q. Solution: Suppose we are given a Z with a = 1 mod n and a ±1 mod n. Since a = 1 mod n we have n a 1). Since p and q both divide n, and n divides a 1, it follows that p and q both divide a 1 = a + 1)a 1). Since p a + 1)a 1) and p is prime, either p a + 1) or p a 1). Similarly, either q a + 1) or q a 1). Note that p and q cannot both divide a + 1) because if we had p a + 1) and q a + 1) then we would have a = 1 mod p and a = 1 mod q and hence a = 1 mod n by the Chinese Remainder Theorem. Similarly, p and q cannot both divide a 1. Thus one of the primes p and q divides a + 1 and the other divides a 1. Let us say that p divides a + 1. Since p a + 1) and q a + 1) and n = pq it follows that p = gcda + 1, n), which we can calculate using the Euclidean Algorithm. Similarly, q = gcda 1, n). iv) Show that, given a Z which is a Fermat liar and a strong witness for n, we can find p and q. Solution: Suppose we are given a Fermat liar a which is a witness for n. Write n = s k with k odd. Since a is a Fermat liar we have a sk = a n 1 = 1 mod n. Since a is a witness for n we have a 0k = a k 1 mod n and a rk 1 mod n for all 0 r < s. Let t be the smallest positive integer such that a tk = 1 mod n and let b = a t 1k. Then b ±1 mod n and b = a tk = 1 mod n. Thus we can find p and q by the method of Part iii). b) Show that if many users choose a small value for their encryption key then the RSA scheme can be weak. To be specific, show that if A sends the same message m to three individuals B 1, B and B 3 who have public keys n i, e i ) which all use the same encryption key e i = 3, then an eavesdropper E who intercepts the three encrypted messages c i = m 3 mod n i can recover the original message m. Solution: Suppose that B 1, B and B have public keys n 1, e 1 ), n, e ) and n 3, e 3 ) with e 1 = e = e 3 = 3. Suppose, further, that the three numbers n 1, n and n 3 are distinct this additional assumption should have been indicated in the statement of the problem). Suppose that 0 m < n i for all i and that E knows the values of c i = m 3 mod n i for all i. Case 1: suppose that two of the numbers n i are not coprime, say gcdn 1, n ) 1. Since n 1 n and each of n 1 and n is a product of two primes, it follows that p = gcdn 1, n ) is a prime and that n 1 = pq 1 and n = pq where p, q 1, q are distinct primes. After finding p = gcdn 1, n ) using the Euclidean Algorithm, E obtains q 1 = n 1 /p and then E can calculate φ 1 = p 1)q 1 1), then d 1 = e 1 1 mod φ 1, then m = c 1 d 1 mod n 1. Case : suppose that all three of the numbers n 1, n and n 3 are coprime. Then E can solve the system of congruences x = c i mod n i, i = 1,, 3. If x = u is a solution then the general solution is x = u mod n 1 n n 3, so E can find the unique solution x = v with 0 v < n 1 n n 3. Since m 3 = c i mod n i for all i, we see that m 3 is a solution to the system, and since 0 m < n i for all i, we have 0 m 3 < n 1 n n 3, and so m 3 = v. Thus E can recover the message m by calculating the cubed root of v in Z say by using Newton s Method for finding cubed roots).

The security of RSA (part 1) The security of RSA (part 1)

The security of RSA (part 1) The security of RSA (part 1) The modulus n and its totient value φ(n) are known φ(n) = p q (p + q) + 1 = n (p + q) + 1 The modulus n and its totient value φ(n) are known φ(n) = p q (p + q) + 1 = n (p + q) + 1 i.e. q = (n φ(n) + 1)

More information

Number Theory and Group Theoryfor Public-Key Cryptography

Number Theory and Group Theoryfor Public-Key Cryptography Number Theory and Group Theory for Public-Key Cryptography TDA352, DIT250 Wissam Aoudi Chalmers University of Technology November 21, 2017 Wissam Aoudi Number Theory and Group Theoryfor Public-Key Cryptography

More information

Number Theory Proof Portfolio

Number Theory Proof Portfolio Number Theory Proof Portfolio Jordan Rock May 12, 2015 This portfolio is a collection of Number Theory proofs and problems done by Jordan Rock in the Spring of 2014. The problems are organized first by

More information

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology. MATH 501 Discrete Mathematics Lecture 6: Number theory Prof. Dr. Slim Abdennadher, slim.abdennadher@guc.edu.eg German University Cairo, Department of Media Engineering and Technology 1 Number theory Number

More information

SOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have

SOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have Exercise 23. (a) Solve the following congruences: (i) x 101 7 (mod 12) Answer. We have φ(12) = #{1, 5, 7, 11}. Since gcd(7, 12) = 1, we must have gcd(x, 12) = 1. So 1 12 x φ(12) = x 4. Therefore 7 12 x

More information

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93. Exercises Exercises 1. Determine whether each of these integers is prime. a) 21 b) 29 c) 71 d) 97 e) 111 f) 143 2. Determine whether each of these integers is prime. a) 19 b) 27 c) 93 d) 101 e) 107 f)

More information

Introduction to Public-Key Cryptosystems:

Introduction to Public-Key Cryptosystems: Introduction to Public-Key Cryptosystems: Technical Underpinnings: RSA and Primality Testing Modes of Encryption for RSA Digital Signatures for RSA 1 RSA Block Encryption / Decryption and Signing Each

More information

Homework #2 solutions Due: June 15, 2012

Homework #2 solutions Due: June 15, 2012 All of the following exercises are based on the material in the handout on integers found on the class website. 1. Find d = gcd(475, 385) and express it as a linear combination of 475 and 385. That is

More information

Applied Cryptography and Computer Security CSE 664 Spring 2017

Applied Cryptography and Computer Security CSE 664 Spring 2017 Applied Cryptography and Computer Security Lecture 11: Introduction to Number Theory Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline What we ve covered so far: symmetric

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand 1 Divisibility, prime numbers By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a

More information

Basic elements of number theory

Basic elements of number theory Cryptography Basic elements of number theory Marius Zimand By default all the variables, such as a, b, k, etc., denote integer numbers. Divisibility a 0 divides b if b = a k for some integer k. Notation

More information

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION Recall that RSA works as follows. A wants B to communicate with A, but without E understanding the transmitted message. To do so: A broadcasts RSA method,

More information

Elementary Number Theory MARUCO. Summer, 2018

Elementary Number Theory MARUCO. Summer, 2018 Elementary Number Theory MARUCO Summer, 2018 Problem Set #0 axiom, theorem, proof, Z, N. Axioms Make a list of axioms for the integers. Does your list adequately describe them? Can you make this list as

More information

4 Number Theory and Cryptography

4 Number Theory and Cryptography 4 Number Theory and Cryptography 4.1 Divisibility and Modular Arithmetic This section introduces the basics of number theory number theory is the part of mathematics involving integers and their properties.

More information

PMA225 Practice Exam questions and solutions Victor P. Snaith

PMA225 Practice Exam questions and solutions Victor P. Snaith PMA225 Practice Exam questions and solutions 2005 Victor P. Snaith November 9, 2005 The duration of the PMA225 exam will be 2 HOURS. The rubric for the PMA225 exam will be: Answer any four questions. You

More information

3 The fundamentals: Algorithms, the integers, and matrices

3 The fundamentals: Algorithms, the integers, and matrices 3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers

More information

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya BBM 205 Discrete Mathematics Hacettepe University http://web.cs.hacettepe.edu.tr/ bbm205 Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya Resources: Kenneth Rosen,

More information

A Readable Introduction to Real Mathematics

A Readable Introduction to Real Mathematics Solutions to selected problems in the book A Readable Introduction to Real Mathematics D. Rosenthal, D. Rosenthal, P. Rosenthal Chapter 7: The Euclidean Algorithm and Applications 1. Find the greatest

More information

Math 109 HW 9 Solutions

Math 109 HW 9 Solutions Math 109 HW 9 Solutions Problems IV 18. Solve the linear diophantine equation 6m + 10n + 15p = 1 Solution: Let y = 10n + 15p. Since (10, 15) is 5, we must have that y = 5x for some integer x, and (as we

More information

Integers and Division

Integers and Division Integers and Division Notations Z: set of integers N : set of natural numbers R: set of real numbers Z + : set of positive integers Some elements of number theory are needed in: Data structures, Random

More information

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II CS 5319 Advanced Discrete Structure Lecture 9: Introduction to Number Theory II Divisibility Outline Greatest Common Divisor Fundamental Theorem of Arithmetic Modular Arithmetic Euler Phi Function RSA

More information

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635 COMP239: Mathematics for Computer Science II Prof. Chadi Assi assi@ciise.concordia.ca EV7.635 The Euclidean Algorithm The Euclidean Algorithm Finding the GCD of two numbers using prime factorization is

More information

Carmen s Core Concepts (Math 135)

Carmen s Core Concepts (Math 135) Carmen s Core Concepts (Math 135) Carmen Bruni University of Waterloo Week 8 1 The following are equivalent (TFAE) 2 Inverses 3 More on Multiplicative Inverses 4 Linear Congruence Theorem 2 [LCT2] 5 Fermat

More information

4 Powers of an Element; Cyclic Groups

4 Powers of an Element; Cyclic Groups 4 Powers of an Element; Cyclic Groups Notation When considering an abstract group (G, ), we will often simplify notation as follows x y will be expressed as xy (x y) z will be expressed as xyz x (y z)

More information

Notes on Systems of Linear Congruences

Notes on Systems of Linear Congruences MATH 324 Summer 2012 Elementary Number Theory Notes on Systems of Linear Congruences In this note we will discuss systems of linear congruences where the moduli are all different. Definition. Given the

More information

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z. Math 3, Fall 010 Assignment 3 Solutions Exercise 1. Find all the integral solutions of the following linear diophantine equations. Be sure to justify your answers. (i) 3x + y = 7. (ii) 1x + 18y = 50. (iii)

More information

Ma/CS 6a Class 4: Primality Testing

Ma/CS 6a Class 4: Primality Testing Ma/CS 6a Class 4: Primality Testing By Adam Sheffer Reminder: Euler s Totient Function Euler s totient φ(n) is defined as follows: Given n N, then φ n = x 1 x < n and GCD x, n = 1. In more words: φ n is

More information

Public Key Cryptography

Public Key Cryptography Public Key Cryptography Spotlight on Science J. Robert Buchanan Department of Mathematics 2011 What is Cryptography? cryptography: study of methods for sending messages in a form that only be understood

More information

1. Algebra 1.7. Prime numbers

1. Algebra 1.7. Prime numbers 1. ALGEBRA 30 1. Algebra 1.7. Prime numbers Definition Let n Z, with n 2. If n is not a prime number, then n is called a composite number. We look for a way to test if a given positive integer is prime

More information

MATH 145 Algebra, Solutions to Assignment 4

MATH 145 Algebra, Solutions to Assignment 4 MATH 145 Algebra, Solutions to Assignment 4 1: a Let a 975 and b161 Find d gcda, b and find s, t Z such that as + bt d Solution: The Euclidean Algorithm gives 161 975 1 + 86, 975 86 3 + 117, 86 117 + 5,

More information

Chapter 2. Divisibility. 2.1 Common Divisors

Chapter 2. Divisibility. 2.1 Common Divisors Chapter 2 Divisibility 2.1 Common Divisors Definition 2.1.1. Let a and b be integers. A common divisor of a and b is any integer that divides both a and b. Suppose that a and b are not both zero. By Proposition

More information

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. INTEGERS PETER MAYR (MATH 2001, CU BOULDER) In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes. 1. Divisibility Definition. Let a, b

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 8 February 1, 2012 CPSC 467b, Lecture 8 1/42 Number Theory Needed for RSA Z n : The integers mod n Modular arithmetic GCD Relatively

More information

Elementary Number Theory Review. Franz Luef

Elementary Number Theory Review. Franz Luef Elementary Number Theory Review Principle of Induction Principle of Induction Suppose we have a sequence of mathematical statements P(1), P(2),... such that (a) P(1) is true. (b) If P(k) is true, then

More information

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element. The first exam will be on Monday, June 8, 202. The syllabus will be sections. and.2 in Lax, and the number theory handout found on the class web site, plus the handout on the method of successive squaring

More information

Theory of RSA. Hiroshi Toyoizumi 1. December 8,

Theory of RSA. Hiroshi Toyoizumi 1. December 8, Theory of RSA Hiroshi Toyoizumi 1 December 8, 2005 1 E-mail: toyoizumi@waseda.jp 2 Introduction This is brief introduction of number theory related to the so-called RSA cryptography. This handout is based

More information

Iterated Encryption and Wiener s attack on RSA

Iterated Encryption and Wiener s attack on RSA Iterated Encryption Euler s function Euler s function: φ(n) = {1 x n : gcd(x, n) = 1} Theorem (Euler) If n is a positive integer and m is a positive integer coprime to n then m φ(n) mod n = 1. Iterated

More information

Chuck Garner, Ph.D. May 25, 2009 / Georgia ARML Practice

Chuck Garner, Ph.D. May 25, 2009 / Georgia ARML Practice Some Chuck, Ph.D. Department of Mathematics Rockdale Magnet School for Science Technology May 25, 2009 / Georgia ARML Practice Outline 1 2 3 4 Outline 1 2 3 4 Warm-Up Problem Problem Find all positive

More information

Simultaneous Linear, and Non-linear Congruences

Simultaneous Linear, and Non-linear Congruences Simultaneous Linear, and Non-linear Congruences CIS002-2 Computational Alegrba and Number Theory David Goodwin david.goodwin@perisic.com 09:00, Friday 18 th November 2011 Outline 1 Polynomials 2 Linear

More information

Number Theory Solutions Packet

Number Theory Solutions Packet Number Theory Solutions Pacet 1 There exist two distinct positive integers, both of which are divisors of 10 10, with sum equal to 157 What are they? Solution Suppose 157 = x + y for x and y divisors of

More information

Discrete Mathematics with Applications MATH236

Discrete Mathematics with Applications MATH236 Discrete Mathematics with Applications MATH236 Dr. Hung P. Tong-Viet School of Mathematics, Statistics and Computer Science University of KwaZulu-Natal Pietermaritzburg Campus Semester 1, 2013 Tong-Viet

More information

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory. CSS322: Security and Cryptography Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 29 December 2011 CSS322Y11S2L06, Steve/Courses/2011/S2/CSS322/Lectures/number.tex,

More information

LINEAR CONGRUENCES AND LINEAR DIOPHANTINE EQUATIONS

LINEAR CONGRUENCES AND LINEAR DIOPHANTINE EQUATIONS LINEAR CONGRUENCES AND LINEAR DIOPHANTINE EQUATIONS MATH 422, CSUSM. SPRING 2009. AITKEN This document discusses methods and results related to solving linear congruences and linear Diophantine equations.

More information

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1

More information

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove

More information

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

Math From Scratch Lesson 20: The Chinese Remainder Theorem

Math From Scratch Lesson 20: The Chinese Remainder Theorem Math From Scratch Lesson 20: The Chinese Remainder Theorem W. Blaine Dowler January 2, 2012 Contents 1 Relatively Prime Numbers 1 2 Congruence Classes 1 3 Algebraic Units 2 4 Chinese Remainder Theorem

More information

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru Number Theory Marathon Mario Ynocente Castro, National University of Engineering, Peru 1 2 Chapter 1 Problems 1. (IMO 1975) Let f(n) denote the sum of the digits of n. Find f(f(f(4444 4444 ))). 2. Prove

More information

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL

NUMBER THEORY AND CODES. Álvaro Pelayo WUSTL NUMBER THEORY AND CODES Álvaro Pelayo WUSTL Talk Goal To develop codes of the sort can tell the world how to put messages in code (public key cryptography) only you can decode them Structure of Talk Part

More information

CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 14 October 23, 2017 CPSC 467, Lecture 14 1/42 Computing in Z n Modular multiplication Modular inverses Extended Euclidean algorithm

More information

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer. CHAPTER 2 INTRODUCTION TO NUMBER THEORY ANSWERS TO QUESTIONS 2.1 A nonzero b is a divisor of a if a = mb for some m, where a, b, and m are integers. That is, b is a divisor of a if there is no remainder

More information

Ma/CS 6a Class 2: Congruences

Ma/CS 6a Class 2: Congruences Ma/CS 6a Class 2: Congruences 1 + 1 5 (mod 3) By Adam Sheffer Reminder: Public Key Cryptography Idea. Use a public key which is used for encryption and a private key used for decryption. Alice encrypts

More information

ASSIGNMENT Use mathematical induction to show that the sum of the cubes of three consecutive non-negative integers is divisible by 9.

ASSIGNMENT Use mathematical induction to show that the sum of the cubes of three consecutive non-negative integers is divisible by 9. ASSIGNMENT 1 1. Use mathematical induction to show that the sum of the cubes of three consecutive non-negative integers is divisible by 9. 2. (i) If d a and d b, prove that d (a + b). (ii) More generally,

More information

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1 MATH 4400 SOLUTIONS TO SOME EXERCISES 1.1.3. If a b and b c show that a c. 1. Chapter 1 Solution: a b means that b = na and b c that c = mb. Substituting b = na gives c = (mn)a, that is, a c. 1.2.1. Find

More information

Math 312/ AMS 351 (Fall 17) Sample Questions for Final

Math 312/ AMS 351 (Fall 17) Sample Questions for Final Math 312/ AMS 351 (Fall 17) Sample Questions for Final 1. Solve the system of equations 2x 1 mod 3 x 2 mod 7 x 7 mod 8 First note that the inverse of 2 is 2 mod 3. Thus, the first equation becomes (multiply

More information

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE CPSC 467a: Cryptography and Computer Security Notes 13 (rev. 2) Professor M. J. Fischer October 22, 2008 53 Chinese Remainder Theorem Lecture Notes 13 We

More information

1 Overview and revision

1 Overview and revision MTH6128 Number Theory Notes 1 Spring 2018 1 Overview and revision In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction

More information

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2000 2013 Contents 9 Introduction to Number Theory 63 9.1 Subgroups

More information

Number theory. Myrto Arapinis School of Informatics University of Edinburgh. October 9, /29

Number theory. Myrto Arapinis School of Informatics University of Edinburgh. October 9, /29 Number theory Myrto Arapinis School of Informatics University of Edinburgh October 9, 2014 1/29 Division Definition If a and b are integers with a 6= 0, then a divides b if there exists an integer c such

More information

CISC-102 Fall 2017 Week 6

CISC-102 Fall 2017 Week 6 Week 6 page 1! of! 15 CISC-102 Fall 2017 Week 6 We will see two different, yet similar, proofs that there are infinitely many prime numbers. One proof would surely suffice. However, seeing two different

More information

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences. Congruences Let n be a postive integer. The integers a and b are called congruent modulo n if they have the same

More information

Some Facts from Number Theory

Some Facts from Number Theory Computer Science 52 Some Facts from Number Theory Fall Semester, 2014 These notes are adapted from a document that was prepared for a different course several years ago. They may be helpful as a summary

More information

Mathematical Foundations of Public-Key Cryptography

Mathematical Foundations of Public-Key Cryptography Mathematical Foundations of Public-Key Cryptography Adam C. Champion and Dong Xuan CSE 4471: Information Security Material based on (Stallings, 2006) and (Paar and Pelzl, 2010) Outline Review: Basic Mathematical

More information

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = ,

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = , Solution Sheet 2 1. (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = 3. 2. (i) gcd (97, 157) = 1 = 34 97 21 157, (ii) gcd (527, 697) = 17 = 4 527 3 697, (iii) gcd (2323, 1679) =

More information

Chapter 3 Basic Number Theory

Chapter 3 Basic Number Theory Chapter 3 Basic Number Theory What is Number Theory? Well... What is Number Theory? Well... Number Theory The study of the natural numbers (Z + ), especially the relationship between different sorts of

More information

An Introduction to Mathematical Thinking: Algebra and Number Systems. William J. Gilbert and Scott A. Vanstone, Prentice Hall, 2005

An Introduction to Mathematical Thinking: Algebra and Number Systems. William J. Gilbert and Scott A. Vanstone, Prentice Hall, 2005 Chapter 2 Solutions An Introduction to Mathematical Thinking: Algebra and Number Systems William J. Gilbert and Scott A. Vanstone, Prentice Hall, 2005 Solutions prepared by William J. Gilbert and Alejandro

More information

Applied Cryptography and Computer Security CSE 664 Spring 2018

Applied Cryptography and Computer Security CSE 664 Spring 2018 Applied Cryptography and Computer Security Lecture 12: Introduction to Number Theory II Department of Computer Science and Engineering University at Buffalo 1 Lecture Outline This time we ll finish the

More information

ECE596C: Handout #11

ECE596C: Handout #11 ECE596C: Handout #11 Public Key Cryptosystems Electrical and Computer Engineering, University of Arizona, Loukas Lazos Abstract In this lecture we introduce necessary mathematical background for studying

More information

Generalized Splines. Madeline Handschy, Julie Melnick, Stephanie Reinders. Smith College. April 1, 2013

Generalized Splines. Madeline Handschy, Julie Melnick, Stephanie Reinders. Smith College. April 1, 2013 Smith College April 1, 213 What is a Spline? What is a Spline? are used in engineering to represent objects. What is a Spline? are used in engineering to represent objects. What is a Spline? are used

More information

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald) 1 Euclid s Algorithm Euclid s Algorithm for computing the greatest common divisor belongs to the oldest known computing procedures

More information

Ma/CS 6a Class 4: Primality Testing

Ma/CS 6a Class 4: Primality Testing Ma/CS 6a Class 4: Primality Testing By Adam Sheffer Send anonymous suggestions and complaints from here. Email: adamcandobetter@gmail.com Password: anonymous2 There aren t enough crocodiles in the presentations

More information

CPSC 467b: Cryptography and Computer Security

CPSC 467b: Cryptography and Computer Security CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 9 February 14, 2013 CPSC 467b, Lecture 9 1/42 Integer Division (cont.) Relatively prime numbers, Z n, and φ(n) Computing in Z n

More information

Number Theory A focused introduction

Number Theory A focused introduction Number Theory A focused introduction This is an explanation of RSA public key cryptography. We will start from first principles, but only the results that are needed to understand RSA are given. We begin

More information

CMPUT 403: Number Theory

CMPUT 403: Number Theory CMPUT 403: Number Theory Zachary Friggstad February 26, 2016 Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Factoring Theorem (Fundamental

More information

Number theory (Chapter 4)

Number theory (Chapter 4) EECS 203 Spring 2016 Lecture 10 Page 1 of 8 Number theory (Chapter 4) Review Questions: 1. Does 5 1? Does 1 5? 2. Does (129+63) mod 10 = (129 mod 10)+(63 mod 10)? 3. Does (129+63) mod 10 = ((129 mod 10)+(63

More information

Introduction to Number Theory

Introduction to Number Theory Introduction to Number Theory CS1800 Discrete Structures; notes by Virgil Pavlu 1 modulo arithmetic All numbers here are integers. The integer division of a at n > 1 means finding the unique quotient q

More information

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is LARGE PRIME NUMBERS 1. Fermat Pseudoprimes Fermat s Little Theorem states that for any positive integer n, if n is prime then b n % n = b for b = 1,..., n 1. In the other direction, all we can say is that

More information

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography David R. Wilkins Copyright c David R. Wilkins 2006 Contents 9 Introduction to Number Theory and Cryptography 1 9.1 Subgroups

More information

Number Theory Math 420 Silverman Exam #1 February 27, 2018

Number Theory Math 420 Silverman Exam #1 February 27, 2018 Name: Number Theory Math 420 Silverman Exam #1 February 27, 2018 INSTRUCTIONS Read Carefully Time: 50 minutes There are 5 problems. Write your name neatly at the top of this page. Write your final answer

More information

CS2800 Questions selected for fall 2017

CS2800 Questions selected for fall 2017 Discrete Structures Final exam sample questions Solutions CS2800 Questions selected for fall 2017 1. Determine the prime factorizations, greatest common divisor, and least common multiple of the following

More information

The Chinese Remainder Theorem

The Chinese Remainder Theorem Chapter 5 The Chinese Remainder Theorem 5.1 Coprime moduli Theorem 5.1. Suppose m, n N, and gcd(m, n) = 1. Given any remainders r mod m and s mod n we can find N such that N r mod m and N s mod n. Moreover,

More information

a the relation arb is defined if and only if = 2 k, k

a the relation arb is defined if and only if = 2 k, k DISCRETE MATHEMATICS Past Paper Questions in Number Theory 1. Prove that 3k + 2 and 5k + 3, k are relatively prime. (Total 6 marks) 2. (a) Given that the integers m and n are such that 3 (m 2 + n 2 ),

More information

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2, SOLUTIONS TO PROBLEM SET 1 Section 1.3 Exercise 4. We see that 1 1 2 = 1 2, 1 1 2 + 1 2 3 = 2 3, 1 1 2 + 1 2 3 + 1 3 4 = 3 4, and is reasonable to conjecture n k=1 We will prove this formula by induction.

More information

1. multiplication is commutative and associative;

1. multiplication is commutative and associative; Chapter 4 The Arithmetic of Z In this chapter, we start by introducing the concept of congruences; these are used in our proof (going back to Gauss 1 ) that every integer has a unique prime factorization.

More information

Chapter 8 Public-key Cryptography and Digital Signatures

Chapter 8 Public-key Cryptography and Digital Signatures Chapter 8 Public-key Cryptography and Digital Signatures v 1. Introduction to Public-key Cryptography 2. Example of Public-key Algorithm: Diffie- Hellman Key Exchange Scheme 3. RSA Encryption and Digital

More information

LECTURE NOTES IN CRYPTOGRAPHY

LECTURE NOTES IN CRYPTOGRAPHY 1 LECTURE NOTES IN CRYPTOGRAPHY Thomas Johansson 2005/2006 c Thomas Johansson 2006 2 Chapter 1 Abstract algebra and Number theory Before we start the treatment of cryptography we need to review some basic

More information

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions Warm-up Problems 1. What is a prime number? Give an example of an even prime number and an odd prime number. A prime number

More information

Introduction to Number Theory

Introduction to Number Theory INTRODUCTION Definition: Natural Numbers, Integers Natural numbers: N={0,1,, }. Integers: Z={0,±1,±, }. Definition: Divisor If a Z can be writeen as a=bc where b, c Z, then we say a is divisible by b or,

More information

10 Problem 1. The following assertions may be true or false, depending on the choice of the integers a, b 0. a "

10 Problem 1. The following assertions may be true or false, depending on the choice of the integers a, b 0. a Math 4161 Dr. Franz Rothe December 9, 2013 13FALL\4161_fall13f.tex Name: Use the back pages for extra space Final 70 70 Problem 1. The following assertions may be true or false, depending on the choice

More information

Number Theory Notes Spring 2011

Number Theory Notes Spring 2011 PRELIMINARIES The counting numbers or natural numbers are 1, 2, 3, 4, 5, 6.... The whole numbers are the counting numbers with zero 0, 1, 2, 3, 4, 5, 6.... The integers are the counting numbers and zero

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Jan Stelovsky based on slides by Dr. Baek and Dr. Still Originals by Dr. M. P. Frank and Dr. J.L. Gross Provided by

More information

Congruence of Integers

Congruence of Integers Congruence of Integers November 14, 2013 Week 11-12 1 Congruence of Integers Definition 1. Let m be a positive integer. For integers a and b, if m divides b a, we say that a is congruent to b modulo m,

More information

MATH 361: NUMBER THEORY FOURTH LECTURE

MATH 361: NUMBER THEORY FOURTH LECTURE MATH 361: NUMBER THEORY FOURTH LECTURE 1. Introduction Everybody knows that three hours after 10:00, the time is 1:00. That is, everybody is familiar with modular arithmetic, the usual arithmetic of the

More information

Math.3336: Discrete Mathematics. Mathematical Induction

Math.3336: Discrete Mathematics. Mathematical Induction Math.3336: Discrete Mathematics Mathematical Induction Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall 2018

More information

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2 Contents 1 Recommended Reading 1 2 Public Key/Private Key Cryptography 1 2.1 Overview............................................. 1 2.2 RSA Algorithm.......................................... 2 3 A Number

More information

Number theory (Chapter 4)

Number theory (Chapter 4) EECS 203 Spring 2016 Lecture 12 Page 1 of 8 Number theory (Chapter 4) Review Compute 6 11 mod 13 in an efficient way What is the prime factorization of 100? 138? What is gcd(100, 138)? What is lcm(100,138)?

More information

Solutions to Practice Final 3

Solutions to Practice Final 3 s to Practice Final 1. The Fibonacci sequence is the sequence of numbers F (1), F (2),... defined by the following recurrence relations: F (1) = 1, F (2) = 1, F (n) = F (n 1) + F (n 2) for all n > 2. For

More information

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

Ma/CS 6a Class 2: Congruences

Ma/CS 6a Class 2: Congruences Ma/CS 6a Class 2: Congruences 1 + 1 5 (mod 3) By Adam Sheffer Reminder: Public Key Cryptography Idea. Use a public key which is used for encryption and a private key used for decryption. Alice encrypts

More information

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime. PUTNAM TRAINING NUMBER THEORY (Last updated: December 11, 2017) Remark. This is a list of exercises on Number Theory. Miguel A. Lerma Exercises 1. Show that the sum of two consecutive primes is never twice

More information