{"id":54,"date":"2018-07-21T09:54:17","date_gmt":"2018-07-21T09:54:17","guid":{"rendered":"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=54"},"modified":"2018-12-27T09:56:10","modified_gmt":"2018-12-27T09:56:10","slug":"number-theory","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/chapter\/number-theory\/","title":{"rendered":"Number Theory"},"content":{"raw":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/LgbOOveCUEE\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Learning Objectives<\/strong>\r\n\r\n\u00d8\u00a0 To understand the basic exponential and logarithmic functions\r\n\r\n\u00d8\u00a0\u00a0 To understand the basic outline to\r\n\r\n&nbsp;\r\n<p style=\"padding-left: 60px\">o\u00a0\u00a0 prime numbers<\/p>\r\n<p style=\"padding-left: 60px\">o\u00a0\u00a0 Primality Testing<\/p>\r\n<p style=\"padding-left: 60px\">o\u00a0\u00a0 Primitive Roots &amp; Discrete Logarithms<\/p>\r\n<p style=\"padding-left: 60px\">o\u00a0\u00a0 Euclidean and Extended Euclidean Algorithms.<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>5.1 Introduction<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Number theory is a branch of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pure_mathematics\">pure mathematics <\/a>devoted primarily to the study of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integer\">integers. <\/a>It is sometimes called \"The Queen of Mathematics\" because of its foundational place in the discipline. The encryption algorithms depends heavily on modular arithmetic. We need to develop various machinery (notations and techniques) for manipulating numbers before can describe algorithms in a natural fashion.First we start with divisors.<\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<strong>5.2 Set of Integers<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The set of integers, denoted by Z, contains all integral numbers (with no fraction) from negative infinity to positive infinity. The integers are made up of positive numbers, negative numbers and zero. The positive numbers are like the naturals, but with a \"plus\" before:+1, +2, +3 \u2026.. Nevertheless, the \"plus\" of the positive numbers does not need to be be written. On the other hand, the negative numbers are like the naturals but with a \"minus\" before:-1,-2,-3\u2026. The number zero is special, because it is the only one that has neither a plus nor a minus, showing that it is neither positive nor negative. For example, the following numbers are integers:<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: center\">Z = {\u2026..,-3,-2,-1,0,1,2,3,\u2026..}<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>5.3 Binary Operations<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In cryptography, we are interested in three binary operations applied to the set of integers. A binary operation takes two inputs and creates one output. A binary operation on A is a rule that assigns to every pair of elements of A a unique element of A.<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-57 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-19.png\" alt=\"\" width=\"349\" height=\"261\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<strong>5.4 Integer Division<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u00d8\u00a0 In integer arithmetic, if we divide a by n, we can get q and r . The relationship between these four integers can be shown as<\/p>\r\n&nbsp;\r\n<p style=\"padding-left: 60px\"><strong>a = q \u00d7 n + r<\/strong><\/p>\r\n&nbsp;\r\n\r\n\u00d8\u00a0 Assume that a = 255 and n = 11. We can find q = 23 and R = 2 using the division algorithm.\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-58 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-20.png\" alt=\"\" width=\"494\" height=\"424\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>5.4.1 Integer Division Properties<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u00d8\u00a0 Property 1: if a\\1, then a=+\/- 1.\r\n\r\n\u00d8\u00a0\u00a0 Property 2: if a\\b and b\\a, then a=+\/-b.\r\n\r\n\u00d8\u00a0\u00a0 Property 3: if a\\b and b\\c, then a\\c.\r\n\r\n\u00d8\u00a0\u00a0 Property 4: if a\\b and a\\c, then a\\(m*b+n*c), where m and n are arbitrary integers.\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<strong>\u00a0 \u00a0 5.5 Divisors<\/strong>\r\n\r\n&nbsp;\r\n\r\n<strong>5.5.1<\/strong>\u00a0\u00a0\u00a0\u00a0 <strong>Definition<\/strong>\r\n\r\n&nbsp;\r\n\r\nLet a, b and c be integers such that\r\n<p style=\"padding-left: 60px\">a = b \u00b7c<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">Then b and c are said to divide (or are factors) of a, while a is said to be a multiple of b (as well as of c). The pipe symbol \u201c|\u201d denotes \u201cdivides\u201d so the situation is summarized by:<\/p>\r\n&nbsp;\r\n<p style=\"text-align: center\">b | a\u00a0\u00a0\u00a0\u00a0^ \u00a0 c | a<\/p>\r\n&nbsp;\r\n\r\n<strong>5.5.2<\/strong>\u00a0\u00a0\u00a0\u00a0 <strong>Examples<\/strong>\r\n\r\n&nbsp;\r\n\r\nWhich of the following is true?\r\n\r\n&nbsp;\r\n\r\n1.\u00a0 77 | 7\r\n\r\n2.\u00a0 7 | 77\r\n\r\n3.\u00a0 24 | 24\r\n\r\n4.\u00a0 0 | 24\r\n\r\n5.\u00a0 24 | 0\r\n\r\n&nbsp;\r\n\r\nAnswer:\r\n\r\n&nbsp;\r\n\r\n1.\u00a0\u00a0\u00a0\u00a0\u00a0 77 | 7: false bigger number can\u2019t divide smaller positive number\r\n\r\n2.\u00a0\u00a0\u00a0\u00a0\u00a0 7 | 77: true because 77 = 7 <em>\u00b7<\/em> 11\r\n\r\n3.\u00a0\u00a0\u00a0\u00a0\u00a0 24 | 24: true because 24 = 24 <em>\u00b7<\/em> 1\r\n\r\n4.\u00a0\u00a0\u00a0\u00a0\u00a0 0 | 24: false, only 0 is divisible by 0\r\n\r\n5.\u00a0\u00a0\u00a0\u00a0\u00a0 24 | 0: true, 0 is divisible by every number (0 = 24 <em>\u00b7<\/em> 0)\r\n\r\n&nbsp;\r\n\r\n<strong>5.5.3 Facts<\/strong>\r\n\r\n&nbsp;\r\n\r\nFact 1: The integer 1 has only one divisor, itself.\r\n\r\nFact 2: Any positive integer has at least two divisors.1 and itself(but it can have more)\r\n\r\n<\/div>\r\n&nbsp;\r\n<div>\r\n\r\n<strong>5.6 GCD<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The greatest common divisor of two positive integers is the largest integer that can divide both integers.\u00a0\u00a0\u00a0\u00a0 When gcd (a, b) = 1, we say that a and b are relatively prime.<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-59 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-21.png\" alt=\"\" width=\"326\" height=\"348\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>5.6.1 Relatively Prime Numbers &amp; GCD<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0 Two numbers a,b are relatively prime (co prime) if they have no common divisors apart from 1\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;padding-left: 60px\">eg. 8 and 15 are relatively prime since factors of 8 are 1,2,4,8 and of 15 are 1, 3, 5,15 and 1 is the only common factor<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">\u2022\u00a0\u00a0 Conversely can determine the greatest common divisor by comparing their prime factorizations and using least powers<\/p>\r\n&nbsp;\r\n<p style=\"padding-left: 60px\">eg. 300 = 2^1x3^1x5^2 ; 18<\/p>\r\n<p style=\"padding-left: 60px\">=\u00a0\u00a0 2^1x3^2 hence GCD(18,300)<\/p>\r\n<p style=\"padding-left: 60px\">=\u00a0\u00a0 2^1x3^1x5^0 = 6<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<strong>5.6.2 GCD Example<\/strong>\r\n\r\n&nbsp;\r\n\r\nFind the greatest common divisor of 140 and 12.\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-60 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-22.png\" alt=\"\" width=\"520\" height=\"260\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>5.6.3 GCD using Extended Euclidean Algorithm<\/strong>\r\n\r\n&nbsp;\r\n\r\nGiven two integers a and b, we often need to find other two integers, s and t, such that\r\n\r\n<img class=\"size-full wp-image-61 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-23.png\" alt=\"\" width=\"645\" height=\"375\" \/>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<strong>Example<\/strong>\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-62 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-24.png\" alt=\"\" width=\"537\" height=\"211\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>5.7 PRIME NUMBERS<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Prime numbers only have divisors of 1 and self \u2013 they cannot be written as a product of other numbers \u2013 note: 1 is Prime, but is generally not of interest<\/p>\r\n&nbsp;\r\n\r\n\u2022\u00a0 Eg. 2,3,5,7 are prime, 4, 6, 8,9,10 are not\r\n\r\n\u2022\u00a0\u00a0 Prime numbers are central to number theory\r\n\r\n\u2022\u00a0 List of prime number less than 200 is: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53\r\n\r\n59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163\r\n\r\n167 173 179 181 191 193 197 199\r\n\r\n&nbsp;\r\n\r\n<strong>5.7.1 PRIME FACTORIZATION<\/strong>\r\n\r\n&nbsp;\r\n\r\n\u2022\u00a0\u00a0 Let us factorize the any number n: n = a x b x c\r\n<p style=\"text-align: justify\">\u2022\u00a0\u00a0 Factoring a number is relatively hard compared to multiplying the factors together to generate the number<\/p>\r\n<p style=\"text-align: justify\">\u2022\u00a0 The prime factorisation of a number n is when its written as a product of primes \u2013 eg. 91 = 7 x 13; 3600 = 2^4 x 3^2 x 5^2<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>5.7.2 PRIMITIVE ROOTS<\/strong>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\nIf <em>n<\/em> is a positive integer, the integers between 1 and <em>n<\/em> \u2212 1 that are <a href=\"https:\/\/en.wikipedia.org\/wiki\/Coprime\">coprime <\/a>to <em>n<\/em> (or equivalently, the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Congruence_class\">congruence classes <\/a>coprime to <em>n<\/em>) form a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Group_(mathematics)\">group <\/a>with multiplication <a href=\"https:\/\/en.wikipedia.org\/wiki\/Modular_arithmetic\">modulo <\/a><em>n<\/em> as the operation; it is denoted by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Multiplicative_group_of_integers_modulo_n\">Z<em>n<\/em>\u00d7 <\/a>and is called the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Group_of_units\">group\u00a0<\/a><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Group_of_units\">of units <\/a><span style=\"text-align: initial;font-size: 1em\">modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\"> or the group of primitive classes modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">. As explained in the article <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Multiplicative_group_of_integers_modulo_n\">multiplicative group of integers modulo <em>n<\/em>, <\/a><span style=\"text-align: initial;font-size: 1em\">this group is <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Cyclic_group\">cyclic <\/a><span style=\"text-align: initial;font-size: 1em\">if and only if <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\"> is equal to 2, 4, <\/span><em style=\"text-align: initial;font-size: 1em\">p<\/em><em style=\"text-align: initial;font-size: 1em\">k<\/em><span style=\"text-align: initial;font-size: 1em\">, or 2<\/span><em style=\"text-align: initial;font-size: 1em\">p<\/em><em style=\"text-align: initial;font-size: 1em\">k<\/em><span style=\"text-align: initial;font-size: 1em\"> where <\/span><em style=\"text-align: initial;font-size: 1em\">p<\/em><em style=\"text-align: initial;font-size: 1em\">k<\/em><span style=\"text-align: initial;font-size: 1em\"> is a power of an odd <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Prime_number\">prime<\/a> <a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Prime_number\">number.<\/a><span style=\"text-align: initial;font-size: 1em\">[2][3][4] A <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Generating_set_of_a_group\">generator <\/a><span style=\"text-align: initial;font-size: 1em\">of this cyclic group is called a primitive root\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Primitive_root_modulo_n#cite_note-5\">,[5] <\/a><span style=\"text-align: initial;font-size: 1em\">or a primitive element of Z<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">\u00d7.The order of (i.e., the number of elements in) Z<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">\u00d7 is given by <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Euler%27s_totient_function\">Euler's totient function <\/a><em style=\"text-align: initial;font-size: 1em\">\u03c6<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">). (sequence <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/oeis.org\/A000010\">A000010 <\/a><span style=\"text-align: initial;font-size: 1em\">in\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">the <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/On-Line_Encyclopedia_of_Integer_Sequences\">OEIS) <\/a><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Euler%27s_theorem\">Euler's theorem <\/a><span style=\"text-align: initial;font-size: 1em\">says that <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><em style=\"text-align: initial;font-size: 1em\">\u03c6<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">) \u2261 1 (mod <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">) for every <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">coprime to <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">; the\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">lowest power of <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\"> which is congruent to 1 modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\"> is called the <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Multiplicative_order\">multiplicative\u00a0<\/a><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Multiplicative_order\">order <\/a><span style=\"text-align: initial;font-size: 1em\">of <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\"> modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">. In particular, for <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\"> to be a primitive root modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">, <\/span><em style=\"text-align: initial;font-size: 1em\">\u03c6<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">) has to be\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">the smallest power of <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\"> which is congruent to 1 modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">.\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">For example, if <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\"> = 14 then the elements of <\/span><strong style=\"text-align: initial;font-size: 1em\">Z<\/strong><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">\u00d7 are the congruence classes {1, 3, 5, 9, 11, 13}; there are <\/span><em style=\"text-align: initial;font-size: 1em\">\u03c6<\/em><span style=\"text-align: initial;font-size: 1em\">(14) = 6 of them. Here is a table of their powers modulo 14:<\/span>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-63 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-25.png\" alt=\"\" width=\"673\" height=\"188\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The order of 1 is 1, the orders of 3 and 5 are 6, the orders of 9 and 11 are 3, and the order of 13 is 2. Thus, 3 and 5 are the primitive roots modulo 14.<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>5.7.3 DISCRETE LOGARITHMS<\/strong>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">In general, let <em>G<\/em> be any group, with its group operation denoted by multiplication. Let <em>b<\/em> and <em>g<\/em> be any elements of <em>G<\/em>. Then any integer <em>k<\/em> that solves <em>b<\/em><em>k<\/em> = <em>g<\/em> is termed a discrete logarithm (or simply logarithm, in this context) of <em>g<\/em> to the base <em>b<\/em>. We write <em>k<\/em> = log<em>b<\/em> <em>g<\/em>. Depending on <em>b<\/em> and <em>g<\/em>, it is possible that no discrete logarithm exists, or that more than one discrete logarithm exists. Let <em>H<\/em> be\u00a0<span style=\"text-align: initial;font-size: 1em\">the <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Subgroup\">subgroup <\/a><span style=\"text-align: initial;font-size: 1em\">of <\/span><em style=\"text-align: initial;font-size: 1em\">G<\/em> <a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Generating_set_of_a_group\">generated <\/a><span style=\"text-align: initial;font-size: 1em\">by <\/span><em style=\"text-align: initial;font-size: 1em\">b<\/em><span style=\"text-align: initial;font-size: 1em\">. Then <\/span><em style=\"text-align: initial;font-size: 1em\">H<\/em><span style=\"text-align: initial;font-size: 1em\"> is a <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Cyclic_group\">cyclic group, <\/a><span style=\"text-align: initial;font-size: 1em\">and integral log<\/span><em style=\"text-align: initial;font-size: 1em\">b<\/em> <em style=\"text-align: initial;font-size: 1em\">g<\/em><span style=\"text-align: initial;font-size: 1em\"> exists for all <\/span><em style=\"text-align: initial;font-size: 1em\">g<\/em><span style=\"text-align: initial;font-size: 1em\"> in <\/span><em style=\"text-align: initial;font-size: 1em\">H<\/em><span style=\"text-align: initial;font-size: 1em\">. If <\/span><em style=\"text-align: initial;font-size: 1em\">H<\/em><span style=\"text-align: initial;font-size: 1em\"> is infinite, then log<\/span><em style=\"text-align: initial;font-size: 1em\">b<\/em> <em style=\"text-align: initial;font-size: 1em\">g<\/em><span style=\"text-align: initial;font-size: 1em\"> is also unique, and the discrete logarithm amounts to a <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Group_isomorphism\">group isomorphism.<\/a><\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\nlogb : H -&gt;\u00a0 Z\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">On the other hand, if <em>H<\/em> is finite of size <em>n<\/em>, then log<em>b<\/em> <em>g<\/em> is unique only up to congruence modulo <em>n<\/em>, and the discrete logarithm amounts to a group isomorphism<\/p>\r\n&nbsp;\r\n\r\nlogb : H\u00a0 -&gt; Z<sub>n<\/sub>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">where Z<sub><em>n<\/em><\/sub> denotes the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Ring_(algebra)\">ring <\/a>of integers modulo <em>n<\/em>. The familiar base change formula for ordinary logarithms remains valid: If <em>c<\/em> is another generator of <em>H<\/em>, then<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">logc(g)=logc(b).logb(g)<\/p>\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<strong>Summary<\/strong>\r\n\r\n\u00d8 Outlined the concept of number theory\r\n\r\n\u00d8 Discussed the integer division\r\n\r\n\u00d8 Explained the about the divisibility properties\r\n\r\n\u00d8 Introduction to prime numbers and relative prime number\r\n\r\n\u00d8 Explored the various examples of GCD.\r\n\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Number Theory<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/LgbOOveCUEE\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<img class=\"size-full wp-image-64 alignleft\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-26.png\" alt=\"\" width=\"659\" height=\"533\" \/>\r\n\r\n&nbsp;","rendered":"<div><span style=\"float: right\"><a href=\"https:\/\/youtu.be\/LgbOOveCUEE\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Learning Objectives<\/strong><\/p>\n<p>\u00d8\u00a0 To understand the basic exponential and logarithmic functions<\/p>\n<p>\u00d8\u00a0\u00a0 To understand the basic outline to<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 60px\">o\u00a0\u00a0 prime numbers<\/p>\n<p style=\"padding-left: 60px\">o\u00a0\u00a0 Primality Testing<\/p>\n<p style=\"padding-left: 60px\">o\u00a0\u00a0 Primitive Roots &amp; Discrete Logarithms<\/p>\n<p style=\"padding-left: 60px\">o\u00a0\u00a0 Euclidean and Extended Euclidean Algorithms.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.1 Introduction<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Number theory is a branch of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pure_mathematics\">pure mathematics <\/a>devoted primarily to the study of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Integer\">integers. <\/a>It is sometimes called &#8220;The Queen of Mathematics&#8221; because of its foundational place in the discipline. The encryption algorithms depends heavily on modular arithmetic. We need to develop various machinery (notations and techniques) for manipulating numbers before can describe algorithms in a natural fashion.First we start with divisors.<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p><strong>5.2 Set of Integers<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The set of integers, denoted by Z, contains all integral numbers (with no fraction) from negative infinity to positive infinity. The integers are made up of positive numbers, negative numbers and zero. The positive numbers are like the naturals, but with a &#8220;plus&#8221; before:+1, +2, +3 \u2026.. Nevertheless, the &#8220;plus&#8221; of the positive numbers does not need to be be written. On the other hand, the negative numbers are like the naturals but with a &#8220;minus&#8221; before:-1,-2,-3\u2026. The number zero is special, because it is the only one that has neither a plus nor a minus, showing that it is neither positive nor negative. For example, the following numbers are integers:<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\">Z = {\u2026..,-3,-2,-1,0,1,2,3,\u2026..}<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.3 Binary Operations<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In cryptography, we are interested in three binary operations applied to the set of integers. A binary operation takes two inputs and creates one output. A binary operation on A is a rule that assigns to every pair of elements of A a unique element of A.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-57 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-19.png\" alt=\"\" width=\"349\" height=\"261\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-19.png 349w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-19-300x224.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-19-65x49.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-19-225x168.png 225w\" sizes=\"auto, (max-width: 349px) 100vw, 349px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p><strong>5.4 Integer Division<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u00d8\u00a0 In integer arithmetic, if we divide a by n, we can get q and r . The relationship between these four integers can be shown as<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 60px\"><strong>a = q \u00d7 n + r<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u00d8\u00a0 Assume that a = 255 and n = 11. We can find q = 23 and R = 2 using the division algorithm.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-58 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-20.png\" alt=\"\" width=\"494\" height=\"424\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-20.png 494w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-20-300x257.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-20-65x56.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-20-225x193.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-20-350x300.png 350w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.4.1 Integer Division Properties<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u00d8\u00a0 Property 1: if a\\1, then a=+\/- 1.<\/p>\n<p>\u00d8\u00a0\u00a0 Property 2: if a\\b and b\\a, then a=+\/-b.<\/p>\n<p>\u00d8\u00a0\u00a0 Property 3: if a\\b and b\\c, then a\\c.<\/p>\n<p>\u00d8\u00a0\u00a0 Property 4: if a\\b and a\\c, then a\\(m*b+n*c), where m and n are arbitrary integers.<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p><strong>\u00a0 \u00a0 5.5 Divisors<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.5.1<\/strong>\u00a0\u00a0\u00a0\u00a0 <strong>Definition<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Let a, b and c be integers such that<\/p>\n<p style=\"padding-left: 60px\">a = b \u00b7c<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Then b and c are said to divide (or are factors) of a, while a is said to be a multiple of b (as well as of c). The pipe symbol \u201c|\u201d denotes \u201cdivides\u201d so the situation is summarized by:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center\">b | a\u00a0\u00a0\u00a0\u00a0^ \u00a0 c | a<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.5.2<\/strong>\u00a0\u00a0\u00a0\u00a0 <strong>Examples<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Which of the following is true?<\/p>\n<p>&nbsp;<\/p>\n<p>1.\u00a0 77 | 7<\/p>\n<p>2.\u00a0 7 | 77<\/p>\n<p>3.\u00a0 24 | 24<\/p>\n<p>4.\u00a0 0 | 24<\/p>\n<p>5.\u00a0 24 | 0<\/p>\n<p>&nbsp;<\/p>\n<p>Answer:<\/p>\n<p>&nbsp;<\/p>\n<p>1.\u00a0\u00a0\u00a0\u00a0\u00a0 77 | 7: false bigger number can\u2019t divide smaller positive number<\/p>\n<p>2.\u00a0\u00a0\u00a0\u00a0\u00a0 7 | 77: true because 77 = 7 <em>\u00b7<\/em> 11<\/p>\n<p>3.\u00a0\u00a0\u00a0\u00a0\u00a0 24 | 24: true because 24 = 24 <em>\u00b7<\/em> 1<\/p>\n<p>4.\u00a0\u00a0\u00a0\u00a0\u00a0 0 | 24: false, only 0 is divisible by 0<\/p>\n<p>5.\u00a0\u00a0\u00a0\u00a0\u00a0 24 | 0: true, 0 is divisible by every number (0 = 24 <em>\u00b7<\/em> 0)<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.5.3 Facts<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Fact 1: The integer 1 has only one divisor, itself.<\/p>\n<p>Fact 2: Any positive integer has at least two divisors.1 and itself(but it can have more)<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div>\n<p><strong>5.6 GCD<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The greatest common divisor of two positive integers is the largest integer that can divide both integers.\u00a0\u00a0\u00a0\u00a0 When gcd (a, b) = 1, we say that a and b are relatively prime.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-59 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-21.png\" alt=\"\" width=\"326\" height=\"348\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-21.png 326w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-21-281x300.png 281w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-21-65x69.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-21-225x240.png 225w\" sizes=\"auto, (max-width: 326px) 100vw, 326px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.6.1 Relatively Prime Numbers &amp; GCD<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0 Two numbers a,b are relatively prime (co prime) if they have no common divisors apart from 1<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;padding-left: 60px\">eg. 8 and 15 are relatively prime since factors of 8 are 1,2,4,8 and of 15 are 1, 3, 5,15 and 1 is the only common factor<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0\u00a0 Conversely can determine the greatest common divisor by comparing their prime factorizations and using least powers<\/p>\n<p>&nbsp;<\/p>\n<p style=\"padding-left: 60px\">eg. 300 = 2^1&#215;3^1&#215;5^2 ; 18<\/p>\n<p style=\"padding-left: 60px\">=\u00a0\u00a0 2^1&#215;3^2 hence GCD(18,300)<\/p>\n<p style=\"padding-left: 60px\">=\u00a0\u00a0 2^1&#215;3^1&#215;5^0 = 6<\/p>\n<\/div>\n<div>\n<p><strong>5.6.2 GCD Example<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Find the greatest common divisor of 140 and 12.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-60 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-22.png\" alt=\"\" width=\"520\" height=\"260\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-22.png 520w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-22-300x150.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-22-65x33.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-22-225x113.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-22-350x175.png 350w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.6.3 GCD using Extended Euclidean Algorithm<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Given two integers a and b, we often need to find other two integers, s and t, such that<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-61 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-23.png\" alt=\"\" width=\"645\" height=\"375\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-23.png 645w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-23-300x174.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-23-65x38.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-23-225x131.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-23-350x203.png 350w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<\/div>\n<div>\n<p><strong>Example<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-62 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-24.png\" alt=\"\" width=\"537\" height=\"211\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-24.png 537w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-24-300x118.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-24-65x26.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-24-225x88.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-24-350x138.png 350w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.7 PRIME NUMBERS<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Prime numbers only have divisors of 1 and self \u2013 they cannot be written as a product of other numbers \u2013 note: 1 is Prime, but is generally not of interest<\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0 Eg. 2,3,5,7 are prime, 4, 6, 8,9,10 are not<\/p>\n<p>\u2022\u00a0\u00a0 Prime numbers are central to number theory<\/p>\n<p>\u2022\u00a0 List of prime number less than 200 is: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53<\/p>\n<p>59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163<\/p>\n<p>167 173 179 181 191 193 197 199<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.7.1 PRIME FACTORIZATION<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>\u2022\u00a0\u00a0 Let us factorize the any number n: n = a x b x c<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0\u00a0 Factoring a number is relatively hard compared to multiplying the factors together to generate the number<\/p>\n<p style=\"text-align: justify\">\u2022\u00a0 The prime factorisation of a number n is when its written as a product of primes \u2013 eg. 91 = 7 x 13; 3600 = 2^4 x 3^2 x 5^2<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.7.2 PRIMITIVE ROOTS<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>If <em>n<\/em> is a positive integer, the integers between 1 and <em>n<\/em> \u2212 1 that are <a href=\"https:\/\/en.wikipedia.org\/wiki\/Coprime\">coprime <\/a>to <em>n<\/em> (or equivalently, the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Congruence_class\">congruence classes <\/a>coprime to <em>n<\/em>) form a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Group_(mathematics)\">group <\/a>with multiplication <a href=\"https:\/\/en.wikipedia.org\/wiki\/Modular_arithmetic\">modulo <\/a><em>n<\/em> as the operation; it is denoted by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Multiplicative_group_of_integers_modulo_n\">Z<em>n<\/em>\u00d7 <\/a>and is called the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Group_of_units\">group\u00a0<\/a><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Group_of_units\">of units <\/a><span style=\"text-align: initial;font-size: 1em\">modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\"> or the group of primitive classes modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">. As explained in the article <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Multiplicative_group_of_integers_modulo_n\">multiplicative group of integers modulo <em>n<\/em>, <\/a><span style=\"text-align: initial;font-size: 1em\">this group is <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Cyclic_group\">cyclic <\/a><span style=\"text-align: initial;font-size: 1em\">if and only if <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\"> is equal to 2, 4, <\/span><em style=\"text-align: initial;font-size: 1em\">p<\/em><em style=\"text-align: initial;font-size: 1em\">k<\/em><span style=\"text-align: initial;font-size: 1em\">, or 2<\/span><em style=\"text-align: initial;font-size: 1em\">p<\/em><em style=\"text-align: initial;font-size: 1em\">k<\/em><span style=\"text-align: initial;font-size: 1em\"> where <\/span><em style=\"text-align: initial;font-size: 1em\">p<\/em><em style=\"text-align: initial;font-size: 1em\">k<\/em><span style=\"text-align: initial;font-size: 1em\"> is a power of an odd <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Prime_number\">prime<\/a> <a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Prime_number\">number.<\/a><span style=\"text-align: initial;font-size: 1em\">[2][3][4] A <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Generating_set_of_a_group\">generator <\/a><span style=\"text-align: initial;font-size: 1em\">of this cyclic group is called a primitive root\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Primitive_root_modulo_n#cite_note-5\">,[5] <\/a><span style=\"text-align: initial;font-size: 1em\">or a primitive element of Z<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">\u00d7.The order of (i.e., the number of elements in) Z<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">\u00d7 is given by <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Euler%27s_totient_function\">Euler&#8217;s totient function <\/a><em style=\"text-align: initial;font-size: 1em\">\u03c6<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">). (sequence <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/oeis.org\/A000010\">A000010 <\/a><span style=\"text-align: initial;font-size: 1em\">in\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">the <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/On-Line_Encyclopedia_of_Integer_Sequences\">OEIS) <\/a><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Euler%27s_theorem\">Euler&#8217;s theorem <\/a><span style=\"text-align: initial;font-size: 1em\">says that <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><em style=\"text-align: initial;font-size: 1em\">\u03c6<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">) \u2261 1 (mod <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">) for every <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\">coprime to <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">; the\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">lowest power of <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\"> which is congruent to 1 modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\"> is called the <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Multiplicative_order\">multiplicative\u00a0<\/a><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Multiplicative_order\">order <\/a><span style=\"text-align: initial;font-size: 1em\">of <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\"> modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">. In particular, for <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\"> to be a primitive root modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">, <\/span><em style=\"text-align: initial;font-size: 1em\">\u03c6<\/em><span style=\"text-align: initial;font-size: 1em\">(<\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">) has to be\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">the smallest power of <\/span><em style=\"text-align: initial;font-size: 1em\">a<\/em><span style=\"text-align: initial;font-size: 1em\"> which is congruent to 1 modulo <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">.\u00a0<\/span><span style=\"text-align: initial;font-size: 1em\">For example, if <\/span><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\"> = 14 then the elements of <\/span><strong style=\"text-align: initial;font-size: 1em\">Z<\/strong><em style=\"text-align: initial;font-size: 1em\">n<\/em><span style=\"text-align: initial;font-size: 1em\">\u00d7 are the congruence classes {1, 3, 5, 9, 11, 13}; there are <\/span><em style=\"text-align: initial;font-size: 1em\">\u03c6<\/em><span style=\"text-align: initial;font-size: 1em\">(14) = 6 of them. Here is a table of their powers modulo 14:<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-63 aligncenter\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-25.png\" alt=\"\" width=\"673\" height=\"188\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-25.png 673w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-25-300x84.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-25-65x18.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-25-225x63.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-25-350x98.png 350w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The order of 1 is 1, the orders of 3 and 5 are 6, the orders of 9 and 11 are 3, and the order of 13 is 2. Thus, 3 and 5 are the primitive roots modulo 14.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>5.7.3 DISCRETE LOGARITHMS<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">In general, let <em>G<\/em> be any group, with its group operation denoted by multiplication. Let <em>b<\/em> and <em>g<\/em> be any elements of <em>G<\/em>. Then any integer <em>k<\/em> that solves <em>b<\/em><em>k<\/em> = <em>g<\/em> is termed a discrete logarithm (or simply logarithm, in this context) of <em>g<\/em> to the base <em>b<\/em>. We write <em>k<\/em> = log<em>b<\/em> <em>g<\/em>. Depending on <em>b<\/em> and <em>g<\/em>, it is possible that no discrete logarithm exists, or that more than one discrete logarithm exists. Let <em>H<\/em> be\u00a0<span style=\"text-align: initial;font-size: 1em\">the <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Subgroup\">subgroup <\/a><span style=\"text-align: initial;font-size: 1em\">of <\/span><em style=\"text-align: initial;font-size: 1em\">G<\/em> <a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Generating_set_of_a_group\">generated <\/a><span style=\"text-align: initial;font-size: 1em\">by <\/span><em style=\"text-align: initial;font-size: 1em\">b<\/em><span style=\"text-align: initial;font-size: 1em\">. Then <\/span><em style=\"text-align: initial;font-size: 1em\">H<\/em><span style=\"text-align: initial;font-size: 1em\"> is a <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Cyclic_group\">cyclic group, <\/a><span style=\"text-align: initial;font-size: 1em\">and integral log<\/span><em style=\"text-align: initial;font-size: 1em\">b<\/em> <em style=\"text-align: initial;font-size: 1em\">g<\/em><span style=\"text-align: initial;font-size: 1em\"> exists for all <\/span><em style=\"text-align: initial;font-size: 1em\">g<\/em><span style=\"text-align: initial;font-size: 1em\"> in <\/span><em style=\"text-align: initial;font-size: 1em\">H<\/em><span style=\"text-align: initial;font-size: 1em\">. If <\/span><em style=\"text-align: initial;font-size: 1em\">H<\/em><span style=\"text-align: initial;font-size: 1em\"> is infinite, then log<\/span><em style=\"text-align: initial;font-size: 1em\">b<\/em> <em style=\"text-align: initial;font-size: 1em\">g<\/em><span style=\"text-align: initial;font-size: 1em\"> is also unique, and the discrete logarithm amounts to a <\/span><a style=\"text-align: initial;font-size: 1em\" href=\"https:\/\/en.wikipedia.org\/wiki\/Group_isomorphism\">group isomorphism.<\/a><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>logb : H -&gt;\u00a0 Z<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">On the other hand, if <em>H<\/em> is finite of size <em>n<\/em>, then log<em>b<\/em> <em>g<\/em> is unique only up to congruence modulo <em>n<\/em>, and the discrete logarithm amounts to a group isomorphism<\/p>\n<p>&nbsp;<\/p>\n<p>logb : H\u00a0 -&gt; Z<sub>n<\/sub><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">where Z<sub><em>n<\/em><\/sub> denotes the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Ring_(algebra)\">ring <\/a>of integers modulo <em>n<\/em>. The familiar base change formula for ordinary logarithms remains valid: If <em>c<\/em> is another generator of <em>H<\/em>, then<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">logc(g)=logc(b).logb(g)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>\u00d8 Outlined the concept of number theory<\/p>\n<p>\u00d8 Discussed the integer division<\/p>\n<p>\u00d8 Explained the about the divisibility properties<\/p>\n<p>\u00d8 Introduction to prime numbers and relative prime number<\/p>\n<p>\u00d8 Explored the various examples of GCD.<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Number Theory<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/LgbOOveCUEE\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-64 alignleft\" src=\"http:\/\/csp11.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/55\/2018\/07\/1-26.png\" alt=\"\" width=\"659\" height=\"533\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-26.png 659w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-26-300x243.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-26-65x53.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-26-225x182.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-content\/uploads\/sites\/55\/2018\/07\/1-26-350x283.png 350w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":3,"menu_order":4,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-kulothungan"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-54","chapter","type-chapter","status-publish","hentry","contributor-dr-kulothungan"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/users\/3"}],"version-history":[{"count":6,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/54\/revisions"}],"predecessor-version":[{"id":528,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/54\/revisions\/528"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapters\/54\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/pressbooks\/v2\/chapter-type?post=54"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/contributor?post=54"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp11\/wp-json\/wp\/v2\/license?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}