Primitive Roots and Discrete Logarithms
|
|
- Clifton Riley
- 5 years ago
- Views:
Transcription
1 Primitive Roots and Discrete Logarithms L. Felipe Martins Department of Mathematics Cleveland State University Work licensed under a Creative Commons License available at March 5, Order of an Element In this chapter, we study successive powers of an integer modulo an integer m. We know, from Euler s Theorem, that a φpmq 1 pmod mq if gcdpa,mq 1. However, there may exist smaller powers of a the are congruent to 1. This is illustrated in the table below, with m 18. In this table, a j mod 18 is computed for a relatively prime to 18, and j 1,2...,φp18q 6. m=18, phi(m)=6 j= : : : : : : So, for example pmod 18q. This observation motivates the following definition: Definition 1.1. Let m 0 be an integer and a be such that gcdpa,mq 1. The multiplicative order, or simply order of a modulo m is the smallest positive integer j such that a j 1 pmod mq. The order of a modulo m is denoted by ord m paq. We also talk about orders in terms of congruence classes. The order of and element a P Z m is defined if a is a unit (that is, a is invertible), and is the smallest 1
2 integer j such that a j 1 (as members of Z m ). We also use the symbol ord m paq to denote the order of an element in Z m. Euler s theorem guarantees that the order of a is at most φpmq, but we can say more about the order. Let s consider the following code segment, that computes the order of elements modulo 18: age: m = 22 sage: phim = euler_phi ( m) sage: print m=%d, phi(m)=%d % (m, phim) sage: R = Integers ( m) sage: units = [ a for a in R if a. is_unit ()] sage: for a in units:... print %2d: %2d % (a,r(a). multiplicative_order ()) m=22, phi(m)=10 1: 1 3: 5 5: 5 7: 10 9: 5 13: 10 15: 5 17: 10 19: 10 21: 2 Notice that the order of the elements not only are smaller than φpmq, they are actually divisors of φpmq. This will follow fro the result below, that characterizes all positive integers such that a j 1 pmod mq. Theorem 1.2. Let m 0 and a be integers such that gcdpa,mq 1. Then, for any positive integer j, a j 1 pmod mq if and only if ord m paq j. Proof. Suppose first that ord m paq divides j, that is, j qord m paq for some integer q. Then: a j a qord mpaq pa ord m paq j q 1 j 1 pmod mq For the converse, suppose that a j 1 pmod mq. Dividing j by ord m a, we obtain j qord m paq r, where 0 r ord m paq. Then: 1 a j a qord mpaq r pa ord m paq q q a r a r pmod mq. Thus, we have a nonnegative r such that a r 1 pmod mq, and r definition of ord m paq, this implies r 0, so that j qord m paq. ord m paq. By the We then have: 2
3 Corollary 1.3. Let m 0 and a be integers such that gcdpa,mq 1. Then, ord m paq φpmq. Proof. Just notice that, from Euler s theorem, a φpmq 1 pmod mq, and use the previous theorem. Let s now investigate what can be said about the order of a k, for a positive integer k. Since 1 pa k q ord mpa kq a k ord mpa kq pmod mq, we have: ord m paq k ord m pa k q. Dividing both sides by d gcdpk,ord m paqq, we get: ord m paq k d d ord mpa k q, and since ord m paq{d and k{d are relatively prime, Euclid s lemma implies: On the other hand, notice that: which implies ord m paq d ord m pa k q. pa k q ord mpaq{d pa ord m paq q k{d 1 pmod mq, ord m pa k ord mpaq q, d by Theorem 1.2. We thus conclude that ord m pa k q ord m paq{d, and we have proved the following theorem: Theorem 1.4. Let m 0 and a be integers such that gcdpa,mq 1. Then: ord m pa k q ord m paq gcdpk,ord m paq Example 1.5. Let m 18 and a 5. The following code lists the orders of a k pmod mq, both computed directly and by the formula above: sage: for k in range (1, orda ):... b = aˆk... print k=%2d: %2d %2d % \... (k,b. multiplicative_order (), orda // gcd(k,orda )) m=18, d=5 k= 1: 6 6 k= 2: 3 3 k= 3: 2 2 k= 4: 3 3 k= 5: 6 6 3
4 2 Primitive Roots and Discrete Logarithms As we have seen in the previous section, the order of an integer modulo m is always a divisor of φpmq. A natural question is whether, given a divisor d of φpmq, it is always possible to find an unit a P Z m with order d. This is investigated in the following examples. Example 2.1. Let m 12. The next code segment compares the set of divisors of φp12q with the set of possible orders of elements a P Z 12 : age: m = 12 sage: R = Integers ( m) sage: phim = euler_phi ( m) sage: divisors_phi = divisors( phim) sage: orders_set = set ([ a. multiplicative_ order ()... for a in R if a.is_unit ()])... sage: orders_list = sorted( list( orders_set )) sage: print m=%d % m sage: print Divisors of phi( m): % s % divisors_phi sage: print Orders represented : % s % orders_list m=12 Divisors of phi( m): [1, 2, 4] Orders represented : [1, 2] This example shows that not all divisors of φpmq are among the possible orders. Notice, in particular, that the highest possible order, φpmq itself, is not represented. Example 2.2. Now let s consider m 29: m=29 Divisors of phi( m): [1, 2, 4, 7, 14, 28] Orders represented : [1, 2, 4, 7, 14, 28] In this case, all possible orders are represented. As we shall see, this is always true for a prime modulus. Example 2.3. On the other hand, there are composite moduli m for which all divisors of φpmq are the order of some element. For example, m 50: m=50 Divisors of phi( m): [1, 2, 4, 5, 10, 20] Orders represented : [1, 2, 4, 5, 10, 20] The task of identifying which possible orders actually occur is simplified by the following observation: 4
5 Lemma 2.4. Let m be a positive integer. Then, the following two statements are equivalent: 1. For every divisor d of φpmq, there is an a such that ord m paq d. 2. There is an a such that ord m paq φpmq. Proof. Obviously, the first statement implies the second. To prove the converse, let a be an integer of order φpmq modulo m, and let d be a divisor of φpmq. Let k φpmq{d. Then, by Theorem 1.4: ord m pa k q that is, a k has order d modulo m. φpmq gcdpφpmq{d,φpmqq d, This motivates the following important definition: Definition 2.5. Let m be a positive integer, and a be such that gcdpa,mq 1. Then, a is said to be a primitive root modulo m if ord m paq φpmq. When considered as an element of Z m, we say that a is a generator of the group of units of Z m. Primitive roots play a fundamental role in all of number theory. The following observation gives one aspect of why they are important. Let a be a primitive root modulo m, thought of as an element of Z m. Consider the sequence of elements of Z m : Here is an example: a 1,a 2,...a φpmq. (1) Example 2.6. Let m 18, and let s find the units and primitive roots modulo 18: sage: m = 18 sage: R = Integers ( m) sage: phim = euler_phi ( m) sage: units = [ a for a in R if a. is_unit ()] sage: primitive_ roots = [ a for a in units... if a. multiplicative_ order ()== phim]... sage: print m=%d % m sage: print Units: % s % units sage: print Primitive roots: % s % primitive_ roots m=18 Units: [1, 5, 7, 11, 13, 17] Primitive roots: [5, 11] 5
6 We now choose (arbitrarily) the primitive root a 11 and compute its successive powers: sage: a = R(11) sage: [ aˆk for k in range (1, phim +1)] [11, 13, 17, 7, 5, 1] We notice that all the units of Z m are represented as a power of a. It is easy to see that the observation in this example is valid in general. Consider the list of powers in (1), where a is a primitive root modulo m. We claim that the elements in this list are distinct modulo m. Indeed, suppose that 0 i j φpmq and a i a j pmod mq. Then, (since a is invertible!), a j i 1 pmod mq, and by Theorem 1.2, ord m paq φpmq j i, which is a contradiction, since j i φpmq. We conclude that the sequence (1) is a list of φpmq distinct units of Z m. Since the number of such elements is φpmq, it follows that each unit appears exactly once in the list. The following definition is then valid: Definition 2.7. Let m be a positive integer, and assume that a is a primitive root modulo m. Let x be such that gcdpx,mq 1. We say that k is a discrete logarithm of x in the base a (for the modulo m), if: a k b pmod mq For instance, going back to Example 2.6, we can see that, for the modulus 18: 3 is a discrete logarithm of 17 in the base 11 5 is a discrete logarithm of 5 in the base 11 Notice that discrete logarithms are not unique: for example, since pmod 18q, it follows that 9 is also a discrete logarithm of 17 for the base 11. In general, suppose that k 1 and k 2 are both discrete logarithms of x in the base a. Then: a k1 x a k 2 pmod mq, so that a k 1 k 2 1 pmod mq, which, again from Theorem 1.2, implies φpmq k 1 k 2, that is: k 1 k 2 pmod φpmqq. Notice that the modulus above is φpmq, and not m! This is a very important point, which can be stated in the following way: Let m be a positive integer, a be a primitive root modulo m, and x invertible modulo m. Then, the discrete logarithm (modulo m) of x in the base a is uniquely defined modulo φpmq. 6
7 Accordingly, we will use the notation: k dlog a pbq pmod φpmqq to express the fact that k is a discrete logarithm of x in the base a. We will also use this notation when thinking in terms of congruence classes. However, special care is then needed. If we are doing computations modulo m, the discrete logarithm of x, dlog a pxq, has to be interpreted as a congruence class modulo φpmq, that is, an element of Z φpmq. We finish this section with a criterion for identifying primitive roots. Theorem 2.8. Let m 0 and a be integers such that gcdpa,mq 1. Then, a is a primitive root modulo m if and only if a φpmq{q 1 pmod mq for all prime divisors q of φpmq. Proof. It is clear that, if a φpmq{q 1 for some prime divisor q of φpmq, then the order of a is strictly smaller than φpmq, and a cannot be a primitive root. For the converse, suppose that d ord m paq φpmq. Then, there is a prime divisor q of φpmq such that q d. Since d φpmq, unique factorization implies d pφpmq{qq, and from a d 1 pmod mq it follows that a φpmq{q 1 pmod mq. Example 2.9. Let s find a primitive root modulo m (A primitive root might not exist, but m has been carefully chosen!). We start by computing φpmq and finding its prime factors: sage: m = sage: phim = euler_phi ( m) sage: pfactors = prime_ divisors ( phim) sage: print m, phim, pfactors [2, 3, 7] The exponents we will have to try have the form φpmq{q, so we generate a list with these values: sage: exps = [ phim/ q for q in pfactors] sage: exps [7203, 4802, 2058] Let s check if 2 is a primitive root modulo m: sage: R = Integers ( m) sage: a = R(2) sage: [ aˆe for e in exps] [1, 15453, 4803] 7
8 Well, since 2 φp16807q{2 1 pmod 16807q, we conclude that 2 is not a primitive root. Let s see if we have better luck with a 3: sage: a = R(3) sage: [ aˆe for e in exps] [16806, 1353, 14407] So, we conclude that 3 is a primitive root modulo It is worth pointing out that this method is quite efficient and practical provided a factorization of φpmq is available. Being able to generate primitive roots is very important for some applications. 3 Primitive Roots for Prime Moduli It is a remarkable and extremely important fact that primitive roots always exist for a prime modulus. In fact, given a prime p, we are able to say exactly how many elements have order d for each divisor d of φppq p 1. We start with a result concerning the number of elements of each possible order for a prime modulus. Theorem 3.1. Let p be a prime number, and d a positive divisor of p 1. Then, one of the following alternatives takes place: 1. There are no elements of order d in Z p. 2. There are exactly φpdq elements of order d in Z p. Proof. The statement of the theorem is equivalent to saying that, if there is an element of order d, then there must be φpdq of them. So, let s assume that we have an a P Z m such that ord m paq d. As proved in Theorem??, the polynomial x d 1 has exactly d zeros on Z p. Clearly, for any j 0, pa j q d pa d q j 1 in Z p, that is, the elements of the sequence a 1,a 2,...,a d are all zeros of x d 1. Since this list has d distinct (why?) elements, these must be all the zeros of x d 1. Now, and element x of order d is necessarily a zero of x d 1, and we conclude that x a k for some k 1,2,...d. From Theorem 1.4, the order of x is d{gcdpk,dq. Thus, ord p pxq d if and only if gcdpk,dq 1. Putting all together, we have the following: 8
9 The elements of order d in Z p are those of the form a k, where k 1,2,...,d and gcdpk,dq 1. However, the number of such elements is, by definition, φpdq. We will now proceed to show that the number of elements of order d cannot be zero (so, by the theorem above, it has to be φpdq). The proof requires the following remarkable formula discovered by Euler: Theorem 3.2. Let m be a positive integer. Then: dm φpdq m. (2) We postpone the proof of this formula until Section 4. The notation above means that the index d in the sum runs over all positive divisors of m (including m). For example, for m 24, the formula reads: φp1q φp2q φp3q φp4q φp6q φp8q φp12q φp24q 24, which can be verified in Sage: sage: m = 24 sage: sum( euler_phi (d) for d in divisors(m)) 24 We are now ready to state and prove the main result of this chapter: Theorem 3.3. Let p be a prime number. Then, if d is a positive divisor of p 1, there are φpdq elements of order d in Z p. Proof. For each positive divisor d of p 1 we let: S d ta P Z p ord p paq du. and denote by c d the number of elements in S j. Since every element of Z d appears in exactly one of the classes, we have: dp 1 On the other hand, Theorem 3.2 gives: dp 1 c d p 1. φpdq p 1. From Theorem 3.1, we know that c d 0 or c d φpp 1q, for every d. Using this fact and comparing the last two formulas implies c d φpdq for all positive divisors d of p 1. 9
10 We then have: Theorem 3.4 (Existence of primitive roots for prime moduli). Let p be a prime number. Then there are φpp 1q primitive roots in Z p. 4 Proof of Theorem 3.2 In this section, we prove Formula (2). The proof we present here is based on a combinatorial argument: we simply count the integers 1, 2,... m in a special way. We place every integer from 1 to m in a set S d, where d is a divisor of m. Namely, we let: m: S d tk P Z 1 k m and gcdpk,mq du. As an example, let s consider m 24. We start by computing the divisors of sage: m = 24 sage: dlist = divisors( m) sage: dlist [1, 2, 3, 4, 6, 8, 12, 24] To store the sets, use a Python data structure called a dictionary. The following code segment initializes the dictionary: sage: sets = {} sage: for d in dlist:... sets[d]=[] We create a dictionary with an entry for every divisor d of m, and initialize the entry to an empty list. Now, we loop over the integers 1, 2,..., m and place each integer in the entry with key gcdpk,mq: sage: for k in range (1,m+1):... sets[gcd(k,m)]. append(k) Let s now print the sets: sage: for key, elem in sets. iteritems ():... print S(%2d) = { % key,... for b in elem:... print %2d % b,... print } S( 1) = { } S( 2) = { } 10
11 S( 3) = { } S( 4) = { 4 20 } S( 6) = { 6 18 } S( 8) = { 8 16 } S(12) = { 12 } S(24) = { 24 } The first thing to observe is that, since every integer 1, 2,..., m is placed in exactly one of the sets, we have: S d m. dm All that remains is to identify the number of integers in each set S d. Notice, in the example above, that d always divides the elements of the set S d. This happens simply because, if k P S d, then d gcdpk,mq k. We can, thus, define the sets: " k * Sd 1 d k P S d, and clearly S d Sd 1. Going back to the example m 24, we compute these newly defined sets: sage: for d, s in sets. iteritems ():... sets[d] = [k//d for k in sets[d]] Here are the sets that are obtained: 1: { } 2: { } 3: { } 4: { 1 5 } 6: { 1 3 } 8: { 1 2 } 12: { 1 } 24: { 1 } Looking at these sets carefully, a pattern emerges: the elements of set Sd 1 are exactly those positive integers that are at most m{d and relatively prime to m{d. To see why this is true, let r be an arbitrary element of Sd 1. Then, r k{d, where k is an integer such that gcdpk, mq d. This implies that gcdpr, dq gcdpk{d, mq 1. Reciprocally, if 1 r d is such that gcdpr,dq 1, then, if we let k rd, we have r k{d and gcdpk,mq d, so that r P Sd 1. We conclude that S d Sd 1 φpm{dq, so that: d m φpm{dq m 11
12 But, as d runs over the set of divisors of m, so does m{d, and we get Formula (2). This formula may, at this point, seem to be a little ad hoc. The formula is placed in a wider context when multiplicative arithmetic functions are studied. 12
Computing Quotient and Remainder. Prime Numbers. Factoring by Trial Division. The Fundamental Theorem of Arithmetic
A Crash Course in Elementary Number Theory L. Felipe Martins Department of Mathematics Cleveland State University l.martins@csuohio.edu Work licensed under a Creative Commons License available at http://creativecommons.org/licenses/by-nc-sa/3.0/us/
More informationThe Chinese Remainder Theorem
The Chinese Remainder Theorem L. Felipe Martins Department of Mathematics Cleveland State University l.martins@csuohio.edu Work licensed under a Creative Commons License available at http://creativecommons.org/licenses/by-nc-sa/3.0/us/
More informationExam 2 Solutions. In class questions
Math 5330 Spring 2018 Exam 2 Solutions In class questions 1. (15 points) Solve the following congruences. Put your answer in the form of a congruence. I usually find it easier to go from largest to smallest
More informationAn 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
More informationCHAPTER 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
More informationDefinition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively
6 Prime Numbers Part VI of PJE 6.1 Fundamental Results Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively D (p) = { p 1 1 p}. Otherwise
More informationDiscrete Logarithms. Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set
Discrete Logarithms Let s begin by recalling the definitions and a theorem. Let m be a given modulus. Then the finite set Z/mZ = {[0], [1],..., [m 1]} = {0, 1,..., m 1} of residue classes modulo m is called
More informationNumber 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 informationMath 5330 Spring Notes Congruences
Math 5330 Spring 2018 Notes Congruences One of the fundamental tools of number theory is the congruence. This idea will be critical to most of what we do the rest of the term. This set of notes partially
More informationChapter 5. Number Theory. 5.1 Base b representations
Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,
More information1 Divisibility Basic facts about divisibility The Division Algorithm... 3
Contents 1 Divisibility 3 1.1 Basic facts about divisibility................................ 3 1.2 The Division Algorithm.................................. 3 1.3 Greatest Common Divisor and The Euclidean
More informationQ 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?
2 Mod math Modular arithmetic is the math you do when you talk about time on a clock. For example, if it s 9 o clock right now, then it ll be 1 o clock in 4 hours. Clearly, 9 + 4 1 in general. But on a
More informationNotes 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 informationTHESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University
The Hasse-Minkowski Theorem in Two and Three Variables THESIS Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University By
More informationChapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations
Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9.1 Chapter 9 Objectives
More information7. Prime Numbers Part VI of PJE
7. Prime Numbers Part VI of PJE 7.1 Definition (p.277) A positive integer n is prime when n > 1 and the only divisors are ±1 and +n. That is D (n) = { n 1 1 n}. Otherwise n > 1 is said to be composite.
More informationALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers
ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some
More informationNumber 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 informationKnow 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 informationLecture 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 informationCourse 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 informationNotes on Primitive Roots Dan Klain
Notes on Primitive Roots Dan Klain last updated March 22, 2013 Comments and corrections are welcome These supplementary notes summarize the presentation on primitive roots given in class, which differed
More informationStandard forms for writing numbers
Standard forms for writing numbers In order to relate the abstract mathematical descriptions of familiar number systems to the everyday descriptions of numbers by decimal expansions and similar means,
More informationA 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 informationEuler s, Fermat s and Wilson s Theorems
Euler s, Fermat s and Wilson s Theorems R. C. Daileda February 17, 2018 1 Euler s Theorem Consider the following example. Example 1. Find the remainder when 3 103 is divided by 14. We begin by computing
More informationA mod p 3 analogue of a theorem of Gauss on binomial coefficients
A mod p 3 analogue of a theorem of Gauss on binomial coefficients Dalhousie University, Halifax, Canada ELAZ, Schloß Schney, August 16, 01 Joint work with John B. Cosgrave Dublin, Ireland We begin with
More information1 Structure of Finite Fields
T-79.5501 Cryptology Additional material September 27, 2005 1 Structure of Finite Fields This section contains complementary material to Section 5.2.3 of the text-book. It is not entirely self-contained
More informationQuadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin
Quadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin mcadam@math.utexas.edu Abstract: We offer a proof of quadratic reciprocity that arises
More informationNumber 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 informationDefinition For a set F, a polynomial over F with variable x is of the form
*6. Polynomials Definition For a set F, a polynomial over F with variable x is of the form a n x n + a n 1 x n 1 + a n 2 x n 2 +... + a 1 x + a 0, where a n, a n 1,..., a 1, a 0 F. The a i, 0 i n are the
More informationPart 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
More informationNumber 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 information4.4 Solving Congruences using Inverses
4.4 Solving Congruences using Inverses Solving linear congruences is analogous to solving linear equations in calculus. Our first goal is to solve the linear congruence ax b pmod mq for x. Unfortunately
More informationNONABELIAN GROUPS WITH PERFECT ORDER SUBSETS
NONABELIAN GROUPS WITH PERFECT ORDER SUBSETS CARRIE E. FINCH AND LENNY JONES Abstract. Let G be a finite group and let x G. Define the order subset of G determined by x to be the set of all elements in
More informationCOMP239: 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 informationCPSC 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
More information2x 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 informationThe Chinese Remainder Theorem
The Chinese Remainder Theorem R. C. Daileda February 19, 2018 1 The Chinese Remainder Theorem We begin with an example. Example 1. Consider the system of simultaneous congruences x 3 (mod 5), x 2 (mod
More informationAN 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= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2
8. p-adic numbers 8.1. Motivation: Solving x 2 a (mod p n ). Take an odd prime p, and ( an) integer a coprime to p. Then, as we know, x 2 a (mod p) has a solution x Z iff = 1. In this case we can suppose
More informationLECTURE 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 informationCourse 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 informationIntroduction 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 informationEULER S THEOREM KEITH CONRAD
EULER S THEOREM KEITH CONRAD. Introduction Fermat s little theorem is an important property of integers to a prime modulus. Theorem. (Fermat). For prime p and any a Z such that a 0 mod p, a p mod p. If
More informationDiscrete Mathematics and Probability Theory Summer 2017 Course Notes Note 6
CS 70 Discrete Mathematics and Probability Theory Summer 2017 Course Notes Note 6 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over
More informationMATH 2200 Final Review
MATH 00 Final Review Thomas Goller December 7, 01 1 Exam Format The final exam will consist of 8-10 proofs It will take place on Tuesday, December 11, from 10:30 AM - 1:30 PM, in the usual room Topics
More informationThe Chinese Remainder Theorem
Sacred Heart University DigitalCommons@SHU Academic Festival Apr 20th, 9:30 AM - 10:45 AM The Chinese Remainder Theorem Nancirose Piazza Follow this and additional works at: http://digitalcommons.sacredheart.edu/acadfest
More informationPOLYGONAL-SIERPIŃSKI-RIESEL SEQUENCES WITH TERMS HAVING AT LEAST TWO DISTINCT PRIME DIVISORS
#A40 INTEGERS 16 (2016) POLYGONAL-SIERPIŃSKI-RIESEL SEQUENCES WITH TERMS HAVING AT LEAST TWO DISTINCT PRIME DIVISORS Daniel Baczkowski Department of Mathematics, The University of Findlay, Findlay, Ohio
More informationCIS 6930/4930 Computer and Network Security. Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography
CIS 6930/4930 Computer and Network Security Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography 1 Review of Modular Arithmetic 2 Remainders and Congruency For any integer a and any positive
More informationIntegers 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 informationThe primitive root theorem
The primitive root theorem Mar Steinberger First recall that if R is a ring, then a R is a unit if there exists b R with ab = ba = 1. The collection of all units in R is denoted R and forms a group under
More informationPart V. Chapter 19. Congruence of integers
Part V. Chapter 19. Congruence of integers Congruence modulo m Let m be a positive integer. Definition. Integers a and b are congruent modulo m if and only if a b is divisible by m. For example, 1. 277
More informationDiscrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6
CS 70 Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6 1 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes
More information2x 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 informationChapter 8. Introduction to Number Theory
Chapter 8 Introduction to Number Theory CRYPTOGRAPHY AND NETWORK SECURITY 1 Index 1. Prime Numbers 2. Fermat`s and Euler`s Theorems 3. Testing for Primality 4. Discrete Logarithms 2 Prime Numbers 3 Prime
More informationLARGE PRIME NUMBERS (32, 42; 4) (32, 24; 2) (32, 20; 1) ( 105, 20; 0).
LARGE PRIME NUMBERS 1. Fast Modular Exponentiation Given positive integers a, e, and n, the following algorithm quickly computes the reduced power a e % n. (Here x % n denotes the element of {0,, n 1}
More informationDiscrete Mathematics and Probability Theory Summer 2014 James Cook Note 5
CS 70 Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over a
More informationON A PROBLEM OF PILLAI AND ITS GENERALIZATIONS
ON A PROBLEM OF PILLAI AND ITS GENERALIZATIONS L. HAJDU 1 AND N. SARADHA Abstract. We study some generalizations of a problem of Pillai. We investigate the existence of an integer M such that for m M,
More informationCS 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 informationNumber 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
More informationFactoring Algorithms Pollard s p 1 Method. This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors.
Factoring Algorithms Pollard s p 1 Method This method discovers a prime factor p of an integer n whenever p 1 has only small prime factors. Input: n (to factor) and a limit B Output: a proper factor of
More informationSummary 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.
More information2.2 Some Consequences of the Completeness Axiom
60 CHAPTER 2. IMPORTANT PROPERTIES OF R 2.2 Some Consequences of the Completeness Axiom In this section, we use the fact that R is complete to establish some important results. First, we will prove that
More informationMath 324, Fall 2011 Assignment 7 Solutions. 1 (ab) γ = a γ b γ mod n.
Math 324, Fall 2011 Assignment 7 Solutions Exercise 1. (a) Suppose a and b are both relatively prime to the positive integer n. If gcd(ord n a, ord n b) = 1, show ord n (ab) = ord n a ord n b. (b) Let
More informationNumber Theory and Graph Theory. Prime numbers and congruences.
1 Number Theory and Graph Theory Chapter 2 Prime numbers and congruences. By A. Satyanarayana Reddy Department of Mathematics Shiv Nadar University Uttar Pradesh, India E-mail: satya8118@gmail.com 2 Module-1:Primes
More informationAll 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 informationSome 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 informationNOTES ON SIMPLE NUMBER THEORY
NOTES ON SIMPLE NUMBER THEORY DAMIEN PITMAN 1. Definitions & Theorems Definition: We say d divides m iff d is positive integer and m is an integer and there is an integer q such that m = dq. In this case,
More information1. 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 informationElementary 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 informationLECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS
LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS 1. The Chinese Remainder Theorem We now seek to analyse the solubility of congruences by reinterpreting their solutions modulo a composite
More informationThe Fundamental Theorem of Arithmetic
Chapter 1 The Fundamental Theorem of Arithmetic 1.1 Primes Definition 1.1. We say that p N is prime if it has just two factors in N, 1 and p itself. Number theory might be described as the study of the
More informationSOLUTIONS 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 informationCISC-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 informationMath 110 HW 3 solutions
Math 0 HW 3 solutions May 8, 203. For any positive real number r, prove that x r = O(e x ) as functions of x. Suppose r
More informationp = 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 informationMathematics 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
More informationax b mod m. has a solution if and only if d b. In this case, there is one solution, call it x 0, to the equation and there are d solutions x m d
10. Linear congruences In general we are going to be interested in the problem of solving polynomial equations modulo an integer m. Following Gauss, we can work in the ring Z m and find all solutions to
More informationIntroduction. What is RSA. A Guide To RSA by Robert Yates. Topics
A Guide To RSA by Robert Yates. Topics Introduction...01/09 What is RSA...01/09 Mod-Exponentiation...02/09 Euler's Theorem...03/09 RSA Algorithm...08/09 RSA Security...09/09 Introduction Welcome to my
More informationMATH Fundamental Concepts of Algebra
MATH 4001 Fundamental Concepts of Algebra Instructor: Darci L. Kracht Kent State University April, 015 0 Introduction We will begin our study of mathematics this semester with the familiar notion of even
More informationPMA225 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 informationPart IA Numbers and Sets
Part IA Numbers and Sets Definitions Based on lectures by A. G. Thomason Notes taken by Dexter Chua Michaelmas 2014 These notes are not endorsed by the lecturers, and I have modified them (often significantly)
More informationWORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}
WORKSHEET ON NUMBERS, MATH 215 FALL 18(WHYTE) We start our study of numbers with the integers: Z = {..., 2, 1, 0, 1, 2, 3,... } and their subset of natural numbers: N = {1, 2, 3,...} For now we will not
More informationCHAPTER 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
More information1 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 informationWilson s Theorem and Fermat s Little Theorem
Wilson s Theorem and Fermat s Little Theorem Wilson stheorem THEOREM 1 (Wilson s Theorem): (p 1)! 1 (mod p) if and only if p is prime. EXAMPLE: We have (2 1)!+1 = 2 (3 1)!+1 = 3 (4 1)!+1 = 7 (5 1)!+1 =
More informationChapter One. The Real Number System
Chapter One. The Real Number System We shall give a quick introduction to the real number system. It is imperative that we know how the set of real numbers behaves in the way that its completeness and
More informationTC10 / 3. Finite fields S. Xambó
TC10 / 3. Finite fields S. Xambó The ring Construction of finite fields The Frobenius automorphism Splitting field of a polynomial Structure of the multiplicative group of a finite field Structure of the
More informationChapter 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
More informationNumber 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 informationPUTNAM 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 informationSolving the general quadratic congruence. y 2 Δ (mod p),
Quadratic Congruences Solving the general quadratic congruence ax 2 +bx + c 0 (mod p) for an odd prime p (with (a, p) = 1) is equivalent to solving the simpler congruence y 2 Δ (mod p), where Δ = b 2 4ac
More informationWORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:
WORKSHEET MATH 215, FALL 15, WHYTE We begin our course with the natural numbers: N = {1, 2, 3,...} which are a subset of the integers: Z = {..., 2, 1, 0, 1, 2, 3,... } We will assume familiarity with their
More informationA Few Primality Testing Algorithms
A Few Primality Testing Algorithms Donald Brower April 2, 2006 0.1 Introduction These notes will cover a few primality testing algorithms. There are many such, some prove that a number is prime, others
More informationElementary Algebra Chinese Remainder Theorem Euclidean Algorithm
Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm April 11, 2010 1 Algebra We start by discussing algebraic structures and their properties. This is presented in more depth than what we
More informationOn some inequalities between prime numbers
On some inequalities between prime numbers Martin Maulhardt July 204 ABSTRACT. In 948 Erdős and Turán proved that in the set of prime numbers the inequality p n+2 p n+ < p n+ p n is satisfied infinitely
More informationWednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).
Wednesday, February 21 Today we will begin Course Notes Chapter 5 (Number Theory). 1 Return to Chapter 5 In discussing Methods of Proof (Chapter 3, Section 2) we introduced the divisibility relation from
More informationMath 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
More informationChapter 7. Number Theory. 7.1 Prime Numbers
Chapter 7 Number Theory 7.1 Prime Numbers Any two integers can be multiplied together to produce a new integer. For example, we can multiply the numbers four and five together to produce twenty. In this
More informationECEN 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,
More information