SlideShare a Scribd company logo
4:-
Chapter 4:-
Number Theory




 By:- Sarthak Patel (www.sarthakpatel.in)
Outline
       Prime And Relative Prime Numbers
       Modular Arithmetic,
       Euler’s Theorem
       Euclid’s Algorithm
       Discrete Logarithm Tics




2   Sarthak Patel (www.sarthakpatel.in)
Prime Numbers
       An integer p > 1 is a prime number if and only if its only
       divisors are ± 1 and ±p. Prime numbers play a critical role in
       number theory and in the techniques like RSA, Deffie-
       Hellman key exchange.




3   Sarthak Patel (www.sarthakpatel.in)
Contd…
    Any integer a > 1 can be factored in a unique way as

    where p1 < p2 < ... < pt are prime numbers and where each is
    a positive integer. This is known as the fundamental theorem of
    arithmetic.




4   Sarthak Patel (www.sarthakpatel.in)
Contd...
       If a and b are two prime numbers then this condition will
       always satisfy:

          gcd(a, b) = 1

       Relatively Prime
          Two integers are relatively prime if their only common positive
          integer factor is 1.
          gcd(a, b) =1                 ex: 8 and 15



5   Sarthak Patel (www.sarthakpatel.in)
Divisibility & The Division Algorithm
       Divisibility
          We say that a nonzero b divides a b|a
          If b|a, we say that b is a divisor of a.

                  The positive divisors of 24 are 1,2,3,4,6,8,12, and 24.

                                   13|182 ; -5|30; 17|289




6   Sarthak Patel (www.sarthakpatel.in)
Properties of Divisibility integers
       If a|1, then a= ±1
       If a|b and b|c, then a|c
          Ex: 11|66 and 66|198= 11|198
       Any b ≠ 0 then, b|a




7   Sarthak Patel (www.sarthakpatel.in)
Division Algorithm
       Given any positive integer n and any nonnegative integer a, if
       we divide a by n, we get an integer quotient q and an integer
       remainder r that obey the following relationship:
               a = qn + r




8   Sarthak Patel (www.sarthakpatel.in)
Modular Arithmetic
      Modular arithmetic properties:
    1. [(a mod n) + (b mod n)] mod n = (a+b) mod n
    2. [(a mod n) - (b mod n)] mod n = (a-b) mod n
    3. [(a mod n) × (b mod n)] mod n = (a×b) mod n

             11 mod 8 = 3; 15 mod 8 = 7
             [(11 mod 8) + (15 mod 8)] mod 8 = 10 mod 8 = 2
             (11 + 15) mod 8 = 26 mod 8 = 2
             [(11 mod 8) - (15 mod 8)] mod 8 = - 4 mod 8 = - 4
             (11 -15) mod 8 = - 4 mod 8 = - 4
             [(11 mod 8) x (15 mod 8)] mod 8 = 21 mod 8 = 5
             (11 x 15) mod 8 = 165 mod 8 = 5


9   Sarthak Patel (www.sarthakpatel.in)
Laws for Modular Arithmetic




10   Sarthak Patel (www.sarthakpatel.in)
Euler's Totient Function
        Before presenting Euler's theorem, we need to introduce
        an important quantity in number theory, referred to as
        Euler's totient function and written Ø(n), defined as the
        number of positive integers less than n and relatively
        prime to n. By convention, Ø(1) = 1.




11   Sarthak Patel (www.sarthakpatel.in)
Euler's Theorem
       Euler’s play important roles in public-key cryptography .

     Euler’s Theorem:
       Euler’s theorem states that for every a and n that are
       relatively prime:                         ( Congruences )
     Proof: Equation is true if n is prime, because in that case Ø(n) =
       (n -1) and Fermat's theorem holds. However, it also holds for
       any integer n. Recall that f(n) is the number of positive integers
       less than n that are relatively prime to n. Consider the set of
       such integers, labeled as follows:
                              R {x1, x2,..., xØ(n)}


12     Sarthak Patel (www.sarthakpatel.in)
Contd...
        That is, each element xi of R is a unique positive integer less
        than n with gcd(xi, n) = 1. Now multiply each element by a,
        modulo n:
           S = {(ax1 mod n), (ax2 mod n),..., (axØ(n) mod n)}
        If axi mod n = xi




13   Sarthak Patel (www.sarthakpatel.in)
Contd…




14   Sarthak Patel (www.sarthakpatel.in)
a=3; n=10; Ø(10) =4 aØ(n) =34 =81= 1(mod 10) = 1 (mod n)

     a=2; n=11; Ø(11)=10 aØ(n) =210=1024=1(mod 11) = 1(mod n)




15     Sarthak Patel (www.sarthakpatel.in)
The Euclid’s Algorithm
        One of the basic techniques of number theory is the
        Euclidean algorithm, which is a simple procedure for
        determining the greatest common divisor of two positive
        integers.




16   Sarthak Patel (www.sarthakpatel.in)
Contd…
     We will use the notation gcd(a, b) to mean the greatest
     common divisor of a and b. The positive integer c is said
     to be the greatest common divisor of a and b if
     1.    c is a divisor of a and of b;
     2.    any divisor of a and b is a divisor of c.
     An equivalent definition is the following:
     gcd(a, b) = max[k, such that k|a and k|b]


                         gcd(60, 24) = gcd(60, 24) = 12

17   Sarthak Patel (www.sarthakpatel.in)
Finding the Greatest Common Divisor
     Euclid’s Theorem:
       For any nonnegative integer a and any positive integer b,

     Proof:
       The algorithm assumes a > b > 0. It is acceptable to restrict the
       algorithm to positive integers because gcd(a, b) = gcd(|a|,
       |b|).




18    Sarthak Patel (www.sarthakpatel.in)
Euclid’s Algorithm




19   Sarthak Patel (www.sarthakpatel.in)
Discrete Logarithm Tics
        Discrete logarithms are fundamental to a number of public-
        key algorithms, including Diffie-Hellman key exchange and
        the digital signature algorithm (DSA).
        Logarithms for Modular Arithmetic
        Calculation of Discrete Logarithms




20   Sarthak Patel (www.sarthakpatel.in)
Logarithms for Modular Arithmetic
      The properties of logarithms include the following:
       logx(1) = 0
       logx(x) = 1




21    Sarthak Patel (www.sarthakpatel.in)
Contd…

     This exponent i is referred to as the discrete logarithm of the
     number b for the base a (mod p). We denote this value as
     dloga.p(b).




22   Sarthak Patel (www.sarthakpatel.in)
Example




23   Sarthak Patel (www.sarthakpatel.in)
Calculation of Discrete Logarithms

         Consider the equation
         y = gx mod p
         Given g, x, and p, it is a straightforward matter to calculate y.
         At the worst, we must perform x repeated multiplications,
         and algorithms exist for achieving greater efficiency.
         However, given y, g, and p, it is, in general, very difficult to
         calculate x (take the discrete logarithm).
         Time complexity O(e(ln p)1/3(ln ln p)2/3)



24    Sarthak Patel (www.sarthakpatel.in)
THE END
25   Sarthak Patel (www.sarthakpatel.in)

More Related Content

What's hot

Integration SPM
Integration SPMIntegration SPM
Integration SPM
Hanini Hamsan
 
Math academy-partial-fractions-notes
Math academy-partial-fractions-notesMath academy-partial-fractions-notes
Math academy-partial-fractions-notes
Math Academy Singapore
 
Algebra formulae
Algebra formulaeAlgebra formulae
Algebra formulaeTamizhmuhil
 
Number theory
Number theoryNumber theory
Number theory
dhivyakesavan3
 
Integration
IntegrationIntegration
Integration
suefee
 
Cat Quant Cheat Sheet
Cat Quant Cheat SheetCat Quant Cheat Sheet
Cat Quant Cheat Sheet
versabit technologies
 
Solving the energy problem of helium final report
Solving the energy problem of helium final reportSolving the energy problem of helium final report
Solving the energy problem of helium final report
JamesMa54
 
Algebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and PolynomialsAlgebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and Polynomials
AnzaLubis
 
Number theory
Number theoryNumber theory
Number theory
manikanta361
 
Solovay Kitaev theorem
Solovay Kitaev theoremSolovay Kitaev theorem
Solovay Kitaev theorem
JamesMa54
 
Dynamic programming (dp) in Algorithm
Dynamic programming (dp) in AlgorithmDynamic programming (dp) in Algorithm
Dynamic programming (dp) in Algorithm
RaihanIslamSonet
 
Greatest integer function
Greatest integer functionGreatest integer function
Greatest integer function
Neil MacIntosh
 
Number theoretic-rsa-chailos-new
Number theoretic-rsa-chailos-newNumber theoretic-rsa-chailos-new
Number theoretic-rsa-chailos-new
Christos Loizos
 
Las expresiones algebraicas y Factorización de productos notables
Las expresiones algebraicas y Factorización de productos notables Las expresiones algebraicas y Factorización de productos notables
Las expresiones algebraicas y Factorización de productos notables
MariannaPatacnMosque
 

What's hot (16)

Number theory lecture (part 1)
Number theory lecture (part 1)Number theory lecture (part 1)
Number theory lecture (part 1)
 
Integration SPM
Integration SPMIntegration SPM
Integration SPM
 
Math academy-partial-fractions-notes
Math academy-partial-fractions-notesMath academy-partial-fractions-notes
Math academy-partial-fractions-notes
 
Algebra formulae
Algebra formulaeAlgebra formulae
Algebra formulae
 
Number theory
Number theoryNumber theory
Number theory
 
Integration
IntegrationIntegration
Integration
 
Cat Quant Cheat Sheet
Cat Quant Cheat SheetCat Quant Cheat Sheet
Cat Quant Cheat Sheet
 
Solving the energy problem of helium final report
Solving the energy problem of helium final reportSolving the energy problem of helium final report
Solving the energy problem of helium final report
 
Algebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and PolynomialsAlgebra Presentation on Topic Modulus Function and Polynomials
Algebra Presentation on Topic Modulus Function and Polynomials
 
Number theory
Number theoryNumber theory
Number theory
 
Solovay Kitaev theorem
Solovay Kitaev theoremSolovay Kitaev theorem
Solovay Kitaev theorem
 
Dynamic programming (dp) in Algorithm
Dynamic programming (dp) in AlgorithmDynamic programming (dp) in Algorithm
Dynamic programming (dp) in Algorithm
 
Greatest integer function
Greatest integer functionGreatest integer function
Greatest integer function
 
Number theoretic-rsa-chailos-new
Number theoretic-rsa-chailos-newNumber theoretic-rsa-chailos-new
Number theoretic-rsa-chailos-new
 
Las expresiones algebraicas y Factorización de productos notables
Las expresiones algebraicas y Factorización de productos notables Las expresiones algebraicas y Factorización de productos notables
Las expresiones algebraicas y Factorización de productos notables
 
Number theory lecture (part 2)
Number theory lecture (part 2)Number theory lecture (part 2)
Number theory lecture (part 2)
 

Viewers also liked

Divisibility
DivisibilityDivisibility
Divisibilitymstf mstf
 
Module 2 lesson 19
Module 2 lesson 19Module 2 lesson 19
Module 2 lesson 19mlabuski
 
number theory
number theorynumber theory
number theory
klawdet
 
Circles
CirclesCircles
the division algorithm
the division algorithmthe division algorithm
the division algorithmJeneva Clark
 
Prime numbers
Prime numbersPrime numbers
Prime numbers
Omran Sham
 
ERATOSTHENES SIEVE
ERATOSTHENES SIEVEERATOSTHENES SIEVE
ERATOSTHENES SIEVE
IES EUROPA
 
Factor slides and prime number info
Factor slides and prime number infoFactor slides and prime number info
Factor slides and prime number infoMrs Seo
 
Prime and composite numbers
Prime and composite numbersPrime and composite numbers
Prime and composite numbersMOHAMED NAVEED
 
Factorise toprimes
Factorise toprimesFactorise toprimes
Factorise toprimesharlie90
 
Real numbers - Fundamental theorem of arithmetic real number for class 10th m...
Real numbers - Fundamental theorem of arithmetic real number for class 10th m...Real numbers - Fundamental theorem of arithmetic real number for class 10th m...
Real numbers - Fundamental theorem of arithmetic real number for class 10th m...
Let's Tute
 
Fundamental theorem of arithmatic
Fundamental theorem of arithmaticFundamental theorem of arithmatic
Fundamental theorem of arithmatic
Subhrajeet Praharaj
 
Euclid's division algorithm
Euclid's division algorithmEuclid's division algorithm
Euclid's division algorithm
Shubham Kumar
 
Prime Number
Prime NumberPrime Number
Prime Number
Arddhendu Dash
 
Cryptography
Cryptography Cryptography
Cryptography
Karwan Mustafa Kareem
 
euler's theorem
euler's theoremeuler's theorem
euler's theorem
mihir jain
 
Prime Numbers
Prime NumbersPrime Numbers
Prime Numbers
Taleese
 
Remainder theorem
Remainder theoremRemainder theorem
Remainder theorem
Department of Education
 
Dgym as media for enhanchment dental public health (presented in seaade hongk...
Dgym as media for enhanchment dental public health (presented in seaade hongk...Dgym as media for enhanchment dental public health (presented in seaade hongk...
Dgym as media for enhanchment dental public health (presented in seaade hongk...Tiarisna Hidayatun Nisa
 

Viewers also liked (20)

Divisibility
DivisibilityDivisibility
Divisibility
 
Module 2 lesson 19
Module 2 lesson 19Module 2 lesson 19
Module 2 lesson 19
 
number theory
number theorynumber theory
number theory
 
Circles
CirclesCircles
Circles
 
the division algorithm
the division algorithmthe division algorithm
the division algorithm
 
Prime numbers
Prime numbersPrime numbers
Prime numbers
 
ERATOSTHENES SIEVE
ERATOSTHENES SIEVEERATOSTHENES SIEVE
ERATOSTHENES SIEVE
 
Factor slides and prime number info
Factor slides and prime number infoFactor slides and prime number info
Factor slides and prime number info
 
Prime and composite numbers
Prime and composite numbersPrime and composite numbers
Prime and composite numbers
 
Factorise toprimes
Factorise toprimesFactorise toprimes
Factorise toprimes
 
Real numbers - Fundamental theorem of arithmetic real number for class 10th m...
Real numbers - Fundamental theorem of arithmetic real number for class 10th m...Real numbers - Fundamental theorem of arithmetic real number for class 10th m...
Real numbers - Fundamental theorem of arithmetic real number for class 10th m...
 
Fundamental theorem of arithmatic
Fundamental theorem of arithmaticFundamental theorem of arithmatic
Fundamental theorem of arithmatic
 
Euclid's division algorithm
Euclid's division algorithmEuclid's division algorithm
Euclid's division algorithm
 
Prime Number
Prime NumberPrime Number
Prime Number
 
Cryptography
Cryptography Cryptography
Cryptography
 
euler's theorem
euler's theoremeuler's theorem
euler's theorem
 
Prime Numbers
Prime NumbersPrime Numbers
Prime Numbers
 
Remainder theorem
Remainder theoremRemainder theorem
Remainder theorem
 
Virus and worms
Virus and wormsVirus and worms
Virus and worms
 
Dgym as media for enhanchment dental public health (presented in seaade hongk...
Dgym as media for enhanchment dental public health (presented in seaade hongk...Dgym as media for enhanchment dental public health (presented in seaade hongk...
Dgym as media for enhanchment dental public health (presented in seaade hongk...
 

Similar to Is unit 4_number_theory

Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
appasami
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
Dr. C.V. Suresh Babu
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Omnia A. Abdullah
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptx
vaishnavi339314
 
lecture 1
lecture 1lecture 1
lecture 1sajinsc
 
A Level Set Method For Multiobjective Combinatorial Optimization Application...
A Level Set Method For Multiobjective Combinatorial Optimization  Application...A Level Set Method For Multiobjective Combinatorial Optimization  Application...
A Level Set Method For Multiobjective Combinatorial Optimization Application...
Scott Faria
 
A common random fixed point theorem for rational inequality in hilbert space
A common random fixed point theorem for rational inequality in hilbert spaceA common random fixed point theorem for rational inequality in hilbert space
A common random fixed point theorem for rational inequality in hilbert space
Alexander Decker
 
555_Spring12_topic06.ppt
555_Spring12_topic06.ppt555_Spring12_topic06.ppt
555_Spring12_topic06.ppt
SnehSinha6
 
Presentation.pdf
Presentation.pdfPresentation.pdf
Presentation.pdf
Chiheb Ben Hammouda
 
Introduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksIntroduction to Artificial Neural Networks
Introduction to Artificial Neural Networks
Stratio
 
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
mathsjournal
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
Rajandeep Gill
 
A common unique random fixed point theorem in hilbert space using integral ty...
A common unique random fixed point theorem in hilbert space using integral ty...A common unique random fixed point theorem in hilbert space using integral ty...
A common unique random fixed point theorem in hilbert space using integral ty...
Alexander Decker
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
Natarajan Angappan
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEM
MANISH KUMAR
 
Complexity Analysis
Complexity Analysis Complexity Analysis
Complexity Analysis
Shaista Qadir
 

Similar to Is unit 4_number_theory (20)

Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Discrete Mathematics - All chapters
Discrete Mathematics - All chapters Discrete Mathematics - All chapters
Discrete Mathematics - All chapters
 
Algorithm.ppt
Algorithm.pptAlgorithm.ppt
Algorithm.ppt
 
2.ppt
2.ppt2.ppt
2.ppt
 
DAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptxDAA - UNIT 4 - Engineering.pptx
DAA - UNIT 4 - Engineering.pptx
 
lecture 1
lecture 1lecture 1
lecture 1
 
A Level Set Method For Multiobjective Combinatorial Optimization Application...
A Level Set Method For Multiobjective Combinatorial Optimization  Application...A Level Set Method For Multiobjective Combinatorial Optimization  Application...
A Level Set Method For Multiobjective Combinatorial Optimization Application...
 
A common random fixed point theorem for rational inequality in hilbert space
A common random fixed point theorem for rational inequality in hilbert spaceA common random fixed point theorem for rational inequality in hilbert space
A common random fixed point theorem for rational inequality in hilbert space
 
555_Spring12_topic06.ppt
555_Spring12_topic06.ppt555_Spring12_topic06.ppt
555_Spring12_topic06.ppt
 
Presentation.pdf
Presentation.pdfPresentation.pdf
Presentation.pdf
 
Introduction to Artificial Neural Networks
Introduction to Artificial Neural NetworksIntroduction to Artificial Neural Networks
Introduction to Artificial Neural Networks
 
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
A Probabilistic Algorithm for Computation of Polynomial Greatest Common with ...
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
 
Algorithms DM
Algorithms DMAlgorithms DM
Algorithms DM
 
A common unique random fixed point theorem in hilbert space using integral ty...
A common unique random fixed point theorem in hilbert space using integral ty...A common unique random fixed point theorem in hilbert space using integral ty...
A common unique random fixed point theorem in hilbert space using integral ty...
 
Cis435 week02
Cis435 week02Cis435 week02
Cis435 week02
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
 
DISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEMDISCRETE LOGARITHM PROBLEM
DISCRETE LOGARITHM PROBLEM
 
Complexity Analysis
Complexity Analysis Complexity Analysis
Complexity Analysis
 

More from Sarthak Patel

IS Unit 9_Web Security
IS Unit 9_Web SecurityIS Unit 9_Web Security
IS Unit 9_Web Security
Sarthak Patel
 
IS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecurityIS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecuritySarthak Patel
 
IS Unit 7_Network Security
IS Unit 7_Network SecurityIS Unit 7_Network Security
IS Unit 7_Network SecuritySarthak Patel
 
Is unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functionsIs unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functionsSarthak Patel
 
IS Unit 3_Public Key Cryptography
IS Unit 3_Public Key CryptographyIS Unit 3_Public Key Cryptography
IS Unit 3_Public Key CryptographySarthak Patel
 
Is unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniquesIs unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniquesSarthak Patel
 
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesIS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesSarthak Patel
 

More from Sarthak Patel (7)

IS Unit 9_Web Security
IS Unit 9_Web SecurityIS Unit 9_Web Security
IS Unit 9_Web Security
 
IS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecurityIS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email Security
 
IS Unit 7_Network Security
IS Unit 7_Network SecurityIS Unit 7_Network Security
IS Unit 7_Network Security
 
Is unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functionsIs unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functions
 
IS Unit 3_Public Key Cryptography
IS Unit 3_Public Key CryptographyIS Unit 3_Public Key Cryptography
IS Unit 3_Public Key Cryptography
 
Is unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniquesIs unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniques
 
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption TechniquesIS Unit 1_Conventional Encryption_Classical Encryption Techniques
IS Unit 1_Conventional Encryption_Classical Encryption Techniques
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 

Recently uploaded (20)

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 

Is unit 4_number_theory

  • 1. 4:- Chapter 4:- Number Theory By:- Sarthak Patel (www.sarthakpatel.in)
  • 2. Outline Prime And Relative Prime Numbers Modular Arithmetic, Euler’s Theorem Euclid’s Algorithm Discrete Logarithm Tics 2 Sarthak Patel (www.sarthakpatel.in)
  • 3. Prime Numbers An integer p > 1 is a prime number if and only if its only divisors are ± 1 and ±p. Prime numbers play a critical role in number theory and in the techniques like RSA, Deffie- Hellman key exchange. 3 Sarthak Patel (www.sarthakpatel.in)
  • 4. Contd… Any integer a > 1 can be factored in a unique way as where p1 < p2 < ... < pt are prime numbers and where each is a positive integer. This is known as the fundamental theorem of arithmetic. 4 Sarthak Patel (www.sarthakpatel.in)
  • 5. Contd... If a and b are two prime numbers then this condition will always satisfy: gcd(a, b) = 1 Relatively Prime Two integers are relatively prime if their only common positive integer factor is 1. gcd(a, b) =1 ex: 8 and 15 5 Sarthak Patel (www.sarthakpatel.in)
  • 6. Divisibility & The Division Algorithm Divisibility We say that a nonzero b divides a b|a If b|a, we say that b is a divisor of a. The positive divisors of 24 are 1,2,3,4,6,8,12, and 24. 13|182 ; -5|30; 17|289 6 Sarthak Patel (www.sarthakpatel.in)
  • 7. Properties of Divisibility integers If a|1, then a= ±1 If a|b and b|c, then a|c Ex: 11|66 and 66|198= 11|198 Any b ≠ 0 then, b|a 7 Sarthak Patel (www.sarthakpatel.in)
  • 8. Division Algorithm Given any positive integer n and any nonnegative integer a, if we divide a by n, we get an integer quotient q and an integer remainder r that obey the following relationship: a = qn + r 8 Sarthak Patel (www.sarthakpatel.in)
  • 9. Modular Arithmetic Modular arithmetic properties: 1. [(a mod n) + (b mod n)] mod n = (a+b) mod n 2. [(a mod n) - (b mod n)] mod n = (a-b) mod n 3. [(a mod n) × (b mod n)] mod n = (a×b) mod n 11 mod 8 = 3; 15 mod 8 = 7 [(11 mod 8) + (15 mod 8)] mod 8 = 10 mod 8 = 2 (11 + 15) mod 8 = 26 mod 8 = 2 [(11 mod 8) - (15 mod 8)] mod 8 = - 4 mod 8 = - 4 (11 -15) mod 8 = - 4 mod 8 = - 4 [(11 mod 8) x (15 mod 8)] mod 8 = 21 mod 8 = 5 (11 x 15) mod 8 = 165 mod 8 = 5 9 Sarthak Patel (www.sarthakpatel.in)
  • 10. Laws for Modular Arithmetic 10 Sarthak Patel (www.sarthakpatel.in)
  • 11. Euler's Totient Function Before presenting Euler's theorem, we need to introduce an important quantity in number theory, referred to as Euler's totient function and written Ø(n), defined as the number of positive integers less than n and relatively prime to n. By convention, Ø(1) = 1. 11 Sarthak Patel (www.sarthakpatel.in)
  • 12. Euler's Theorem Euler’s play important roles in public-key cryptography . Euler’s Theorem: Euler’s theorem states that for every a and n that are relatively prime: ( Congruences ) Proof: Equation is true if n is prime, because in that case Ø(n) = (n -1) and Fermat's theorem holds. However, it also holds for any integer n. Recall that f(n) is the number of positive integers less than n that are relatively prime to n. Consider the set of such integers, labeled as follows: R {x1, x2,..., xØ(n)} 12 Sarthak Patel (www.sarthakpatel.in)
  • 13. Contd... That is, each element xi of R is a unique positive integer less than n with gcd(xi, n) = 1. Now multiply each element by a, modulo n: S = {(ax1 mod n), (ax2 mod n),..., (axØ(n) mod n)} If axi mod n = xi 13 Sarthak Patel (www.sarthakpatel.in)
  • 14. Contd… 14 Sarthak Patel (www.sarthakpatel.in)
  • 15. a=3; n=10; Ø(10) =4 aØ(n) =34 =81= 1(mod 10) = 1 (mod n) a=2; n=11; Ø(11)=10 aØ(n) =210=1024=1(mod 11) = 1(mod n) 15 Sarthak Patel (www.sarthakpatel.in)
  • 16. The Euclid’s Algorithm One of the basic techniques of number theory is the Euclidean algorithm, which is a simple procedure for determining the greatest common divisor of two positive integers. 16 Sarthak Patel (www.sarthakpatel.in)
  • 17. Contd… We will use the notation gcd(a, b) to mean the greatest common divisor of a and b. The positive integer c is said to be the greatest common divisor of a and b if 1. c is a divisor of a and of b; 2. any divisor of a and b is a divisor of c. An equivalent definition is the following: gcd(a, b) = max[k, such that k|a and k|b] gcd(60, 24) = gcd(60, 24) = 12 17 Sarthak Patel (www.sarthakpatel.in)
  • 18. Finding the Greatest Common Divisor Euclid’s Theorem: For any nonnegative integer a and any positive integer b, Proof: The algorithm assumes a > b > 0. It is acceptable to restrict the algorithm to positive integers because gcd(a, b) = gcd(|a|, |b|). 18 Sarthak Patel (www.sarthakpatel.in)
  • 19. Euclid’s Algorithm 19 Sarthak Patel (www.sarthakpatel.in)
  • 20. Discrete Logarithm Tics Discrete logarithms are fundamental to a number of public- key algorithms, including Diffie-Hellman key exchange and the digital signature algorithm (DSA). Logarithms for Modular Arithmetic Calculation of Discrete Logarithms 20 Sarthak Patel (www.sarthakpatel.in)
  • 21. Logarithms for Modular Arithmetic The properties of logarithms include the following: logx(1) = 0 logx(x) = 1 21 Sarthak Patel (www.sarthakpatel.in)
  • 22. Contd… This exponent i is referred to as the discrete logarithm of the number b for the base a (mod p). We denote this value as dloga.p(b). 22 Sarthak Patel (www.sarthakpatel.in)
  • 23. Example 23 Sarthak Patel (www.sarthakpatel.in)
  • 24. Calculation of Discrete Logarithms Consider the equation y = gx mod p Given g, x, and p, it is a straightforward matter to calculate y. At the worst, we must perform x repeated multiplications, and algorithms exist for achieving greater efficiency. However, given y, g, and p, it is, in general, very difficult to calculate x (take the discrete logarithm). Time complexity O(e(ln p)1/3(ln ln p)2/3) 24 Sarthak Patel (www.sarthakpatel.in)
  • 25. THE END 25 Sarthak Patel (www.sarthakpatel.in)