Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

crypto presentation

Views: 87
1
2
\documentclass{beamer}
3
4
\usetheme{Madrid}
5
\usepackage{graphicx}
6
7
8
\definecolor{MyLightMagenta}{cmyk}{0.1,0.8,0,0.1}
9
10
\title{Gr\"obner Basis and Their Applications}
11
12
13
\author{MIDN 1/ C Ben Liu, USNA
14
\\advised by Professor S. Margulies}
15
16
17
\institute[United States Naval Academy]
18
{
19
Department of Mathematics\\
20
United States Naval Academy
21
}
22
23
24
\date{Service Academy Student Mathematics Conference, 2017}
25
26
27
\subject{Theoretical Computer Science}
28
29
\AtBeginSubsection[]
30
31
32
\begin{document}
33
34
\begin{frame}
35
\titlepage
36
\end{frame}
37
38
\begin{frame}
39
\includegraphics[width=12cm, height=6cm]{picture1}
40
\end{frame}
41
42
\begin{frame}
43
\includegraphics[width=12cm, height=6cm]{picture2}
44
\end{frame}
45
46
\begin{frame}\frametitle{Overview of Public-Key Cryptography}
47
\[
48
\begin{array}{c||c||c}
49
\text{Alice} & \text{Public} & \text{Bob}\\ \hline\
50
{\Big( \text{Key}_{\text{private}}, \text{Key}_{\text{public}} \Big)} & & \\
51
\text{Key}_{\text{public}} \Longrightarrow& \text{Key}_{\text{public}} & \\
52
& & \text{plaintext}\\
53
& & \downarrow\\
54
& & \textbf{encrypt with } \text{Key}_{\text{public}}\\
55
& & \downarrow\\
56
\text{ciphertext} &\Longleftarrow \text{ciphertext} & \Longleftarrow \text{ciphertext}\\
57
\downarrow & & \\
58
\textbf{decrypt with } \text{Key}_{\text{private}} & & \\
59
\downarrow & & \\
60
\text{plaintext} & &\\
61
& (Eve) &
62
\end{array}
63
\]
64
\end{frame}
65
66
\begin{frame}\frametitle{Overview of Public-Key Cryptography}
67
\[
68
\begin{array}{c||c||c}
69
\text{Alice} & \text{Public} & \text{Bob}\\ \hline\
70
{\Big( \text{Key}_{\text{private}}, \text{Key}_{\text{public}} \Big)} & & \\
71
\text{Key}_{\text{public}} \Longrightarrow& \text{Key}_{\text{public}} & \\
72
& & \text{plaintext}\\
73
& & \downarrow\\
74
& & \textbf{encrypt with } \text{Key}_{\text{public}}\\
75
& & \downarrow\\
76
\text{ciphertext} &\Longleftarrow \text{ciphertext} & \Longleftarrow \text{ciphertext}\\
77
\downarrow & & \\
78
\textbf{decrypt with } \text{Key}_{\text{private}} & & \\
79
\downarrow & & \\
80
\text{plaintext} & &\\
81
& (Eve) &
82
\end{array}
83
\]
84
\end{frame}
85
86
\begin{frame}{The Imai-Matsumoto System}
87
\text{Let us have a plaintext $\overline{x} = \{x_1, x_2,..., x_n\}$ that resides in the finite field $\mathbb{F}_2$} \\
88
\vspace{20pt}
89
\uncover<2->{
90
\textbf{Example:}
91
\begin{align*}
92
\{x_1, x_2,..., x_n\} &= \{1,0,0,...,1\}
93
\end{align*}}
94
\end{frame}
95
96
\begin{frame}{The Imai-Matsumoto System}
97
\text{The first thing we do is set $\overline{u} = A\overline{x} + \overline{c}$}
98
where A is a $n \times n$ invertible matrix and c is a constant vector of length $n$\\
99
\vspace{20pt}
100
\uncover<2->{
101
\textbf{Example:}
102
\[A = \left( \begin{array}{ccc}
103
1 & 0 & 1\\
104
0 & 1 & 1\\
105
0 & 0 & 1\end{array} \right)\]
106
\vspace{.3cm}
107
\[ \bar{c}= (1,0,0) \]
108
\begin{align*}
109
u_1 &= x_1 + x_3 + 1
110
\\u_2 &= x_2 + x_3
111
\\u_3 &= x_3
112
\end{align*}}
113
\end{frame}
114
115
\begin{frame}{The Imai-Matsumoto System}
116
We then set the $\overline{u}$ values as the coefficients of the indeterminates in a quotient ring $\mathbb{K}$ with basis $\{1, X^1, X^2, ..., X^{n-1}\}$ modulo an irreducible polynomial $f(X)$ and denote $\textbf{u} = u_1 + u_2X + u_3X^2 + ... + u_nX^{n-1}$.\\
117
\vspace{20pt}
118
\uncover<2->{
119
\textbf{Example:}
120
\begin{center}
121
$f(X) = X^3 + X^2 + 1$
122
\end{center}
123
\begin{align*}
124
\textbf{u} = (x_1 + x_3 + 1) + (x_2 + x_3)X + (x_3)X^2
125
\end{align*}}
126
\end{frame}
127
128
\begin{frame}{The Imai-Matsumoto System}
129
We raise $\textbf{u}$ to a certain exponent $h$ and denote $\textbf{v} = \textbf{u}^h$.\\
130
\vspace{20pt}
131
\uncover<2->{
132
\textbf{Example:}
133
\begin{align*}
134
\textbf{v} = &(x1^2 + x1*x2 + x1*x3 + x2^2 + x2*x3 + x2 + x3 + 1)\\ &+ (x1*x3 + x2^2 + x2*x3 + x3^2 + x3)X\\ &+ (x1*x2 + x2*x3 + x2 + x3^2)X^2
135
\end{align*}}
136
\end{frame}
137
138
\begin{frame}{The Imai-Matsumoto System}
139
We set $\overline{v}$ as the coefficients of $\textbf{v}$\\
140
\vspace{20pt}
141
\uncover<2->{
142
\textbf{Example:}
143
\begin{align*}
144
v_1 &= x1^2 + x1*x2 + x1*x3 + x2^2 + x2*x3 + x2 + x3 + 1
145
\\v_2 &= x1*x3 + x2^2 + x2*x3 + x3^2 + x3
146
\\v_3 &= x1*x2 + x2*x3 + x2 + x3^2
147
\end{align*}}
148
\end{frame}
149
150
\begin{frame}{The Imai-Matsumoto System}
151
We establish $\overline{y} = B^{-1}(\overline{v}-\overline{d})$, where
152
$B^{-1}$ is the inverse of a $n \times n$ matrix $B$ and $\overline{d}$ is a constant vector of length $n$.\\
153
\vspace{20pt}
154
\uncover<2->{
155
\textbf{Example:}
156
\[B^{-1} = \left( \begin{array}{ccc}
157
1 & 1 & 1\\
158
1 & 1 & 0\\
159
0 & 1 & 1\end{array} \right)\]
160
\vspace{.3cm}
161
\[ \bar{d}= (0,1,0) \]
162
\begin{align*}
163
y_1 &= x_1^2 + x_2x_3
164
\\y_2 &= x_1^2 + x_1x_2 + x_2 + x_3^2
165
\\y_3 &= x_1x_2 + x_1x_3 + x_2^2 + x_2 + x_3 + 1
166
\end{align*}}
167
\end{frame}
168
169
\begin{frame}{The Imai-Matsumoto System}
170
In Summary:
171
\begin{center}
172
$x_1,...,x_n$
173
\pause
174
\\$\Downarrow$
175
\\$\bar{u}$ = A$\bar{x}$ + $\bar{c}$
176
\pause
177
\\$\Downarrow$
178
\\$\textbf{u}$ = $\sum$ $u_iX^{i-1}$
179
\pause
180
\\$\Downarrow$
181
\\$\textbf{v} = \textbf{u}^{h}$
182
\pause
183
\\$\Downarrow$
184
\\$\bar{y}$ = $B^{-1}(\bar{v} - \bar{d}$).
185
\end{center}
186
\end{frame}
187
188
\begin{frame}{The Imai-Matsumoto System}
189
Rules:
190
\begin{center}
191
$0 \leq \theta \leq n-1$
192
\vspace{.5cm}
193
\\$q$ is a power of 2, where $\mathbb{F}_q$ is the finite field we are working in
194
\vspace{.5cm}
195
\\The exponent $h$, $0 \leq h \leq q^n$, is of the form \\$h = q^{\theta} + 1$
196
and satisfies the condition g.c.d.($h,q^n - 1$) = 1
197
\end{center}
198
\end{frame}
199
200
\begin{frame}{The Imai-Matsumoto System}
201
\begin{center}
202
Let $\theta = 2$, $q = 2$, $h = 5$,
203
\\the quotient ring is modulo the irreducible polynomial $f(X) = X^3 + X^2 + 1$
204
\[A = \left( \begin{array}{ccc}
205
1 & 0 & 1\\
206
0 & 1 & 1\\
207
0 & 0 & 1\end{array} \right), \hspace{.5cm}
208
B = \left( \begin{array}{ccc}
209
1 & 0 & 1\\
210
1 & 1 & 1\\
211
1 & 1 & 0\end{array} \right) \]
212
\[ \bar{c}= (1,0,0) , \hspace{1cm} \bar{d}= (0,1,0). \]
213
\end{center}
214
\end{frame}
215
216
\begin{frame}{The Imai-Matsumoto System}
217
\begin{center}
218
Public Key:
219
\end{center}
220
\begin{align*}
221
y_1 &= x_1^2 + x_2x_3
222
\\y_2 &= x_1^2 + x_1x_2 + x_2 + x_3^2
223
\\y_3 &= x_1x_2 + x_1x_3 + x_2^2 + x_2 + x_3 + 1
224
\end{align*}
225
\begin{center}
226
plaintext: (0,1,0) $\Rightarrow$ ciphertext: (0,1,1)
227
\end{center}
228
\end{frame}
229
230
\begin{frame}
231
Alice's Decryption:
232
\begin{center}
233
$y_1,...,y_n$
234
\pause
235
\\$\Downarrow$
236
\\$\bar{v}$ = B$\bar{y}$ + $\bar{d}$
237
\pause
238
\\$\Downarrow$
239
\\$\textbf{v}$ = $\sum$ $v_iX^{i-1}$
240
\pause
241
\\$\Downarrow$
242
\\$\textbf{u} = \textbf{v}^{h'}$
243
\pause
244
\\$\Downarrow$
245
\\$\bar{x}$ = $A^{-1}(\bar{u} - \bar{c}$).
246
\end{center}
247
\end{frame}
248
249
\begin{frame}{The Imai-Matsumoto System}
250
Let $\textbf{R}$ be a ring, an $\textit{ideal}$ of $\textbf{R}$ is a subset of $\textbf{R}$ that is defined as a subset $I \subset \textbf{R}$ that satisfies:
251
\begin{align*}
252
(i)\thinspace &0 \in I.
253
\\(ii)\thinspace &\textit{If f, g} \in I, \textit{then f + g} \in I.
254
\\(iii)\thinspace &\textit{If f} \in \textit{I and h} \in \textbf{R}, \textit{then hf} \in I.
255
\end{align*}
256
An example of an ideal would be the multiples of 3 in ring of integers $\mathbb{Z}$.
257
\vspace{.5cm}
258
\\$I = \{x_1^2 + x_2x_3, x_1^2 + x_1x_2 + x_2 + x_3^2 + 1, x_1x_2 + x_1x_3 + x_2^2 + x_2 + x_3 \}$
259
\end{frame}
260
261
\begin{frame}
262
\vspace{.5cm}
263
A finite subset $G$ = ${g_1,...g_t}$ of an ideal $I$ is said to be a $\textbf{Gr\"obner basis}$ if
264
\begin{center}
265
$\langle LT(g_1),..., LT(g_t) \rangle = \langle LT(I) \rangle.$
266
\end{center}
267
\end{frame}
268
269
\begin{frame}
270
$\textbf{Theorem (Buchberger's Algorithm).}$ Let $I$ = $\langle f_1,..., f_s \rangle \neq {0}$ be a polynomial ideal. Then a Gr\"obner basis for $I$ can be constructed in a finite number of steps by the following algorithm:
271
272
Input: $F$ = ($f_1,...,f_s$)
273
274
Output: a Gr\"obner basis $G$ = ($g_1,..., g_t$) for $I$, with $F$ $\subset$ $G$
275
\vspace{.5cm}
276
277
$G$ := $F$
278
279
REPEAT
280
281
\hspace{1cm}$G'$ := $G$
282
283
\hspace{1cm}FOR each pair{$p,q$}, $p \neq q$ in $G'$ DO
284
285
\hspace{2cm}$S$ := $\overline{S(p,q)}^{G'}$
286
287
\hspace{2cm}IF $S \neq 0$ THEN $G := G \cup {S}$
288
289
UNTIL $G = G'$
290
\end{frame}
291
292
\begin{frame}
293
S-Polynomials
294
\vspace{.5cm}
295
Let $f,g \in k[x_1,..., x_n]$ be nonzero polynomials.
296
\begin{flushleft}
297
(i) If multideg($f$) = $\alpha$ and multideg($g$) = $\beta$, then let $\gamma = (\gamma_1,...,\gamma_n)$, where $\gamma_i =$ max($\alpha,\beta_i$) for each $i$. We call $x^{\gamma}$ the $\textit{least common multiple}$ of LM($f$) and LM($g$), written $x^{\gamma}$ = LCM(LM($f$),LM($g$)).
298
\\(ii) The $\textit{S-polynomial}$ of $f$ and $g$ is the combination
299
\end{flushleft}
300
\begin{center}
301
S($f,g$) = $\frac{x^{\gamma}}{LT(f)}\cdot f - \frac{x^{\gamma}}{LT(g)}\cdot g$
302
\end{center}
303
\uncover<2->{
304
\textbf{Example:}
305
\begin{center}
306
307
$f = x^3y^2 - x^2y^3 + x$ and $g = 3x^4y + y^2$
308
309
$S(f,g) = \frac{x^4y^2}{x^3y^2}\cdot f - \frac{x^4y^2}{3x^4y}\cdot g$
310
311
$S(f,g) = -x^3y^3 + x^2 - (1/3)y^3$
312
\end{center}}
313
\end{frame}
314
315
\begin{frame}
316
But it is well-known that Gr\"obner bases cannot be found in polynomial time, even for low degree, and even for a small number of polynomials, even if $\textbf{P} = \text{NP}$. Gr\"obner bases are EXPSPACE-complete. Recall the known complexity class inclusions:
317
\begin{align*}
318
\text{P} \subseteq \text{NP} \subseteq \text{PSPACE} \subseteq \text{EXPTIME} \subseteq \text{NEXPTIME} \subseteq \text{EXPSPACE}
319
\end{align*}
320
Furthermore, by the time hierarchy theorem and the space hierarchy theorem, the following \emph{proper} inclusions are known (see Papadimitriou's Computational Complexity text as reference or \url{https://en.wikipedia.org/wiki/EXPTIME})
321
\begin{align*}
322
\text{P} \subsetneq \text{EXPTIME} \quad \text{and} \quad \text{NP} \subsetneq \text{NEXPTIME} \quad \text{and} \quad \text{PSPACE} \subsetneq \text{EXPSPACE}
323
\end{align*}
324
Therefore, it is known that \text{NP} is a \emph{proper} subset of EXPSPACE. Therefore, even if $\textbf{P} = \text{NP}$, the complexity of finding a Gr\"obner bases would remain unchanged since \emph{exponential space is required to even write the bases down} in general.
325
\end{frame}
326
327
\begin{frame}{The Imai-Matsumoto System}
328
Gr\"obner Basis:
329
\begin{align*}
330
g_{1} &= x_2^4 + x_2^3x_3 + x_2x_3^3 + x_2x_3 + x_3^2 + 1\\g_{2} &= x_1x_2 + x_1x_3 + x_2^2 + x_2 + x_3\\g_{3} &= x_1^2 + x_2x_3\\g_{4} &= x_1 + x_2^3 + x_2^2x_3 + x_3^3 + 1\\g_{5} &= x_1^2 + x_1x_2 + x_2 + x_3^2 + 1\\g_{6} &= x_1x_3 + x_2^2 + x_2x_3 + x_3^2 + x_3 + 1\\g_{7} &= x_2^3x_3 + x_2^2x_3^2 + x_2^2 + x_2x_3 + x_3^4 + x_3^2 + 1\\g_{8} &= x_2^6 + x_2^4x_3^2 + x_2^4 + x_2^3x_3 + x_2x_3^3 + x_3^6 + x_3^2\\g_{9} &= x_2^2 + 1\\g_{10} &= x_3
331
\end{align*}
332
\end{frame}
333
334
\begin{frame}
335
\begin{center}
336
Buchberger's Algorithm and S-Polynomials Analysis
337
\end{center}
338
\url{https://cloud.sagemath.com/projects/e92ee2f7-c8d2-4f13-bc73-d8b824e125f5/files/Presentation_example.sagews}
339
\end{frame}
340
341
\begin{frame}
342
Techniques for Crytanalysis:
343
\begin{center}
344
\vspace{.5cm}
345
Chosen Plaintext Attack
346
\pause
347
348
Examples where n = 2,3,5
349
\pause
350
351
Probability Testing for Random Invertible Matrices when n = 3
352
\pause
353
354
Examples with identity matrices and zero constant vectors
355
\pause
356
357
Manipulating irreducible polynomials, h, and monomial ordering
358
\pause
359
360
Going From Ciphertext to Plaintext
361
\end{center}
362
\end{frame}
363
364
\begin{frame}
365
\begin{center}
366
Thank you for your attention!
367
\end{center}
368
\end{frame}
369
370
\end{document}
371
372
373
374
375