Introduction to Number Theory 1 Euler Totient Function
Introduction to Number Theory 1
Euler Totient Function: (n) • • • (n) = how many numbers there are between 1 and n-1 that are relatively prime to n. (4) = 2 (1, 3 are relatively prime to 4) (5) = 4 (1, 2, 3, 4 are relatively prime to 5) (6) = 2 (1, 5 are relatively prime to 6) (7) = 6 (1, 2, 3, 4, 5, 6 are relatively prime to 7)
Euler Totient Function Cont. (5) and (7), (n) will be n-1 whenever n is a prime number. This implies that (n) will be easy to calculate when n has exactly two different prime factors: (P * Q) = (P-1)*(Q-1), if P and Q are prime.
Euler’s Totient Theorem • This theorem generalizes Fermat’s theorem and is an important key to the RSA algorithm. • Version 1: If GCD(a, p) = 1, and a < p, then a (p) 1(mod p). • Version 2: a (p)+1 a(mod p) so that p does not necessarily need to be relatively prime to a.
Example To Calculate 6^24 mod 35 35 prime factorization 5*7 Pi(35)=(5 -1)(7 -1)=4*6=24 As given in Euler’s theorem 6^24 mod 35 =1 20^62 mod 77 77 prime factorization 11*7 Pi(77)=(11 -1)(7 -1)=10*6=60 As given in Euler’s theorem version 2 20^61 mod 77*20 mod 77=20*20 mod 77=400 mod 77=15
Chinese Remainder Theorem Given pair wise co prime positive integers m 1, m 2, …. mn and arbitary integers b 1, b 2…bn the system of linear congruences x ≅b 1 mod m 1 x ≅b 2 mod m 2 : : x ≅bn mod mn has a solution and the solution is unique modulo M=m 1, m 2…. mn
Continues • To compute x: x= mod M Where Mi=M/mi--- M=m 1 xm 2…mn xi ≡ Mi ^-1 mod mi
Example x≡ 2 mod 3 x≡ 1 mod 4 x≡ 3 mod 5 a 1=2; a 2=1; a 3=3 m 1=3; m 2=4; m 3=5 M=3*4*5=60 Mi=M/mi- M 1=60/3=20; M 2=60/4=15; M 3=60/5=12 x 1=20^-1 mod 3=2 x 2=15^-1 mod 4=3 x 3=12^-1 mod 5=3
• =2*20*2+1*15*3+3*12*3 • =233 mod 60 • =53
- Slides: 9