# Elementary Number Theory Review. Franz Luef

Size: px
Start display at page:

Transcription

1 Elementary Number Theory Review

2 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 P(k + 1) is true. Then P(n) is true for all n N.

3 Principle of Strong Induction Principle of Strong Induction Suppose we have a sequence of mathematical statements P(1), P(2),... such that (a) P(1) is true. (b) If for all n N, the truth of P(1),..., P(n) implies that P(n + 1) is true. Then P(n) is true for all n N. Principle of Induction and Principle of Strong Induction are equivalent!

4 Division Algorithm Division Algorithm Suppose a and b are non-zero integers. Then there exist unique integers q and r such that 0 r < b and a = bq + r. We call q the quotient and r the remainder. GCD Supoose a and b are integers. Then there exist integers x and y such that ax + by = gcd(a, b).

5 Euclid s Algorithm Most efficient method to compute gcd of two integers. Euclid s Algorithm Suppose a and b are two integers such that a b > 0. Then the following sequence of divisions provides the gcd(a, b) as the last remainder r n : a = q 1 b + r 1 b = q 2 r 1 + r 2 r 1 = q 3 r 2 + r 3. =. r n 2 = q n r n 1 + r n r n 1 = q n+1 r n + 0

6 Euclid s Algorithm Lemma If a = qb + r, then gcd(a, b) = gcd(b, r). Euclid s Algorithm Consequences 1 Write r n = r n 2 q n r n 1 2 Express r n 1 as r n 3 q n 1 r n 2 and substitute in the preceding equation for r n : r n = r n 2 q n (r n 3 q n 1 r n 2 ) = (1+q n q n 1 )r n 2 +( q n )r n 3 In this way, we expressed r n in terms of r n 2 and r n 3. 3 Proceeding in this manner we obtain ab expression of gcd(a, b) in terms of a linear combination of a and b.

7 Euclid s Lemma Euclid s Lemma If a prime p divides the product of natural numbers a and b, then p divides a or p divides b. Fundamental Theorem of Arithemtic Each natural number n can be uniquely factored into prime numbers: n = p k 1 1 pkr r

8 Linear Diophantine Equations Linear Diophantine Equations Let a, b be two integers and d = gcd(a, b). Then the linear Diophantine equation ax + by = c has a solution in Z if and only if d c. Furthermore, if x 0, y 0 is a solution, then all other solutions are given by for any t Z. x = x 0 + b d t, y = y 0 a d t

9 Congruences Congruence The notion of congruence allows one to treat remainders in a systematic manner. For each positive integer greater than 1 there is an arithmetic mod n that mirrors ordinary arithmetic, but is finite, since it involves only the remainders 0, 1,..., n 1 occuring on division by n. Definition Integers a and b are said to be congruent mod n, written a b mod n, if n divides a b. Note, a 1 mod 10 says that the last digit of a is 1.

10 Congruences Basic Rules a a mod n If a b mod n, then b a mod n. If a b mod n and b c mod n, then a c mod n. If a b mod n and c d mod n, then a + c b + d mod n and ac bd mod n. If a b mod n, then a k b k mod n.

11 Congruences Lemma Suppose ac bc mod n. Then a b mod Corollary Suppose gcd(c, n) = 1. Then a c b c a b mod n. n gcd(c,n). mod n implies Suppose p is a prime number. If c is not a multiple of p, then Then a c b c mod p implies a b mod p.

12 Congruences Linear congruences The equation ax b mod n has a solution if and only if d divides b, where d is the gcd(a, n). If d divides b, then it has d mutually incongruent solutions modulo n: x 0, x 0 + n d, x 0 + 2n d,..., x 0 + (d 1)n d. Consequence Suppose gcd(a, n) = 1. Then ax b mod n has a unique solution. Idea The linear congruence is equivalent to the linear Diophantine equation ax ny = b.

13 Chinese Remainder Theorem Chinese Remainder Theorem Let n 1, n 2 and n 3 be integers with gcd(n 1, n 2 ) = gcd(n 1, n 2 ) = gcd(n 2, n 3 ) = 1. Suppose a 1, a 2 and a 3 are integers. Then the simultaneous congruences x a 1 mod n 1 and x a 2 mod n 2 and x a 3 mod n 3 has exactly one solution x with 0 x < n 1 n 2 n 3. Form n = n 1 n 2 n 3 and N 1 = n/n 1 = n 2 n 3, N 2 = n/n 2 = n 1 n 3, N 3 = n/n 3 = n 1 n 2. Then gcd(n k, n k ) = 1 and N k x 1 mod n k has a solution x k. x = a 1 N 1 x 1 + a 2 N 2 x 2 + a 3 N 3 x 3 is a solution to the three linear congruences.

14 Multiplicative inverse Multiplicative inverse in modular arithmetic Find y Z such that ay 1 mod n, i.e. find the multiplicative inverse of a modulo n. Use the Euclidean algorithm to find such an y. Multiply the linear congrunce ax b mod n with the multiplicative inverse y. Then yax yb mod n, which yields x yb mod n.

15 Multiplicative inverse Inverses modulo p Suppose gcd(a, p) = 1. Then ax 1 mod p has a unique solution a 1, the inverse of a modulo p. Formula for inverses modulo p Suppose a 0 mod p. Then a p 1 = a p 2 a 1 mod p, in other words a p 2 is the inverse of a modulo p.

16 Wilson s Theorem Wilson s Theorem The congruence (n 1)! 1 mod n holds if and only if n is a prime number. Remark G.W. Leibniz seems to have known the result prior to Wilson. J. Lagrange gave the first rigorous proof using his theorem on solutions of polynomial congruences, a result we are going to prove later in the course.

17 Arithmetic Functions In this chapter we are discuss arithemtic functions. Definition A function f mapping a set of natural numbers to integers is an arithmetic function. An arithmetic function f is called multiplicative if Examples f (mn) = f (m)f (n) for gcd(m, n) = 1. τ(n) denotes the number of divisors of a natural number n. σ(n) denotes the sum of divisors of a natural number n. Euler s ϕ-function ϕ(n) denotes the number of integers a relatively prime to n with 1 a n. Möbius function µ(n).

18 Arithmetic Functions Crucial Notion Euler s ϕ-function ϕ(n) denotes the number of integers a relatively prime to n with 1 a n. Any such a has a multiplicative inverse modulo n. Facts ϕ is multiplicative, i.e. if gcd(m, n) = 1, then ϕ(m n) = ϕ(m) ϕ(n). If p 1,..., p r are the distinct primes dividing n, then ϕ(n) = n (1 1 ) (1 1 ). p 1 p r

19 Arithmetic Functions Euler Suppose gcd(a, n) = 1. Then a ϕ(n) 1 mod n. Gauss n = ϕ(d) = ϕ( n d ) d n d n

20 Arithmetic Functions Möbius function µ(1) = 1 µ(p 1 p r ) = ( 1) r µ(n) = 0 if p 2 n for some prime number p. Lemma The Möbius function µ is multiplicative and it satisfies µ(1) = 1 and d n µ(d) = 0 for all n > 1.

21 Arithmetic Functions The theory of multiplicative function relies largely on the prime factorization of a natural number. Lemma The divisors of n = p k 1 1 pkr r are the numbers d = p a 1 1 par r for 0 a i k i for all i = 1,..., r. Theorem For n = p k 1 1 pkr r τ(n) = (k 1 + 1) (k r + 1) σ(n) = pk p 1 1 pkr +1 r 1 p r 1 τ and σ are multiplicative. τ and σ are determined by τ(p k ) and σ(p k ).

22 Arithmetic Functions Lemma Suppose f is a multiplicative arithmetic function. Then f (1) = 1 follows from f (1 n) = f (1)f (n). A multiplicative arithmetic function f is determined by f (p k ). Suppose f and g are arithmetic multiplicative functions. Then f g is an arithmetic multiplicative function. In the case that g(n) 0 then f /g is an arithmetic multiplicative function.

23 Arithmetic Functions Sum function F (n) = d n f (d) f is multiplicative if and only if the sum function F is multiplicative. For a multiplicative function f we have that F (n) = Π r i=1(1 + f (p i ) + f (p 2 i ) + + f (p kr r )). Möbius Inversion Formula Suppose F (n) = d n f (d). Then f (n) = d n µ( n )F (d). d

24 Public-key Cryptography and RSA-algorithm RSA algorithm Fundamental Idea: Construction of a One-Way Function on a set X. This is an invertible function E : X X such that it is easy for Alice to compute E 1, but extremely difficult for anybody else to do so. Rivset, Shamir and Adleman used modular arithmetic to design such a one-way function. Alice picks two large prime numbers p and q, and computes n = pq Alice computes ϕ(n) = (p 1)(q 1).

25 Public-key Cryptography and RSA-algorithm RSA algorithm Alice chooses a random integer e with 1 < e < ϕ(n) and gcd(e, ϕ(n)) = 1 Alice finds a solution x = d to xe 1 mod ϕ(n) Alice defines the function E(x) = x e mod n. Anybody can compute E quickly. The pair (n, e) is the public key of Alice. But Alice is the only one, who knows d, which allows her to compute E 1.

26 Public-key Cryptography and RSA-algorithm Decryption Key Let n = pq and let d, e be such that (p 1) (de 1) and (q 1) (de 1). Then a de a mod n for all integers a. Proof: Since n a de a if and only if p and q divide a de a. Now for gcd(a, p) = 1 we have that a p 1 1 mod p, since (p 1) (de 1) and the same for q, we have that a de 1 1 mod p. Thus to decrypt a message m Alice computes E(m) d = (m e ) d = m

27 Order of an integer and primitive roots Order of an integer and primitive roots Suppose a is relatively prime to n. The order of a modulo n is the least integer k such that a k 1 mod n. a is called a primitive root of n if the order of k equals ϕ(n). If a has order k modulo n, then a, a 2,..., a k are all distinct modulo n. If n has a primitive root, then it has ϕ(ϕ(n)) primitive roots. If p is a prime number, then p has ϕ(p 1) incongruent primitive roots. If d ϕ(p) = p 1, then there are ϕ(d) elements of order d.

28 Order of an integer and primitive roots Existence of primitive roots Every prime p has primitive root. If p is an odd prime, then p k has a primitive root for k 2. Gauss: A positive integer has a primitive root if and only if n = 2, 4, p k, 2p k for an odd prime p. Index of an integer Suppose r is a primitive root of n and gcd(a, n) = 1. Then the least positive integer k such that a r k mod n is called the index of a, and denoted by ind r a.

29 Order of an integer and primitive roots Index of an integer ind r a ind r b mod ϕ(n). ind r (ab) = ind r a + ind r b ind r a k = k ind r a Index of an integer x k a mod n has a solution if and only if k ind r a = ind r a mod ϕ(n) has a solution.

30 Quadratic reciprocity Quadratic residue Example Let p be an odd prime and gcd(a, p) = 1. Then a is a quadratic residue of p if a is a solution of x 2 a mod p. If a does not sovle x 2 a mod p, then a is called a quadratic non-residue of p. ( ) Legendre symbol: a p = +1 if a is a quadratic residue ( ) and a p = 1 otherwise. Quadratic residues of 5: 1, 4 and quadratic non-residues of 5: 2, 3 Quadratic residues of 7: 1, 2, 4 and 3, 5, 6 are not.

31 Quadratic reciprocity Basic facts Let p be an odd prime and gcd(a, p) = 1. If x 0 is a solution of x 2 a mod p, then p x 0 is another solution of the congruence. By Lagrange s theorem on polynomial congruences these are all solutions. Suppose a b mod p. Then a is a quadratic residue if and only if b is a quadratic residue. Therefore, we can restrict our discussion of quadratic residues to the integers between 1 and p. There are (p 1)/2 quadratic residues and (p 1)/2 quadratic non-residues of p.

32 Quadratic reciprocity Basic facts Let p be an odd prime. Suppose a and b are integers such that gcd(a, p) = gcd(b, p) = 1. ( ab p ) = ( a p ) ( ) b. p Euler s criterion ( ) a = a (p 1)/2 mod p. p

33 Quadratic reciprocity Quadratic Reciprocity Gauss (1796) Suppose p and q are distinct prime numbers. ( ) ( ) q p = p q if one of the primes is of the form 4k + 1. ( ) ( ) q p = p q if BOTH primes are of the form 4k + 3. Quadratic Reciprocity Gauss (1796) Suppose p and q are distinct prime numbers. Then ( ) ( ) q = ( 1) p 1 q 1 p 2 2 p q

34 Quadratic reciprocity Quadratic Reciprocity Supplement 1 Suppose p is an odd prime number. ( ) 1 p = 1 mod p for p 1 mod 4. ) = 1 mod p for p 3 mod 4. ( 1 p Quadratic Reciprocity Supplement 2 ( 2 p ) = 1 for p = 1 or 7 mod 8. ( 2 p ) = 1 for p = 3 or 5 mod 8.

### Elementary Number Theory. Franz Luef

Elementary Number Theory Congruences Modular Arithmetic Congruence The notion of congruence allows one to treat remainders in a systematic manner. For each positive integer greater than 1 there is an arithmetic

### 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

### Summary Slides for MATH 342 June 25, 2018

Summary Slides for MATH 342 June 25, 2018 Summary slides based on Elementary Number Theory and its applications by Kenneth Rosen and The Theory of Numbers by Ivan Niven, Herbert Zuckerman, and Hugh Montgomery.

### M381 Number Theory 2004 Page 1

M81 Number Theory 2004 Page 1 [[ Comments are written like this. Please send me (dave@wildd.freeserve.co.uk) details of any errors you find or suggestions for improvements. ]] Question 1 20 = 2 * 10 +

### 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

### 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

### A Guide to Arithmetic

A Guide to Arithmetic Robin Chapman August 5, 1994 These notes give a very brief resumé of my number theory course. Proofs and examples are omitted. Any suggestions for improvements will be gratefully

### 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

### 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

### 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

### 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

### 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

### CPSC 467: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security Michael J. Fischer Lecture 9 September 30, 2015 CPSC 467, Lecture 9 1/47 Fast Exponentiation Algorithms Number Theory Needed for RSA Elementary Number Theory

### 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

### Math 314 Course Notes: Brief description

Brief description These are notes for Math 34, an introductory course in elementary number theory Students are advised to go through all sections in detail and attempt all problems These notes will be

### Mathematics for Cryptography

Mathematics for Cryptography Douglas R. Stinson David R. Cheriton School of Computer Science University of Waterloo Waterloo, Ontario, N2L 3G1, Canada March 15, 2016 1 Groups and Modular Arithmetic 1.1

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

### Discrete mathematics I - Number theory

Discrete mathematics I - Number theory Emil Vatai (based on hungarian slides by László Mérai) 1 January 31, 2018 1 Financed from the financial support ELTE won from the Higher Education

### 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

### Number Theory and Algebra: A Brief Introduction

Number Theory and Algebra: A Brief Introduction Indian Statistical Institute Kolkata May 15, 2017 Elementary Number Theory: Modular Arithmetic Definition Let n be a positive integer and a and b two integers.

### Part II. Number Theory. Year

Part II Year 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2017 Paper 3, Section I 1G 70 Explain what is meant by an Euler pseudoprime and a strong pseudoprime. Show that 65 is an Euler

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

### 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

### 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

### 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

### Math 324, Fall 2011 Assignment 6 Solutions

Math 324, Fall 2011 Assignment 6 Solutions Exercise 1. (a) Find all positive integers n such that φ(n) = 12. (b) Show that there is no positive integer n such that φ(n) = 14. (c) Let be a positive integer.

### 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)

### 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

### Elementary Number Theory and Cryptography, 2014

Elementary Number Theory and Cryptography, 2014 1 Basic Properties of the Integers Z and the rationals Q. Notation. By Z we denote the set of integer numbers and by Q we denote the set of rational numbers.

### Discrete Mathematics GCD, LCM, RSA Algorithm

Discrete Mathematics GCD, LCM, RSA Algorithm Abdul Hameed http://informationtechnology.pk/pucit abdul.hameed@pucit.edu.pk Lecture 16 Greatest Common Divisor 2 Greatest common divisor The greatest common

### Number Theory. Zachary Friggstad. Programming Club Meeting

Number Theory Zachary Friggstad Programming Club Meeting Outline Factoring Sieve Multiplicative Functions Greatest Common Divisors Applications Chinese Remainder Theorem Throughout, problems to try are

### Lecture 4: Number theory

Lecture 4: Number theory Rajat Mittal IIT Kanpur In the next few classes we will talk about the basics of number theory. Number theory studies the properties of natural numbers and is considered one of

### 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

### 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

### 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

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

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

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

### Chapter 5. Modular arithmetic. 5.1 The modular ring

Chapter 5 Modular arithmetic 5.1 The modular ring Definition 5.1. Suppose n N and x, y Z. Then we say that x, y are equivalent modulo n, and we write x y mod n if n x y. It is evident that equivalence

### Lecture Notes. Advanced Discrete Structures COT S

Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-13 Recap Divisibility Prime Number Theorem Euclid s Lemma Fundamental Theorem of Arithmetic Euclidean Algorithm Basic Notions - Section

### 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

### 4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus...

PREFACE These notes have been prepared by Dr Mike Canfell (with minor changes and extensions by Dr Gerd Schmalz) for use by the external students in the unit PMTH 338 Number Theory. This booklet covers

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

### 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

### Public-key Cryptography: Theory and Practice

Public-key Cryptography Theory and Practice Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Chapter 2: Mathematical Concepts Divisibility Congruence Quadratic Residues

### 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

### 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.

### CS483 Design and Analysis of Algorithms

CS483 Design and Analysis of Algorithms Lectures 2-3 Algorithms with Numbers Instructor: Fei Li lifei@cs.gmu.edu with subject: CS483 Office hours: STII, Room 443, Friday 4:00pm - 6:00pm or by appointments

### Beautiful Mathematics

Beautiful Mathematics 1. Principle of Mathematical Induction The set of natural numbers is the set of positive integers {1, 2, 3,... } and is denoted by N. The Principle of Mathematical Induction is a

### Lecture 14: Hardness Assumptions

CSE 594 : Modern Cryptography 03/23/2017 Lecture 14: Hardness Assumptions Instructor: Omkant Pandey Scribe: Hyungjoon Koo, Parkavi Sundaresan 1 Modular Arithmetic Let N and R be set of natural and real

### 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

### 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

### 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

### Number Theory. Modular Arithmetic

Number Theory The branch of mathematics that is important in IT security especially in cryptography. Deals only in integer numbers and the process can be done in a very fast manner. Modular Arithmetic

### 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

### Numbers. Çetin Kaya Koç Winter / 18

Çetin Kaya Koç http://koclab.cs.ucsb.edu Winter 2016 1 / 18 Number Systems and Sets We represent the set of integers as Z = {..., 3, 2, 1,0,1,2,3,...} We denote the set of positive integers modulo n as

### Basic Algorithms in Number Theory

Basic Algorithms in Number Theory Algorithmic Complexity... 1 Basic Algorithms in Number Theory Francesco Pappalardi Discrete Logs, Modular Square Roots & Euclidean Algorithm. July 20 th 2010 Basic Algorithms

### 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

### MATH 145 Algebra, Solutions to Assignment 4

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 178 1 = s. The Euclidean Algorithm gives 365 = 178 + 9 178

### A SURVEY OF PRIMALITY TESTS

A SURVEY OF PRIMALITY TESTS STEFAN LANCE Abstract. In this paper, we show how modular arithmetic and Euler s totient function are applied to elementary number theory. In particular, we use only arithmetic

### CHAPTER 6. Prime Numbers. Definition and Fundamental Results

CHAPTER 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results 6.1. Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and the only positive divisors of p are 1 and p. If n

### Basic Algorithms in Number Theory

Basic Algorithms in Number Theory Algorithmic Complexity... 1 Basic Algorithms in Number Theory Francesco Pappalardi #2-b - Euclidean Algorithm. September 2 nd 2015 SEAMS School 2015 Number Theory and

### 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

### CHAPTER 3. Congruences. Congruence: definitions and properties

CHAPTER 3 Congruences Part V of PJE Congruence: definitions and properties Definition. (PJE definition 19.1.1) Let m > 0 be an integer. Integers a and b are congruent modulo m if m divides a b. We write

### ECEN 5022 Cryptography

Elementary Algebra and Number Theory University of Colorado Spring 2008 Divisibility, Primes Definition. N denotes the set {1, 2, 3,...} of natural numbers and Z denotes the set of integers {..., 2, 1,

### 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

### The number of ways to choose r elements (without replacement) from an n-element set is. = r r!(n r)!.

The first exam will be on Friday, September 23, 2011. The syllabus will be sections 0.1 through 0.4 and 0.6 in Nagpaul and Jain, and the corresponding parts of the number theory handout found on the class

### Review. CS311H: Discrete Mathematics. Number Theory. Computing GCDs. Insight Behind Euclid s Algorithm. Using this Theorem. Euclidian Algorithm

Review CS311H: Discrete Mathematics Number Theory Instructor: Işıl Dillig What does it mean for two ints a, b to be congruent mod m? What is the Division theorem? If a b and a c, does it mean b c? What

### 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

### 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

### Any real-valued function on the integers f:n R (or complex-valued function f:n C) is called an arithmetic function.

Arithmetic Functions Any real-valued function on the integers f:n R (or complex-valued function f:n C) is called an arithmetic function. Examples: τ(n) = number of divisors of n; ϕ(n) = number of invertible

### 2 More on Congruences

2 More on Congruences 2.1 Fermat s Theorem and Euler s Theorem definition 2.1 Let m be a positive integer. A set S = {x 0,x 1,,x m 1 x i Z} is called a complete residue system if x i x j (mod m) whenever

### 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

### 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

### 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)

### 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

### Introduction to Cybersecurity Cryptography (Part 5)

Introduction to Cybersecurity Cryptography (Part 5) Prof. Dr. Michael Backes 13.01.2017 February 17 th Special Lecture! 45 Minutes Your Choice 1. Automotive Security 2. Smartphone Security 3. Side Channel

### 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

### 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

### 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

### 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

### Objective Type Questions

DISTANCE EDUCATION, UNIVERSITY OF CALICUT NUMBER THEORY AND LINEARALGEBRA Objective Type Questions Shyama M.P. Assistant Professor Department of Mathematics Malabar Christian College, Calicut 7/3/2014

### Mathematics 4: Number Theory Problem Sheet 3. Workshop 26 Oct 2012

Mathematics 4: Number Theory Problem Sheet 3 Workshop 26 Oct 2012 The aim of this workshop is to show that Carmichael numbers are squarefree and have at least 3 distinct prime factors (1) (Warm-up question)

### 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

### Our Number Theory Textbook

Our Number Theory Textbook Math 311: Fall 2015 December, 2015 Contents 1 Divisibility 2 M. Gonsalves, L. Lewis.......................... 2 1.1 Introduction.............................. 2 1.2 Glossary

### Addition. Ch1 - Algorithms with numbers. Multiplication. al-khwārizmī. al-khwārizmī. Division 53+35=88. Cost? (n number of bits) 13x11=143. Cost?

Ch - Algorithms with numbers Addition Basic arithmetic Addition ultiplication Division odular arithmetic factoring is hard Primality testing 53+35=88 Cost? (n number of bits) O(n) ultiplication al-khwārizmī

### Topics in Cryptography. Lecture 5: Basic Number Theory

Topics in Cryptography Lecture 5: Basic Number Theory Benny Pinkas page 1 1 Classical symmetric ciphers Alice and Bob share a private key k. System is secure as long as k is secret. Major problem: generating

### 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

### A. Algebra and Number Theory

A. Algebra and Number Theory Public-key cryptosystems are based on modular arithmetic. In this section, we summarize the concepts and results from algebra and number theory which are necessary for an understanding

### 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

### 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

### W3203 Discrete Mathema1cs. Number Theory. Spring 2015 Instructor: Ilia Vovsha. hcp://www.cs.columbia.edu/~vovsha/w3203

W3203 Discrete Mathema1cs Number Theory Spring 2015 Instructor: Ilia Vovsha hcp://www.cs.columbia.edu/~vovsha/w3203 1 Outline Communica1on, encryp1on Number system Divisibility Prime numbers Greatest Common

### Number Theory Course notes for MA 341, Spring 2018

Number Theory Course notes for MA 341, Spring 2018 Jared Weinstein May 2, 2018 Contents 1 Basic properties of the integers 3 1.1 Definitions: Z and Q....................... 3 1.2 The well-ordering principle...................

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

Chapter 6 Prime Numbers Part VI of PJE. Definition and Fundamental Results Definition. (PJE definition 23.1.1) An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p. If n > 1

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

Monday, Oct 29 Today we will talk about inverses in modular arithmetic, and the use of inverses to solve linear congruences. For your quiz in recitation this week, refer to these exercise generators: GCD

### Theory of Numbers Problems

Theory of Numbers Problems Antonios-Alexandros Robotis Robotis October 2018 1 First Set 1. Find values of x and y so that 71x 50y = 1. 2. Prove that if n is odd, then n 2 1 is divisible by 8. 3. Define

### 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

### ECE 646 Lecture 5. Mathematical Background: Modular Arithmetic

ECE 646 Lecture 5 Mathematical Background: Modular Arithmetic Motivation: Public-key ciphers RSA as a trap-door one-way function PUBLIC KEY message ciphertext M C = f(m) = M e mod N C M = f -1 (C) = C