Professional Documents
Culture Documents
Euler Function
Euler Function
xφ(n) ≡ 1 mod n
⇒ 11 φ(n) ≡ 1 mod 10
⇒ 11 4 ≡ 1 mod 10 (as, φ(10) =4 )
⇒ 14641 ≡ 1 mod 10
⇒ 14641 mod 10= 1 mod 10
• x φ(n)*a ≡ 1 mod 10
For example, 11 φ(10)*2 ≡ 1 mod 10
=> 11 8 ≡ 1 mod 10
[as, φ(10) =4; 11 4*2 = 11 8 ]
=>214,358,881≡ 1 mod 10
Application of Euler’s Toitient Theorem
• The security of the RSA cryptosystem lies in an
algorithm based on Euler's Theorem. This
cryptosystem has proven to be unbreakable,
as long as it is implemented correctly, for over
30 years.
• Primality testing (ap-1 = 1 (mod p))
• Fifth root party trick.
Euler's Totient Theorem is a fundamental concept in number theory and
is used in RSA (Rivest-Shamir-Adleman), a widely used asymmetric
encryption algorithm, for several critical reasons:
• X=3, n=5
⇒35-1 =34 =81
⇒81 ≡ 1 mod 5
⇒ 81 mod 5= 1 mod 5
• Another form of Fermat theorem is, xn ≡ x
mod n
• xn-1 ≡ 1 mod n
⇒xn .x-1 ≡ 1 mod n
⇒xn≡ x mod n
Example
1. X=3, n=5
=> xn = 35 =243 ≡ 3 mod 5
2. x= 5 ,n=2
=> xn =52 =25≡ 5 mod 2
Application of Fermat Theorem
• Primality testing
• Public key cryptography
• Base of RSA
• It’s often used to prove identity
Discrete logarithms calculation
gn mod P= x
• Here, g is primitive root or generator of P;(P is
a prime number)
• n can be any integer value and n is greater
than 1 to any range.
• We can write the equation this way,
logg x=n mod p
Example
Q1. 23 mod 7= ?
Ans: 1
Q2. solve log2 9 mod 11
Ans: P=11, g=2, x=9
⇒2n mod 11=9
Try n=1,2,3,4,……
n= 6
• It is easy to solve when we know the n and have to
calculate x .
• But when we have to find out n for given x then it
can be hard when P is large. Then the needed time
and effort is huge.
• That’s why it is called one way function and the
strength of this function depends on how much
time it takes to break it.
• It is used in ElGamal encryption, Diffie-Hellman key
exchange and digital signature algorithm.