ℤₙ* The Multiplicative
group for ℤₙ modulo n
Prof Bill Buchanan OBE, The Cyber Academy
http://asecuritysite.com
A puzzle
• For the numbers up to 10, which numbers do not share any factors with
10?
Multiplicative group for ℤₙ modulo n
• For the numbers up to 10, which numbers do not share any factors with
10?
• And so we get 1, 3, 7 and 9 [here]. This has the name of the multiplicative
group for ℤₙ modulo n.
Multiplicative group for ℤₙ modulo n
• In number theory, ℤₙ is the set of non-negative integers less than n
({0,1,2,3…n-1}).
• ℤₙ* is then a subnet of this which is the multiplicative group for ℤₙ
modulo n.
• The set ℤₙ* is the set of integers between 1 and n that are relatively
prime to n (ie they do not share any factors).
• If n is prime, then ℤₙ* is the values up to (n − 1). ℤ11* =
{1,2,3,4,5,6,7,8,9,10}
• Note that is is also shown as (ℤ/nℤ)ˣ.
Examples
If we want g to be generated from multiplicative group for ℤₙ modulo n,
we would define: g ∈ ℤₙ*
For Z9* we get: {1, 2, 4, 5, 7, 8}
For Z91* we get (13x7):
{ 1 2 3 4 5 6 8 9 10 11 12 15 16 17 18 19 20 22 23 24 25 27 29 30 31 32 33
34 36 37 38 40 41 43 44 45 46 47 48 50 51 53 54 55 57 58 59 60 61 62 64
66 67 68 69 71 72 73 74 75 76 79 80 81 82 83 85 86 87 88 89 90}
For Z97* we get [here]:
{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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 }
number=1763*1763
import syscount=0
def gcd(a,b):
while b > 0:
a, b = b, a % b
return aprint
"Value is:t",number
print "Multiplicative group for Zn up to 100 is:”
for i in range(1,100):
if (gcd(number,i)==1):
print i,
count=count+1
print "nThe number of values is: ",count
Cyclic
Y = Gˣ (mod N)
If N is prime we get a cyclic result. For N=7, we can select 2,3,4,5 or 6, so let’s select
6:
>>> print 6**1 % 7
6
>>> print 6**2 % 7
1
>>> print 6**3 % 7
6
>>> print 6**4 % 7
1
Output: {6,1,6,1,…}
Cyclic
Y = Gˣ (mod N)
Sometimes, though, something special happens, and we get a sequence from
0 to N-1. So let’s select N=11, we pick a g value of 2.
Y =2¹ (mod 11) = 2 Y = 2² (mod 11) = 4
Y = 2³ (mod 11) = 8 Y =2⁴ (mod 11) = 5
Y =2⁵ (mod 11) = 10 Y =2⁶ (mod 11) = 9
Y =2⁷ (mod 11) = 7 Y =2⁸ (mod 11) = 3
Y =2⁹ (mod 11) = 6 Y = 2¹⁰ (mod 11) = 1
Y =2¹¹ (mod 11) = 2 (repeat) Y =2¹² (mod 11) = 4 (repeat)
{2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4, 8 …}
Cylic group G of order n with a generator g. (ℤ/nℤ)*. [Link]
ℤₙ* The Multiplicative
group for ℤₙ modulo n
Prof Bill Buchanan OBE, The Cyber Academy
http://asecuritysite.com

ℤₙ* The Multiplicative group for ℤₙ modulo n

  • 1.
    ℤₙ* The Multiplicative groupfor ℤₙ modulo n Prof Bill Buchanan OBE, The Cyber Academy http://asecuritysite.com
  • 2.
    A puzzle • Forthe numbers up to 10, which numbers do not share any factors with 10?
  • 3.
    Multiplicative group forℤₙ modulo n • For the numbers up to 10, which numbers do not share any factors with 10? • And so we get 1, 3, 7 and 9 [here]. This has the name of the multiplicative group for ℤₙ modulo n.
  • 4.
    Multiplicative group forℤₙ modulo n • In number theory, ℤₙ is the set of non-negative integers less than n ({0,1,2,3…n-1}). • ℤₙ* is then a subnet of this which is the multiplicative group for ℤₙ modulo n. • The set ℤₙ* is the set of integers between 1 and n that are relatively prime to n (ie they do not share any factors). • If n is prime, then ℤₙ* is the values up to (n − 1). ℤ11* = {1,2,3,4,5,6,7,8,9,10} • Note that is is also shown as (ℤ/nℤ)ˣ.
  • 5.
    Examples If we wantg to be generated from multiplicative group for ℤₙ modulo n, we would define: g ∈ ℤₙ* For Z9* we get: {1, 2, 4, 5, 7, 8} For Z91* we get (13x7): { 1 2 3 4 5 6 8 9 10 11 12 15 16 17 18 19 20 22 23 24 25 27 29 30 31 32 33 34 36 37 38 40 41 43 44 45 46 47 48 50 51 53 54 55 57 58 59 60 61 62 64 66 67 68 69 71 72 73 74 75 76 79 80 81 82 83 85 86 87 88 89 90} For Z97* we get [here]: {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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 } number=1763*1763 import syscount=0 def gcd(a,b): while b > 0: a, b = b, a % b return aprint "Value is:t",number print "Multiplicative group for Zn up to 100 is:” for i in range(1,100): if (gcd(number,i)==1): print i, count=count+1 print "nThe number of values is: ",count
  • 6.
    Cyclic Y = Gˣ(mod N) If N is prime we get a cyclic result. For N=7, we can select 2,3,4,5 or 6, so let’s select 6: >>> print 6**1 % 7 6 >>> print 6**2 % 7 1 >>> print 6**3 % 7 6 >>> print 6**4 % 7 1 Output: {6,1,6,1,…}
  • 7.
    Cyclic Y = Gˣ(mod N) Sometimes, though, something special happens, and we get a sequence from 0 to N-1. So let’s select N=11, we pick a g value of 2. Y =2¹ (mod 11) = 2 Y = 2² (mod 11) = 4 Y = 2³ (mod 11) = 8 Y =2⁴ (mod 11) = 5 Y =2⁵ (mod 11) = 10 Y =2⁶ (mod 11) = 9 Y =2⁷ (mod 11) = 7 Y =2⁸ (mod 11) = 3 Y =2⁹ (mod 11) = 6 Y = 2¹⁰ (mod 11) = 1 Y =2¹¹ (mod 11) = 2 (repeat) Y =2¹² (mod 11) = 4 (repeat) {2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4, 8 …} Cylic group G of order n with a generator g. (ℤ/nℤ)*. [Link]
  • 8.
    ℤₙ* The Multiplicative groupfor ℤₙ modulo n Prof Bill Buchanan OBE, The Cyber Academy http://asecuritysite.com