Assignment 2. Due: Monday Oct. 15, :59pm

Similar documents
b) Find all positive integers smaller than 200 which leave remainder 1, 3, 4 upon division by 3, 5, 7 respectively.

Solutions for the Practice Questions

Final exam. Question Points Score. Total: 150

University of British Columbia. Math 312, Midterm, 6th of June 2017

NUMBER THEORY AMIN WITNO

Solutions for the Practice Final

CHAPTER 2. Modular Arithmetic

SOLUTIONS TO PROBLEM SET 5. Section 9.1

Sheet 1: Introduction to prime numbers.

Discrete Mathematics & Mathematical Reasoning Multiplicative Inverses and Some Cryptography

Data security (Cryptography) exercise book

The congruence relation has many similarities to equality. The following theorem says that congruence, like equality, is an equivalence relation.

6. Find an inverse of a modulo m for each of these pairs of relatively prime integers using the method

Primitive Roots. Chapter Orders and Primitive Roots

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

L29&30 - RSA Cryptography

Fermat s little theorem. RSA.

Cryptography Math 1580 Silverman First Hour Exam Mon Oct 2, 2017

Foundations of Cryptography

Solutions to Exam 1. Problem 1. a) State Fermat s Little Theorem and Euler s Theorem. b) Let m, n be relatively prime positive integers.

The Chinese Remainder Theorem

Wilson s Theorem and Fermat s Theorem

MATH 135 Algebra, Solutions to Assignment 7

SOLUTIONS FOR PROBLEM SET 4

Solutions to Problem Set 6 - Fall 2008 Due Tuesday, Oct. 21 at 1:00

Public Key Encryption

Modular Arithmetic. Kieran Cooney - February 18, 2016

Number Theory/Cryptography (part 1 of CSC 282)

Mathematics Explorers Club Fall 2012 Number Theory and Cryptography

The Chinese Remainder Theorem

Introduction. and Z r1 Z rn. This lecture aims to provide techniques. CRT during the decription process in RSA is explained.

Algorithmic Number Theory and Cryptography (CS 303)

Modular Arithmetic. claserken. July 2016

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 24 February 2012

Public Key Cryptography Great Ideas in Theoretical Computer Science Saarland University, Summer 2014

CMPSCI 250: Introduction to Computation. Lecture #14: The Chinese Remainder Theorem David Mix Barrington 4 October 2013

Discrete Square Root. Çetin Kaya Koç Winter / 11

Modular arithmetic Math 2320

The number theory behind cryptography

Carmen s Core Concepts (Math 135)

Math 127: Equivalence Relations

Cryptography, Number Theory, and RSA

EE 418: Network Security and Cryptography

Introduction to Modular Arithmetic

MATH 324 Elementary Number Theory Solutions to Practice Problems for Final Examination Monday August 8, 2005

The Chinese Remainder Theorem

Collection of rules, techniques and theorems for solving polynomial congruences 11 April 2012 at 22:02

Exam 1 7 = = 49 2 ( ) = = 7 ( ) =

1.6 Congruence Modulo m

Linear Congruences. The solutions to a linear congruence ax b (mod m) are all integers x that satisfy the congruence.

Math 255 Spring 2017 Solving x 2 a (mod n)

Diffie-Hellman key-exchange protocol

p 1 MAX(a,b) + MIN(a,b) = a+b n m means that m is a an integer multiple of n. Greatest Common Divisor: We say that n divides m.

Algorithmic Number Theory and Cryptography (CS 303)

Number Theory - Divisibility Number Theory - Congruences. Number Theory. June 23, Number Theory

To be able to determine the quadratic character of an arbitrary number mod p (p an odd prime), we. The first (and most delicate) case concerns 2

Lecture 32. Handout or Document Camera or Class Exercise. Which of the following is equal to [53] [5] 1 in Z 7? (Do not use a calculator.

MAT Modular arithmetic and number theory. Modular arithmetic

Congruence. Solving linear congruences. A linear congruence is an expression in the form. ax b (modm)

Calculators will not be permitted on the exam. The numbers on the exam will be suitable for calculating by hand.

Distribution of Primes

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall

An interesting class of problems of a computational nature ask for the standard residue of a power of a number, e.g.,

Applications of Fermat s Little Theorem and Congruences

ALGEBRA: Chapter I: QUESTION BANK

Cryptography. 2. decoding is extremely difficult (for protection against eavesdroppers);

Math 319 Problem Set #7 Solution 18 April 2002

UNIVERSITY OF MANITOBA DATE: December 7, FINAL EXAMINATION TITLE PAGE TIME: 3 hours EXAMINER: M. Davidson

Problem Set 6 Solutions Math 158, Fall 2016

LECTURE 7: POLYNOMIAL CONGRUENCES TO PRIME POWER MODULI

DUBLIN CITY UNIVERSITY

Number Theory. Konkreetne Matemaatika

Discrete Math Class 4 ( )

LECTURE 3: CONGRUENCES. 1. Basic properties of congruences We begin by introducing some definitions and elementary properties.

Degree project NUMBER OF PERIODIC POINTS OF CONGRUENTIAL MONOMIAL DYNAMICAL SYSTEMS

Number Theory and Public Key Cryptography Kathryn Sommers

MAT199: Math Alive Cryptography Part 2

Discrete Mathematics and Probability Theory Spring 2018 Ayazifar and Rao Midterm 2 Solutions

MATH 13150: Freshman Seminar Unit 15

Solutions for the 2nd Practice Midterm

ON MODULI FOR WHICH THE FIBONACCI SEQUENCE CONTAINS A COMPLETE SYSTEM OF RESIDUES S. A. BURR Belt Telephone Laboratories, Inc., Whippany, New Jersey

A REMARK ON A PAPER OF LUCA AND WALSH 1. Zhao-Jun Li Department of Mathematics, Anhui Normal University, Wuhu, China. Min Tang 2.

EE 418 Network Security and Cryptography Lecture #3

PT. Primarity Tests Given an natural number n, we want to determine if n is a prime number.

PRIMES IN SHIFTED SUMS OF LUCAS SEQUENCES. Lenny Jones Department of Mathematics, Shippensburg University, Shippensburg, Pennsylvania

1 Introduction to Cryptology

ON THE EQUATION a x x (mod b) Jam Germain

Numbers (8A) Young Won Lim 5/22/17

Numbers (8A) Young Won Lim 6/21/17

LUCAS-SIERPIŃSKI AND LUCAS-RIESEL NUMBERS

Numbers (8A) Young Won Lim 5/24/17

Practice Midterm 2 Solutions

Cryptography Lecture 1: Remainders and Modular Arithmetic Spring 2014 Morgan Schreffler Office: POT 902

Application: Public Key Cryptography. Public Key Cryptography

MA/CSSE 473 Day 9. The algorithm (modified) N 1

#A3 INTEGERS 17 (2017) A NEW CONSTRAINT ON PERFECT CUBOIDS. Thomas A. Plick

Introduction to Number Theory 2. c Eli Biham - November 5, Introduction to Number Theory 2 (12)

Lecture 8. Outline. 1. Modular Arithmetic. Clock Math!!! 2. Inverses for Modular Arithmetic: Greatest Common Divisor. 3. Euclid s GCD Algorithm

Cryptography CS 555. Topic 20: Other Public Key Encryption Schemes. CS555 Topic 20 1

CS1800 Discrete Structures Fall 2016 Profs. Aslam, Gold, Ossowski, Pavlu, & Sprague 7 November, CS1800 Discrete Structures Midterm Version C

Transcription:

Introduction To Discrete Math Due: Monday Oct. 15, 2012. 11:59pm Assignment 2 Instructor: Mohamed Omar Math 6a For all problems on assignments, you are allowed to use the textbook, class notes, and other book references. All problems must be written on your own, though you may collaborate on problem solving for all but the No collaboration problems. The internet can be used for reference material on course subjects, but should not be used to search for or obtain solutions. 1. (No Collaboration) (a) Solve the congruence equation 19x 3 (mod 32). (b) Compute 1905 189 mod 2741 using at most 12 multiplications and at most 12 modular arithmetic reductions. Solution (a) We first find all integral solutions to the Diophantine equation 19x + 32y = 3. By the usual method (ie. the Euclidean algorithm) we see that solutions have the form x = 15 + 32k, y = 9 19k for integers k. It follows that the solutions to the congruence relation are x = 15 + 32k for integers k. 19x 3 (mod 32) (b) Note that 2 = 2 7 2 6 3. Solving the congruence relation we see that in Z 2741, 1905 1 = 200. We now have 1905 189 1905 27 +2 6 3 1905x 1 (mod 2741), (mod 2741) 1905 27 1905 26 200 2 200 (mod 2741). We can compute the first two factors by squaring 1905 seven times (reducing modulo 2741 each time). Similarly, the third factor requires one instance of multiplication. Multiplying the four factors together then brings us up to eleven multiplications. 2. (No Collaboration) Alice wants to send a secret message to Bob using RSA. Bob creates the public key (n, e) = (37 89, 17). If C = 1516, what is M? 1

Solution First we will find d. This can be done by solving the congruence relation 17d 1 (mod 36 88). Our usual technique shows that d = 1277 works. We now know that C d = 1516 1277 M (mod 37 89). We will first compute 1516 1277 (mod 37) ( 1) 1277 (mod 37) 1 (mod 37) and 1516 1277 (mod 89) 3 45 (mod 89), by Euler s theorem and the fact that 1277 = 45 (mod 88). Observing that 45 = 2 5 + 2 4 3 and 3 30 (mod 89), we can readily verify that 3 45 86 (mod 89). We now search for 0 x < 89 37 such that x 1 (mod 37) x 86 (mod 89). By the Chinese remainder theorem, it will follow that M = x. Such an x must satisfy x = 37y 1 for some integer y, and so whence 37y 1 86 (mod 89), 37y 89k = 87 for some integer k. By the usual arguments, it follows that y = 12 87 + 89l for some integer l for instance, y = 24 works. But then M = x = 887. 3. (a) Find all possible values of e, with 2 e 30, for which (61 97, e) is a valid public key for RSA encryption. (b) Bob shouldn t publish too much information! During the RSA algorithm, Bob accidentally publishes φ(n). Show that, using n and φ(n) alone, an adversary (such as Eve L.) can determine p and q. Solution (a) A given 2 e 30 is suitable iff gcd(e, 60 96) = 1. Now the prime factors of 60, 96 are 2, 3 and 5, so we see that such an e is suitable iff 2, 3, 5e. 2

(b) We have so we know that φ(n) = (p 1)(q 1) = pq (p + q) + 1 = n + 1 (p + q), p 2 = p(p + q) pq = p(n + 1 φ(n)) n and p can be recovered by the quadratic formula. We then have q = n p. 4. Determine all integers n for which n 8017 + n 975 + n 86 + 1 is divisible by 91. Solution Observe that 91 = 13 7; as 13 and 7 are prime, we see (reducing exponents modulo 12 and 6, respectively) that if and only if if and only if n 8017 + n 975 + n 86 + 1 0 (mod 91) n 8017 + n 975 + n 86 + 1 0 (mod 7) 0 (mod 13) n 3 + n 2 + n 1 + 1 = (n 2 + 1)(n + 1) 0 (mod 7) 0 (mod 13). Now trial and error verifies that and (n 2 + 1)(n + 1) 0 (mod 7) n 6 (mod 7) (n 2 + 1)(n + 1) 0 (mod 13) n 8 (mod 13) or n 12 (mod 13). Applying the methods with which we are now thoroughly familiar, together with the Chinese remainder theorem, we see that all the desired n have the form for nonnegative integers k. n = 34 + 91k or n = 90 + 91k 5. In this problem, we present a method for certifying an integer is prime. Suppose n 2 is a positive integer, and a is an integer in the set {1, 2,..., n 1} such that gcd(a, n) = 1. The order of a with respect to n, denoted ord n (a), is the smallest positive integer d such that a d 1 mod n. In this problem, we will investigate properties of the order function. (a) Determine ord 7 (2), ord 7 (3), ord 7 (4), ord 7 (5), ord 7 (6). (b) Show that if b is a positive integer then a b 1 mod n if and only if ord n (a) b. Conclude that ord n (a) φ(n). 3

(c) Suppose n is prime, and d φ(n). How many integers in {1, 2,..., n 1} are there whose order is exactly d? You may use without proof that if m is a positive integer, then φ(d) = m. d m Solution (a) By part (b), we know that ord 7 (a) is one of 2, 3, 6 for each of the a given. Finding the exact value then involves a minimal amount of calculation, and reveals: ord 7 (2) = 3 ord 7 (3) = 6 ord 7 (4) = 3 ord 7 (5) = 6 ord 7 (6) = 2. (b) One direction is straightforward: if b = kord n (a) then a b (mod n) (a ordn(a) ) k (mod n) 1 (mod n). Conversely, suppose a b (mod n) but ord n (a)b, so for some positive k, 0 < r < ord n (a), b = kord n (a) + r. But we then have a r 0 (mod n), contradicting the definition of ord n (a). The conclusion follows by Euler s theorem. (c) For each positive integer d which divides φ(n), let O d be the number of positive integers < n of order d. We will show that O d = φ(d) for each such d. This will be achieved by showing that O d φ(d) and then (see hint) appealing to the fact φ(d) = φ(n) = n 1 = O d. d φ(n) d φ(n) The last equality follows from part (b). Towards this end, suppose there is some a < n such that ord n (a) = d (if not, the inequality is immediate). It is then readily verified that the integers a, a 2,, a d 1 are (pairwise) distinct modulo n and for each index 1 k d 1, ord n (a k ) = d gcd(k, d) = 1, (a k ) d 1 (mod n). On the other hand, recall that as n is prime, there are at most d solutions to the equation x d 1 (mod n) modulo n. Thus, every b < n such that ord n (b) = d must appear in the list above, and so we see that O d = φ(d). We have actually shown that for every d φ(n), O d = 0 or O d = φ(d); in particular, O d φ(d), and the result follows. 4

6. Use the Chinese Remainder Theorem to find quick answers to the following questions: (a) How many positive integer multiples of 13 have their last ten digits being 9876543210, in that order? (b) A positive integer n is square-free if there is no prime number p such that p 2 n. Prove or disprove: There is a sequence of 1, 000, 000 consecutive positive integers, none of which is square free. Solution (a) Infinitely many. By the Chinese remainder theorem, there is a positive integer x such that 13x 0 (mod 13) x 9876543210 (mod 10 10 ), and then for each n, x + 13 10 10 n is a positive integer multiple of 13 with 9876543210 as its last ten digits. (b) This is true. Let p 1,, p 10 6 be a sequence of distinct prime numbers and use the Chinese remainder theorem to find x > 0 such that x 1 (mod p 2 1) x 2 (mod p 2 2). x 10 6 (mod p 2 10 6 ). Then x + 1, x + 2,, x + 10 6 is a sequence of positive integers which are not square free. 5