Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mathematical Background: Prime Numbers

Similar presentations


Presentation on theme: "Mathematical Background: Prime Numbers"— Presentation transcript:

1 Mathematical Background: Prime Numbers
Network Security Design Fundamentals ET-IDA-082 Lecture-4 Mathematical Background: Prime Numbers , v24 Prof. W. Adi

2 Mathematical Background In Discrete Mathematics, number theory
Outlines Euclidean Algorithm, Remainder Greatest Common Divisor (gcd) Group Theory, Rings, Finite Fields Element’s Order, Euler Theorem Prime Numbers Prime Number Generation Extension Fields part 1 part 2 part 3 part 4

3 Primes are necessary to generate a GF
Prime Numbers Primes are necessary to generate a GF Prime numbers like : 2, 3, 5, 7, …..13 ,17 ,19 ….. How many primes do exist less which are than n? There is an simplified approximate number of (n) primes where: (Tchebycheff Theorem) or Example: For 1  r  = n Pr(r=prime) =

4 Sample prime numbers List of Primes up to 4483

5 How to Find Probably-Primes ?
Based on: Fermat´s Theorem If p is a prime number where 1 < b < p then p-1 b = (mod p) Primality test: If an integer m verifies Fermat theorem for some b, then m is called a pseudoprime to the base b. The probability that m is a prime is > 2-1 Miller test is widely used as primality test based on Fermat theorem That is; bm-1 = (mod m)

6 How to Find Probable Primes? Widespread primality test algorithm
Use Miller Test Widespread primality test algorithm m is odd Serch for s and Q such that m-1= 2s Q, Q is odd Compute yes no yes no yes m is a strong pseudoprime for the base b no Miller test based on Fermat theorem for t independent random choice of b has the probability that m is not a prime roughly < 4-t m is not a prime

7 How to Find Provably-Primes ? Pocklington´s Theorem (1916)
Let n = 1 + F R and let F = q1 ... qt be the distinct prime factors of F. If there exists a number a such that 1. an-1 ≡ 1 (mod n) 2. for all i = 1 .. t, gcd (a(n-1)/qi - 1, n) = 1, 3. if F >  n, then n is prime. If n is prime the probability that a randomly selected a which satisfies Pocklington is (1 – 1/qi) Example: n = 2 ( ) + 1 = 67, F = 3 x 11 and R=2. Is 67 a prime? Proof: gcd ( 2 (67-1)/ 3 –1 , 67 ) = gcd ( 222 –1 , 67 ) = 1 is true (selecting a=2) gcd ( 2 (67-1)/ 11 –1, 67 ) = gcd ( 26 –1 , 67 ) = 1 is true = 1 mod 67 ( or in Z67 ) is true F = 3 x 11 > 67 => > is true => 67 is prime By selecting R=3 => n = 3 (3x11) +1 = 100. Is 100 a prime?. Check condition 2: = 299 =88  1 in (mod 100) (condition 2 is not true) => 100 is not a prime !

8 Example: Prove that 67 is a prime , examine GF(67) Algebra
Some facts in GF(67) Number of invertible elements in GF(67) is Euler function (67) = (67-1)=66 = The possible multiplicative orders in GF(67) are the divisors of 66 namely 1, 2, 3, 6,11,22,33,66 Number of elements with order 1 is (1) = 1 Number of elements with order 33 is (33) = (3x11)=(3-1) (11-1)= 20 Number of elements with order 66 is (66) = (2x3x11)=(2-1)(3-1)(11-1)= 20 order of 11: 111 = 111, 112 = -131, 113 =-91, 115=501, 116=14, 1111=30, 1122=29 1, 1133=29x11=-1 1 => order of 11 is 66. Now we know that the order of 11 is 66 , thus Ord (11i ) = 66 / gcd (66,i). by selecting i=2 => order [ 112]=54 = 66/2=33. by selecting i=5 => order [115=50]= 66/1=66. by selecting i=6 => order [116 ]= 66/6=11. Mult. Inv of 31 GF( 67) =13 a1-qa2 b1-qb2 n n a b a b q r computation 1 2 1 1 2 2 67 31 1 1 2 5 67/31 =2 + 5/67 31 5 1 1 0-2x1 -2 6 1 31/5= 6 +1/5 --- 1-6x-2 13 5 1 1 -2 5 5/1=5+ 0/1


Download ppt "Mathematical Background: Prime Numbers"

Similar presentations


Ads by Google