0% found this document useful (0 votes)
5 views

Abstract Algebra and Number Theory

The document discusses the significance of abstract algebra and number theory in modern cryptography, emphasizing the role of prime numbers and modular arithmetic. It covers key concepts such as the Euclidean algorithm, Fermat's and Euler's theorems, and the properties of modular arithmetic. Additionally, it explains the importance of prime numbers in encryption algorithms and provides examples of calculations related to these mathematical principles.

Uploaded by

wabedin470
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Abstract Algebra and Number Theory

The document discusses the significance of abstract algebra and number theory in modern cryptography, emphasizing the role of prime numbers and modular arithmetic. It covers key concepts such as the Euclidean algorithm, Fermat's and Euler's theorems, and the properties of modular arithmetic. Additionally, it explains the importance of prime numbers in encryption algorithms and provides examples of calculations related to these mathematical principles.

Uploaded by

wabedin470
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

Abstract Algebra and

Number Theory
Abstract Algebra and Number
Theory
 Modern cryptography

 Plaintext and Ciphertext

 Most encryption is heavily on number theory

 Abstract Algebra

 No major contribution of calculus and Trigonometry


Concepts

 The Division Algorithm  Polynomial Arithmetic

 The Euclidean Algorithm  Prime Numbers

  Fermat's and Euler's Theorem


The Extended Euclidean
Algorithm  Testing for Primality
 Modular Arithmetic  The Chinese Remainder

 Groups , Rings , Fields and Theorem

Finite Fields  Discrete Logarithms


Prime Numbers

 Prime Numbers : Has exactly two devisors.


 If “N” is the prime , then the divisors are 1 and N.
 All numbers have prime factors.
Numbers 10 11 100 37 308 14688

Prime 21 x 51 11 x 111 22 x 52 11 x 371 22 x 71 x 25 x 33 x


Factorizatio 111 171
n

Prime 2 ,5 1 , 11 2,5 1 , 37 2,7, 2,3,


Numbers 11 17
Prime Numbers

A Prime Number is number greater than


1 with only two factors – itself and one.
It cannot be divided further by any other
numbers without leaving a remainder.
Prime Numbers – Example

 2 is a prime number
 3 is a prime number
 5 is a prime number
 7 is a prime number
 9 is not a prime number
 9 is composite number
 33 is a composite number

33 11 3 1
1 33 3 33 11 33 33 33
33 33 33 33
0 0 0
0
Why prime numbers in
cryptography ?
 Many encryption algorithms are based on prime numbers

 Very fast to multiply two large prime numbers.

 Extremely computer-intensive to do the reverse.

 Factoring very large prime numbers is very hard.

Are they prime numbers ?


5393
27644437
4398042316799
1125899839733759
18014398241046527
Modular Arithmetic
 System of arithmetic for integers.
 Wrap around after reaching a certain value called modulus.
 Central mathematical concept in cryptography.

0
Congruence 12 10
0
10
In cryptography , congruence (≡) instead of equality (=) (-2)

Examples :
1 3
15 ≡ 3 ( mod 26 ) 12 15 10 33
12 30
33 ≡ 3 (mod 10) 3 3
10 ≡ -2 ( mod 12 )
a ≡ b (mod m)

a = km + b
k
m a

Valid or invalid
38 ≡ 2 ( mod 12 )
38 ≡ 14 ( mod 12 )
5 ≡ 0 ( mod 5 )
10 ≡ 2 ( mod 6 )
13 ≡ 3 ( mod 13 )
2 ≡ -3 ( mod 5 )
-8 ≡ 7 ( mod 5 )
One more analogy

Circumference : 10 Length : 35

No of wraps Remaining Thread Congruence


(Quotient) (Remainder)
1 25 35 ≡ 25 mod 10
2 15 35 ≡ 15 mod 10
3 5 35 ≡ 5 mod 10
Properties of Modular Arithmetic

1. [ ( a mod n ) + ( b mod n ) ] = ( a + b ) mod n


2. [ ( a mod n ) – ( b mod n ) ] = ( a – b ) mod n
3. [ ( a mod n ) * ( b mod n ) ] = ( a * b ) mod n

Example :

[ ( 15 mod 8 ) + ( 11 mod 8 ) ]mod 8 = ( 15 + 11 ) mod 8


= 26 mod 8
=2
Properties of Modular Arithmetic

Property Expression

Commutative Laws (a + b ) mod n = ( b + a ) mod n


( a * b ) mod n = ( b * a ) mod n

Associative Laws [ ( a + b ) + c ] mod n = [ a + ( b + c ) ]


mod n
[ ( a * b ) * c ] mod n = [ a * ( b * c ) ]
mod n
Distributive Laws [ a * ( b + c ) ] mod n = [ ( a * b ) + ( a
* c ) ] mod n

Identities ( 0 + a ) mod n = a mod n


( 1 * a ) mod n = a mod n

Additive Inverse For each a∈Zn , there exists a “–a” such


that
a + (-a) ≡ 0 mod n
Modular Exponentiation

 It is a type of a exponentiation performed over a modulus.


 ab mod m or ab ( mod m ).

Solve 233 mod 30


Example :
233 mod 30 = - 73 mod 30 || 23 mod 30 can be 23 or -7.
= - 73 mod 30
233 mod 30
= - 72 *-7 mod 30
3100 mod 29 = 49 *-7 mod 30
= - 133 mod 30
= - 13 mod 30
= 17 mod 30
233 mod 30 = 17
Example :
Solve 887 mod 187

881 mod 187 = 88


882 mod 187 = 881 * 881 mod 187 = 88 * 88 = 7744 mod 187 = 77
884 mod 187 = 882 * 882 mod 187= 77 * 77 = 5929 mod 187 = 132
887 mod 187 = 884 * 882 * 881 mod 187 = ( 132 * 77 * 88 ) mod 187
= 894,432 mod 187

887 mod 187 = 11


Euclidean Algorithm

 Euclidean Algorithm or Euclid's Algorithm


 For computing the Greatest common Divisor ( GCD )
 Highset common factor (HCF)
 Starts with two numbers, 𝑎 and 𝑏, where 𝑎>𝑏>b.
 The last non-zero remainder is the GCD of the original two numbers.

12 33
Divisors 1,2,3,4,6,12 1,3,11,33
Common Divisors 1,3
Greatest Common 3
Divisors

GCD ( 12 , 33 ) = 3
25 150
Divisors 1,5,25 1,2,3,5,6,10,15,25,30
50,75,150
Common Divisors
Greatest Common
Divisors

GCD (25,150) = 25

13 31
Divisors
Common Divisors
Greatest Common
Divisors

GCD (13,31) = 1
Find GCD 12,33
Euclid's Algorithm for finding GCD

GCD (12,33) = 3

Q A B R

33 12

Find the GCD (750,900)


GCD (252,105)
Euclid's Algorithm for finding GCD

Prerequisite : a > b

Euclid_GCD (a,b):

if b = 0 then

return a ;

else

return Euclid_GCD ( b , a mod b ) ;


Example 1 : find the GCD (50,12)

Solution :

Here a=50 , b=12

GCD (a , b ) =GCD (b , a mod b )

GCD ( 50 , 12 ) =GCD (12 , 50 ) mod 12 = GCD (12 , 2 )


GCD ( 12 , 2 ) = GCD (2 , 12 mod 2 ) = GCD (2 , 0 )
GCD ( 50 , 12 ) = 2

Find the GCD ( 83 , 19 )


Relative Prime Numbers

Two numbers are said to be relatively prime , if they have


no prime Factors in common , and their only common factor is 1.

 If GCD ( a , b ) = 1 then “a” and “b” are relatively prime numbers


 Co-prime

GCD (4 , 13 ) = 1
Are 4 and 13 relatively prime ? Yes , 4 and 13 are relatively prime numbers.

4 13
Divisors 1,2,4 1,13
Common Divisors 1
Greatest Common 1
Divisors
Are 15 and 21 relatively prime ?

15 21

Divisors

Common Divisors

Greatest Common
Divisors
Euler's Totient
Function
(Phi Function)
Euler's Totient Function

 Denoted as φ(n)
 φ(n) = Number of positive integers less than “n” that are relatively prime to n.

Example :

Find φ(5)

Numbers less than 5 are 1,2,3 and 4

GCD Relatively prime ?


GCD (1,5) = 1 ✔
GCD (2,5) = 1 ✔
GCD (3,5) = 1 ✔
GCD (4,5) = 1 ✔

φ(5) = 4
Find φ(11)
Solution

Here n = 11

Numbers less than 5 are 1,2,3,4,5,6,7,8,9 and 10


GCD Relatively prime ?
GCD (1,11) = 1 ✔
GCD (2,11) = 1 ✔
GCD (3,11) = 1 ✔
GCD (4,11) = 1 ✔
GCD (5,11) = 1 ✔
GCD (6,11) = 1 ✔

GCD Relatively prime ?


GCD (7,11) = 1 ✔
GCD (8,11) = 1 ✔
GCD (9,11) = 1 ✔
GCD (10,11) = 1 ✔
Fermat's Little Theorem

If “p” is a prime number and “a” is a positive integer not divisible by “p” then
ap-1 ≡ 1 ( mod p )

Example 1 :

Does Fermat's theorem hold true for p = 5 and a = 2 ?

Solution : Given p = 5 a = 2

ap-1 ≡ 1 (mod p)
25-1 ≡ 1 (mod 5)
24 ≡ 1 (mod 5 )
16 ≡ 1 (mod 5)

Therefore , Fermat's theorem holds true for p = 5 and a = 2

You might also like