SlideShare uma empresa Scribd logo
1 de 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]

Mais conteúdo relacionado

Mais procurados

Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptographyYasser Ali
 
Approximation algorithms
Approximation algorithmsApproximation algorithms
Approximation algorithmsGanesh Solanke
 
Principles of soft computing-Associative memory networks
Principles of soft computing-Associative memory networksPrinciples of soft computing-Associative memory networks
Principles of soft computing-Associative memory networksSivagowry Shathesh
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)Nitesh Singh
 
Fermat and euler theorem
Fermat and euler theoremFermat and euler theorem
Fermat and euler theoremJanani S
 
Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Sivagowry Shathesh
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 
Security Attacks on RSA
Security Attacks on RSASecurity Attacks on RSA
Security Attacks on RSAPratik Poddar
 
Cs8792 cns - unit i
Cs8792   cns - unit iCs8792   cns - unit i
Cs8792 cns - unit iArthyR3
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key CryptosystemDevakumar Kp
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logicAmey Kerkar
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculusRajendran
 
Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.mohanrathod18
 
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.SrinivasanMathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasanmunicsaa
 
Homomorphic encryption in cloud computing final
Homomorphic encryption  in cloud computing finalHomomorphic encryption  in cloud computing final
Homomorphic encryption in cloud computing finalSantanu Das Saan
 

Mais procurados (20)

Asymptotic notation
Asymptotic notationAsymptotic notation
Asymptotic notation
 
Elgamal & schnorr digital signature scheme copy
Elgamal & schnorr digital signature scheme   copyElgamal & schnorr digital signature scheme   copy
Elgamal & schnorr digital signature scheme copy
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptography
 
Approximation algorithms
Approximation algorithmsApproximation algorithms
Approximation algorithms
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Principles of soft computing-Associative memory networks
Principles of soft computing-Associative memory networksPrinciples of soft computing-Associative memory networks
Principles of soft computing-Associative memory networks
 
Logic programming (1)
Logic programming (1)Logic programming (1)
Logic programming (1)
 
Fermat and euler theorem
Fermat and euler theoremFermat and euler theorem
Fermat and euler theorem
 
Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing Unit I & II in Principles of Soft computing
Unit I & II in Principles of Soft computing
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 
Security Attacks on RSA
Security Attacks on RSASecurity Attacks on RSA
Security Attacks on RSA
 
Cs8792 cns - unit i
Cs8792   cns - unit iCs8792   cns - unit i
Cs8792 cns - unit i
 
Public Key Cryptosystem
Public Key CryptosystemPublic Key Cryptosystem
Public Key Cryptosystem
 
Id3,c4.5 algorithim
Id3,c4.5 algorithimId3,c4.5 algorithim
Id3,c4.5 algorithim
 
neural networks
 neural networks neural networks
neural networks
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
Predicate calculus
Predicate calculusPredicate calculus
Predicate calculus
 
Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.Mathematical Analysis of Recursive Algorithm.
Mathematical Analysis of Recursive Algorithm.
 
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.SrinivasanMathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
Mathematics Towards Elliptic Curve Cryptography-by Dr. R.Srinivasan
 
Homomorphic encryption in cloud computing final
Homomorphic encryption  in cloud computing finalHomomorphic encryption  in cloud computing final
Homomorphic encryption in cloud computing final
 

Semelhante a 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
 

Semelhante a 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
 
Primality
PrimalityPrimality
Primality
 
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
 

Último

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 

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.

Notas do Editor

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