0% found this document useful (0 votes)
9 views

PSE Basic Mathematics Cryptography ZKP-EN

Uploaded by

asleep.03.mirage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

PSE Basic Mathematics Cryptography ZKP-EN

Uploaded by

asleep.03.mirage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 52

Hello, Pura Vida! Thanks for your attention!

In this file you have the opportunity to experiment with numbers throug
emergence of numerical patterns that help us to understand basic math s
to the development of cryptographic schemes and protocols, and, also Z

I encourage you to experiment and after check your results with the solu

Gracias!
Ranulfo
with numbers through 4 simple mathematical experiments (x_1...x_4), and see the
derstand basic math structures, such as, groups, rings, finite fields. These structures are vital
protocols, and, also ZKP protocols.

ur results with the solution_x_1...solution_x_4.


d see the
tructures are vital
R1 - Sum two numbers (x, z), and, calculate the remainder (y) of that
sum when divided by 2. The values ​of x and z can only be 0 or 1 . Hint:
use the Excel MOD function or RESIDUO (Spanish version). See Table
1

note that you already have all the numbers you need
Table 1 x z y ≡ ( x + z ) mod 2
0 0
0 1
1 0
1 1
that R2 – Multiply two numbers (x, z), and, calculate the remainder (y
. Hint: product when divided by 2. The values ​of x and z can only be 0 o
e Table 2

ers you need to start the calculatios in columns x and z


x z y ≡ ( x * z ) mod 2Table 2
0 0
0 1
1 0
1 1
ulate the remainder (y) of that
and z can only be 0 or 1. See Table
R3 - Given the set of integers N5 = { 0, 1, 2, 3, 4 }. Add each R4 - Given the
element of N5 with all the others, one by one. And, calculate element of N5 w
the remainder (C) of that number when divided by 5. remainder (C)
See Table 1.

note that you already have all the numbers you need

Table 1 A B C ≡ ( A + B ) mod 5 A
0 0 0
0 1 0
0 2 0
0 3 0
0 4 0
1 0 1
1 1 1
1 2 1
1 3 1
1 4 1
2 0 2
2 1 2
2 2 2
2 3 2
2 4 2
3 0 3
3 1 3
3 2 3
3 3 3
3 4 3
4 0 4
4 1 4
4 2 4
4 3 4
4 4 4
R4 - Given the set of integers N5 = { 0, 1, 2, 3, 4 }. Multiply each R5 - Given the set
element of N5 with all the others, one by one. And, calculate the each element of N
remainder (C) of that number when divided by 5. See Table 2. the remainder (C)
See Table 3.

s you need to start the calculatios in columns A and B

B C ≡ ( A * B ) mod 5 Table 2 A
0 0
1 0
2 0
3 0
4 0
0 1
1 1
2 1
3 1
4 1
0 2
1 2
2 2
3 2
4 2
0 3
1 3
2 3
3 3
4 3
0 4
1 4
2 4
3 4
4 4
R6 – Given the set of integ
R5 - Given the set of integers N5 = { 0, 1, 2, 3, 4 }. Add
Multiply each element of N
each element of N5 with B = 0, one by one. And, calculate
And, calculate the remaind
the remainder (C) of that number when divided by 5. when divided by 5. See Ta
See Table 3.

B C ≡ ( A + 0 ) mod 5 Table 3 A B
0 0 1
0 0 1
0 0 1
0 0 1
0 0 1
0 1 1
0 1 1
0 1 1
0 1 1
0 1 1
0 2 1
0 2 1
0 2 1
0 2 1
0 2 1
0 3 1
0 3 1
0 3 1
0 3 1
0 3 1
0 4 1
0 4 1
0 4 1
0 4 1
0 4 1
Given the set of integers N5 = { 0, 1, 2, 3, 4 }.
ply each element of N5 with B = 1, one by one.
calculate the remainder (C) of that number
divided by 5. See Table 4.

C ≡ ( A * 1 ) mod 5Table 4
G1 - Given the set of positive integers Hn=9 = { 0, 1, 2, 3, 4, 5, 6
1 . Calculate the GCD (Greatest Common Divisor) of each elem
i.e., they are coprime, and belongs to set C.
2. Multiply each element of C by all the others, one by one, and
3. Add each element of C with all others, one by one, and divide

Table 1 - Get those numbers Table 2 - Fill the rowi and columnj (those color
that are coprime of n=9, and
put them in column C. element belonging to the set C. For example, in
with the first element of C, and so on. In other c
remainder (item 2).
GCD( Ni, 9 ) column1 column2
Ni 9 C C
0 9 row1 0
1 row2
2 row3
3 row4
4 row5
5 row6
6
7 Table 3 - Fill the rowi and columnj (those colo
8
element belonging to the set C. For example, i
with the first element of C, and so on. In other
remainder (item 3).

Table 3 column1 column2


C
row1 0
row2
row3
row4
row5
row6
, 1, 2, 3, 4, 5, 6, 7, 8 }, where n=9 is the number of elements belonging to H.
or) of each element of H with n=9 (Table 1) and select those H elements wher

one by one, and divide the product by 9 and get the remainder of that division
one, and divide the product by 9 and get the remainder of that division. See T

columnj (those colored green), with each


et C. For example, in row1 and column1 fill
, and so on. In other cells, calculate the
column3 column4 column5 column6
Table 2

d columnj (those colored green), with each


set C. For example, in row1 and column1 fill
C, and so on. In other cells, calculate the

column3 column4 column5 column6


elonging to H.
elements where GCD(H, 9) = 1,

of that division. See Table 2.


division. See Table 3.
G2 – Given the prime number n = 11, and the set of integers, Z11* = { 1, 2, 3, 4, 5, 6, 7
represent the cardinality of the set Zn* . Please, look at Table 1 and its commentary at
where Ni are the elements that belong to Zn* .
A - For each element, Ni Є Z11*, for example, Ni = 1, how many times do you have to m
When multiplying each Ni by itself up to 200 times, do you observe any cyclic pattern
'algorithm'.
B - Count how many times, X, you had to repeat the step A until you got the number 1

Table 2 - Check the emergence of a cyclic pattern


Table 1 - Checking the after changing the Ni value at column C ≡ mod(a * R,
cardinality of Z*11 = 10. n)
See the algorithm at spreadsheet 'pseudoAlgorithm'

GCD( Ni, n = 11 ) num_times a


Ni < n = 11 11 1 1
1 1 2 1
2 3 1
3 4 1
4 5 1
5 6 1
6 7 1
7 8 1
8 9 1
9 10 1
10 11 1
12 1
13 1
14 1
15 1
16 1
17 1
18 1
19 1
20 1
21 1
22 1
23 1
24 1
25 1
26 1
27 1
28 1
29 1
30 1
31 1
32 1
33 1
34 1
35 1
36 1
37 1
38 1
39 1
40 1
41 1
42 1
43 1
44 1
45 1
46 1
47 1
48 1
49 1
50 1
51 1
52 1
53 1
54 1
55 1
56 1
57 1
58 1
59 1
60 1
61 1
62 1
63 1
64 1
65 1
66 1
67 1
68 1
69 1
70 1
71 1
72 1
73 1
74 1
75 1
76 1
77 1
78 1
79 1
80 1
81 1
82 1
83 1
84 1
85 1
86 1
87 1
88 1
89 1
90 1
91 1
92 1
93 1
94 1
95 1
96 1
97 1
98 1
99 1
100 1
101 1
102 1
103 1
104 1
105 1
106 1
107 1
108 1
109 1
110 1
111 1
112 1
113 1
114 1
115 1
116 1
117 1
118 1
119 1
120 1
121 1
122 1
123 1
124 1
125 1
126 1
127 1
128 1
129 1
130 1
131 1
132 1
133 1
134 1
135 1
136 1
137 1
138 1
139 1
140 1
141 1
142 1
143 1
144 1
145 1
146 1
147 1
148 1
149 1
150 1
151 1
152 1
153 1
154 1
155 1
156 1
157 1
158 1
159 1
160 1
161 1
162 1
163 1
164 1
165 1
166 1
167 1
168 1
169 1
170 1
171 1
172 1
173 1
174 1
175 1
176 1
177 1
178 1
179 1
180 1
181 1
182 1
183 1
184 1
185 1
186 1
187 1
188 1
189 1
190 1
191 1
192 1
193 1
194 1
195 1
196 1
197 1
198 1
199 1
200 1
11= { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, with cardinality equal to 10. Zn* is a set of elements smaller th
*

and its commentary at cell 'C21' and check the cardinality of the Zn* . Coprimes or relatively prim

times do you have to multiply Ni by itself in order to get the remainder = 1 when dividing the pr
erve any cyclic pattern after you find a remainder =1? Observe the patterns in Table 2. You can

l you got the number 1 as the remainder. Complete the Table 3.

a cyclic pattern Table 3 - How many times, X, did you have to repeat
mn C ≡ mod(a * R,
n= 11
the step A until you got the number 1 as the
Ni = 1 remainder?
seudoAlgorithm'

R (previous remainder C) C ≡ mod(a * R, n) Table 3 Ni X


1 1 1 1
1 1 2
1 1 3
1 1 4
1 1 5
1 1 6
1 1 7
1 1 8
1 1 9
1 1 10
1 1
1 1 For which of the elements from Table 3 did it take
1 1 a number of repetitions equal to the cardinality of
1 1 Z11*, to generate a remainder = 1? These numbers
1 1 are called 'generators' or 'primitives'.
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
lements smaller than 'n' and are coprime to 'n'. These numbers
es or relatively prime means that for Ni < n, GCD(Ni, n) = 1,

hen dividing the product by n=11?


Table 2. You can see the algorithm in Spreadsheet

you have to repeat


1 as the

ble 3 did it take


he cardinality of
These numbers
s'.
G2 – Given the prime number n = 11, and the set of integers, Z11* = { 1, 2, 3,
of elements smaller than 'n' and, also, they are coprime to 'n'. These numbers
Coprimes, or, relatively prime means that for Ni < n, GCD(Ni, n) = 1, where
Divisor). Now, consider this operation:
33 = 3 * 3 * 3 ≡ 5 mod 11

How many times, k, do we have to multiply 3 by itself to get a remainder R


times, k, do we have to multiply 'a' by itself go get a remainder R = 1 when d

3k = 3 * 3 * ... * 3 ≡ R mod 11 in generic terms ak = a * a * ... * a ≡ R

a=3
num_times
1 3 = 31 * 1 = 3 ≡ 3 mod 11
2 32 = 3 * 3 = 9 ≡ 9 mod 11
3 33 = 9 * 3 = 27 ≡ 5 mod 11
4 34 = 5 * 3 = 15 ≡ 4 mod 11
5 35 = 4 * 3 = 12 ≡ 1 mod 11
, Z11* = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, with cardinality equal to 10, where, Zn* is a set
. These numbers represent the cardinality of the set Z n* . Please, look at Table 1.
Ni, n) = 1, where Ni are the elements that belong to Z n* . GCD (Greatest Common

t a remainder R equal to 1 when divided by 11? Or, in generical terms, how many
der R = 1 when divided by n?

* a * ... * a ≡ R mod n

a=3
a1 = a0 * 3 = 3 ≡ 3 mod 11, where R1 = 3
a2 = a1 * 3 = 9 ≡ 9 mod 11, where R2 = 9
a3 = a2 * 3 = 27 ≡ 5 mod 11, where R3 = 5
a4 = a3 * 3 = 15 ≡ 4 mod 11, where R4 = 4
a5 = a4 * 3 = 12 ≡ 1 mod 11, where R5 = 1
a6 = a5 * 3 = 3 ≡ 3 mod 11
a7 = a6 * 3 = 9 ≡ 9 mod 11
... ...
a199 = a198 * 3 = 15 ≡ 4 mod 11
a200 = a199 * 3 = 12 ≡ 1 mod 11
Zn* is a set
able 1.
ommon

w many
R1 - Sum two numbers (x, z), and, calculate the remainder (y) of that sum w
values ​of x and z can only be 0 or 1 . Hint: use the Excel MOD function or
version)

note that you already have all the num


Table 1 x z
0 0
0 1
1 0
1 1

The results represent the operator XOR, ⊕, commonly used in encrypti


word RAM, using the XOR and the shared secret, 1010110. The encryp

Encryption Plaintext R A M Stream Cipher


Bit Representation 1010010 1000001 1001101 Decryption
XOR ⊕ ⊕ ⊕
Key Stream 1010110 1010110 1010110 The plaintext (xi
Cyphertext 0000100 0010111 0011011 key stream (si) c
xi,yi,si ∈ {0,1}.
Encryption: yi ≡
Decryption Cyphertext 0000100 0010111 0011011
XOR ⊕ ⊕ ⊕ Decryption: xi ≡
Key Stream 1010110 1010110 1010110
Bit Representation 1010010 1000001 1001101
Plaintext R A M
inder (y) of that sum when divided by 2. The R2 – Multiply two numbe
xcel MOD function or RESIDUO (Spanish product when divided by 2

ave all the numbers you need to start the calculatios in columns
y ≡ ( x + z ) mod 2 x z
0 0 0
1 0 1
1 1 0
0 1 1

monly used in encryption. Let's encrypt the The results represent the o
1010110. The encryption occurs bit-bit. AND.

Stream Cipher Encryption and


Decryption

The plaintext (xi), the ciphertext (yi) and the


key stream (si) consist of individual bits, i.e.,
xi,yi,si ∈ {0,1}.
Encryption: yi ≡ xi + si mod 2
Decryption: xi ≡ yi + si mod 2

x 0 1 z
0 0 1
1 1 0

x 0 1 z
0 0 0
1 0 1
Multiply two numbers (x, z), and, calculate the remainder (y) of that
ct when divided by 2. The values ​of x and z can only be 0 or 1.

os in columns x and z
y ≡ ( x * z ) mod 2Table 2
0
0
0
1

esults represent the operator


.
R3 - Given the set of integers N5 = { 0, 1, 2, 3, 4 }. Add each R4 - Given the
element of N5 with all the others, one by one. And, calculate element of N5 w
the remainder (C) of that number when divided by 5. remainder (C)
See Table 1.

note that you already have all the numbers you need

Table 1 A B C ≡ ( A + B ) mod 5 A
0 0 0 0
0 1 1 0
0 2 2 0
0 3 3 0
0 4 4 0
1 0 1 1
1 1 2 1
1 2 3 1
1 3 4 1
1 4 0 1
2 0 2 2
2 1 3 2
2 2 4 2
2 3 0 2
2 4 1 2
3 0 3 3
3 1 4 3
3 2 0 3
3 3 1 3
3 4 2 3
4 0 4 4
4 1 0 4
4 2 1 4
4 3 2 4
4 4 3 4
R4 - Given the set of integers N5 = { 0, 1, 2, 3, 4 }. Multiply each R5 - Given the set
element of N5 with all the others, one by one. And, calculate the each element of N
remainder (C) of that number when divided by 5. See Table 2. the remainder (C)
See Table 3.

s you need to start the calculatios in columns A and B

B C ≡ ( A * B ) mod 5 Table 2 A
0 0 0
1 0 0
2 0 0
3 0 0
4 0 0
0 0 1
1 1 1
2 2 1
3 3 1
4 4 1
0 0 2
1 2 2
2 4 2
3 1 2
4 3 2
0 0 3
1 3 3
2 1 3
3 4 3
4 2 3
0 0 4
1 4 4
2 3 4
3 2 4
4 1 4
R6 – Given the set of integ
R5 - Given the set of integers N5 = { 0, 1, 2, 3, 4 }. Add
Multiply each element of N
each element of N5 with B = 0, one by one. And, calculate
And, calculate the remaind
the remainder (C) of that number when divided by 5. when divided by 5. See Ta
See Table 3.

B C ≡ ( A + 0 ) mod 5 Table 3 A B
0 0 0 1
0 0 0 1
0 0 0 1
0 0 0 1
0 0 0 1
0 1 1 1
0 1 1 1
0 1 1 1
0 1 1 1
0 1 1 1
0 2 2 1
0 2 2 1
0 2 2 1
0 2 2 1
0 2 2 1
0 3 3 1
0 3 3 1
0 3 3 1
0 3 3 1
0 3 3 1
0 4 4 1
0 4 4 1
0 4 4 1
0 4 4 1
0 4 4 1
Given the set of integers N5 = { 0, 1, 2, 3, 4 }.
ply each element of N5 with B = 1, one by one.
calculate the remainder (C) of that number
divided by 5. See Table 4.

C ≡ ( A * 1 ) mod 5Table 4
0
0
0
0
0
1
1
1
1
1
2
2
2
2
2
3
3
3
3
3
4
4
4
4
4
G1 - Given the set of positive integers Hn=9 = { 0, 1, 2, 3, 4, 5, 6
1 . Calculate the GCD (Greatest Common Divisor) of each elem
i.e., they are coprime, and belongs to set C.
2. Multiply each element of C by all the others, one by one. And

Table 1 - Get those numbers Table 2 - Fill the rowi and columnj (those color
that are coprime of n=9, and
element belonging to the set C. For example, in
put them in column C.
with the first element of C, and so on. In other c
remainder (item 2).
GCD( Ni, 9 ) column1 column2
Ni 9 C C 1 2
0 9 1 row1 1 1 2
1 1 2 row2 2 2 4
2 1 4 row3 4 4 8
3 3 5 row4 5 5 1
4 1 7 row5 7 7 5
5 1 8 row6 8 8 7
6 3
7 1
8 1

column1 column2
C 1 2
row1 1 2 3
row2 2 3 4
row3 4 5 6
row4 5 6 7
row5 7 8 0
row6 8 0 1
, 1, 2, 3, 4, 5, 6, 7, 8 }, where n=9 is the number of elements belonging to H.
or) of each element of H with n=9 (Table 1) and select those H elements wher

one by one. And, calculate that number's remainder (P) when divided by 9. Se

columnj (those colored green), with each


et C. For example, in row1 and column1 fill
, and so on. In other cells, calculate the
column3 column4 column5 column6
4 5 7 8 1 - If all the remainder's values belong to the set C, then
4 5 7 8 operation multiplication module n is closed. The results
8 1 5 7 are closed.
7 2 1 5 2 - Observing row1, we check that mod(a*b, 9)=b, wher
2 7 8 4
1 8 4 2 b=(1, 2, 4, 5, 7, 8). We say a=1, is the element identity.
5 4 2 1
3 - If in each row there is a value = 1, we say that it is t
For example, consider the intersection between (row3, c
which value is 1. We can say that 7(col5) is the inverse
according the operation (4*7 mod 9).

column3 column4 column5 column6


1 - If all the remainder's values belong to the set C, the
4 5 7 8
5 6 8 0 operation multiplication module n is closed. The result
6 7 0 1 are not closed because 0 and 3 does not belong to C.
8 0 2 3 2 - We do not observe no element identity. But if 0 was
0 1 3 4
C, it would the identity element regarding the operatio
2 3 5 6
3 4 6 7
3 - If in each row there is a value = 0, we say that it is
For example, consider the intersection between (row1,
which value is 0. We can say that 8(col6) is the inverse
regarding the operation (1+8 mod 9).
elonging to H.
elements where GCD(H, 9) = 1,

ivided by 9. See Table 2.

ng to the set C, then the


closed. The results from Table 2

mod(a*b, 9)=b, where, a=1, and,


e element identity.

1, we say that it is the inverse.


on between (row3, column5)
col5) is the inverse of 4(row3)
).

ong to the set C, then the


s closed. The results from Table 3
not belong to C.
dentity. But if 0 was included in
arding the operation a+0 mod n.

0, we say that it is the inverse.


on between (row1, column6)
(col6) is the inverse of 1(row1)
).
G2 – Given the prime number n = 11, and the set of integers, Z11* = { 1, 2, 3, 4, 5, 6, 7
represent the cardinality of the set Zn* . Please, look at Table 1 and its commentary at
where Ni are the elements that belong to Zn* .
A - For each element, Ni Є Z11*, for example, Ni = 1, how many times do you have to m
When multiplying each Ni by itself up to 200 times, do you observe any cyclic pattern
B - Count how many times, X, you had to repeat the step A until you got the number 1

Table 2 - Check the emergence of a cyclic pattern


Table 1 - Checking the after changing 'a' value´s at cell 'I16'.
cardinality of Z*11 = 10. See the algorithm at spreadsheet 'algorithm'

GCD( Ni, n = 11 ) num_times a


Ni < n = 11 11 1 1
1 1 2 1
2 1 3 1
3 1 4 1
4 1 5 1
5 1 6 1
6 1 7 1
7 1 8 1
8 1 9 1
9 1 10 1
10 1 11 1
12 1
13 1
14 1

15 1
16 1
17 1

18 1
19 1
20 1

21 1
22 1
23 1
24 1
25 1
26 1
27 1
28 1
29 1
30 1
31 1
32 1
33 1
34 1
35 1
36 1
37 1
38 1
39 1
40 1
41 1
42 1
43 1
44 1
45 1
46 1
47 1
48 1
49 1
50 1
51 1
52 1
53 1
54 1
55 1
56 1
57 1
58 1
59 1
60 1
61 1
62 1
63 1
64 1
65 1
66 1
67 1
68 1
69 1
70 1
71 1
72 1
73 1
74 1
75 1
76 1
77 1
78 1
79 1
80 1
81 1
82 1
83 1
84 1
85 1
86 1
87 1
88 1
89 1
90 1
91 1
92 1
93 1
94 1
95 1
96 1
97 1
98 1
99 1
100 1
101 1
102 1
103 1
104 1
105 1
106 1
107 1
108 1
109 1
110 1
111 1
112 1
113 1
114 1
115 1
116 1
117 1
118 1
119 1
120 1
121 1
122 1
123 1
124 1
125 1
126 1
127 1
128 1
129 1
130 1
131 1
132 1
133 1
134 1
135 1
136 1
137 1
138 1
139 1
140 1
141 1
142 1
143 1
144 1
145 1
146 1
147 1
148 1
149 1
150 1
151 1
152 1
153 1
154 1
155 1
156 1
157 1
158 1
159 1
160 1
161 1
162 1
163 1
164 1
165 1
166 1
167 1
168 1
169 1
170 1
171 1
172 1
173 1
174 1
175 1
176 1
177 1
178 1
179 1
180 1
181 1
182 1
183 1
184 1
185 1
186 1
187 1
188 1
189 1
190 1
191 1
192 1
193 1
194 1
195 1
196 1
197 1
198 1
199 1
200 1
11= { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }, with cardinality equal to 10. Zn* is a set of elements smaller th
*

and its commentary at cell 'C21' and check the cardinality of the Zn* . Coprimes or relatively prim

times do you have to multiply Ni by itself in order to get the remainder = 1 when dividing the pr
erve any cyclic pattern after you find a remainder =1? Observe the patterns in Table 2. You can
l you got the number 1 as the remainder. Complete the Table 3.

f a cyclic pattern Table 3 - How many times, X, did you have to repeat the
I16'.
n= 11
step A until you got the number 1 as the remainder?
'algorithm' Ni = 1

R (previous remainder C) C ≡ mod(a * R, n) Table 3 Ni X


1 1 1 1
For which of the elem
1 1 2 10 cardinality of Z11*, to
1 1 3 5 'primitives'.
1 1 4 5
1 1 5 5
1 1 6 10 The generators of Z*
1 1 7 10 Є G, and, ß Є Z*11. Y
1 1 8 10
1 1 9 5
1 1 10 2
1 1
1 1 Table 4 i
1 1 α=2
1 1

1 1 Table 5 Ni
1 1 α=6
1 1

1 1 Table 8 Ni
1 1 α=7
1 1

1 1 Table 7 Ni
1 1 α=8
1 1
1 1
1 1
1 1 The Discrete Logarith
1 1
given:
1 1
the 'p' prime number, th
1 1
An example, given α =
1 1
following set, S, can be
1 1 S = { 4, 14, 24, 34, 44,
1 1
1 1 The DLP are fundamen
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
et of elements smaller than 'n' and are coprime to 'n'. These numbers
oprimes or relatively prime means that for Ni < n, GCD(Ni, n) = 1,

= 1 when dividing the product by n=11?


erns in Table 2. You can see the algorithm in Spreadsheet 'algorithm'.

X, did you have to repeat the


ber 1 as the remainder?

For which of the elements from Table 3 did it take a number of repetitions equal to the
cardinality of Z11*, to generate a remainder = 1? These numbers are called 'generators' or
'primitives'.

The generators of Z*11 are the set G = { 2, 6, 7, 8 }, i.e., αi ≡ ß mod11, where i = 1...10, α
Є G, and, ß Є Z*11. You can check with Tables 4, 5, 6, 7.

1 2 3 4 5 6 7 8 9 10
2 4 8 5 10 9 7 3 6 1

1 2 3 4 5 6 7 8 9 10
6 3 7 9 10 5 8 4 2 1

1 2 3 4 5 6 7 8 9 10
7 5 2 3 10 4 6 9 8 1

1 2 3 4 5 6 7 8 9 10
8 9 6 4 10 3 2 5 7 1
The Discrete Logarithm Problem (DLP) consist in finding the integer 'x' such that, αx ≡ ß mo
given:
the 'p' prime number, the generator 'α' Є Z*p, and ß an integer Є Z*p. , where Z*p is a finite cycli

An example, given α = 7, p=11, ß = 3, from Table 2 (Ni = α; n = p), we can see that anyone of
following set, S, can be the value 'x':
S = { 4, 14, 24, 34, 44, 54, 64, 74, 84, 94, 104, 114, 124, 134, 144, 154, 164, 174, 184, 194 }

The DLP are fundamental to the Diffie-Hellman Key Exchange and Elgamal encryption schem
ons equal to the
ed 'generators' or

here i = 1...10, α
such that, αx ≡ ß mod(p),

e Z*p is a finite cyclic group.

n see that anyone of the

4, 174, 184, 194 }

mal encryption scheme.

You might also like