The document covers key concepts in number theory and cryptology, focusing on Euler's Totient Function, Euler's Theorem, and Fermat's Little Theorem. It explains how to calculate the value of φ(n) and provides examples of its application in modular arithmetic. The document also includes proofs and examples demonstrating the use of these theorems in solving exponentiation problems.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views
unit 3 part 2
The document covers key concepts in number theory and cryptology, focusing on Euler's Totient Function, Euler's Theorem, and Fermat's Little Theorem. It explains how to calculate the value of φ(n) and provides examples of its application in modular arithmetic. The document also includes proofs and examples demonstrating the use of these theorems in solving exponentiation problems.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10
CSF352: Number Theory and Cryptology
Session: 2024-25
B. Tech (CSE) 5th Semester
Course Instructor Course Coordinator
Dr. Parul Saini Dr. Parul Saini
Assistant Professor, School Assistant Professor, School of Computing of Computing Euler's Totient Function or Euler’s Phi-Function • This function finds the number of integers that are both smaller than n and relatively prime to n. • The set Zn* contains the numbers that are smaller than n and relatively prime to n. The function φ(n) calculates the number of elements in this set. The following helps to find the value of φ(n). 1. φ(1) = 0. 2. φ(p) = p − 1 if p is a prime. 3. φ(m × n) = φ(m) × φ(n) if m and n are relatively prime. 4. φ(pe) = pe − pe−1 if p is a prime. Note 1: The difficulty of finding φ(n) depends on the difficulty of finding the factorization of n. Examples: • What is the value of φ(13)? • Because 13 is a prime, φ(13) = (13 −1) = 12. • What is the value of φ(10)? • We can use the third rule: φ(10) = φ(2) × φ(5) = 1 × 4 = 4, because 2 and 5 are primes. • What is the value of φ(240)? • We can write 240 = 24× 31 × 51. Then φ(240) = (24−23) × (31− 30) × (51− 50) = 64 • Can we say that φ(49) = φ(7) × φ(7) = 6 × 6 = 36? • No. The third rule applies when m and n are relatively prime. Here 49 = 72 We need to use the fourth rule: φ(49) = 72 − 71= 42. • What is the number of elements in Z14*? • The answer is φ(14) = φ(7) × φ(2) = 6 × 1 = 6. The members are 1, 3, 5, 9, 11, and 13. Euler’s Theorem • Euler’s Theorem deals with powers of integers modulo positive integers. It arises in applications of elementary number theory, including the RSA cryptosystem. It is used in the production and generation of keys. • It states that: If x and n are coprime, then xφ(n) ≡ 1 (mod n). • Example: x=11, n=10 • 11φ(10) ≡ 1 (mod 10). φ(10)= φ(2 X 5)= φ(2) X φ(5) =1 X 4 =4 • 114 ≡ 1 (mod 10) • 114 mod 10 = 1 (mod 10) • 14641 mod 10 =1 mod 10 • 1=1 which is true • Any multiple (k) of φ(n) will also give the same result xφ(n).k ≡ 1 (mod n) • 114 ≡ 1 (mod 10) • 114*2 mod 10 = 1 (mod 10) Take k=2 • 118 ≡ 1 (mod 10) • 214358831 mod 10 =1 mod 10 • 1=1 which is true • Also, we can write above equation as: • Multiply both sides of above equation by x • x. xφ(n).k ≡ x. 1 (mod n) • xφ(n).k +1 ≡ x (mod n) Fermat’s Little Theorem • It is a special case of Euler’s Theorem [xφ(n) ≡ 1 (mod n) ] which states that if p is a prime and a is an integer such that p does not divide a then aφ(p)≡ 1 mod p First Version: ap-1≡ 1 mod p [φ(p) = p-1, since p is a prime] (From rule 2 of Euler’s Phi-Function) Multiply both sides of above equation by a a.ap-1 ≡ a.1 mod p Second Version: ap≡ a mod p Note 2: From ap-1 ≡ 1 mod p, we can say that ap-1-1 is divisible by p and from ap ≡ a mod p we can say that ap-a is divisible by p Examples: • Fermat’s little theorem sometimes is helpful for quickly finding a solution to some exponentiations • Find 610 mod 11 • We have 610 mod 11 = 1. This is the first version of Fermat’s little theorem where p = 11. • Find 312 mod 11 • Here the exponent (12) and the modulus (11) are not the same. With substitution this can be solved using Fermat’s little theorem. • 312 mod 11 = (311 × 3) mod 11 = (311 mod 11) (3 mod 11) = (3 × 3) mod 11 = 9 Proof of Fermat’s Little Theorem If p is a prime, and x ,a is an integer then below equation is true: (x1 + x2 + x3 + .... + xa )p = x1p + x2p + .... + xap + Ms of p(Multiples of p) Now substitute x1=x2=x3=...=xa=1, we get (1 + 1 + 1 +... a times)p = 1p + 1p + .... a times + Ms of p In congruence form we can write above equation as (1 + 1 + 1 +... a times)p ≡ (1p + 1p + .... a times) mod p ap ≡ a mod p (Second version of Fermat’s Little Theorem) Subtract a from both sides ap-a ≡ 0 mod p From above equation we can say that ap-a is divisible by p which is true for Fermat’s Little Theorem (From note 2 of Fermat’s Little Theorem) Since ap ≡ a mod p Divide both sides by a, we get ap-1≡ 1 mod p (First version of Fermat’s Little Theorem) From above equation (Subtract 1 from both sides), we can say that ap-1-1 is divisible by p which is true for Fermat’s Little Theorem (From note 2 of Fermat’s Little Theorem) Examples based on Euler's Totient Function or Euler’s Phi- Function, Euler's Theorem and Fermat’s Little Theorem • What is the value of φ(29)? • Because 29 is a prime, φ(29) = (29 −1) = 28. • What is the value of φ(32)? • We can write 32 = 24. Then φ(32) = (24−23) = 32-16 = 16 • Find 515 mod 13 • We have 515mod 13 = 513.52 mod 13 = (513 mod 13 ) (52 mod 13 ) mod 13 = (5)(12) mod 13 = 60 mod 13 = 8 • Find the result of 624 mod 35 • We can write 24 as 6 X 4. • 6 can be written as φ(7) and 4 can be written as φ(5) • Now, 24 = 6X4 = φ(7) X φ(5) = φ(35) • 624 mod 35 = 6φ(35) mod 35 = 1 (from Euler's theorem as 6 and 35 are coprime) • Find the remainder of 911 when divided by 13. • Fermat’s Little Theorem states ap-1≡ 1 mod p for prime p when a is not divisible by p. • If a =9 and p =13 , a and p are relatively prime the 912≡ 1 mod 13 is true. It means 912 mod 13 = 1 Now, 911 mod 13 = 912 . 9-1 mod 13 = (912 mod 13) (9-1 mod 13 ) mod 13 = (1)(3) mod 13 [Since multiplicative inverse of 9 in mod 13 (Z*13) is 3 because (9X3) mod 13 = 27 mod 13 =1 ] = 3 mod 13 =3 Hence remainder of 911 when divided by 13 is 3