SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Cryptography and Network Security Chapter 8 by William Stallings by  B . A . Forouzan
Objectives ❏  To introduce prime numbers and their applications   in cryptography. ❏  To discuss some primality test algorithms and their   efficiencies. ❏  To discuss factorization algorithms and their   applications in cryptography. ❏  To describe the Chinese remainder theorem and its   application. ❏  To introduce quadratic congruence. ❏  To introduce modular exponentiation and   logarithm.
9Definition Figure  Three groups of positive integers A prime is divisible only by itself and 1. Note
Prime Numbers ,[object Object],[object Object],[object Object],[object Object],[object Object]
Primes Under 2000 Prime Numbers
Cardinality of Primes Infinite Number of Primes There is an infinite number of primes. Number of Primes Note
Continued Find the number of primes less than 1,000,000. Example  Solution The approximation gives the range 72,383 to 78,543. The actual number of primes is 78,498.
Given a number n, how can we determine if n is a prime? The answer is that we need to see if the number is divisible by all primes less than Checking for Primeness We know that this method is inefficient, but it is a good start.
Continued Is 97 a prime? Example  Is 301 a prime? Example  Solution The floor of   97 = 9. The primes less than 9 are 2, 3, 5, and 7. We need to see if 97 is divisible by any of these numbers. It is not, so 97 is a prime. Solution The floor of   301 = 17. We need to check 2, 3, 5, 7, 11, 13, and 17. The numbers 2, 3, and 5 do not divide 301, but 7 does. Therefore 301 is not a prime.
Sieve of Eratosthenes Continued
Prime Factorisation ,[object Object],[object Object],[object Object],[object Object]
Relatively Prime Numbers & GCD ,[object Object],[object Object],[object Object],[object Object]
Fermat's Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fermat’s Little Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Euler’s phi-function,   (n), which is sometimes called the Euler’s totient function  plays a very important role in cryptography.  The function finds number of integer that are smaller  than n and relativly prime to n.  Euler’s Phi-Function
Euler Totient Function  ø(n) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Euler Totient Function  ø(n) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
We can combine the above four rules to find the value of   (n). For example, if n can be factored as  n = p 1 e 1   × p 2 e 2  × … × p k e k  then we combine the third and the fourth rule to find Continued The difficulty of finding   (n) depends on the difficulty of finding the factorization of  n . Note
Continued What is the value of   (13)? Example  Solution Because 13 is a prime,   (13) = (13 −1) = 12. What is the value of   (10)? Example  Solution We can use the third rule:   (10) =   (2) ×   (5) = 1 × 4 = 4, because 2 and 5 are primes.
Continued What is the value of   (240)? Example  Solution Can we say that   (49) =   (7) ×   (7) = 6 × 6 = 36? Example  Solution
Continued What is the value of   (240)? Example  Solution We can write 240 = 2 4  × 3 1  × 5 1 . Then  (240) = (2 4  −2 3 ) × (3 1  − 3 0 ) × (5 1  − 5 0 ) = 64 Can we say that   (49) =   (7) ×   (7) = 6 × 6 = 36? Example  Solution No. The third rule applies when  m  and  n  are relatively prime. Here 49 = 7 2 . We need to use the fourth rule:   (49) = 7 2  − 7 1  = 42.
Continued What is the number of elements in Z 14 *? Example  Solution The answer is   (14) =   (7) ×   (2) = 6 × 1 = 6. The members are 1, 3, 5, 9, 11, and 13. Interesting point: If  n  > 2, the value of   ( n ) is even. Note
Euler's Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Euler’s Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Primality Testing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Miller Rabin Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Probabilistic Considerations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Example
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Example
CHINESE REMAINDER THEOREM The Chinese remainder theorem (CRT) is used to solve a set of congruent equations with one variable but different moduli, which are relatively prime, as shown below:
Continued The following is an example of a set of equations with different moduli: Example  The solution to this set of equations is given in the next section; for the moment, note that the answer to this set of equations is x = 23. This value satisfies all equations: 23 ≡ 2 (mod 3), 23 ≡ 3 (mod 5), and 23 ≡ 2 (mod 7).
Continued Solution To Chinese Remainder Theorem 1. Find M = m 1  × m 2  × … × m k . This is the common modulus. 2. Find M 1  = M/m 1 , M 2  = M/m 2 , …, M k  = M/m k . 3. Find the multiplicative inverse of M 1 , M 2 , …, M k  using the   corresponding moduli (m 1 , m 2 , …, m k ). Call the inverses   M 1 −1 , M 2 −1 , …, M k   −1 . 4. The solution to the simultaneous equations is
Continued Find the solution to the simultaneous equations: Example  Solution We follow the four steps. 1. M = 3 × 5 × 7 = 105 2. M 1  = 105 / 3 = 35, M 2  = 105 / 5 = 21, M 3  = 105 / 7 = 15 3. The inverses are M 1 −1  = 2, M 2 −1  = 1, M 3   −1  = 1 4. x = (2 × 35 × 2 + 3 × 21 × 1 + 2 × 15 × 1) mod 105 = 23 mod 105
Continued Find an integer that has a remainder of 3 when divided by 7 and 13, but is divisible by 12. Example  Solution This is a CRT problem. We can form three equations and solve them to find the value of x. If we follow the four steps, we find x = 276. We can check that  276 = 3 mod 7, 276 = 3 mod 13 and 276 is divisible by 12 (the quotient is 23 and the remainder is zero).
Chinese Remainder Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object]
Chinese Remainder Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object]
Chinese Remainder Theorem ,[object Object],[object Object],[object Object],Chinese Remainder Theorem
Chinese Remainder Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chinese Remainder Theorem
Chinese Remainder Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chinese Remainder Theorem
Chinese Remainder Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Chinese Remainder Theorem
Primitive Roots ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Powers of Integers, modulo 19 Discrete Logarithms a  : primitive root
Discrete Logarithms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Powers of Integers, modulo 19 Discrete Logarithms a  : primitive root
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6Adeel Rasheed
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Subhasis Dash
 
Travelling salesman dynamic programming
Travelling salesman dynamic programmingTravelling salesman dynamic programming
Travelling salesman dynamic programmingmaharajdey
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.mali yogesh kumar
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler designAnul Chaudhary
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation harshit chavda
 
Introduction to design and analysis of algorithm
Introduction to design and analysis of algorithmIntroduction to design and analysis of algorithm
Introduction to design and analysis of algorithmDevaKumari Vijay
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory Rajendran
 
INTRODUCTION TO ALGORITHMS Third Edition
INTRODUCTION TO ALGORITHMS Third EditionINTRODUCTION TO ALGORITHMS Third Edition
INTRODUCTION TO ALGORITHMS Third EditionPHI Learning Pvt. Ltd.
 
SHA 1 Algorithm.ppt
SHA 1 Algorithm.pptSHA 1 Algorithm.ppt
SHA 1 Algorithm.pptRajapriya82
 

Was ist angesagt? (20)

IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
RSA Algorithm
RSA AlgorithmRSA Algorithm
RSA Algorithm
 
Travelling salesman dynamic programming
Travelling salesman dynamic programmingTravelling salesman dynamic programming
Travelling salesman dynamic programming
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
 
Encryption algorithms
Encryption algorithmsEncryption algorithms
Encryption algorithms
 
Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
 
20CS2021 DISTRIBUTED COMPUTING
20CS2021 DISTRIBUTED COMPUTING20CS2021 DISTRIBUTED COMPUTING
20CS2021 DISTRIBUTED COMPUTING
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler design
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
 
Introduction to design and analysis of algorithm
Introduction to design and analysis of algorithmIntroduction to design and analysis of algorithm
Introduction to design and analysis of algorithm
 
Intro automata theory
Intro automata theory Intro automata theory
Intro automata theory
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
NP completeness
NP completenessNP completeness
NP completeness
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
INTRODUCTION TO ALGORITHMS Third Edition
INTRODUCTION TO ALGORITHMS Third EditionINTRODUCTION TO ALGORITHMS Third Edition
INTRODUCTION TO ALGORITHMS Third Edition
 
Data Structure and Algorithm - Divide and Conquer
Data Structure and Algorithm - Divide and ConquerData Structure and Algorithm - Divide and Conquer
Data Structure and Algorithm - Divide and Conquer
 
SHA 1 Algorithm.ppt
SHA 1 Algorithm.pptSHA 1 Algorithm.ppt
SHA 1 Algorithm.ppt
 

Ähnlich wie Ch08

ch08 modified.pptmodified.pptmodified.ppt
ch08 modified.pptmodified.pptmodified.pptch08 modified.pptmodified.pptmodified.ppt
ch08 modified.pptmodified.pptmodified.ppttahirnaquash2
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiouvafopoulos
 
A Proof of Twin primes and Golbach's Conjecture
A Proof of Twin primes and Golbach's ConjectureA Proof of Twin primes and Golbach's Conjecture
A Proof of Twin primes and Golbach's Conjecturenikos mantzakouras
 
The Mathematics of RSA Encryption
The Mathematics of RSA EncryptionThe Mathematics of RSA Encryption
The Mathematics of RSA EncryptionNathan F. Dunn
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxvaishnavi339314
 
FermatThm.pptx
FermatThm.pptxFermatThm.pptx
FermatThm.pptxSnehSinha6
 
Solving Linear Equations Over p-Adic Integers
Solving Linear Equations Over p-Adic IntegersSolving Linear Equations Over p-Adic Integers
Solving Linear Equations Over p-Adic IntegersJoseph Molina
 
Basics of Mathematical Cryptography
Basics of Mathematical CryptographyBasics of Mathematical Cryptography
Basics of Mathematical CryptographyNeha Gupta
 
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdfnassorokayanda9412
 
Arithmetic sequence in elementary and HS
Arithmetic sequence in elementary and HSArithmetic sequence in elementary and HS
Arithmetic sequence in elementary and HSRoseEdenAbitong2
 
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huliCRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huliharshmacduacin
 
The Complexity Of Primality Testing
The Complexity Of Primality TestingThe Complexity Of Primality Testing
The Complexity Of Primality TestingMohammad Elsheikh
 

Ähnlich wie Ch08 (20)

Ch08
Ch08Ch08
Ch08
 
ch08 modified.pptmodified.pptmodified.ppt
ch08 modified.pptmodified.pptmodified.pptch08 modified.pptmodified.pptmodified.ppt
ch08 modified.pptmodified.pptmodified.ppt
 
Unit 3.ppt
Unit 3.pptUnit 3.ppt
Unit 3.ppt
 
2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou2010 3-24 cryptography stamatiou
2010 3-24 cryptography stamatiou
 
Number theory
Number theoryNumber theory
Number theory
 
Rsa documentation
Rsa documentationRsa documentation
Rsa documentation
 
Ch7
Ch7Ch7
Ch7
 
Number theory
Number theoryNumber theory
Number theory
 
Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
 
A Proof of Twin primes and Golbach's Conjecture
A Proof of Twin primes and Golbach's ConjectureA Proof of Twin primes and Golbach's Conjecture
A Proof of Twin primes and Golbach's Conjecture
 
The Mathematics of RSA Encryption
The Mathematics of RSA EncryptionThe Mathematics of RSA Encryption
The Mathematics of RSA Encryption
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptx
 
FermatThm.pptx
FermatThm.pptxFermatThm.pptx
FermatThm.pptx
 
Solving Linear Equations Over p-Adic Integers
Solving Linear Equations Over p-Adic IntegersSolving Linear Equations Over p-Adic Integers
Solving Linear Equations Over p-Adic Integers
 
Basics of Mathematical Cryptography
Basics of Mathematical CryptographyBasics of Mathematical Cryptography
Basics of Mathematical Cryptography
 
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
3.-SEQUENCES-AND-SERIES-THEORY.hhsssspdf
 
Arithmetic sequence in elementary and HS
Arithmetic sequence in elementary and HSArithmetic sequence in elementary and HS
Arithmetic sequence in elementary and HS
 
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huliCRYPTOGRAPHY AND NUMBER THEORY, he ha huli
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
 
Proof Techniques
Proof TechniquesProof Techniques
Proof Techniques
 
The Complexity Of Primality Testing
The Complexity Of Primality TestingThe Complexity Of Primality Testing
The Complexity Of Primality Testing
 

Kürzlich hochgeladen

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Kürzlich hochgeladen (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Ch08

  • 1. Cryptography and Network Security Chapter 8 by William Stallings by B . A . Forouzan
  • 2. Objectives ❏ To introduce prime numbers and their applications in cryptography. ❏ To discuss some primality test algorithms and their efficiencies. ❏ To discuss factorization algorithms and their applications in cryptography. ❏ To describe the Chinese remainder theorem and its application. ❏ To introduce quadratic congruence. ❏ To introduce modular exponentiation and logarithm.
  • 3. 9Definition Figure Three groups of positive integers A prime is divisible only by itself and 1. Note
  • 4.
  • 5. Primes Under 2000 Prime Numbers
  • 6. Cardinality of Primes Infinite Number of Primes There is an infinite number of primes. Number of Primes Note
  • 7. Continued Find the number of primes less than 1,000,000. Example Solution The approximation gives the range 72,383 to 78,543. The actual number of primes is 78,498.
  • 8. Given a number n, how can we determine if n is a prime? The answer is that we need to see if the number is divisible by all primes less than Checking for Primeness We know that this method is inefficient, but it is a good start.
  • 9. Continued Is 97 a prime? Example Is 301 a prime? Example Solution The floor of  97 = 9. The primes less than 9 are 2, 3, 5, and 7. We need to see if 97 is divisible by any of these numbers. It is not, so 97 is a prime. Solution The floor of  301 = 17. We need to check 2, 3, 5, 7, 11, 13, and 17. The numbers 2, 3, and 5 do not divide 301, but 7 does. Therefore 301 is not a prime.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. Euler’s phi-function,  (n), which is sometimes called the Euler’s totient function plays a very important role in cryptography. The function finds number of integer that are smaller than n and relativly prime to n. Euler’s Phi-Function
  • 16.
  • 17.
  • 18. We can combine the above four rules to find the value of  (n). For example, if n can be factored as n = p 1 e 1 × p 2 e 2 × … × p k e k then we combine the third and the fourth rule to find Continued The difficulty of finding  (n) depends on the difficulty of finding the factorization of n . Note
  • 19. Continued What is the value of  (13)? Example Solution Because 13 is a prime,  (13) = (13 −1) = 12. What is the value of  (10)? Example Solution We can use the third rule:  (10) =  (2) ×  (5) = 1 × 4 = 4, because 2 and 5 are primes.
  • 20. Continued What is the value of  (240)? Example Solution Can we say that  (49) =  (7) ×  (7) = 6 × 6 = 36? Example Solution
  • 21. Continued What is the value of  (240)? Example Solution We can write 240 = 2 4 × 3 1 × 5 1 . Then  (240) = (2 4 −2 3 ) × (3 1 − 3 0 ) × (5 1 − 5 0 ) = 64 Can we say that  (49) =  (7) ×  (7) = 6 × 6 = 36? Example Solution No. The third rule applies when m and n are relatively prime. Here 49 = 7 2 . We need to use the fourth rule:  (49) = 7 2 − 7 1 = 42.
  • 22. Continued What is the number of elements in Z 14 *? Example Solution The answer is  (14) =  (7) ×  (2) = 6 × 1 = 6. The members are 1, 3, 5, 9, 11, and 13. Interesting point: If n > 2, the value of  ( n ) is even. Note
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. CHINESE REMAINDER THEOREM The Chinese remainder theorem (CRT) is used to solve a set of congruent equations with one variable but different moduli, which are relatively prime, as shown below:
  • 31. Continued The following is an example of a set of equations with different moduli: Example The solution to this set of equations is given in the next section; for the moment, note that the answer to this set of equations is x = 23. This value satisfies all equations: 23 ≡ 2 (mod 3), 23 ≡ 3 (mod 5), and 23 ≡ 2 (mod 7).
  • 32. Continued Solution To Chinese Remainder Theorem 1. Find M = m 1 × m 2 × … × m k . This is the common modulus. 2. Find M 1 = M/m 1 , M 2 = M/m 2 , …, M k = M/m k . 3. Find the multiplicative inverse of M 1 , M 2 , …, M k using the corresponding moduli (m 1 , m 2 , …, m k ). Call the inverses M 1 −1 , M 2 −1 , …, M k −1 . 4. The solution to the simultaneous equations is
  • 33. Continued Find the solution to the simultaneous equations: Example Solution We follow the four steps. 1. M = 3 × 5 × 7 = 105 2. M 1 = 105 / 3 = 35, M 2 = 105 / 5 = 21, M 3 = 105 / 7 = 15 3. The inverses are M 1 −1 = 2, M 2 −1 = 1, M 3 −1 = 1 4. x = (2 × 35 × 2 + 3 × 21 × 1 + 2 × 15 × 1) mod 105 = 23 mod 105
  • 34. Continued Find an integer that has a remainder of 3 when divided by 7 and 13, but is divisible by 12. Example Solution This is a CRT problem. We can form three equations and solve them to find the value of x. If we follow the four steps, we find x = 276. We can check that 276 = 3 mod 7, 276 = 3 mod 13 and 276 is divisible by 12 (the quotient is 23 and the remainder is zero).
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. Powers of Integers, modulo 19 Discrete Logarithms a : primitive root
  • 43.
  • 44. Powers of Integers, modulo 19 Discrete Logarithms a : primitive root
  • 45.

Hinweis der Redaktion

  1. Lecture slides by Lawrie Brown for “Cryptography and Network Security”, 4/e, by William Stallings, Chapter 8 – “ Introduction to Number Theory ”.