SlideShare a Scribd company logo
Cryptography and Data
Security

   Number Theory (1 of 2)




   (presented by Aleksandr Yampolskiy)
Who is this?




Évariste Galois (1811-1832)
Divisors

n   A non-zero number b divides a if 9m
    s.t. a=mb (a,b,m 2 Z)
n   That is, b divides into a with no
    remainder
n   We denote this b|a
n   Example:
    ¡   all of 1,2,3,4,6,8,12,24 divide 24
    ¡   6 | 24 (4*6 = 24), 1 | 24 (24*1 = 24),
        but 5 | 24 (no m2Z such that m*5 = 24)
Divisors (cont.)

n   Some axioms:
    ¡   a|1 ) a = §1
    ¡   a|b Æ b|a ) a = §b
    ¡   8b?0 b|0
    ¡   b|g Æ b|h ) b|(mg + nh)
n   A number p is prime , p ? 1 Æ 8m2
    (1, p) m | p
Groups
n  Def: A set G with a binary operation
?: G£ G ! G is called a group if:
1. (closure) ∀ a,b∈G, a?b∈G
2. (associativity) ∀ a,b,c∈G, (a?b)?c=a?(b?c)
4. (identity element) ∃ e∈G, ∀ a∈G, a?e=a
5. (inverse element) ∀ a∈G, ∃ a-1∈G, a?(a-1)=e

n   A group is commutative (Abelian) if
∀ a,b∈G, a?b=b?a
Examples of groups
n Integers under addition, (Z, +) = {…, -2, -1, 0, +1,
  +2, …}.
  Identity: e = 0. Inverses: a-1 = -a
n ({Britney, Dustin}, ? ), where
    ¡   Britney? Britney = Britney
    ¡   Britney? Dustin = Dustin
    ¡   Dustin ? Britney = Dustin
    ¡   Dustin ? Dustin = Britney
    Identity: e = Britney. Inverses: Britney -1 = Britney, Dustin-1 =
        Dustin.
Subgroups

n   Let (G, ?) be a group. (H, ?) is a sub-
    group of (G, ?) if it is a group, and
    H⊆G.
n   Lagrange’s theorem: if G is finite and
    (H, ?) is a sub-group of (G, ?) then |H|
    divides |G|
Cyclic groups
n   We define exponentiation as repeated
    application of operator ?. For example,
    ¡   a3 = a?a?a
    ¡   we also define a0 = e and a-n = (a-1)n
n   A group G is cyclic if every element is a
    power of some fixed element.
n   That is, G = <a> = {e, a, a2, a3,…} for some
    a.
n   a is said to be a generator of the group
A theorem…
Theorem: If (G, ? ) is a finite group, then
  8a2 G a|G| = e.
Proof:
   ¡   Fix a2G. Consider <a> = {a0 = e, a, a2, …}
   ¡   |G| < 1 Æ <a> = G ) |<a>| < 1
   ¡   Hence, <a> = {e, a, a2, …, ak-1} for some k and
       ak = e.
   ¡   By Lagrange’s Theorem, |<a>| divides |G| )
       |G| = d¢|<a>| for some d2 Z.
   ¡   So, a|G| = ad¢|<a>| = ad¢k = {ak} d = ed. QED.
Rings
n        Def: A set R together with two operations (+, ?) is a ring if
    1.      (R, +) is an Abelian group.
    2.      (R, ?) is a semi-group (just needs to be
            associative)
    3.      ? distributes over +: a(b + c) = ab + ac and
            (a + b)c = ac + bc
n        We use +, ?, only for the sake of using familiar and intuitive
         notation. We could instead use any symbols. We are
         NOT doing regular addition/multiplication.
n        In the ring R, we denote by: -a, the additive inverse of a.
         On commutative rings, the multiplicative inverse of a is
         denoted by a-1 (when it exists).
Rings (cont.)

n   Example: set of 2x2 matrices forms a
    ring under regular matrix (+, *).
n   Some questions to think about:
    ¡   Is it always the case that A + B = B + A?
    ¡   What about A*B = B*A?
    ¡   What is the identity element?
Fields

n   Def: A field is a commutative ring with
    identity where each non-zero element has a
    multiplicative inverse: ∀ a≠0∈F, ∃ a-1∈F,
    a·a-1=1
n   Equivalently, (F,+) is a commutative
    (additive) group and (F  {0}, ·) is a
    commutative (multiplicative) group.
n   Example: set of rational numbers Q
Modular arithmetic
n   Def: Modulo operator a mod n = remainder
    when a is divided by n
    (Another notation: a % n)
n   Example: 11 mod 7 = 4, 10 mod 5 = 0, 3 mod 2
    = 1.                              n-1 0 1

                                                   .
                                                   .
                                                   .
         01      n-1 n

                              clock
                           arithmetic
Modular arithmetic (cont.)

n   a is congruent to b (a = b mod n) if
    when divided by n, a and b give the
    same remainder (a mod n = b mod n)
n   a ´ b mod n if n | (a – b)
n   E.g. 100 ´ 34 mod 11
Zn

n   a´ b mod n defines an equivalence
    relation
n   set of residues Zn = {0, 1, …, n-1}
n   Each integer r2 Zn actually represents
    a residue class [r] = {a2 Z : a ´ r mod
    n}
Zn (cont.)
E.g., Z7 = {0, 1, 2, 3, 4, 5, 6}. But in fact, we
are dealing with:
...
-21 -20 -19 -18 -17 -16 -15
-14 -13 -12 -11 -10 -9 -8
 -7 -6 -5 -4 -3 -2 -1
  0   1   2   3   4   5   6
  7   8   9 10 11 12 13
 14 15 16 17 18 19 20
 21 22 23 24 25 26 27
 28 29 30 31 32 33 34
...
Zn (cont.)

n   Integers mod n Zn = {0, 1, …, n-1} is
    an Abelian group.
n   Example: What is 3+5 in Z7? What is
    -6 in Z7?
n   Note some peculiarities for Zn
    ¡   if (a+b)=(a+c) mod n then b=c mod n
    ¡   but (ab)=(ac) mod n then b=c mod n only
        if a is relatively prime to n
Zn*


n   Multiplicative integers mod n
    Zn* = {x2 Zn : gcd(x, n) = 1}
n   Zn* consists of all integers 0…n-1
    relatively prime with n
n   What is the size of this group? Euler’s
    totient function φ(n) = |Zn*|
Zn* (cont.)

n   What is φ(p) when p is prime?
    ¡   ZP* = {1, 2, …, p-1} ) φ(p) = |Zp*| = p – 1.
n   What about φ(pk) where p is prime and k >
    1?
    ¡   Zpk = {0, 1, …, pk – 1}
    ¡   How many multiples of p are in Zpk?
    ¡   Multiples are {0, p, 2p, …, (pk-1 – 1)p}. There are
        pk-1 of them
    ¡   Hence, φ(pk) = pk – pk-1
Zn* (cont.)

n   φ(mn) = φ(m)¢ φ(n)
n   φ(∏i pie) = ∏i(pie – pie-1)
n   Example:
    ¡   φ(10) = φ(2)¢φ(5) = 1¢4 = 4
    ¡   S = {1· n · 10 : n relatively prime to 10} =
        {1. 3, 7, 9}. Notice that |S| = 4 as expected.
To be continued next time…

More Related Content

PPT
Number theory
PPT
Number theory
PPTX
number theory.ppt
PPTX
Modern algebra
PPTX
Binomial Theorem
PDF
Group Theory
PPTX
CMSC 56 | Lecture 5: Proofs Methods and Strategy
PPTX
Fermat and euler theorem
Number theory
Number theory
number theory.ppt
Modern algebra
Binomial Theorem
Group Theory
CMSC 56 | Lecture 5: Proofs Methods and Strategy
Fermat and euler theorem

What's hot (20)

PPTX
Group abstract algebra
PPTX
Mathematics 101
PPTX
Cyclic group- group theory
PPT
Amazing Maths Trick
PDF
A study on number theory and its applications
PPTX
21 monotone sequences x
PPT
introduction to Numerical Analysis
PPTX
Method of direct proof
PPTX
Recursion DM
PPTX
Branches of mathematics
PPTX
Mathematical induction
PPTX
Modular arithmetic
PPTX
Principle of mathematical induction
PPT
Linear Algebra and Matrix
PPT
Algebraic structures
PPTX
Number theory
PPTX
Calculus in real life (Differentiation and integration )
PPTX
Section 11: Normal Subgroups
PPT
Indices and logarithms
Group abstract algebra
Mathematics 101
Cyclic group- group theory
Amazing Maths Trick
A study on number theory and its applications
21 monotone sequences x
introduction to Numerical Analysis
Method of direct proof
Recursion DM
Branches of mathematics
Mathematical induction
Modular arithmetic
Principle of mathematical induction
Linear Algebra and Matrix
Algebraic structures
Number theory
Calculus in real life (Differentiation and integration )
Section 11: Normal Subgroups
Indices and logarithms
Ad

Viewers also liked (20)

PDF
Number theory
PPTX
History of Number Theory
PPTX
The Number Theory
PPTX
Abel - A great mathematician
PPTX
Number theory Grade 7, 8 and 9
PPT
Algorithms,graph theory and combinatorics
PPTX
the division algorithm
PDF
Microprocessor-based Systems 48/32bit Division Algorithm
PDF
Module 2 lessson 14
DOCX
Number Theory In Cryptography
PPTX
Eucledian algorithm for gcd of integers and polynomials
PPTX
introduction to division algorithm
PPTX
Number theory
PPTX
Euclid's division algorithm
PDF
Number theory lecture (part 2)
PPTX
Euclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
PPT
Mean field Green function solution of the two-band Hubbard model in cuprates
PPT
Ppt On Number Theory For Cat
PPTX
LINEAR PROGRAMMING
PPT
Unit 1 Number Theory (5th Grade)
Number theory
History of Number Theory
The Number Theory
Abel - A great mathematician
Number theory Grade 7, 8 and 9
Algorithms,graph theory and combinatorics
the division algorithm
Microprocessor-based Systems 48/32bit Division Algorithm
Module 2 lessson 14
Number Theory In Cryptography
Eucledian algorithm for gcd of integers and polynomials
introduction to division algorithm
Number theory
Euclid's division algorithm
Number theory lecture (part 2)
Euclid's Algorithm for Greatest Common Divisor - Time Complexity Analysis
Mean field Green function solution of the two-band Hubbard model in cuprates
Ppt On Number Theory For Cat
LINEAR PROGRAMMING
Unit 1 Number Theory (5th Grade)
Ad

Similar to Number theory lecture (part 1) (20)

PPT
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
PDF
Homework 2 sol
PPT
555_Spring12_topic06.ppt
PPT
Complete Book Lectures maths theory helpful for kids.ppt
PDF
Group theory notes
PDF
A Szemeredi-type theorem for subsets of the unit cube
PPTX
Last+minute+revision(+Final)+(1) (1).pptx
PPT
PPT
Clase3 Notacion
PPT
Group Ring.ppt
PPTX
Nbvtalkatbzaonencryptionpuzzles
PPTX
Nbvtalkatbzaonencryptionpuzzles
PDF
Imc2017 day2-solutions
PPT
Chap4
PDF
Steven Duplij, "Polyadic rings of p-adic integers"
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPT
PPTX
Arithmetic and Multiplicative Function .pptx
PPTX
Cryptography Modular Arithmetic and their application.pptx
PPT
ch04 cryptography and network security.ppt
CRYPTOGRAPHY AND NUMBER THEORY, he ha huli
Homework 2 sol
555_Spring12_topic06.ppt
Complete Book Lectures maths theory helpful for kids.ppt
Group theory notes
A Szemeredi-type theorem for subsets of the unit cube
Last+minute+revision(+Final)+(1) (1).pptx
Clase3 Notacion
Group Ring.ppt
Nbvtalkatbzaonencryptionpuzzles
Nbvtalkatbzaonencryptionpuzzles
Imc2017 day2-solutions
Chap4
Steven Duplij, "Polyadic rings of p-adic integers"
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
Arithmetic and Multiplicative Function .pptx
Cryptography Modular Arithmetic and their application.pptx
ch04 cryptography and network security.ppt

More from Aleksandr Yampolskiy (20)

PPT
New York REDIS Meetup Welcome Session
PDF
"Managing software development" by Peter Bell
PPT
Recruiting Great Engineers in Six Easy Steps
PPTX
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
PPT
Malware Goes to the Movies - Briefing
PPT
Privacy and E-Commerce
PPT
Eight simple rules to writing secure PHP programs
PPT
Social media security challenges
PPTX
Social Engineering and What to do About it
PPT
OWASP Much ado about randomness
PPT
Malware goes to the movies
PDF
Inoculation strategies for victims of viruses
PPT
Much ado about randomness. What is really a random number?
PPT
Threshold and Proactive Pseudo-Random Permutations
PPT
Secure information aggregation in sensor networks
PPT
A verifiable random function with short proofs and keys
PPT
Towards a theory of data entangelement
PPT
Price of anarchy is independent of network topology
PPT
Business Case Studies
PPT
Spreading Rumors Quietly and the Subgroup Escape Problem
New York REDIS Meetup Welcome Session
"Managing software development" by Peter Bell
Recruiting Great Engineers in Six Easy Steps
You Too Can Be a Radio Host Or How We Scaled a .NET Startup And Had Fun Doing It
Malware Goes to the Movies - Briefing
Privacy and E-Commerce
Eight simple rules to writing secure PHP programs
Social media security challenges
Social Engineering and What to do About it
OWASP Much ado about randomness
Malware goes to the movies
Inoculation strategies for victims of viruses
Much ado about randomness. What is really a random number?
Threshold and Proactive Pseudo-Random Permutations
Secure information aggregation in sensor networks
A verifiable random function with short proofs and keys
Towards a theory of data entangelement
Price of anarchy is independent of network topology
Business Case Studies
Spreading Rumors Quietly and the Subgroup Escape Problem

Number theory lecture (part 1)

  • 1. Cryptography and Data Security Number Theory (1 of 2) (presented by Aleksandr Yampolskiy)
  • 2. Who is this? Évariste Galois (1811-1832)
  • 3. Divisors n A non-zero number b divides a if 9m s.t. a=mb (a,b,m 2 Z) n That is, b divides into a with no remainder n We denote this b|a n Example: ¡ all of 1,2,3,4,6,8,12,24 divide 24 ¡ 6 | 24 (4*6 = 24), 1 | 24 (24*1 = 24), but 5 | 24 (no m2Z such that m*5 = 24)
  • 4. Divisors (cont.) n Some axioms: ¡ a|1 ) a = §1 ¡ a|b Æ b|a ) a = §b ¡ 8b?0 b|0 ¡ b|g Æ b|h ) b|(mg + nh) n A number p is prime , p ? 1 Æ 8m2 (1, p) m | p
  • 5. Groups n Def: A set G with a binary operation ?: G£ G ! G is called a group if: 1. (closure) ∀ a,b∈G, a?b∈G 2. (associativity) ∀ a,b,c∈G, (a?b)?c=a?(b?c) 4. (identity element) ∃ e∈G, ∀ a∈G, a?e=a 5. (inverse element) ∀ a∈G, ∃ a-1∈G, a?(a-1)=e n A group is commutative (Abelian) if ∀ a,b∈G, a?b=b?a
  • 6. Examples of groups n Integers under addition, (Z, +) = {…, -2, -1, 0, +1, +2, …}. Identity: e = 0. Inverses: a-1 = -a n ({Britney, Dustin}, ? ), where ¡ Britney? Britney = Britney ¡ Britney? Dustin = Dustin ¡ Dustin ? Britney = Dustin ¡ Dustin ? Dustin = Britney Identity: e = Britney. Inverses: Britney -1 = Britney, Dustin-1 = Dustin.
  • 7. Subgroups n Let (G, ?) be a group. (H, ?) is a sub- group of (G, ?) if it is a group, and H⊆G. n Lagrange’s theorem: if G is finite and (H, ?) is a sub-group of (G, ?) then |H| divides |G|
  • 8. Cyclic groups n We define exponentiation as repeated application of operator ?. For example, ¡ a3 = a?a?a ¡ we also define a0 = e and a-n = (a-1)n n A group G is cyclic if every element is a power of some fixed element. n That is, G = <a> = {e, a, a2, a3,…} for some a. n a is said to be a generator of the group
  • 9. A theorem… Theorem: If (G, ? ) is a finite group, then 8a2 G a|G| = e. Proof: ¡ Fix a2G. Consider <a> = {a0 = e, a, a2, …} ¡ |G| < 1 Æ <a> = G ) |<a>| < 1 ¡ Hence, <a> = {e, a, a2, …, ak-1} for some k and ak = e. ¡ By Lagrange’s Theorem, |<a>| divides |G| ) |G| = d¢|<a>| for some d2 Z. ¡ So, a|G| = ad¢|<a>| = ad¢k = {ak} d = ed. QED.
  • 10. Rings n Def: A set R together with two operations (+, ?) is a ring if 1. (R, +) is an Abelian group. 2. (R, ?) is a semi-group (just needs to be associative) 3. ? distributes over +: a(b + c) = ab + ac and (a + b)c = ac + bc n We use +, ?, only for the sake of using familiar and intuitive notation. We could instead use any symbols. We are NOT doing regular addition/multiplication. n In the ring R, we denote by: -a, the additive inverse of a. On commutative rings, the multiplicative inverse of a is denoted by a-1 (when it exists).
  • 11. Rings (cont.) n Example: set of 2x2 matrices forms a ring under regular matrix (+, *). n Some questions to think about: ¡ Is it always the case that A + B = B + A? ¡ What about A*B = B*A? ¡ What is the identity element?
  • 12. Fields n Def: A field is a commutative ring with identity where each non-zero element has a multiplicative inverse: ∀ a≠0∈F, ∃ a-1∈F, a·a-1=1 n Equivalently, (F,+) is a commutative (additive) group and (F {0}, ·) is a commutative (multiplicative) group. n Example: set of rational numbers Q
  • 13. Modular arithmetic n Def: Modulo operator a mod n = remainder when a is divided by n (Another notation: a % n) n Example: 11 mod 7 = 4, 10 mod 5 = 0, 3 mod 2 = 1. n-1 0 1 . . . 01 n-1 n clock arithmetic
  • 14. Modular arithmetic (cont.) n a is congruent to b (a = b mod n) if when divided by n, a and b give the same remainder (a mod n = b mod n) n a ´ b mod n if n | (a – b) n E.g. 100 ´ 34 mod 11
  • 15. Zn n a´ b mod n defines an equivalence relation n set of residues Zn = {0, 1, …, n-1} n Each integer r2 Zn actually represents a residue class [r] = {a2 Z : a ´ r mod n}
  • 16. Zn (cont.) E.g., Z7 = {0, 1, 2, 3, 4, 5, 6}. But in fact, we are dealing with: ... -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 ...
  • 17. Zn (cont.) n Integers mod n Zn = {0, 1, …, n-1} is an Abelian group. n Example: What is 3+5 in Z7? What is -6 in Z7? n Note some peculiarities for Zn ¡ if (a+b)=(a+c) mod n then b=c mod n ¡ but (ab)=(ac) mod n then b=c mod n only if a is relatively prime to n
  • 18. Zn* n Multiplicative integers mod n Zn* = {x2 Zn : gcd(x, n) = 1} n Zn* consists of all integers 0…n-1 relatively prime with n n What is the size of this group? Euler’s totient function φ(n) = |Zn*|
  • 19. Zn* (cont.) n What is φ(p) when p is prime? ¡ ZP* = {1, 2, …, p-1} ) φ(p) = |Zp*| = p – 1. n What about φ(pk) where p is prime and k > 1? ¡ Zpk = {0, 1, …, pk – 1} ¡ How many multiples of p are in Zpk? ¡ Multiples are {0, p, 2p, …, (pk-1 – 1)p}. There are pk-1 of them ¡ Hence, φ(pk) = pk – pk-1
  • 20. Zn* (cont.) n φ(mn) = φ(m)¢ φ(n) n φ(∏i pie) = ∏i(pie – pie-1) n Example: ¡ φ(10) = φ(2)¢φ(5) = 1¢4 = 4 ¡ S = {1· n · 10 : n relatively prime to 10} = {1. 3, 7, 9}. Notice that |S| = 4 as expected.
  • 21. To be continued next time…