EULER AND FERMAT THEOREM
Upcoming SlideShare
Loading in...5
×
 

EULER AND FERMAT THEOREM

on

  • 2,485 views

EULER THEOREM AND FERMAT THEOREM WITH RSA EXAMPLE

EULER THEOREM AND FERMAT THEOREM WITH RSA EXAMPLE

Statistics

Views

Total Views
2,485
Views on SlideShare
2,484
Embed Views
1

Actions

Likes
1
Downloads
56
Comments
0

1 Embed 1

http://www.docshut.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

EULER AND FERMAT THEOREM EULER AND FERMAT THEOREM Presentation Transcript

  • Fermat and Euler’s Theorems Presented By : Ankita Pandey ME ECE- 112604
  • CONTENTS PRIME NUMBERS  PRIME FACTORIZATION  RELATIVELY PRIME NUMBERS  GREATEST COMMON DIVISOR FERMAT’S THEOREM  FERMAT THEOREM PROOF EULER TOTIENT FUNCTION EULER’S THEOREM APPLICATIONS SUMMARY REFERENCES
  • PRIME NUMBERS : View slide
  • PRIME FACTORIZATION : View slide
  • RELATIVELY PRIME NUMBERS :
  • GREATEST COMMON DIVISOR (GCD)
  • FERMAT’S THEOREM≡≡
  • FERMAT’S THEOREM PROOF : Consider a set of positive integers less than ‘p’ : {1,2,3,…..,(p-1)} and multiply each element by ‘a’ and ‘modulo p’ , to get the set X = {a mod p, 2a mod p,…, (p-1)a mod p} No elements of X is zero and equal, since p doesn’t divide a. Multiplying the numbers in both sets (p and X) and taking the result mod p yields
  • FERMAT’S THEOREM PROOF :a * 2a *…* (p-1)a ≡ [1 * 2 * 3 *…* (p-1)] (mod p) a p −1 ( p −1)! ≡ ( p −1)!(mod p )Thus on equating (p-1)! term from both the sides,since it is relatively prime to p, result becomes, a p −1 ≡1(mod p )An alternative form of Fermat’s Theorem is given as a p ≡ a (mod p )
  • 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 : φ (n)♦ From φ (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: φ * Q) = (P-1)*(Q-1) (P if P and Q are prime.
  • EULER TOTIENT FUNCTION : φ (n)♦ If GCD(a, p) = 1, and a < p, then φ ≡a (p) 1(mod p).♦ In other words, If a and p are relatively prime, with a being the smaller integer, then when we multiply a with itself φ (p) times and divide the result by p, the remainder will be 1.
  • EULER’S THEOREM : a Φ( n ) ≡ 1( mod n )
  • EULER’S THEOREM :♦ Above equation is true if n is prime because then, Φ n ) = ( n −1) (and Fermat’s theorem holds.♦ Consider the set of such integers, labeled as, R = {x1 , x2 ,..., xΦ( n ) }Here each element xi of R is unique positive integer less than n with GCD( xi ,n ) = 1.
  • EULER’S THEOREM :♦ Multiply each element by a, modulo n : S = {( ax1 mod n ), ( ax2 mod n ),...., ( axΦ( n ) mod n )}The set S is permutation of R :  Because a and xi is relatively prime to n, xi so a must also be relatively prime to n. Thus the elements of S are integers that are less than n and that are relatively prime to n.  There are no duplicates in S.
  • EULER’S THEOREM :♦ If axi mod n = ax j mod n then xi =x j Φ ) (n Φ ) (n ∏(ax i mod n ) =∏xi i= 1 i= 1 Φ ) (n Φ ) (n ∏ax i= 1 i =∏(mod n ) xi i= 1  (n ) Φ  Φn ) ( a Φ ) (n × ∏≡  xi ∏(mod n ) xi i = 1  i= 1 a Φ n ) ≡ (mod n ) ( 1
  • APPLICATIONS:
  • EXAMPLE :1. Choose two large prime numbers P and Q. Let P = 7 , Q = 172. Calculate N = P * Q. Thus , N = 7 x 17 = 1193. Select the public key (i.e. the encryption key) E such that it is not a factor of (P-1)*(Q-1). • Now (7-1) x (17-1) = 6 x 16 = 96. • Factors of 96 are 2 and 3 (2 x 2 x 2 x 2 x 2 x 3). • E has to be prime to 96, let E = 5.
  • EXAMPLE :4. Select the private key (i.e. the decryption key) D such that the following equation is true : (D x E) mod (P-1) x (Q-1) = 1 • Substitute the values of E, P and Q in the equation • Let choose D = 77 since (5 x 77) mod 96 = 385 mod 96 = 1 Which satisfies the above condition.5. For encryption, calculate the Cipher Text CT from the Plain Text PT as follows : CT = PTᴱ mod N.
  • EXAMPLE : Let us consider of encoding of alphabets as A = 1, B = 2, C = 3,….. , Z = 26. We have to encrypt a single alphabet ‘ F’ (F = 6) using this scheme, with B’ s public key as 77 (known to A and B) and B’ s private key as 5 (known only to B). 5 CT = PTᴱ mod 119 =6 mod 119 = 416. Send CT as the cipher text to the reciever. Send 41 as the cipher text to the reciever.
  • EXAMPLE :7. For decryption at the reciever, calculate the plain text PT from the cipher text CT as follows : PT = CTᴰ mod N. PT = CTᴰ mod 119 = 77 41 mod 119 = 6 Which was the original plain text i.e. the code of ‘F’.
  • Encryption algorithm using the Decryption algorithm using public key the private key1. Encode the original 1. Raise the number to the character using A=1, power D, here 77. B=2 etc. 2. Divide the result by 1192. Raise the number to and get the remainder. power E, here 5. The resulting number is the plain text.3. Divide the result by 119 and get the remainder. 3. Decode the original The resulting number is character using 1=A, the cipher text. 2=B etc. F F 6 41 F 5 4177 6 Results modulo 119 Results modulo 119 6 F = 41
  • SUMMARY : Firstly Prime Numbers, Prime Factorization And Greatest Common Divisor were discussed. Secondly Fermat’s Theorem and its proof is done. Then Euler Totient Function is discussed. Lastly Euler’s Theorem is discussed.
  • REFERENCES :[1] Cryptography and Network Security Principlesand Practice, Fifth Edition, By: William Stallings.[2] Cryptography and Network Security, Chapter 9Mathematics of Cryptography, Part III: Primes andRelated Congruence Equations, By: BehrouzForouzan.[3]L. Levine, Fermats Little Theorem: A Proof byFunction Iteration," Math. Mag. 72 (1999), 308-309.[4] C. Smyth, A Coloring Proof of a Generalisationof Fermats Little Theorem," Amer. Math. Monthly93 (1986), 469-471.
  • THANK YOU.