Math 430 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS

Similar documents
Number Theory Proof Portfolio

MATH 310: Homework 7

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 = ,

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

HOMEWORK 11 MATH 4753

Math 109 HW 9 Solutions

Elementary Number Theory MARUCO. Summer, 2018

Math 223, Spring 2009 Final Exam Solutions

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

AN ALGEBRAIC PROOF OF RSA ENCRYPTION AND DECRYPTION

Math 324, Fall 2011 Assignment 7 Solutions. 1 (ab) γ = a γ b γ mod n.

Homework #2 solutions Due: June 15, 2012

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

Solving the general quadratic congruence. y 2 Δ (mod p),

In fact, 3 2. It is not known whether 3 1. All three problems seem hard, although Shor showed that one can solve 3 quickly on a quantum computer.

Implementation Tutorial on RSA

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

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?

Math 261 Spring 2014 Final Exam May 5, 2014

MATH 115: ERRATA IN ELEMENTARY NUMBER THEORY, FOURTH EDITION BY KENNETH H. ROSEN

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?

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

Elementary Number Theory Review. Franz Luef

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

MATH 3240Q Introduction to Number Theory Homework 5

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

One can use elliptic curves to factor integers, although probably not RSA moduli.

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

Solutions to Practice Final 3

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

Math.3336: Discrete Mathematics. Mathematical Induction

Integers and Division

ECE596C: Handout #11

DM49-2. Obligatoriske Opgave

Week 7 An Application to Cryptography

Public Key Cryptography

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

School of Mathematics

Winter Camp 2009 Number Theory Tips and Tricks

Network Security Technology Spring, 2018 Tutorial 3, Week 4 (March 23) Due Date: March 30

Name: There are 8 questions on 13 pages, including this cover.

Introduction to Number Theory

A Readable Introduction to Real Mathematics

Number Theory and Algebra: A Brief Introduction

Wilson s Theorem and Fermat s Little Theorem

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

COMP424 Computer Security

Public-Key Cryptosystems CHAPTER 4

Solution to Midterm Examination

Advanced Number Theory Note #8: Dirichlet's theorem on primes in arithmetic progressions 29 August 2012 at 19:01

The Vigenère cipher is a stronger version of the Caesar cipher The encryption key is a word/sentence/random text ( and )

CIS 6930/4930 Computer and Network Security. Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography

Homework Problems, Math 134, Spring 2007 (Robert Boltje)

Congruence of Integers

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used.

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

Fermat s Little Theorem. Fermat s little theorem is a statement about primes that nearly characterizes them.

10 Public Key Cryptography : RSA

Cryptography. pieces from work by Gordon Royle

3.2 Solving linear congruences. v3

Solutions to the Midterm Test (March 5, 2011)

AN INTRODUCTION TO THE UNDERLYING COMPUTATIONAL PROBLEM OF THE ELGAMAL CRYPTOSYSTEM

Cryptography. P. Danziger. Transmit...Bob...

Number Theory. Final Exam from Spring Solutions

Fall 2017 September 20, Written Homework 02

RSA Algorithm. Factoring, EulerPhi, Breaking RSA. Çetin Kaya Koç Spring / 14

Math 299 Supplement: Modular Arithmetic Nov 8, 2013

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

PMA225 Practice Exam questions and solutions Victor P. Snaith

Today. Polynomials. Secret Sharing.

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

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

CPE 776:DATA SECURITY & CRYPTOGRAPHY. Some Number Theory and Classical Crypto Systems

Chapter 8. Introduction to Number Theory

(Primes and) Squares modulo p

MATH 145 Algebra, Solutions to Assignment 4

Math Circles Cryptography

For your quiz in recitation this week, refer to these exercise generators:

COMP4109 : Applied Cryptography

Powers in Modular Arithmetic, and RSA Public Key Cryptography

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

University of Regina Department of Mathematics & Statistics Final Examination (April 21, 2009)

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2,

Lecture Notes, Week 6

MONOALPHABETIC CIPHERS AND THEIR MATHEMATICS. CIS 400/628 Spring 2005 Introduction to Cryptography

Discrete Mathematics with Applications MATH236

M381 Number Theory 2004 Page 1

Practice Assignment 2 Discussion 24/02/ /02/2018

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

Introduction to Modern Cryptography. Benny Chor

Number Theory Notes Spring 2011

ECE 646 Lecture 5. Mathematical Background: Modular Arithmetic

MATH3302 Cryptography Problem Set 2

10 Modular Arithmetic and Cryptography

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

Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 1, 2013

Number Theory Homework.

Executive Assessment. Executive Assessment Math Review. Section 1.0, Arithmetic, includes the following topics:

} has dimension = k rank A > 0 over F. For any vector b!

NUMBER THEORY FOR CRYPTOGRAPHY

Transcription:

Math 40 Midterm II Review Packet Spring 2018 SOLUTIONS TO PRACTICE PROBLEMS WARNING: Remember, it s best to rely as little as possible on my solutions. Therefore, I urge you to try the problems on your own first, using as little outside resources as possible and perhaps even timing yourself, before consulting the solutions I ve prepared below. Problem 1. Compute φ(8800), φ(1512), and φ(1000000). SOLUTION: We apply Theorem 7. to calculate these: φ(8800) φ(2 5 5 2 11) 8800(1 1 2 )(1 1 5 )(1 1 11 ) 8800 1 2 4 5 10 11 200. φ(1512) φ(2 7) 1512(1 1 2 )(1 1 )(1 1 7 ) 1512 1 2 2 6 7 42. φ(1000000) φ(2 6 5 6 ) 1000000 (1 1 2 )(1 1 5 ) 1000000 1 2 4 5 400000. Problem 2. (a): Find all values of n such that φ(n) n/6. SOLUTION: From Theorem 7., if the prime factorization of n is n p a1 1 pa2 2 pa k k, (where each a i is a positive integer and all of the p i are distinct primes) then which we set equal to n/6. Thus, we must have φ(n) n(1 1 p 1 )(1 1 p 2 ) (1 1 p k ), 1 6 (1 1 p 1 )(1 1 p 2 ) (1 1 p k ). If we obtain common denominators on the right hand side and then cross multiply, this becomes p 1 p 2 p k 6(p 1 1)(p 2 1) (p k 1). Since the right side contains factors of both 2 and, so must the left side. Thus, assume that p 1 2 and p 2. Then the equation becomes 6p p k 6 (2 1)( 1)(p 1) (p k 1), which simplifies to p p k 2(p 1) (p k 1).

This implies that one of p, p 4,..., p k must be 2, contradicting the assumption that the p i are distinct primes. Thus, we conclude that φ(n) n/6 is impossible. There are no values of n for which this is true. (b): Find at least 5 different numbers n such that φ(n) 160. How many more can you find? SOLUTION: Note that 160 16 10 φ(17) φ(11) φ(187). Likewise, we have We also have And We have also 160 16 10 1 φ(17) φ(11) φ(2) φ(74). 160 4 40 φ(5) φ(41) φ(205). 160 4 40 1 φ(5) φ(41) φ(2) φ(410). 160 4 40 φ(8) φ(41) φ(28). We can find lots more, for example, by finding other integers k relatively prime to 41, such that φ(k) 4, for then φ(41k) 160. (c): What can you say about n if the value of φ(n) is a prime number? SOLUTION: We have seen in Theorem 7.4 that φ(n) must be even for all n. Thus, if φ(n) is prime, we must have φ(n) 2. Write n p a1 1 pa2 2 pa k, so that we deduce that 2 φ(n) n(1 1 p 1 )(1 1 p 2 ) (1 1 p k ). Finding common denominators and cross multiplying, we find that 2p 1 p 2 p k n(p 1 1)(p 2 1) (p k 1) p a1 1 pa2 2 pa k k (p 1 1)(p 2 1) (p k 1) k and so 2 p a1 1 1 p a2 1 2 p a k 1 k (p 1 1)(p 2 1) (p k 1). From this equation, note that no p i can be >. Thus k 2. If k 2, then we may assume that p 1 2 and p 2, which forces a 1 a 2 1, and so n 6. On the other hand, if k 1, then if p 1 2, we have a 1 2, so n 2 2 4. But if p 1, then we have a 1 1, so n. So our conclusion is that n, 4 or 6. Problem. Find all solutions x to the congruence (a): 5x 11 x+1 (mod 1)

SOLUTION: We compute the index on each side of this equation. This gives us 5x ind r () (x + 1) ind r (11) (mod 12). Next, we must choose a primitive root of 1. It is easily seen that 2 is such a primitive root (since its order is 12). So we must find the index (base 2) of and of 11. Since 2 4 (mod 1), ind 2 () 4. And since 2 7 11 (mod 1), ind 2 (11) 7. Plugging these values into the congruence above gives: 20x 7(x + 1) 9x + 7 (mod 12). Thus, 11x 7 (mod 12). Thus, x 7 5 (mod 12). So we have x 5, 17, 29,.... (b): 5x 2 18 (mod 7) SOLUTION: Let us start by multiplying the congruence through by the multiplicative inverse of 5. From the Euclidean Algorithm, we see that this inverse is 15. Multiplying through by 15, the congruence becomes x 2 11 (mod 7). We compute the index on each side of the equation: 2 ind r (x) ind r (11) (mod 6). Again we see that a primitive root is r 2 (this can be checked from Table 1 of the text, for instance). Using a TI-92, we find that ind 2 (11) 0. So we have 2 ind 2 (x) 0 (mod 6). Using the Euclidean Algorithm, we find that the multiplicative inverse of 2 (mod 6) is 11, so we multiply the previous equation by that: So This generates all solutions for x. ind 2 (x) 6 (mod 6). x 2 6 64 27 (mod 7). Problem 4. Decode the following message, which was sent using the modulus n 7081 and the exponent e 1789: 5192 2604 4222 SOLUTION: We factor 7081 7 97. So we must find the decryption key d from the fact that ed 1 (mod 72 96 6912)

Using the Euclidean Algorithm, we find that d 85 (mod 6912). So we must find C 85 (mod 7081) to recover the original message. We have 5192 85 1615 (mod 7081) 2604 85 282 (mod 7081) 4222 85 110 (mod 7081). So the original message (in numeric form) is 1615 282 110. Problem 5. Does the congruence x 2 + 14x 5 0 ( mod 7) have a solution? What about the congruence x 2 x 1 0 ( mod 1957) SOLUTION: In converting the quadratic congruence to the form y 2 d (mod p), we must simply determine whether d is a quadratic residue modulo p or not, where d b 2 4ac. In the first equation, a 1, b 14, c 5, so d 14 2 4(1)( 5) 6. So we must compute ( ) 6 7 so the quadratic congruence does have a solution. ( ) 1 7 In the latter case, we have d b 2 4ac ( ) 2 4(1)( 1) 1, so we must compute ( ) ( ) ( ) ( ) ( ) 1 1957 1 1 1, 1957 1 1 so this quadratic congruence also has a solution. Problem 6. Compute the following Legendre symbols (see if you can derive them in several ways!): (a): ( ) 72 29 1, SOLUTION: We have ( ) ( ) 72 2 1, 29 29 according to Theorem 9.6. (b): ( ) 60 79 SOLUTION: We have ( ) ( ) 60 15 79 79 ( ) ( ) 5 [ 79 79 ( ) 79 ] ( ) 79 [ 5 ( ) 1 ] ( ) 1 1 1 1. 5

(c): ( ) 6 11 SOLUTION: We have ( ) ( ) 6 7 11 11 (d): ( ) 55 179 SOLUTION: We have ( ) ( ) ( ) 55 5 11 179 179 179 ( 179 5 ) [ ( ) 179 ] 11 ( ) 11 7 ( ) 1 1. 7 ( ) ( ) 1 [ ] 5 11 ( ) 11 ( ) 2 1. (e): ( ) 760 SOLUTION: We have ( ) 760 ( 1 ) ( ) 121 ( ) ( ) ( ) 1 7 1 121 121 ( 1 ( 1 ) ( 121 7 ) ( ) ( ) ( ) 91 121 1 121 ) ( ) 121 1 ( ) ( ) 2 4 1. 7 1 Problem 7. Find all positive integers less than 89 having order 11, modulo 89. Repeat for order 4. SOLUTION: We begin by trying to find a primitive root of 89, which would be an integer r with order φ(89) 88. Note that 2 11 1 (mod 89), so 2 is not a primitive root of 89. However, it can be quickly checked that if we raise to the powers 1,2,4,8,11,22, and 44, none of them is 1 (mod 89), and hence is a primitive root. So any element of order 11 would have the form h, such that 88 gcd(h, 88) 11. Hence, we must have gcd(h, 88) 8, which means that we must have h 8, 16, 24, 2, 40, 48, 56, 64, 72, 80. So the integers less than 89 having order 11 modulo 89 are 8, 16, 24, 2, 40, 48, 56, 64, 72, 80, which can all be reduced modulo 89 to give us integers < 89. For order 4, we are simply asking for gcd(h, 88) 22, which requires h 22 or h 66. Thus, 22 and 66 reduce modulo 89 to integers < 89 with order 4. Problem 8. Prove that if p > 5 is prime, then the product of all primitive roots of p is congruent to 1 modulo p. [Hint: How many primitive roots does p have?]

SOLUTION: All primitive roots of p can be written in the form r k, where r is a fixed primitive root and k is an exponent that is relatively prime with p 1. So we are asked to compute the product r k r {k:gcd(k,p 1)1}, {k:gcd(k,p 1)1} and, modulo p 1, the sum in the previous exponent is 0 (since gcd(k, p 1) gcd( k, p 1) gcd(p 1 k, p 1), so these terms cancel out, modulo p 1). That is, the power of r that appears as a summation is a multiple of p 1. Since we already know that r p 1 1 (mod p), we know also that r {k:gcd(k,p 1)1} 1 (mod p), as desired. [NOTE: Try this one out for p 11 or p 1 directly to help you see what s going on!] Problem 9. Prove that if p (mod 4) and a is a quadratic residue of p, then x a (p+1)/4 is a solution to the congruence x 2 a ( mod p). SOLUTION: Write p 4k + for some integer k. Then if we let x a (p+1)/4, we have x 2 a (p+1)/2 a (4k+4)/2 a 2k+2 a a 2k+1 a a (p 1)/2 a ( mod p), where we have used the fact that a (p 1)/2 1 (mod p) by Euler s Criterion for a quadratic residue. Problem 10. Suppose that q is a prime number that is congruent to 1 modulo 4, and suppose that the number p 2q + 1 is also a prime number. Show that 2 is a primitive root modulo p. SOLUTION: Write q 4k + 1 for some integer k. Then p 2q + 1 2(4k + 1) + 1 8k +. We wish to show that 2 has order p 1 2q, modulo p. Suppose, to the contrary, that 2 has order < 2q, modulo p. Then the order of 2 is either 1, 2 or q. But 2 1 1 (mod p) and 2 2 1 (mod p), since p 11 (since q 5). Finally, suppose that 2 has order q (mod p). Then 1 2 q 2 (p 1)/2 (mod p), which implies by Euler s Criterion that 2 is a quadratic residue of p. That is, ( ) 2 1. p However, by Theorem 9.6, we know that since p has the form 8k +, ( ) 2 1. p So we have reached a contradiction in this case as well. We conclude that 2 has order 2q, and hence is a primitive root of p.

Problem 11. If a and b satisfy the relation ab 1 (mod p), how are the indices ind r (a) and ind r (b) related? SOLUTION: Taking the index ind r of both sides of the congruence yields or which means that ind r (ab) ind r (1) (mod p 1 ), ind r (a) + ind r (b) 0 (mod p 1 ), ind r (a) ind r (b) (mod p 1 ). Problem 12. In a lengthy ciphertext message, sent using a linear cipher C ap + b (mod 26), the most frequently occurring letter is Q and the second most frequent is J. Write out the plaintext for the intercepted message WCPQ JZQO MX. SOLUTION: The answer is GIVE THEM UP.