SlideShare une entreprise Scribd logo
1  sur  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]

Contenu connexe

Tendances

Digital signature algorithm (de la cruz, genelyn).ppt 2
Digital signature algorithm (de la cruz, genelyn).ppt 2Digital signature algorithm (de la cruz, genelyn).ppt 2
Digital signature algorithm (de la cruz, genelyn).ppt 2YooGenelyn
 
Network security - OSI Security Architecture
Network security - OSI Security ArchitectureNetwork security - OSI Security Architecture
Network security - OSI Security ArchitectureBharathiKrishna6
 
Message authentication
Message authenticationMessage authentication
Message authenticationCAS
 
Evaluating hypothesis
Evaluating  hypothesisEvaluating  hypothesis
Evaluating hypothesisswapnac12
 
Linear models for classification
Linear models for classificationLinear models for classification
Linear models for classificationSung Yub Kim
 
T9. Trust and reputation in multi-agent systems
T9. Trust and reputation in multi-agent systemsT9. Trust and reputation in multi-agent systems
T9. Trust and reputation in multi-agent systemsEASSS 2012
 
block ciphers
block ciphersblock ciphers
block ciphersAsad Ali
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSADr.Florence Dayana
 
Cs8792 cns - unit i
Cs8792   cns - unit iCs8792   cns - unit i
Cs8792 cns - unit iArthyR3
 

Tendances (20)

Spline representations
Spline representationsSpline representations
Spline representations
 
Compiler Design- Machine Independent Optimizations
Compiler Design- Machine Independent OptimizationsCompiler Design- Machine Independent Optimizations
Compiler Design- Machine Independent Optimizations
 
Digital signature algorithm (de la cruz, genelyn).ppt 2
Digital signature algorithm (de la cruz, genelyn).ppt 2Digital signature algorithm (de la cruz, genelyn).ppt 2
Digital signature algorithm (de la cruz, genelyn).ppt 2
 
Network security - OSI Security Architecture
Network security - OSI Security ArchitectureNetwork security - OSI Security Architecture
Network security - OSI Security Architecture
 
Message authentication
Message authenticationMessage authentication
Message authentication
 
Evaluating hypothesis
Evaluating  hypothesisEvaluating  hypothesis
Evaluating hypothesis
 
Unit 1
Unit 1Unit 1
Unit 1
 
Unit 2 in daa
Unit 2 in daaUnit 2 in daa
Unit 2 in daa
 
COMPILER DESIGN Run-Time Environments
COMPILER DESIGN Run-Time EnvironmentsCOMPILER DESIGN Run-Time Environments
COMPILER DESIGN Run-Time Environments
 
Linear models for classification
Linear models for classificationLinear models for classification
Linear models for classification
 
T9. Trust and reputation in multi-agent systems
T9. Trust and reputation in multi-agent systemsT9. Trust and reputation in multi-agent systems
T9. Trust and reputation in multi-agent systems
 
Daa unit 5
Daa unit 5Daa unit 5
Daa unit 5
 
block ciphers
block ciphersblock ciphers
block ciphers
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Rsa cryptosystem
Rsa cryptosystemRsa cryptosystem
Rsa cryptosystem
 
Truth management system
Truth  management systemTruth  management system
Truth management system
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSA
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
 
Exhaustive Search
Exhaustive SearchExhaustive Search
Exhaustive Search
 
Cs8792 cns - unit i
Cs8792   cns - unit iCs8792   cns - unit i
Cs8792 cns - unit i
 

Similaire à Ch08

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
 
27-Equivalent under modulo-27-Oct-2020Material_I_27-Oct-2020_Cryptography_.pdf
27-Equivalent under modulo-27-Oct-2020Material_I_27-Oct-2020_Cryptography_.pdf27-Equivalent under modulo-27-Oct-2020Material_I_27-Oct-2020_Cryptography_.pdf
27-Equivalent under modulo-27-Oct-2020Material_I_27-Oct-2020_Cryptography_.pdfMohamedshabana38
 

Similaire à Ch08 (20)

Ch08
Ch08Ch08
Ch08
 
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
 
27-Equivalent under modulo-27-Oct-2020Material_I_27-Oct-2020_Cryptography_.pdf
27-Equivalent under modulo-27-Oct-2020Material_I_27-Oct-2020_Cryptography_.pdf27-Equivalent under modulo-27-Oct-2020Material_I_27-Oct-2020_Cryptography_.pdf
27-Equivalent under modulo-27-Oct-2020Material_I_27-Oct-2020_Cryptography_.pdf
 

Dernier

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 

Dernier (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 

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.

Notes de l'éditeur

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