Commit | Line | Data |
---|---|---|
a6e375a6 MW |
1 | %%% -*-latex-*- |
2 | %%% | |
3 | %%% The Wrestlers Protocol: secure, deniable key-exchange | |
4 | %%% | |
5 | %%% (c) 2006 Mark Wooding | |
6 | %%% | |
7 | ||
8 | \newif\iffancystyle\fancystylefalse | |
9 | \fancystyletrue | |
10 | \errorcontextlines=\maxdimen | |
11 | \showboxdepth=\maxdimen | |
12 | \showboxbreadth=\maxdimen | |
13 | ||
14 | \iffancystyle | |
15 | \documentclass | |
16 | [a4paper, article, 10pt, numbering, noherefloats, notitlepage, | |
17 | runinsubsubsec] | |
18 | {strayman} | |
19 | \usepackage[T1]{fontenc} | |
20 | \usepackage[palatino, helvetica, courier, maths=cmr]{mdwfonts} | |
21 | \usepackage[within = subsection, mdwmargin]{mdwthm} | |
22 | \usepackage{mdwlist} | |
23 | \usepackage{sverb} | |
24 | \PassOptionsToPackage{dvips}{xy} | |
25 | \else | |
26 | \documentclass[a4paper]{llncs} | |
27 | \usepackage{a4wide} | |
28 | \fi | |
29 | ||
30 | \PassOptionsToPackage{show}{slowbox} | |
31 | %\PassOptionsToPackage{hide}{slowbox} | |
32 | \usepackage{mdwtab, mathenv, mdwmath, crypto} | |
33 | \usepackage{slowbox} | |
34 | \usepackage{amssymb, amstext} | |
35 | \usepackage{url, multicol} | |
36 | \usepackage{tabularx} | |
37 | \DeclareUrlCommand\email{\urlstyle{tt}} | |
38 | \ifslowboxshow | |
39 | \usepackage[all]{xy} | |
40 | \turnradius{4pt} | |
41 | \fi | |
42 | ||
43 | \iffancystyle | |
44 | \def\next{\title[The Wrestlers Protocol]} | |
45 | \else | |
46 | \def\next{\title} | |
47 | \fi | |
48 | \next | |
49 | {The Wrestlers Protocol \\ | |
50 | A simple, practical, secure, deniable protocol for key-exchange} | |
51 | \iffancystyle | |
52 | \author{Mark Wooding \\ \email{mdw@distorted.org.uk}} | |
53 | \else | |
54 | \author{Mark Wooding} | |
55 | \institute{\email{mdw@distorted.org.uk}} | |
56 | \fi | |
57 | ||
58 | \iffancystyle | |
59 | \bibliographystyle{mdwalpha} | |
60 | \let\epsilon\varepsilon | |
61 | \let\emptyset\varnothing | |
62 | \let\le\leqslant\let\leq\le | |
63 | \let\ge\geqslant\let\geq\ge | |
64 | \numberwithin{table}{section} | |
65 | \numberwithin{figure}{section} | |
66 | \numberwithin{equation}{subsection} | |
67 | \let\random\$ | |
68 | \else | |
69 | \bibliographystyle{plain} | |
70 | \expandafter\let\csname claim*\endcsname\claim | |
71 | \expandafter\let\csname endclaim*\endcsname\endclaim | |
72 | \fi | |
73 | ||
74 | \iffancystyle | |
75 | \newcommand{\Nupto}[1]{\N_{<{#1}}} | |
76 | \else | |
77 | \newcommand{\Nupto}[1]{\{0, 1, \ldots, #1 - 1\}} | |
78 | \fi | |
79 | \let\Bin\Sigma | |
80 | \let\emptystring\lambda | |
81 | \edef\Pr{\expandafter\noexpand\Pr\nolimits} | |
82 | \newcommand{\bitsto}{\mathbin{..}} | |
83 | \newcommand{\E}{{\mathcal{E}}} | |
84 | \newcommand{\M}{{\mathcal{M}}} | |
85 | \iffancystyle | |
86 | \def\description{% | |
87 | \basedescript{% | |
88 | \let\makelabel\textit% | |
89 | \desclabelstyle\multilinelabel% | |
90 | \desclabelwidth{1in}% | |
91 | }% | |
92 | } | |
93 | \fi | |
94 | \def\fixme#1{\marginpar{FIXME}[FIXME: #1]} | |
95 | \def\hex#1{\texttt{#1}_{x}} | |
96 | ||
97 | \def\dbox#1{% | |
98 | \vtop{% | |
99 | \def\\{\unskip\egroup\hbox\bgroup\strut\ignorespaces}% | |
100 | \hbox{\strut#1}% | |
101 | }% | |
102 | } | |
103 | ||
104 | \def\Wident{\Xid{W}{ident}} | |
105 | \def\Wkx{\Xid{W}{kx}} | |
106 | \def\Wdkx{\Xid{W}{dkx}} | |
107 | \def\Func#1#2{\mathcal{F}[#1\to#2]} | |
108 | \def\diff#1#2{\Delta_{#1, #2}} | |
109 | \def\Hid{H_{\textit{ID}}} | |
110 | ||
111 | %% protocol run diagrams | |
112 | \def\PRaction#1{#1\ar[r]} | |
113 | \def\PRcreatex#1{\PRaction{\textsf{Create session\space}#1}} | |
114 | \def\PRcreate#1#2#3{\PRcreatex{(\text{#1},\text{#2},#3)}} | |
115 | \def\PRreceivex#1{\PRaction{\textsf{Receive\space}#1}} | |
116 | \def\PRreceive#1#2{\PRreceivex{\msg{#1}{#2}}} | |
117 | \def\PRsession#1{\relax\mathstrut#1\ar[r]} | |
118 | \def\msg#1#2{(\cookie{#1},#2)} | |
119 | \def\PRresult#1{#1} | |
120 | \def\PRsendx#1{\PRresult{\textsf{Send\space}#1}} | |
121 | \def\PRsend#1#2{\PRsendx{\msg{#1}{#2}}} | |
122 | \def\PRcomplete#1{\textsf{Complete:\space}#1} | |
123 | \def\PRstate#1{\textsf{State:\space}#1} | |
124 | \def\PRignore{\textsf{(ignored)}} | |
125 | \def\PRreveal{\textsf{Session-state reveal}\ar[r]} | |
126 | \def\protocolrun#1{\[\xymatrix @R=0pt @C=2em {#1}\]} | |
127 | ||
128 | %% class-ids for proof of extractor lemma | |
129 | \let\Cid=\Lambda | |
130 | \let\Csession=S | |
131 | \let\Cindex=r | |
132 | \let\Cquery=Q | |
133 | \let\Chash=H | |
134 | \let\Ccheck=c | |
135 | \let\Ccheckset=V | |
136 | \let\Ccount=\nu | |
137 | ||
138 | \begin{document} | |
139 | ||
140 | %%%-------------------------------------------------------------------------- | |
141 | ||
142 | \maketitle | |
143 | ||
144 | \begin{abstract} | |
145 | We describe and prove (in the random-oracle model) the security of a simple | |
146 | but efficient zero-knowledge identification scheme, whose security is based | |
147 | on the computational Diffie-Hellman problem. Unlike other recent proposals | |
148 | for efficient identification protocols, we don't need any additional | |
149 | assumptions, such as the Knowledge of Exponent assumption. | |
150 | ||
151 | From this beginning, we build a simple key-exchange protocol, and prove | |
152 | that it achieves `SK-security' -- and hence security in Canetti's Universal | |
153 | Composability framework. | |
154 | ||
155 | Finally, we show how to turn the simple key-exchange protocol into a | |
156 | slightly more complex one which provides a number of valuable `real-life' | |
157 | properties, without damaging its security. | |
158 | \end{abstract} | |
159 | ||
160 | \iffancystyle | |
161 | \newpage | |
162 | \columnsep=2em \columnseprule=0pt | |
163 | \tableofcontents[\begin{multicols}{2}\raggedright][\end{multicols}] | |
164 | %%\listoffigures[\begin{multicols}{2}\raggedright][\end{multicols}] | |
165 | %% \listoftables[\begin{multicols}{2}\raggedright][\end{multicols}] | |
166 | \newpage | |
167 | \fi | |
168 | ||
169 | %%%-------------------------------------------------------------------------- | |
170 | ||
171 | \section{Introduction} | |
172 | ||
173 | %% Blah... | |
174 | %% Very brief discussion of key-exchange | |
175 | %% models of secure key exchange | |
176 | %% mutter about protocol actually being implemented | |
177 | ||
178 | ||
179 | ||
180 | In this paper, we concern ourselves mainly with \emph{authenticated key | |
181 | exchange}. That is, we present a system whereby two parties, say Alice and | |
182 | Bob, can communicate over an insecure channel, and end up knowing a shared | |
183 | random key unknown to anyone else. \fixme{write the rest of this} | |
184 | ||
185 | ||
186 | \subsection{Asymptotic and concrete security results} | |
187 | ||
188 | Most security definitions for identification (particularly zero-knowledge) | |
189 | and key-exchange in the literature are \emph{asymptotic}. That is, they | |
190 | consider a family of related protocols, indexed by a \emph{security | |
191 | parameter}~$k$; they that any \emph{polynomially-bounded} adversary has only | |
192 | \emph{negligible} advantage. A polynomially-bounded adversary is one whose | |
193 | running time is a bounded by some polynomial~$t(k)$. The security definition | |
194 | requires that, for any such polynomially-bounded adversary, and any | |
195 | polynomial $p(k)$, there is a bound~$n$ such that the adversary's advantage | |
196 | is less than $p(k)$ for all choices of $k > n$. | |
197 | ||
198 | Such asymptotic notions are theoretically interesting, and have obvious | |
199 | connections to complexity theory. Unfortunately, such an asymptotic result | |
200 | tells us nothing at all about the security of a particular instance of a | |
201 | protocol, or what parameter sizes one needs to choose for a given level of | |
202 | security against a particular kind of adversary. Koblitz and Menezes | |
203 | \cite{Koblitz:2006:ALP} (among other useful observations) give examples of | |
204 | protocols, proven to meet asymptotic notions of security, whose security | |
205 | proofs guarantee nothing at all for the kinds of parameters typically used in | |
206 | practice. | |
207 | ||
208 | Since, above all, we're interested in analysing a practical and implemented | |
209 | protocol, we follow here the `practice-oriented provable security' approach | |
210 | largely inspired by Bellare and Rogaway, and exemplified by | |
211 | \cite{Bellare:1994:SCB, Bellare:1995:XMN, Bellare:1995:OAE, Bellare:1996:ESD, | |
212 | Bellare:1996:KHF, Bellare:2000:CST}; see also \cite{Bellare:1999:POP}. | |
213 | Rather than attempting to say, formally, whether or not a protocol is | |
214 | `secure', we associate with each protocol an `insecurity function' which | |
215 | gives an upper bound on the advantage of any adversary attacking the protocol | |
216 | within given resource bounds. | |
217 | ||
218 | ||
219 | \subsection{Desirable properties of our protocols} | |
220 | ||
221 | Our identification protocol has a number of desirable properties. | |
222 | \begin{itemize} | |
223 | \item It is \emph{simple} to understand and implement. In particular, it | |
224 | requires only two messages. | |
225 | \item It is fairly \emph{efficient}, requiring two scalar multiplications by | |
226 | each of the prover and verifier. | |
227 | \item It is provably \emph{secure} (in the random oracle model), assuming the | |
228 | intractability of the computational Diffie-Hellman problem. | |
229 | \end{itemize} | |
230 | ||
231 | Our key-exchange protocol also has a number of desirable properties. | |
232 | \begin{itemize} | |
233 | \item It is fairly \emph{simple} to understand and implement, though there | |
234 | are a few subtleties. In particular, it is \emph{symmetrical}. We have | |
235 | implemented a virtual private network system based on this protocol. | |
236 | \item It is \emph{efficient}, requiring four scalar multiplications by each | |
237 | participant. The communication can be reduced to three messages by | |
238 | breaking the protocol's symmetry. | |
239 | \item It is provably \emph{secure} (again, in the random oracle model), | |
240 | assuming the intractability of the computational Diffie-Hellman problem, | |
241 | and the security of a symmetric encryption scheme. | |
242 | \item It provides \emph{perfect forward secrecy}. That is, even if a user's | |
243 | long-term secrets are compromised, past sessions remain secure. | |
244 | \item It is \emph{deniable}. It is possible to construct simulated | |
245 | transcripts of protocol executions between any number of parties without | |
246 | knowing any of their private keys. The simulated transcripts are (almost) | |
247 | indistinguishable from real protocol transcripts. Hence, a transcript | |
248 | does not provide useful evidence that a given party was really involved in | |
249 | a given protocol execution. | |
250 | \end{itemize} | |
251 | ||
252 | ||
253 | \subsection{Formal models for key-exchange} | |
254 | ||
255 | Many proposed key-exchange protocols have turned out to have subtle security | |
256 | flaws. Burrows, Abadi and Needham \cite{Burrows:1989:LA} presented a formal | |
257 | logic for the analysis of authentication and key-exchange protocols. Formal | |
258 | models for analysing the \emph{computational} security of key-exchange | |
259 | protocols began with Bellare and Rogaway \cite{Bellare:1994:EAK}, extended in | |
260 | \cite{Bellare:1995:PSS, Blake-Wilson:1997:KAP, Blake-Wilson:1998:EAA, | |
261 | Bellare:1998:MAD}. | |
262 | ||
263 | ||
264 | ||
265 | ||
266 | \subsection{Outline of the paper} | |
267 | ||
268 | The remaining sections of this paper are as follows. | |
269 | \begin{itemize} | |
270 | \item Section \ref{sec:prelim} provides the essential groundwork for the rest | |
271 | of the paper. It introduces important notation, and describes security | |
272 | notions and intractability assumptions. | |
273 | \item Section \ref{sec:zk-ident} describes our zero-knowledge identification | |
274 | protocol and proves its security. | |
275 | \item Section \ref{sec:kx} describes the simple version of our key-exchange | |
276 | protocol, and proves its security and deniability. It also describes some | |
277 | minor modifications which bring practical benefits without damaging | |
278 | security. | |
279 | \item Finally, section \ref{sec:...} presents our conclusions. | |
280 | \end{itemize} | |
281 | ||
282 | %%%-------------------------------------------------------------------------- | |
283 | ||
284 | \section{Preliminaries} | |
285 | \label{sec:prelim} | |
286 | ||
287 | \subsection{Miscellaneous notation} | |
288 | ||
289 | We write $\Func{D}{R}$ for the set of all functions with domain $D$ and range | |
290 | $R$. | |
291 | \iffancystyle | |
292 | We write $\Nupto{n} = \{\, i \in \Z \mid 0 \le i < n \,\} = \{0, 1, \ldots, n | |
293 | - 1\}$ for the set of nonnegative integers less than $n$. | |
294 | \fi | |
295 | ||
296 | ||
297 | \subsection{Groups} | |
298 | ||
299 | Let $(G, +)$ be a cyclic group\footnote{ | |
300 | We find that additive group notation is easier to read. In particular, in | |
301 | multiplicative groups, one ends up with many interesting things tucked away | |
302 | in little superscripts.}% | |
303 | of prime order $q$, and generated by an element $P$. We shall write the | |
304 | identity of $G$ as $0_G$, or simply as $0$ when no ambiguity is likely to | |
305 | arise. Thus, we have $\langle P \rangle = G$ and $q P = 0$. Any $X \in G$ | |
306 | can be written as $X = x P$ for some $x \in \Nupto{q}$. | |
307 | ||
308 | ||
309 | \subsection{Bit strings and encodings} | |
310 | \label{sec:bitenc} | |
311 | ||
312 | Let $\Bin = \{0, 1\}$ be the set of binary digits. Then $\Bin^n$ is the set | |
313 | of $n$-bit strings, and $\Bin^*$ the set of all (finite) bit strings. If $x | |
314 | \in \Bin^n$ is a bit string, we write its length as $|x| = n$. For a bit | |
315 | string $x \in \Bin^n$, and for $0 \le i < n$, we write $x[i]$ as the $i$th | |
316 | bit of $x$. The empty string is denoted $\emptystring$. | |
317 | ||
318 | Let $x$ and $y$ be two bit strings. If $|x| = |y| = n$, we write $x \xor y$ | |
319 | to mean the bitwise exclusive-or of $x$ and $y$: if $z = x \xor y$ then $|z| | |
320 | = n$, and $z[i] = (x[i] + y[i]) \bmod 2$ for $0 \le i < n$. We write $x \cat | |
321 | y$ to mean the concatenation of $x$ and $y$: if $z = x \cat y$ then $|z| = | |
322 | |x| + |y|$ and $z[i] = x[i]$ if $0 \le i < |x|$ and $z[i] = y[i - |x|]$ if | |
323 | $|x| < i \le |x| + |y|$. | |
324 | ||
325 | Finally, we let $\bot$ be a value distinct from any bit string. | |
326 | ||
327 | We shall want to encode group elements $X \in G$ and indices $x \in I = | |
328 | \Nupto{|G|}$ as bit strings. To this end, we shall assume the existence of | |
329 | integers $\ell_G, \ell_I > 0$ and functions | |
330 | \[ | |
331 | e_S\colon S \to \Bin^{\ell_S} | |
332 | \quad \textrm{and} \quad | |
333 | d_S\colon \Bin^{\ell_S} \to S \cup \{ \bot \} | |
334 | \qquad | |
335 | \textrm{for } S \in \{ G, I \}. | |
336 | \] | |
337 | with the following properties. | |
338 | \begin{itemize} | |
339 | \item The functions are \emph{unique} and \emph{unambiguous}, i.e., for any | |
340 | $t \in \Bin^{\ell_S}$, we have | |
341 | \[ d_S(t) = \begin{cases} | |
342 | s & if there is some $s \in S$ such that $t = e_S(s)$, or \\ | |
343 | \bot & if no such $s$ exists. | |
344 | \end{cases} | |
345 | \] | |
346 | \item The functions should be \emph{efficient} to compute. Indeed, we shall | |
347 | be assuming that the time taken for encoding and decoding is essentially | |
348 | trivial. | |
349 | \end{itemize} | |
350 | Note that, as we have defined them, all encodings of group elements are the | |
351 | same length, and similarly for encodings of indices. This is necessary for | |
352 | the security of our protocols. | |
353 | ||
354 | We shall frequently abuse notation by omitting the encoding and decoding | |
355 | functions where it is obvious that they are required. | |
356 | ||
357 | ||
358 | \subsection{Games, adversaries, and oracles} | |
359 | \label{sec:games} | |
360 | ||
361 | Many of the security definitions and results given here make use of | |
362 | \emph{games}, played with an \emph{adversary}. An adversary is a | |
363 | probabilistic algorithm. In some games, the adversary is additionally | |
364 | equipped with \emph{oracles}, which perform computations with values chosen | |
365 | by the adversary and secrets chosen by the game but not revealed to the | |
366 | adversary. We impose limits on the adversary's resource usage: in | |
367 | particular, the total time it takes, and the number of queries it makes to | |
368 | its various oracles. Throughout, we include the size of the adversary's | |
369 | program as part of its `time', in order to model adversaries which contain | |
370 | large precomputed tables. | |
371 | ||
372 | The games provide models of someone trying to attack a construction or | |
373 | protocol. For security, we will either define a notion of `winning' the | |
374 | game, and require that all adversaries have only a very small probability of | |
375 | winning, or we consider two different games and require that no adversary can | |
376 | distinguish between the two except with very small probability. | |
377 | ||
378 | Our proofs make frequent use of sequences of games; see | |
379 | \cite{Shoup:2004:SGT,Bellare:2004:CBG}. The presentation owes much to Shoup | |
380 | \cite{Shoup:2004:SGT}. We begin with a game $\G0$ based directly on a | |
381 | relevant security definition, and construct a sequence of games $\G1$, $\G2$, | |
382 | \dots, each slightly different from the last. We define all of the games in | |
383 | a sequence over the same underlying probability space -- the random coins | |
384 | tossed by the algorithms involved -- though different games may have slightly | |
385 | differently-defined events and random variables. Our goal in doing this is | |
386 | to bound the probability of the adversary winning the initial game $\G0$ by | |
387 | simultaneously (a) relating the probability of this event to that of | |
388 | corresponding events in subsequent games, and (b) simplifying the game until | |
389 | the probability of the corresponding event can be computed directly. | |
390 | ||
391 | The following simple lemma from \cite{Shoup:2001:OR} will be frequently | |
392 | useful. | |
393 | \begin{lemma}[Difference Lemma] | |
394 | \label{lem:shoup} | |
395 | Let $S$, $T$, $F$ be events. Suppose $\Pr[S|\bar F] = \Pr[T|\bar F]$. | |
396 | Then $|\Pr[S] - \Pr[T]| \le \Pr[F]$. | |
397 | \end{lemma} | |
398 | \begin{proof} | |
399 | A simple calculation: | |
400 | \begin{eqnarray*}[rl] | |
401 | |\Pr[S] - \Pr[T]| | |
402 | & = |(\Pr[S|F]\Pr[F] + \Pr[S|\bar F]\Pr[\bar F]) - | |
403 | (\Pr[T|F]\Pr[F] + \Pr[T|\bar F]\Pr[\bar F])| \\ | |
404 | & = \Pr[F] \cdot |\Pr[S|F] - \Pr[T|F]| \\ | |
405 | & \le \Pr[F] | |
406 | \end{eqnarray*} | |
407 | and we're done! | |
408 | \end{proof} | |
409 | ||
410 | ||
411 | \subsection{The random oracle model} | |
412 | \label{sec:ro} | |
413 | ||
414 | In particular, most of our results will make use of the \emph{random oracle} | |
415 | model \cite{Bellare:1993:ROP}, in which all the participants, including the | |
416 | adversary, have access to a number of `random oracles'. A random oracle with | |
417 | domain $D$ and range $R$ is an oracle which computes a function chosen | |
418 | uniformly at random from the set of all such functions. (In the original | |
419 | paper \cite{Bellare:1993:ROP}, random oracles are considered having domain | |
420 | $\Bin^*$ and range $\Bin^\omega$; we use finite random oracles here, because | |
421 | they're easier to work with.) | |
422 | ||
423 | Given a protocol proven secure in the random oracle model, we can instantiate | |
424 | each random oracle by a supposedly-secure hash function and be fairly | |
425 | confident that either our protocol will be similarly secure, or one of the | |
426 | hash functions we chose has some unfortunate property. | |
427 | ||
428 | Proofs in the random oracle must be interpreted carefully. For example, | |
429 | Canetti, Goldreich and Halevi \cite{Canetti:2004:ROM} show that there are | |
430 | schemes which can be proven secure in the random oracle model but provably | |
431 | have no secure instantiation in the standard model. | |
432 | ||
433 | The random oracle model is useful for constructing reductions and simulators | |
434 | for two main reasons. | |
435 | \begin{enumerate} | |
436 | \item One can use the transcript of an adversary's queries to random oracles | |
437 | in order to extract knowledge from it. | |
438 | \item One can `program' a random oracle so as to avoid being bound by prior | |
439 | `commitments', or to guide an adversary towards solving a selected instance | |
440 | of some problem. | |
441 | \end{enumerate} | |
442 | Our proofs only make use of the first feature. This becomes particularly | |
443 | important when we consider issues of zero-knowledge and deniability in a | |
444 | concurrent setting, because we want to be able to claim that we retain these | |
445 | features when the random oracle is instantiated using a cryptographic hash | |
446 | function, and hash functions definitely aren't `programmable' in this way! | |
447 | The former property seems rather more defensible -- one would indeed hope | |
448 | that the only sensible way of working out (anything about) the hash of a | |
449 | particular string is to actually compute the hash function, and the random | |
450 | oracle model is, we hope, just giving us a `hook' into this process. | |
451 | ||
452 | (Our protocols can be modified to make use of bilinear pairings so as to | |
453 | provide identity-based identification and key-exchange, using the techniques | |
454 | of \cite{Boneh:2001:IBE}. Proving the security of the modifications we | |
455 | discuss would involve `programming' random oracles, but this doesn't affect | |
456 | the zero-knowledge or deniability of the resulting protocols.) | |
457 | ||
458 | ||
459 | \subsection{Notation for algorithms} | |
460 | ||
461 | We shall have occasion to describe algorithms by means of a pseudocode. Our | |
462 | choice of pseudocode is unlikely to be particularly controversial. We let $x | |
463 | \gets y$ denote the action of setting $x$ to the value $y$; similarly, $x | |
464 | \getsr Y$ denotes the action of sampling $x$ from the set $Y$ uniformly at | |
465 | random. | |
466 | ||
467 | The expression $a \gets A^{O(\cdot, x)}(y)$ means `assign to $a$ the value | |
468 | output by algorithm $A$ on input $y$, and with oracle access to the algorithm | |
469 | which, given input $z$, computes $O(z, x)$'. | |
470 | ||
471 | We make use of conditional (\IF-\ELSE) and looping (\FOR-\DO and \WHILE-\DO) | |
472 | constructions; in order to reduce the amount of space taken up, the bodies of | |
473 | such constructions are shown by indentation only. | |
474 | ||
475 | We don't declare the types of our variables explicitly, assuming that these | |
476 | will be obvious by inspection; also, we don't describe our variables' scopes | |
477 | explicitly, leaving the reader to determine these from context. | |
478 | ||
479 | Finally, the notation $\Pr[\textit{algorithm} : \textit{condition}]$ denotes | |
480 | the probability that \textit{condition} is true after running the given | |
481 | \textit{algorithm}. | |
482 | ||
483 | ||
484 | \subsection{Diffie-Hellman problems} | |
485 | \label{sec:dhp} | |
486 | ||
487 | The security of our protocols is related to the hardness of the | |
488 | computational, decisional, and gap Diffie-Hellman problems in the group $G$. | |
489 | We define these problems and what it means for them to be `hard' here. | |
490 | ||
491 | The \emph{computational} Diffie-Hellman problem (CDH) is as follows: given | |
492 | two group elements $X = x P$ and $Y = y P$, find $Z = x y P$. | |
493 | \begin{definition}[The computational Diffie-Hellman problem] | |
494 | Let $(G, +)$ be a cyclic group generated by $P$. For any adversary $A$, we | |
495 | say that $A$'s \emph{success probability} at solving the computational | |
496 | Diffie-Hellman problem in $G$ is | |
497 | \[ \Succ{cdh}{G}(A) = | |
498 | \Pr[ x \getsr I; y \getsr \Nupto{|G|} : A(x P, y P) = x y P ] | |
499 | \] | |
500 | where the probability is taken over the random choices of $x$ and $y$ and | |
501 | any random decisions made by $A$. We say that the \emph{CDH insecurity | |
502 | function} of $G$ is | |
503 | \[ \InSec{cdh}(G; t) = \max_A \Succ{cdh}{G}(A) \] | |
504 | where the maximum is taken over adversaries which complete in time $t$. | |
505 | \end{definition} | |
506 | Certainly, if one can compute discrete logarithms in the group $G$ (i.e., | |
507 | given $x P$, find $x$), then one can solve the computational Diffie-Hellman | |
508 | problem. The converse is not clear, though. Shoup \cite{Shoup:1997:LBD} | |
509 | gives us some confidence in the difficulty of the problem by showing that a | |
510 | \emph{generic} adversary -- i.e., one which makes no use of the specific | |
511 | structure of a group -- has success probability no greater than $q^2/|G|$. | |
512 | ||
513 | This isn't quite sufficient for our purposes. Our proofs will be able to | |
514 | come up with (possibly) a large number of guesses for the correct answer, and | |
515 | at most one of them will be correct. Unfortunately, working out which one is | |
516 | right seems, in general, to be difficult. This is the \emph{decision} | |
517 | Diffie-Hellman problem (DDH), which \cite{Shoup:1997:LBD} shows, in the | |
518 | generic group model, is about as hard as CDH. (See \cite{Boneh:1998:DDP} for | |
519 | a survey of the decision Diffie-Hellman problem.) | |
520 | ||
521 | Our reference problem will be a `multiple-guess computational Diffie-Hellman | |
522 | problem' (MCDH), which is captured by a game as follows. An adversary is | |
523 | given a pair of group elements $(x P, y P)$, and an oracle $V(\cdot)$ which | |
524 | accepts group elements as input. The adversary wins the game if it queries | |
525 | $V(x y P)$. | |
526 | \begin{definition}[The multiple-guess computational Diffie-Hellman problem] | |
527 | \label{def:mcdh} | |
528 | Let $(G, +)$ be a cyclic group generated by $P$. For some adversary $A$, | |
529 | we say that $A$'s \emph{success probability} at solving the multiple-guess | |
530 | computational Diffie-Hellman problem in $G$ is | |
531 | \[ \Succ{mcdh}{G}(A) = \Pr[\Game{mcdh}{G}(A) = 1] \] | |
532 | where $\Game{mcdh}{G}(A)$ is shown in figure~\ref{fig:mcdh}. We say that | |
533 | the \emph{MCDH insecurity function of $G$} is | |
534 | \[ \InSec{mcdh}(G; t, q_V) = \max_A \Succ{mcdh}{G}(A) \] | |
535 | where the maximum is taken over adversaries which complete in time $t$ and | |
536 | make at most $q_V$-oracle queries. | |
537 | \end{definition} | |
538 | ||
539 | \begin{figure} | |
540 | \begin{program} | |
541 | $\Game{mcdh}{G}(A)$: \+ \\ | |
542 | $w \gets 0$; \\ | |
543 | $x \getsr \Nupto{|G|}$; $y \getsr \Nupto{|G|}$; \\ | |
544 | $A^{V(\cdot)}(x P, y P)$; \\ | |
545 | \RETURN $w$; | |
546 | \next | |
547 | Function $V(Z)$: \+ \\ | |
548 | \IF $Z = x y P$ \THEN \\ \ind | |
549 | $w \gets 1$; \\ | |
550 | \RETURN $1$; \- \\ | |
551 | \RETURN $0$; | |
552 | \end{program} | |
553 | ||
554 | \caption{The multiple-guess computational Diffie-Hellman problem: | |
555 | $\Game{mcdh}{G}(A)$} | |
556 | \label{fig:mcdh} | |
557 | \end{figure} | |
558 | ||
559 | Note that our MCDH problem is not quite the `gap Diffie-Hellman problem' | |
560 | (GDH). The gap problem measures the intractibility of solving CDH even with | |
561 | the assistance of an oracle for solving (restricted) decision Diffie-Hellman | |
562 | problems in the group. Specifically, the adversary is given $(X, Y) = (x P, | |
563 | y P)$ and tries to find $Z = x y P$, as for CDH, but now it has access to an | |
564 | oracle $D(R, S)$ which answers $1$ if $S = x R$ and $0$ otherwise. | |
565 | ||
566 | Clearly MCDH is at least as hard as GDH, since our simple verification oracle | |
567 | $V(Z)$ can be simulated with the gap problem's DDH oracle, as $D(Y, Z)$. | |
568 | However, we can (loosely) relate the difficulty of MCDH to the difficulty of | |
569 | CDH. | |
570 | \begin{proposition}[Comparison of MCDH and CDH security] | |
571 | For any cyclic group $(G, +)$, | |
572 | \[ \InSec{mcdh}(G; t, q_V) \le q_V\cdot\InSec{cdh}(G; t + O(q_V)). \] | |
573 | \end{proposition} | |
574 | \begin{proof} | |
575 | Let $A$ be an adversary attacking the multiple-guess computational | |
576 | Diffie-Hellman problem in $G$, and suppose that it runs in time $t$ and | |
577 | issues $q_V$ queries to its verification oracle. | |
578 | ||
579 | We use a sequence of games. Game $\G0$ is the original MCDH attack game. | |
580 | In each game $\G{i}$, we let the event $S_i$ be the probability that the | |
581 | adversary wins the game. | |
582 | ||
583 | Game $\G1$ is the same as $\G0$, except that we change the behaviour of the | |
584 | verification oracle. Specifically, we make the oracle always return $0$. | |
585 | We claim that this doesn't affect the adversary's probability of winning, | |
586 | i.e., $\Pr[S_1] = \Pr[S_0]$. To see this, note that if none of the | |
587 | adversary's $V(\cdot)$ queries was correct, then there is no change in the | |
588 | game; conversely, if any query was correct, then the adversary will have | |
589 | won regardless of its subsequent behaviour (which may differ arbitrarily | |
590 | between the two games). | |
591 | ||
592 | We are now ready to construct from $A$ an adversary $B$ attacking the | |
593 | standard computational Diffie-Hellman problem. | |
594 | \begin{program} | |
595 | Adversary $B(X, Y)$: \+ \\ | |
596 | $n \gets 0$; \\ | |
597 | \FOR $i \in \Nupto{q_V}$ \DO $Q_i \gets 0$; \\ | |
598 | $A^{V(\cdot)}$; \\ | |
599 | $r \getsr \Nupto{n}$; \\ | |
600 | \RETURN $Q_r$; | |
601 | \next | |
602 | Function $D(Z')$: \+ \\ | |
603 | $Q_n \gets Z'$; \\ | |
604 | $n \gets n + 1$; \\ | |
605 | \RETURN $0$; | |
606 | \end{program} | |
607 | Observe that $B$ provides $A$ with an accurate simulation of game $\G1$. | |
608 | Moreover, at the end of the algorithm, we have $0 < n \le q_V$, the | |
609 | output of $A$ is stored in $Q_{n-1}$ and the values $Q_0$, $Q_1$, \dots, | |
610 | $Q_{n-1}$ are the values of $A$'s oracle queries. Hence, with probability | |
611 | $Pr[S_1]$, at least of one of the $Q_i$ is the correct answer to the CDH | |
612 | problem. Let $\epsilon = \Pr[S_1] = \Pr[S_0]$; we claim that $B$'s | |
613 | probability of success is at least $\epsilon/q_V$. The proposition | |
614 | follows directly from this claim and that, because $A$ was chosen | |
615 | arbitrarily, we can maximize and count resources. | |
616 | ||
617 | We now prove the above claim. For $0 \le i < q_V$, let $W_i$ be the | |
618 | event that $Q_i = x y P$, i.e., that $Q_i$ is the correct response. A | |
619 | simple union bound shows that | |
620 | \[ \sum_{0\le i<j} \Pr[W_i \mid n = j] \ge \epsilon. \] | |
621 | We now perform a calculation: | |
622 | \begin{eqnarray*}[rl] | |
623 | \Succ{cdh}{G}(B) | |
624 | & = \sum_{0\le i<q_V} \Pr[W_i \land r = i] \\ | |
625 | & = \sum_{0<j\le q_V} \Pr[n = j] | |
626 | \biggl( \sum_{0\le i<j} \Pr[W_i \land r = i \mid n = j] \biggr) \\ | |
627 | & = \sum_{0<j\le q_V} \Pr[n = j] | |
628 | \biggl( \frac{1}{j} \sum_{0\le i<j} \Pr[W_i \mid n = j] \biggr) \\ | |
629 | &\ge \sum_{0<j\le q_V} \Pr[n = j] \frac{\epsilon}{j} \\ | |
630 | &\ge \frac{\epsilon}{q_V} \sum_{0<j\le q_V} \Pr[n = j] \\ | |
631 | & = \frac{\epsilon}{q_V}. | |
632 | \end{eqnarray*} | |
633 | which completes the proof. | |
634 | \end{proof} | |
635 | ||
636 | ||
637 | \subsection{Example groups and encodings} | |
638 | ||
639 | For nonnegative integers $0 \le n < 2^\ell$, there is a natural binary | |
640 | encoding $N_\ell\colon \Nupto{2^\ell} \to \Bin^\ell$ which we can define | |
641 | recursively as follows. | |
642 | \[ N_0(0) = \emptystring \qquad | |
643 | N_\ell(n) = \begin{cases} | |
644 | N_{\ell-1}(n) \cat 0 & if $0 \le n < 2^{\ell-1}$ \\ | |
645 | N_{\ell-1}(n - 2^{\ell-1}) \cat 1 & if $2^{\ell-1} \le n < 2^\ell$. | |
646 | \end{cases} | |
647 | \] | |
648 | Given an encoding $a = N_\ell(n)$ we can recover $n$ as | |
649 | \[ n = \sum_{0\le i<\ell} a[i] 2^i. \] | |
650 | Hence, given some limit $L \le 2^\ell$, we can encode elements of $\Nupto{L}$ | |
651 | using the functions $(e, d)$: | |
652 | \[ e(L, \ell, n) = N_\ell(n) \qquad | |
653 | d(L, \ell, a) = \begin{cases} | |
654 | N_\ell(a) & if $N_\ell(a) < L$ \\ | |
655 | \bot & otherwise | |
656 | \end{cases} | |
657 | \] | |
658 | The reader can verify that the functions $e(L, \ell, \cdot)$ and $d(L, \ell, | |
659 | \cdot)$ satisfy the requirements of section~\ref{sec:bitenc}. | |
660 | ||
661 | Given some $q < 2^{\ell_I}$ and $I = \Nupto{q}$, then, we can define an | |
662 | encoding $(e_I, d_I)$ by $e_I(n) = e(q, \ell_I, n)$ and $d_I(a) = d(q, | |
663 | \ell_I, a)$. | |
664 | ||
665 | Let $p$ and $q$ be primes, with $q|(p - 1)$. Then there is an order-$q$ | |
666 | subgroup of $(\Z/p\Z)^*$. In practice, an order-$q$ element can be found | |
667 | easily by taking elements $h \in (\Z/p\Z)^*$ at random and computing $g = | |
668 | h^{(p-1)/2}$ until $g \ne 1$; then $G = \langle g \rangle$ is a group of $q$ | |
669 | elements. Assuming that $p$ and $q$ are sufficiently large, the | |
670 | Diffie-Hellman problems seem to be difficult in $G$. Some texts recommend | |
671 | additional restrictions on $p$, in particular that $(p - 1)/2q$ be either | |
672 | prime or the product of large primes. Primes of this form protect against | |
673 | small-subgroup attacks; but our protocols are naturally immune to these | |
674 | attacks, so such precautions are unnecessary here. Elements of $G$ can be | |
675 | encoded readily, since each element $n + p\Z$ of $\Z/p\Z$ has an obvious | |
676 | `representative' integer $n$ such that $0 \le n < p$, and given $2^{\ell_G} > | |
677 | p$, we can encode $n$ as $e(p, \ell_G, n)$, as above. | |
678 | ||
679 | Alternatively, let $\F = \gf{p^f}$ be a finite field, and $E$ be an elliptic | |
680 | curve defined over $\F$ such that the group $E(\F)$ of $\F$-rational points | |
681 | of $E$ has a prime-order cyclic subgroup $G$. Elements of $G$ can be | |
682 | represented as pairs of elements of $\F$. If $f = 1$, i.e., $\F = \Z/p\Z$ | |
683 | then field elements can be encoded as above. If $p = 2$, we can represent | |
684 | the field as $\F_2/(p(x))$ for some irreducible polynomial $p(x) \in \F_2[x]$ | |
685 | of degree $f$. An element $r \in \F$ can then be represented by a polynomial | |
686 | $r(x)$ with degree less than $f$, and coefficients $c_i \in \{0, 1\}$, i.e., | |
687 | \[ r(x) = \sum_{0\le i<f} c_i x^i \] | |
688 | and hence we can uniquely encode $r$ as an $f$-bit string $a$ such that $a[i] | |
689 | = c_i$. | |
690 | ||
691 | ||
692 | \subsection{Symmetric encryption} | |
693 | \label{sec:sym-enc} | |
694 | ||
695 | Our key-exchange protocol requires a symmetric encryption scheme. Our | |
696 | definition is fairly standard, except that, rather than specifying a | |
697 | key-generation algorithm, we assume that key generation simply involves | |
698 | selecting a string of a given length uniformly at random. | |
699 | \begin{definition}[Symmetric encryption schemes] | |
700 | A \emph{symmetric encryption scheme} $\E = (\kappa, E, D)$ consists of: | |
701 | \begin{itemize} | |
702 | \item an integer $\kappa \ge 0$, | |
703 | \item a randomized \emph{encryption algorithm} $E$ which, on input $K \in | |
704 | \Bin^\kappa$ and $p \in \Bin^*$ outputs some $c \in \Bin^*$, written $c | |
705 | \gets E_K(p)$; | |
706 | \item a \emph{decryption algorithm} $D$ which, on input $K \in \Bin^\kappa$ | |
707 | and $c \in \Bin^*$ outputs some $p' \in \Bin^* \cup \{\bot\}$, written | |
708 | $p' \gets D_K(c)$. | |
709 | \end{itemize} | |
710 | Furthermore, a symmetric encryption scheme must be \emph{sound}: that is, | |
711 | if $c \gets E_K(p)$ for some $K \in \Bin^\kappa$ and $p \in \Bin^*$, and | |
712 | $p' \gets D_K(c)$ then $p = p'$. | |
713 | \end{definition} | |
714 | Our security notion for symmetric encryption is the standard notion of | |
715 | left-or-right indistinguishability of ciphertexts under chosen-ciphertext | |
716 | attack. | |
717 | \begin{definition} | |
718 | [Indistinguishability under chosen-ciphertext attack (IND-CCA)] | |
719 | Let $\E = (\kappa, E, D)$ be a symmetric encryption scheme, and $A$ be an | |
720 | adversary. Let $\id{lr}_b(x_0, x_1) = x_b$ for $b \in \{0, 1\}$. Let | |
721 | \[ P_b = | |
722 | \Pr[K \getsr \Bin^\kappa; | |
723 | b \gets A^{E_K(\id{lr}_b(\cdot, \cdot)), D_K(\cdot)}() : | |
724 | b = 1] | |
725 | \] | |
726 | An adversary is \emph{valid} if | |
727 | \begin{itemize} | |
728 | \item for any query to its encryption oracle $E_K(\id{lr}_b(x_0, x_1))$ we | |
729 | have $|x_0| = |x_1|$, and | |
730 | \item no query to the decryption oracle $D_K(\cdot)$ is equal to any reply | |
731 | from an encryption query. | |
732 | \end{itemize} | |
733 | If $A$ is valid, then we define its \emph{advantage} in attacking the | |
734 | security of $\E$ as follows | |
735 | \[ \Adv{ind-cca}{\E} = P_1 - P_0. \] | |
736 | Further, we define the \emph{IND-CCA insecurity function of $\E$} to be | |
737 | \[ \InSec{ind-cca}(\E; t, q_E, q_D) = \max_A \Adv{ind-cca}{\E}(A) \] | |
738 | where the maximum is taken over all valid adversaries $A$ which run in time | |
739 | $t$, and issue at most $q_E$ encryption and $q_D$ decryption queries. | |
740 | \end{definition} | |
741 | ||
742 | ||
743 | \subsection{Simulations} | |
744 | \label{sec:sim} | |
745 | ||
746 | In section~\ref{sec:zk-ident}, we shall prove that our identification | |
747 | protocol is zero-knowledge; in section~\ref{sec:denial}, we show that our | |
748 | key-exchange protocol is deniable. In both of these proofs, we shall need to | |
749 | demonstrate \emph{simulatability}. | |
750 | ||
751 | \subsubsection{General framework} | |
752 | Consider a game in which an adversary~$A$ interacts with some `world'~$W$, | |
753 | which we shall represent as a probabilistic algorithm. The world may in fact | |
754 | represent a number of honest parties communicating in a concurrent fashion, | |
755 | but we can consider them as a single algorithm for our present purposes. | |
756 | ||
757 | Initially the world and the adversary are both given the same \emph{common | |
758 | input}~$c$; in addition, the world is given a \emph{private input}~$w$. | |
759 | Both $c$ and~$w$ are computed by an \emph{initialization function}~$I$, which | |
760 | is considered to be part of the definition of the game. Finally, the | |
761 | adversary decides somehow that it has finished interacting, and outputs a | |
762 | value~$a$. All this we notate as | |
763 | \[ (w, c) \gets I(); a \gets A^{W(w, c)}(c). \] | |
764 | This game is \emph{simulatable} if there is an algorithm~$S$ -- the | |
765 | \emph{simulator} -- which can compute the same things as~$A$, but all by | |
766 | itself without interacting with the world. That is, we run the simulator on | |
767 | the common input~$c$, allowing it to interact in some way with the | |
768 | adversary~$A$, and finally giving us an output~$s$. | |
769 | \[ (w, c) \gets I(); s \gets S^A(c). \] | |
770 | We shall say that the simulator is \emph{effective} if it's difficult to tell | |
771 | whether a given string was output by the adversary after interacting with the | |
772 | world, or by the simulator running by itself. That is, for any algorithm~$D$ | |
773 | -- a \emph{distinguisher} -- running in some bounded amount of time, its | |
774 | advantage | |
775 | \begin{spliteqn*} | |
776 | \Pr[(w, c) \gets I(); a \gets A^{W(w, c)}(c); | |
777 | b \gets D(c, a) : b = 1] - {} \\ | |
778 | \Pr[(w, c) \gets I(); s \gets S^A(c); b \gets D(c, s) : b = 1] | |
779 | \end{spliteqn*} | |
780 | is small. (Note that we gave the distinguisher the common input as well as | |
781 | the output of the adversary or the simulator.) | |
782 | ||
783 | It's usual to study \emph{transcripts} of interactions in these kinds of | |
784 | settings. We are considering arbitrary adversarial outputs here, so this | |
785 | certainly includes adversaries which output a transcript of their | |
786 | interactions. Indeed, for any adversary~$A$, we could construct an | |
787 | adversary~$A_T$ which performs the same computation, and outputs the same | |
788 | result, but also includes a complete transcript of $A$'s interaction with the | |
789 | world. Therefore we're just providing additional generality. | |
790 | ||
791 | \subsubsection{Random oracles} | |
792 | We shall be considering interactions in which all the parties have access to | |
793 | several random oracles. We could simply say that the random oracles are part | |
794 | of the world~$W$. In the setting described above, only the adversary | |
795 | actually interacts with the world (and therefore would be able to query | |
796 | random oracles). The simulator would be forced to `make up' its own random | |
797 | oracle, and the distinguisher would have to study the distributions of the | |
798 | random-oracle queries and their responses to make up its mind about which it | |
799 | was given. | |
800 | ||
801 | However, this would be a poor model for the real world, since once we | |
802 | instantiate the random oracle with a hash function, we know that everyone | |
803 | would in actually be able to compute the hash function for themselves. Thus | |
804 | a distinguisher in the real world would be able to tell the difference | |
805 | immediately between a real interaction and the simulated transcript, since | |
806 | the `random oracle' queries recorded in the latter would be wrong! | |
807 | ||
808 | Therefore we decide not to include the random oracles as part of the world, | |
809 | but instead allow all the participants -- adversary, simulator and | |
810 | distinguisher -- access to them. If we denote by~$\mathcal{H} = (H_0, H_1, | |
811 | \ldots, H_{n-1})$ the collection of random oracles under consideration, the | |
812 | expression for the distinguisher's advantage becomes | |
813 | \begin{spliteqn*} | |
814 | \Pr[(w, c) \gets I(); a \gets A^{W(w, c), \mathcal{H}}(c); | |
815 | b \gets D^{\mathcal{H}}(c, a) : b = 1] - {} \\ | |
816 | \Pr[(w, c) \gets I(); s \gets S^{A, \mathcal{H}}(c); | |
817 | b \gets D^{\mathcal{H}}(c, s) : b = 1]. | |
818 | \end{spliteqn*} | |
819 | ||
820 | \subsubsection{Auxiliary inputs} | |
821 | If an adversary's output can be effectively simulated, then we can | |
822 | confidently state that the adversary `learnt' very little of substance from | |
823 | its interaction, and certainly very little it can \emph{prove} to anyone | |
824 | else. However, as we have described the setting so far, we fix an adversary | |
825 | before we choose inputs to the world, so our model says little about what an | |
826 | adversary which has already acquired some knowledge might learn beyond that. | |
827 | For example, an adversary might overhear some other conversation between | |
828 | honest parties and be able to use this to its advantage. | |
829 | ||
830 | To this end, we give the adversary an \emph{auxiliary input}~$u$, computed by | |
831 | an algorithm~$U$. We give $U$ both $c$ and $w$, in order to allow the | |
832 | adversary to gain some (possibly partial) knowledge of the secrets of the | |
833 | other parties. We also allow $U$ access to the random oracles~$\mathcal{H}$, | |
834 | because clearly in the `real world' it would be ridiculous to forbid such an | |
835 | algorithm from computing a publicly-known hash function. | |
836 | ||
837 | The simulator and distinguisher are also given the auxiliary input. The | |
838 | simulator is meant to represent the adversary's ability to compute things on | |
839 | its own, without interacting with the world, and since the adversary is given | |
840 | the auxiliary input, the simulator must be too. The distinguisher must be | |
841 | the auxiliary input because otherwise the simulator could just `make up' | |
842 | plausible-looking inputs. | |
843 | ||
844 | \subsubsection{Resource limits} | |
845 | We shall not allow our algorithms to perform completely arbitrary | |
846 | computations and interactions. Instead, we impose limits on the amount of | |
847 | time they are allowed to take, the number of random-oracle queries they make, | |
848 | and so on. Specifically, we are interested in | |
849 | \begin{itemize} | |
850 | \item the time $t_A$ taken by the adversary and $t_D$ taken by the | |
851 | distinguisher, | |
852 | \item the number of oracle queries $\mathcal{Q}_A = (q_{A,0}, q_{A,1}, | |
853 | \ldots, q_{A,n-1})$ made by the adversary, and $\mathcal{Q}_D$ made by the | |
854 | distinguisher, | |
855 | \item a number of resource bounds $\mathcal{R}$ on the adversary's | |
856 | interaction with the world (e.g., number of messages of various kinds sent | |
857 | and received), and | |
858 | \item a number of bounds $\mathcal{U}$ on the contents of the adversary's | |
859 | auxiliary input~$u$. | |
860 | \end{itemize} | |
861 | Sometimes we shall not be interested in proving simulatability of adversaries | |
862 | with auxiliary inputs. We write $\mathcal{U} = 0$ to indicate that auxiliary | |
863 | output is not allowed. | |
864 | ||
865 | \subsubsection{World syntax} | |
866 | It will be worth our while being more precise about what a `world' actually | |
867 | is, syntactically. We define a world to be a single, randomized algorithm | |
868 | taking inputs $(\iota, \sigma, \tau, \mu) \in (\Bin^*)^4$; the algorithm's | |
869 | output is a pair $(\sigma', \rho) \in (\Bin^*)^2$. We show how the | |
870 | adversary's interaction is mapped on to this world algorithm in | |
871 | figure~\ref{fig:sim-world}. | |
872 | \begin{itemize} | |
873 | \item The `input' $\iota$ is the result of the initialization function~$I$. | |
874 | That is, it is the pair $(w, c)$ of the world's private input and the | |
875 | common input. | |
876 | \item The `state' $\sigma$ is empty on the world's first invocation; on each | |
877 | subsequent call, the value of the world's output $\sigma'$ is passed back. | |
878 | In this way, the world can maintain state. | |
879 | \item The `type $\tau$ is a token giving the type of invocation this is. | |
880 | \item The `message' $\mu$ is any other information passed in; its form will | |
881 | typically depend on the type~$\tau$ of the invocation. | |
882 | \item The `new state' $\sigma'$ is the value of $\sigma$ to pass to the next | |
883 | invocation of the world. | |
884 | \item The `reply $\rho$ is the actual output of the invocation. | |
885 | \end{itemize} | |
886 | There are two special invocation types. The adversary is \emph{forbidden} | |
887 | from making special invocations. | |
888 | \begin{itemize} | |
889 | \item The special invocation type $\cookie{init}$ is used to allow the world to | |
890 | prepare an initial state. The world is invoked as | |
891 | \[ W^{\mathcal{H}}(\iota, \emptystring, \cookie{init}, \emptystring) \] | |
892 | and should output an initial state $\sigma'$. The world's reply $\rho$ is | |
893 | ignored. (Recall that $\emptystring$ represents the empty string.) | |
894 | \item The special invocation type $\cookie{random}$ is used to inform the | |
895 | world that the adversary has issued a random oracle query. The world is | |
896 | invoked as | |
897 | \[ W^{\mathcal{H}}(\iota, \sigma, \cookie{random}, (i, x, h)) \] | |
898 | to indicate that the adversary has queried its random oracle $H_i(\cdot)$ | |
899 | on the input $x$, giving output~$h$. The world may output an updated state | |
900 | $\sigma'$; its reply $\rho$ is ignored. | |
901 | \end{itemize} | |
902 | The latter special query is a technical device used to allow the `fake-world' | |
903 | simulators we define below to be aware of the adversary's random oracle | |
904 | queries without being able to `program' the random oracle. Including it here | |
905 | does little harm, and simplifies the overall exposition. | |
906 | ||
907 | \begin{figure} | |
908 | \begin{program} | |
909 | Interaction $A^{W(w, c), \mathcal{H}}(c, u)$: \+ \\ | |
910 | $(\sigma, \rho) \gets | |
911 | W((w, c), \emptystring, \cookie{init}, \emptystring)$; \\ | |
912 | $a \gets A^{\id{world}(\cdot, \cdot), | |
913 | \id{random}(\cdot, \cdot)}(c, u)$; \\ | |
914 | \RETURN $a$; | |
915 | \newline | |
916 | Function $\id{world}(\tau, \mu)$: \+ \\ | |
917 | \IF $\tau \in \{\cookie{init}, \cookie{random}\}$ \THEN | |
918 | \RETURN $\bot$; \\ | |
919 | $(\sigma, \rho) \gets W((w, c), \sigma, \tau, \mu)$; \\ | |
920 | \RETURN $\rho$; \- | |
921 | \next | |
922 | Function $\id{random}(i, x)$: \+ \\ | |
923 | $h \gets H_i(x)$; \\ | |
924 | $(\sigma, \rho) \gets | |
925 | W((w, c), \sigma, \cookie{random}, (i, x, h))$; \\ | |
926 | \RETURN $h$; | |
927 | \end{program} | |
928 | ||
929 | \caption{Interacting with a world: Interaction $A^{W, \mathcal{H}}$} | |
930 | \label{fig:sim-world} | |
931 | \end{figure} | |
932 | ||
933 | \subsubsection{Definitions} | |
934 | We are now ready to begin making definitions. | |
935 | \begin{definition}[Simulation security] | |
936 | \label{def:sim} | |
937 | Consider the game described above, with the initialization function~$I$, | |
938 | and the world~$W$: let $A$ be an adversary, and let~$U$ be an | |
939 | auxiliary-input function; let $S$ be a simulator, and let $D$ be a | |
940 | distinguisher. We define $D$'s \emph{advantage against $S$'s simulation of | |
941 | $A$'s interaction with~$W$ with auxiliary inputs provided by~$U$} to be | |
942 | \[ \Adv{sim}{W, I, S}(A, U, D) = | |
943 | \Pr[\Game{real}{W, I, S}(A, U, D) = 1] - | |
944 | \Pr[\Game{sim}{W, I, S}(A, U, D)= 1] | |
945 | \] | |
946 | where the games are as shown in figure~\ref{fig:sim}. | |
947 | Furthermore, we define the \emph{simulator's insecurity function} to be | |
948 | \[ \InSec{sim}(W, I, S; | |
949 | t_D, t_A, \mathcal{Q}_D, \mathcal{Q}_A, \mathcal{R}, \mathcal{U}) = | |
950 | \max_{D, A, U} \Adv{sim}{W, I, S}(A, U, D) | |
951 | \] | |
952 | where the maximum is taken over all distinguishers~$D$ running in | |
953 | time~$t_D$ and making at most $\mathcal{Q}_D$ random-oracle queries, and | |
954 | all adversaries~$A$ running in time~$t_A$, making at most $\mathcal{Q}_A$ | |
955 | random-oracle queries, not exceeding the other stated resource | |
956 | bounds~$\mathcal{R}$ on its interaction with~$W$, and auxiliary-input | |
957 | functions producing output not exceeding the stated bounds~$\mathcal{U}$. | |
958 | \end{definition} | |
959 | \begin{remark} | |
960 | The usual definitions of zero-knowledge, for example, require the simulator | |
961 | to work for all choices of inputs (common, private and auxiliary), rather | |
962 | than for random choices. Our definition therefore looks weaker. Our proof | |
963 | of zero-knowledge actually carries through to the traditional | |
964 | stronger-looking definition. Critically, however, the standard | |
965 | universal quantification over inputs fails to capture deniability in the | |
966 | random oracle model, since the inputs can't therefore depend on the random | |
967 | oracle. Our formulation therefore actually gives \emph{stronger} | |
968 | deniability that the usual one. | |
969 | \end{remark} | |
970 | ||
971 | \begin{figure} | |
972 | \begin{program} | |
973 | $\Game{real}{W, I, S}(A, U, D)$: \+ \\ | |
974 | $(w, c) \gets I()$; \\ | |
975 | $u \gets U^{\mathcal{H}}(w, c)$; \\ | |
976 | $a \gets A^{W(w, c), \mathcal{H}}(c, u)$; \\ | |
977 | $b \gets D^{\mathcal{H}}(c, u, a)$; \\ | |
978 | \RETURN $b$; | |
979 | \next | |
980 | $\Game{sim}{W, I, S}(A, U, D)$: \+ \\ | |
981 | $(w, c) \gets I()$; \\ | |
982 | $u \gets U^{\mathcal{H}}(w, c)$; \\ | |
983 | $s \gets S^{A, \mathcal{H}}(c, u)$; \\ | |
984 | $b \gets D^{\mathcal{H}}(c, u, s)$; \\ | |
985 | \RETURN $b$; | |
986 | \end{program} | |
987 | ||
988 | \caption{Games for simulation: $\Game{real}{W, I}$ and $\Game{sim}{W, I}$} | |
989 | \label{fig:sim} | |
990 | \end{figure} | |
991 | ||
992 | \subsubsection{Fake-world simulators} | |
993 | The simulators we shall be considering in the present paper are of a specific | |
994 | type which we call `fake-world simulators'. They work by running the | |
995 | adversary in a fake `cardboard cut-out' world, and attempting to extract | |
996 | enough information from the adversary's previous interactions and random | |
997 | oracle queries to maintain a convincing illusion. | |
998 | ||
999 | That is, the behaviour of a fake-world simulator~$S$ is simply to allow the | |
1000 | adversary to interact with a `fake world'~$W'$, which was not given the world | |
1001 | private input. That is, there is some world $W'$ such that | |
1002 | \[ S^{A, \mathcal{H}}(c, u) \equiv A^{W'(u, c), \mathcal{H}}(c, u) \] | |
1003 | Fake-world simulators are convenient because they allow us to remove from | |
1004 | consideration the distinguisher~$D$ as the following definition shows. | |
1005 | \begin{definition}[Fake-world simulation security] | |
1006 | \label{def:fakesim} | |
1007 | Let $I$, $W$ and $U$ be as in definition~\ref{def:sim}. Let $A$ be an | |
1008 | adversary which outputs a single bit. Let $S$ be a fake-world simulator. | |
1009 | We define $A$'s \emph{advantage against $S$'s fake-world simulation of $W$ | |
1010 | with auxiliary inputs provided by~$U$} to be | |
1011 | \begin{spliteqn*} | |
1012 | \Adv{fw}{W, I, S}(A, U) = | |
1013 | \Pr[(w, c) \gets I(); u \gets U^{\mathcal{H}}(w, c); | |
1014 | b \gets A^{W(w, c), \mathcal{H}}(c, u) : b = 1] - {} \\ | |
1015 | \Pr[(w, c) \gets I(); u \gets U^{\mathcal{H}}(w, c); | |
1016 | b \gets S^{A, \mathcal{H}}(c, u) : b = 1] | |
1017 | \end{spliteqn*} | |
1018 | Furthermore, we define the \emph{simulator's insecurity function} to be | |
1019 | \[ \InSec{fw}(W, I, S; | |
1020 | t_D, t, \mathcal{Q}, \mathcal{R}, \mathcal{U}) = | |
1021 | \max_{A, U} \Adv{fw}{W, I, S}(A, U) | |
1022 | \] | |
1023 | where the maximum is taken over all adversaries~$A$ running in time~$t$, | |
1024 | making at most $\mathcal{Q}$ random-oracle queries, not exceeding the other | |
1025 | stated resource bounds~$\mathcal{R}$ on its interaction with~$W$, and | |
1026 | auxiliary-input functions producing output not exceeding the stated | |
1027 | bounds~$\mathcal{U}$. | |
1028 | \end{definition} | |
1029 | It remains for us to demonstrate that this is a valid way of analysing | |
1030 | simulators; the following simple proposition shows that this is indeed the | |
1031 | case. | |
1032 | \begin{proposition}[Fake-world simulation] | |
1033 | \label{prop:fakesim} | |
1034 | Let $I$ be an initialization function and let $W$ be a world. Then, for | |
1035 | any fake-world simulator~$S$, | |
1036 | \[ \InSec{sim}(W, I, S; t_D, t_A, \mathcal{Q}_D, \mathcal{Q}_A, | |
1037 | \mathcal{R}, \mathcal{U}) \le | |
1038 | \InSec{fw}(W, I, S; t_A + t_D, \mathcal{Q}_D + \mathcal{Q}_A, | |
1039 | \mathcal{R}, \mathcal{U}) | |
1040 | \] | |
1041 | (where addition of query bounds $\mathcal{Q}$ is done elementwise). | |
1042 | \end{proposition} | |
1043 | \begin{proof} | |
1044 | Let $W$ and $I$ as in the proposition statement be given; also let a | |
1045 | distinguisher~$D$ running in time~$t_D$ and making $\mathcal{Q}_D$ | |
1046 | random-oracle queries, an adversary~$A$ running in time~$t_A$ and making | |
1047 | $\mathcal{Q}_A$ random-oracle queries and interacting with its world within | |
1048 | the stated bounds~$\mathcal{R}$, an auxiliary-input function~$U$ satisfying | |
1049 | the constraints~$\mathcal{U}$ on its output, and a fake-world simulator~$S$ | |
1050 | all be given. | |
1051 | ||
1052 | We construct an adversary~$B$ outputting a single bit as follows | |
1053 | \begin{program} | |
1054 | Adversary $B^{W, \mathcal{H}}(c, u)$: \+ \\ | |
1055 | $a \gets A^{W, \mathcal{H}}(c, u)$; \\ | |
1056 | $b \gets D^{\mathcal{H}}(c, u, a)$; \\ | |
1057 | \RETURN $b$; | |
1058 | \end{program} | |
1059 | A glance at definitions \ref{def:sim} and~\ref{def:fakesim} and the | |
1060 | resources used by $B$ shows that | |
1061 | \[ \Adv{sim}{W, I, S}(A, U) = \Adv{fw}{W, I, S}(B, U) | |
1062 | \le \InSec{fw}(W, I, S; t_D + t_A, \mathcal{Q}_D + \mathcal{Q}_A, | |
1063 | \mathcal{R}, \mathcal{U}) | |
1064 | \] | |
1065 | as required. | |
1066 | \end{proof} | |
1067 | ||
1068 | %%%-------------------------------------------------------------------------- | |
1069 | ||
1070 | \section{A zero-knowledge identification scheme} | |
1071 | \label{sec:zk-ident} | |
1072 | ||
1073 | ||
1074 | \subsection{Description} | |
1075 | ||
1076 | Here we present a simple zero-knowledge identification scheme. Fix some | |
1077 | group $G$. Suppose Alice chooses a private key $x \inr \Nupto{|G|}$, and | |
1078 | publishes the corresponding public key $X = x P$. Let $H_I\colon G^2 \to | |
1079 | \Bin^{\ell_I}$ be a secure hash function. Here's a simple protocol which | |
1080 | lets her prove her identity to Bob. | |
1081 | \begin{enumerate} | |
1082 | \item Bob selects a random $r \inr \Nupto{|G|}$, and computes $R = r P$, $Y = | |
1083 | r X$, and $c = r \xor H_I(R, Y)$. He sends the pair $(R, c)$ to Alice as | |
1084 | his \emph{challenge}. | |
1085 | \item Alice receives $(R, c)$. She computes $Y' = x R$ and $r' = c \xor | |
1086 | H_I(R', Y')$, and checks that $R = r' P$. If so, she sends $Y'$ as her | |
1087 | \emph{response}; otherwise she sends $\bot$. | |
1088 | \item Bob receives $Y'$ from Alice. He checks that $Y' = Y$. If so, he | |
1089 | accepts that he's talking to Alice; otherwise he becomes suspicious. | |
1090 | \end{enumerate} | |
1091 | We name this the Wrestlers Identification Protocol in~$G$, $\Wident^G$ (we | |
1092 | drop the superscript to refer to the protocol in general, or when no | |
1093 | ambiguity is likely to result). A summary is shown in | |
1094 | figure~\ref{fig:wident}. | |
1095 | ||
1096 | \begin{figure} | |
1097 | \begin{description} | |
1098 | \item[Setup] Group $G = \langle P \rangle$; $|G| = q$ is prime. | |
1099 | $H_I(\cdot, \cdot)$ is a secure hash. | |
1100 | \item[Private key] $x \inr \Nupto{q}$. | |
1101 | \item[Public key] $X = x P$. | |
1102 | \item[Challenge] $(R, c)$ where $r \inr \Nupto{q}$, $R = r P$, $c = r \xor | |
1103 | H_I(R, r X)$. | |
1104 | \item[Response] $x R = r X$ if $R = (c \xor H_I(R, x R)) P$; otherwise | |
1105 | $\bot$. | |
1106 | \end{description} | |
1107 | ||
1108 | \caption{Summary of the Wrestlers Identification Protocol, $\Wident$} | |
1109 | \label{fig:wident} | |
1110 | \end{figure} | |
1111 | ||
1112 | ||
1113 | \subsection{Security} | |
1114 | ||
1115 | In order to evaluate the security of our protocol, we present a formal | |
1116 | description of the algorithms involved in figure~\ref{fig:wident}. Here, the | |
1117 | hash function $H_I(\cdot, \cdot)$ is modelled as a random oracle. | |
1118 | ||
1119 | \begin{figure} | |
1120 | \begin{program} | |
1121 | Function $\id{setup}()$: \+ \\ | |
1122 | $x \getsr \Nupto{q}$; \\ | |
1123 | $X \gets x P$; \\ | |
1124 | \RETURN $(x, X)$; | |
1125 | \next | |
1126 | Function $\id{challenge}^{H_I(\cdot, \cdot)}(R, c, X)$: \+ \\ | |
1127 | $r \getsr \Nupto{q}$; \\ | |
1128 | $R \gets r P$; $Y \gets r X$; \\ | |
1129 | $h \gets H_I(R, Y)$; $c \gets r \xor h$; \\ | |
1130 | \RETURN $(Y, R, c)$; \- \\[\medskipamount] | |
1131 | Function $\id{verify}(Y, Y')$: \+ \\ | |
1132 | \IF $Y' = Y$ \THEN \RETURN $1$; \\ | |
1133 | \RETURN $0$; | |
1134 | \next | |
1135 | Function $\id{response}^{H_I(\cdot, \cdot)}(R, c, x)$: \+ \\ | |
1136 | $Y' \gets x R$; \\ | |
1137 | $h \gets H_I(R', Y')$; $r' \gets c \xor h$; \\ | |
1138 | \IF $R \ne r' P$ \THEN \RETURN $\bot$; \\ | |
1139 | \RETURN $Y'$; | |
1140 | \end{program} | |
1141 | ||
1142 | \caption{Functions implementing $\Wident$ in the random oracle model} | |
1143 | \label{fig:wident-ro} | |
1144 | \end{figure} | |
1145 | ||
1146 | \subsubsection{Completeness} | |
1147 | Suppose that Bob really is talking to Alice. Note that $Y' = x R = x (r P) = | |
1148 | r (x P) = r X = Y$. Hence $r' = c \xor H_I(R', Y') = c \xor H_I(R, Y) = r$, | |
1149 | so $r' P = r P = R$, so Alice returns $Y' = Y$ to Bob. Therefore $\Wident$ | |
1150 | is \emph{complete}: if Bob really is communicating with Alice then he | |
1151 | accepts. | |
1152 | ||
1153 | \subsubsection{Soundness} | |
1154 | We next show that impersonating Alice is difficult. The natural way to prove | |
1155 | this would be to give an adversary a challenge and prove that its probability | |
1156 | of giving a correct response is very small. However, we prove a stronger | |
1157 | result: we show that if the adversary can respond correctly to any of a large | |
1158 | collection of challenges then it can solve the MCDH problem. | |
1159 | ||
1160 | Consider the game $\Game{imp}{\Wident}$ shown in | |
1161 | figure~\ref{fig:wident-sound}. An adversary's probability of successfully | |
1162 | impersonating Alice in our protocol, by correctly responding to any one of | |
1163 | $n$ challenges, is exactly its probability of winning the game (i.e., causing | |
1164 | it to return $1$). | |
1165 | ||
1166 | \begin{figure} | |
1167 | \begin{program} | |
1168 | $\Game{imp-$n$}{\Wident}(A)$: \+ \\ | |
1169 | $H_I \getsr \Func{G^2}{\Bin^{\ell_I}}$; \\ | |
1170 | $(x, X) \gets \id{setup}()$; \\ | |
1171 | $\id{win} \gets 0$; \\ | |
1172 | $\Xid{R}{map} \gets \emptyset$; \\ | |
1173 | $\mathbf{c} \gets \id{challenges}(n)$; \\ | |
1174 | $(R', Y') \gets A^{H_I(\cdot, \cdot), \id{check}(\cdot, \cdot)} | |
1175 | (X, \mathbf{c})$; \\ | |
1176 | \RETURN $\id{win}$; | |
1177 | \newline | |
1178 | Function $\id{challenges}(n)$: \+ \\ | |
1179 | \FOR $i \in \Nupto{n}$ \DO \\ \ind | |
1180 | $(Y, R, c) \gets \id{challenge}^{H_I(\cdot, \cdot)}$; \\ | |
1181 | $\Xid{R}{map} \gets \Xid{R}{map} \cup \{ R \mapsto Y \}$; \\ | |
1182 | $\mathbf{c}[i] \gets (R, c)$; \- \\ | |
1183 | \RETURN $\mathbf{c}$; \next | |
1184 | Function $\id{check}(R', Y')$: \\ | |
1185 | \IF $R' \notin \dom \Xid{R}{map}$ \THEN \RETURN $0$; \\ | |
1186 | $Y \gets \Xid{R}{map}(R')$; \\ | |
1187 | \IF $\id{verify}(Y, Y')$ \THEN \\ \ind | |
1188 | $\id{win} \gets 1$; \\ | |
1189 | \RETURN $1$; \- \\ | |
1190 | \RETURN $0$; | |
1191 | \end{program} | |
1192 | ||
1193 | \caption{Soundness of $\Wident$: $\Game{imp-$n$}{\Wident}(A)$} | |
1194 | \label{fig:wident-sound} | |
1195 | \end{figure} | |
1196 | ||
1197 | \begin{theorem}[Soundness of $\Wident$] | |
1198 | \label{thm:wident-sound} | |
1199 | Let $A$ be any adversary running in time $t$ and making $q_I$ queries to | |
1200 | its random oracle, and $q_V$ queries to its verification oracle. Let $G$ | |
1201 | be a cyclic group. Then | |
1202 | \[ \Pr[\Game{imp-$n$}{\Wident^G}(A) = 1] \le | |
1203 | \InSec{mcdh}(G; t', q_I + q_V) | |
1204 | \] | |
1205 | where $t' = t + O(q_I) + O(q_V)$. | |
1206 | \end{theorem} | |
1207 | \begin{remark} | |
1208 | Note that the security bound here is \emph{independent} of the value of | |
1209 | $n$. | |
1210 | \end{remark} | |
1211 | \begin{proof} | |
1212 | We prove this by defining a sequence of games $\G{i}$. The first will be | |
1213 | the same as the attack game $\Game{imp-$n$}{\Wident}(A)$ and the others | |
1214 | will differ from it in minor ways. In each game $\G{i}$, let $S_i$ be the | |
1215 | event that $A$ wins the game -- i.e., that it successfully impersonates the | |
1216 | holder of the private key~$x$. | |
1217 | ||
1218 | Let game $\G0$ be the attack game $\Game{imp}{\Wident}(A)$, and let $(R', | |
1219 | Y')$ be the output of $A$ in the game. | |
1220 | ||
1221 | We define a new game $\G1$ which is the same as $\G0$, except that we query | |
1222 | the random oracle $H_I$ at $(R', Y')$ whenever the adversary queries | |
1223 | $\id{check}(R', Y')$. (We don't charge the adversary for this.) This | |
1224 | obviously doesn't affect the adversary's probability of winning, so | |
1225 | $\Pr[S_1] = \Pr[S_0]$. | |
1226 | ||
1227 | Game $\G2$ is like $\G1$, except that we change the way we generate | |
1228 | challenges and check their responses. Specifically, we new functions | |
1229 | $\id{challenges}_2$ and $\id{check}_2$, as shown in | |
1230 | figure~\ref{fig:wident-sound-2}. | |
1231 | ||
1232 | \begin{figure} | |
1233 | \begin{program} | |
1234 | Function $\id{challenges}_2(n)$: \+ \\ | |
1235 | $r^* \getsr I$; $R^* \gets r^* P$; $Y^* \gets r^* X$; \\ | |
1236 | \FOR $i \in \Nupto{n}$ \DO \\ \ind | |
1237 | $r \getsr I$; $R \gets r R^*$; $Y \gets r Y^*$; \\ | |
1238 | $h \gets H_I(R, Y)$; $c \gets r \xor h$; \\ | |
1239 | $\Xid{R}{map} \gets \Xid{R}{map} \cup \{ R \mapsto r \}$; \\ | |
1240 | $\mathbf{c}[i] \gets (R, c)$; \- \\ | |
1241 | \RETURN $\mathbf{c}$; | |
1242 | \next | |
1243 | Function $\id{check}_2(R', Y')$: \+ \\ | |
1244 | \IF $R' \notin \dom \Xid{R}{map}$ \THEN \RETURN $0$; \\ | |
1245 | $r \gets \Xid{R}{map}(R')$; \\ | |
1246 | \IF $\id{verify}(Y^*, Y'/r)$ \THEN \\ \ind | |
1247 | $\id{win} \gets 1$; \\ | |
1248 | \RETURN $1$; \- \\ | |
1249 | \RETURN $0$; | |
1250 | \end{program} | |
1251 | ||
1252 | \caption{Soundness of $\Wident$: $\id{challenges}_2$ and $\id{check}_2$} | |
1253 | \label{fig:wident-sound-2} | |
1254 | \end{figure} | |
1255 | ||
1256 | While we're generating and checking challenges in a more complicated way | |
1257 | here, we're not actually changing the distribution of the challenges, or | |
1258 | changing the winning condition. Hence $\Pr[S_2] = \Pr[S_1]$. | |
1259 | ||
1260 | Now we change the rules again. Let $\G3$ be the same as $\G2$ except that | |
1261 | we change the winning condition. Instead, we say that the adversary wins | |
1262 | if any of the queries to its random oracle $H_I(R', Y')$ would be a correct | |
1263 | response -- i.e., $\id{check}_2(R', Y')$ would return $1$. Since we query | |
1264 | the oracle on $(R', Y')$ on its behalf at the end of the game, no adversary | |
1265 | can do worse in this game than it does in $\G2$, so we have $\Pr[S_3] \ge | |
1266 | \Pr[S_2]$. (It's not hard to see that this only helps quite stupid | |
1267 | adversaries. We can transform any adversary into one for which equality | |
1268 | holds here.) | |
1269 | ||
1270 | Finally, let $\G4$ be the same as $\G3$ except that we change the way we | |
1271 | generate challenges again: rather than computing $h$ and setting $c \gets h | |
1272 | \xor r$, we just choose $c$ at random. Specifically, we use the new | |
1273 | function, $\id{challenges}_4$, shown in figure~\ref{fig:wident-sound-4}. | |
1274 | ||
1275 | \begin{figure} | |
1276 | \begin{program} | |
1277 | Function $\id{challenges}_4(n)$: \+ \\ | |
1278 | $r^* \getsr I$; $R^* \gets r^* P$; $Y^* \gets r^* X$; \\ | |
1279 | \FOR $i \in \Nupto{n}$ \DO \\ \ind | |
1280 | $r \getsr I$; $R \gets r R^*$; \\ | |
1281 | $c \getsr \Bin^{\ell_I}$; \\ | |
1282 | $\Xid{R}{map} \gets \Xid{R}{map} \cup \{ R \mapsto r \}$; \\ | |
1283 | $\mathbf{c}[i] \gets (R, c)$; \- \\ | |
1284 | \RETURN $\mathbf{c}$; | |
1285 | \end{program} | |
1286 | ||
1287 | \caption{Soundness of $\Wident$: $\id{challenges}_4$} | |
1288 | \label{fig:wident-sound-4} | |
1289 | \end{figure} | |
1290 | ||
1291 | Since $H_I(\cdot, \cdot)$ is a random function, the adversary can only | |
1292 | distinguish $\G4$ from $\G3$ if it queries its random oracle at some $(R, r | |
1293 | Y^*)$. But if it does this, then by the rule introduced in $\G3$ it has | |
1294 | already won. Therefore we must have $\Pr[S_4] = \Pr[S_3]$. | |
1295 | ||
1296 | Our $\id{challenges}_4$ function is interesting, since it doesn't actually | |
1297 | make use of $r^*$ or $Y^*$ when generating its challenges. This gives us | |
1298 | the clue we need to bound $\Pr[S_4]$: we can use adversary $A$ to solve the | |
1299 | multiple-guess Diffie-Hellman problem in $G$ by simulating the game $\G4$. | |
1300 | Specifically, we define the adversary $B$ as shown in | |
1301 | figure~\ref{fig:wident-sound-cdh}. That is, for each query $A$ makes to | |
1302 | its random oracle at a new pair $(R', Y')$, we see whether this gives us | |
1303 | the answer we're looking for. We have $\Pr[S_0] \le \Pr[S_4] = | |
1304 | \Succ{mcdh}{G}(B) \le \InSec{gdh}(G; t', q_I + q_V)$ as required. | |
1305 | ||
1306 | \begin{figure} | |
1307 | \begin{program} | |
1308 | Adversary $B^{V(\cdot)}(X, R^*)$: \+ \\ | |
1309 | $F \gets \emptyset$; $\Xid{R}{map} \gets \emptyset$; \\ | |
1310 | \FOR $i \in \Nupto{n}$ \DO \\ \ind | |
1311 | $r \getsr I$; $R \gets r R^*$; $c \getsr \Bin^{\ell_I}$; \\ | |
1312 | $\Xid{R}{map} \gets \Xid{R}{map} \cup \{ R \mapsto r \}$; \\ | |
1313 | $\mathbf{c}[i] \gets (R, c)$; \- \\ | |
1314 | $(R', Y') \gets A^{H_I(\cdot, \cdot), \id{check}(\cdot, \cdot)} | |
1315 | (X, \mathbf{c})$; \\ | |
1316 | \IF $Y' \neq \bot$ \THEN $H_I(R', Y')$; | |
1317 | \next | |
1318 | Oracle $H_I(R', Y')$: \+ \\ | |
1319 | \IF $(R', Y') \in \dom F$ \THEN \\ \quad | |
1320 | $h \gets F(x)$; \\ | |
1321 | \ELSE \\ \ind | |
1322 | $\id{check}(R', Y')$; \\ | |
1323 | $h \getsr \Bin^{\ell_I}$; | |
1324 | $F \gets F \cup \{ (R', Y') \mapsto h \}$; \- \\ | |
1325 | \RETURN $h$; | |
1326 | \- \\[\medskipamount] | |
1327 | Oracle $\id{check}(R', Y')$: \+ \\ | |
1328 | \IF $R' \in \dom \Xid{R}{map}$ \THEN | |
1329 | $V(Y'/\Xid{R}{map}(R'))$; | |
1330 | \end{program} | |
1331 | ||
1332 | \caption{Soundness of $\Wident$: reduction from MCDH} | |
1333 | \label{fig:wident-sound-cdh} | |
1334 | \end{figure} | |
1335 | ||
1336 | \end{proof} | |
1337 | ||
1338 | \subsubsection{Zero-knowledge} | |
1339 | Finally we must prove that $\Wident$ is (statistical) zero-knowledge -- i.e., | |
1340 | that, except with very small probability, Bob learns nothing of use to him | |
1341 | except that he's interacting with Alice. To do this, we show that, for any | |
1342 | algorithm $B$ which Bob might use to produce his challenge to the real Alice, | |
1343 | there exists a simulator $S$ which produces transcripts distributed very | |
1344 | similarly to transcripts of real conversations between $B$ and Alice, the | |
1345 | difference being that $S$ doesn't know Alice's key. We shall show that the | |
1346 | statistical difference between the two distributions is $2^{-\ell_I}$. | |
1347 | ||
1348 | The intuition here is that Bob ought to know what answer Alice is going to | |
1349 | give him when he constructs his challenge. This is certainly true if he's | |
1350 | honest: his challenge is $R = r P$ for some $r$ he knows, so he won't learn | |
1351 | anything useful when Alice responds with $x R = r X$. However, if Bob sends | |
1352 | a challenge $R$ when he doesn't know the corresponding $r$, he learns | |
1353 | something potentially useful. The accompanying check value $c = r \xor | |
1354 | H_I(R, r X)$ keeps him honest. | |
1355 | ||
1356 | To show this, we present an \emph{extractor} which, given any challenge $(R, | |
1357 | c)$ Bob can construct, and his history of random-oracle queries, either | |
1358 | returns a pair $(r, Y)$ such that $R = r P$ and $Y = r X$, or $\bot$; | |
1359 | moreover, the probability that Alice returns a response $Y' \ne \bot$ given | |
1360 | the challenge $(R, c)$ is $2^{-\ell}$. We can, of course, readily convert | |
1361 | this extractor into a simulator to prove the zero-knowledge property of our | |
1362 | protocol. | |
1363 | ||
1364 | We shall actually consider a slightly more complex setting. We grant Bob | |
1365 | access to an oracle which produces random, correctly-formed challenges. We | |
1366 | require this to model the legitimate challenges of other parties when we | |
1367 | analyse the security of our key exchange protocol. The extractor is | |
1368 | permitted to fail given | |
1369 | ||
1370 | \begin{definition}[Discrete-log extractors] | |
1371 | Let $T$, $B$ be randomized algorithms. Define the game | |
1372 | $\Game{dl-ext}{G}(T, B)$ as shown in figure~\ref{fig:dlext}. The | |
1373 | \emph{success probability of $T$ as a discrete-log extractor against $B$} | |
1374 | is defined as | |
1375 | \[ \Succ{dl-ext}{G}(T, B) = \Pr[\Game{dl-ext}{G}(T, B) = 1]. \] | |
1376 | \end{definition} | |
1377 | Let's unpack this definition slightly. We make the following demands of our | |
1378 | extractor. | |
1379 | \begin{itemize} | |
1380 | \item It is given a bare `transcript' of $B$'s execution. In particular, it | |
1381 | is given only its output and a list of $B$'s random-oracle queries in no | |
1382 | particular order. | |
1383 | \item While the extractor is not given the private key~$x$, the adversary~$B$ | |
1384 | is given the private key. | |
1385 | \item We require that, if the extractor produces values $r, Y \ne \bot$ then | |
1386 | $r$ and $Y$ are \emph{correct}; i.e., that $R = r P$ and $Y = x R$. | |
1387 | \item The extractor is explicitly \emph{not} given the outputs of the | |
1388 | challenge-generation oracle $C()$, nor of the random-oracle queries issued | |
1389 | by $C()$. However, we allow the extractor to fail (i.e., return $\bot$) if | |
1390 | $B$ simply parrots one of its $C$-outputs. | |
1391 | \item The extractor is allowed -- indeed \emph{required} -- to fail if the | |
1392 | challenge $(R, c)$ is \emph{invalid} (i.e., Alice would return $\bot$ given | |
1393 | the challenge). | |
1394 | \end{itemize} | |
1395 | The resulting definition bears a striking similarity to the concept of | |
1396 | \emph{plaintext awareness} in \cite{Bellare:1998:RAN}. | |
1397 | ||
1398 | \begin{figure} | |
1399 | \begin{program} | |
1400 | $\Game{dl-ext}{G}(T, B):$ \+ \\ | |
1401 | $H_I \getsr \Func{G^2}{\Bin^{\ell_I}}$; | |
1402 | $Q_H \gets \emptyset$; $Q_C \gets \emptyset$; \\ | |
1403 | $(x, X) \gets \id{setup}()$; \\ | |
1404 | $(R, c) \gets B^{\Xid{H_I}{trap}(\cdot, \cdot), C()}(x, X)$; \\ | |
1405 | $(r, Y) \gets T(R, c, Q_H)$; \\ | |
1406 | $Y' \gets x R$; $h' \gets H_I(R, Y')$; $r' \gets c \xor h'$; \\ | |
1407 | \IF $r \ne \bot$ \THEN \\ \quad | |
1408 | \IF $Y = \bot \lor R \ne r P \lor Y \ne Y'$ \THEN \RETURN $0$; \\ | |
1409 | \IF $R = r' P$ \THEN $(r^*, Y^*) = (r', Y')$; \\ | |
1410 | \ELSE $(r^*, Y^*) \gets (\bot, \bot)$; \\ | |
1411 | \IF $(R, c) \in Q_C$ \THEN \RETURN $1$; \\ | |
1412 | \IF $(r, Y) = (r', Y')$ \THEN \RETURN $1$; \\ | |
1413 | \RETURN $0$; | |
1414 | \next | |
1415 | Oracle $\Xid{H_I}{trap}(R', Y')$: \+ \\ | |
1416 | $h \gets H_I(R', Y')$; \\ | |
1417 | $Q_H \gets Q_H \cup \{(R', Y', h)\}$; \\ | |
1418 | \RETURN $h$; \- \\[\medskipamount] | |
1419 | Oracle $C()$: \+ \\ | |
1420 | $r \getsr \Nupto{q}$; \\ | |
1421 | $R \gets r P$; $c \gets r \xor H_I(R, r X)$; \\ | |
1422 | $Q_C \gets Q_C \cup \{(R, c)\}$; \\ | |
1423 | \RETURN $(R, c)$ | |
1424 | \end{program} | |
1425 | ||
1426 | \caption{Discrete log extraction game: $\Game{dl-ext}{G}(T, B)$} | |
1427 | \label{fig:dlext} | |
1428 | \end{figure} | |
1429 | ||
1430 | Such an extractor indeed exists, as the following lemma states. | |
1431 | \begin{lemma}[Effectiveness of extractor $T_\Wident$] | |
1432 | \label{lem:dlext} | |
1433 | There exists a \emph{universal discrete-log extractor} $T_\Wident$ which, | |
1434 | for any algorithm $B$, | |
1435 | \[ \Succ{dl-ext}{G}(T_\Wident, B) \ge 1 - \frac{1}{2^{\ell_I}}. \] | |
1436 | Moreover, if $B$ issues at most $q_H$ random-oracle queries, then the | |
1437 | running time of $T_\Wident$ is $O(q_H)$. | |
1438 | \end{lemma} | |
1439 | We prove this result at the end of the section. For now, let us see how to | |
1440 | prove that $\Wident$ is zero-knowledge. | |
1441 | ||
1442 | We use the set-up described in section~\ref{sec:sim}. Our initialization | |
1443 | function~$I_\Wident$ just chooses a random $x \in \Nupto{q}$ as the world | |
1444 | private input and sets $X = x P$ as the common input. In the `real world', | |
1445 | the adversary is allowed to submit a (single) challenge to the prover; it is | |
1446 | given the prover's response, and must then compute its output. This is shown | |
1447 | on the left hand side of figure~\ref{fig:wident-sim}. | |
1448 | ||
1449 | The zero-knowledge property of the scheme is described by the following | |
1450 | theorem. | |
1451 | \begin{theorem}[Statistical zero-knowledge of $\Wident$] | |
1452 | \label{thm:wident-zk} | |
1453 | Let $I_\Wident$, $W_\Wident$ and $S_\Wident$ be the real-prover world and | |
1454 | simulator shown in figure~\ref{fig:wident-sim}. Then, for any~$t$, | |
1455 | $q_I$ and $q_C$, | |
1456 | \[ \InSec{sim}(W_\Wident, I_\Wident, S_\Wident; t, q_I, q_C, 0) \le | |
1457 | \frac{q_C}{2^\ell_I}. | |
1458 | \] | |
1459 | where $q_C$ is the maximum number of challenges allowed by the adversary. | |
1460 | \end{theorem} | |
1461 | \begin{proof} | |
1462 | The simulator simply uses the extractor~$T_\Wident$ to extract the answer | |
1463 | from the adversary's history of random oracle queries. Observe that | |
1464 | $S_\Wident$ is a fake-world simulator. By lemma~\ref{lem:dlext}, the | |
1465 | extractor fails with probability only $2^{-\ell_I}$. The theorem follows | |
1466 | by a simple union bound and proposition~\ref{prop:fakesim}. | |
1467 | \end{proof} | |
1468 | ||
1469 | \begin{figure} | |
1470 | \begin{program} | |
1471 | Initialization function $I_\Wident()$: \+ \\ | |
1472 | $x \getsr \Nupto{|G|}$; \\ | |
1473 | $X \gets x P$; \\ | |
1474 | \RETURN $(x, X)$; | |
1475 | \- \\[\medskipamount] | |
1476 | Real-prover world $W_\Wident^{H_I(\cdot, \cdot)} | |
1477 | ((x, X), \sigma, \tau, \mu)$: \+ \\ | |
1478 | \IF $\tau = \cookie{challenge}$ \THEN \\ \ind | |
1479 | $(R, c) \gets \mu$; \\ | |
1480 | $Y \gets \id{response}^{H_I(\cdot, \cdot)}(R, c, x)$; \\ | |
1481 | \RETURN $(1, Y)$; \- \\ | |
1482 | \ELSE \\ \ind | |
1483 | \RETURN $(\sigma, \bot)$; | |
1484 | \next | |
1485 | Simulator $S_\Wident$'s fake world \\ | |
1486 | \hspace{1in} $W_{\text{sim}}^{H_I(\cdot, \cdot)} | |
1487 | ((X, u), \sigma, \tau, \mu)$: \+ \\ | |
1488 | \IF $\tau = \cookie{init}$ \THEN \\ \ind | |
1489 | \RETURN $(\emptyset, \emptystring)$; \- \\ | |
1490 | $Q_H \gets \sigma$; \\ | |
1491 | \IF $\tau = \cookie{challenge}$ \THEN \\ \ind | |
1492 | $(R, c) \gets \mu$; \\ | |
1493 | $(r, Y) \gets T_\Wident(R, c, Q_H)$; \\ | |
1494 | \RETURN $(Q_H, Y)$; \- \\ | |
1495 | \ELSE \IF $\tau = \cookie{random}$ \THEN \\ \ind | |
1496 | $(i, (R', Y'), h) \gets \mu$; \\ | |
1497 | $Q_H \gets Q_H \cup \{(R', Y', h)\}$; \\ | |
1498 | \RETURN $(Q_H, \emptystring)$; \- \\ | |
1499 | \ELSE \\ \ind | |
1500 | \RETURN $(\sigma, \bot)$; | |
1501 | \end{program} | |
1502 | ||
1503 | \caption{Real-prover and simulator for zero-knowledge of $\Wident$} | |
1504 | \label{fig:wident-sim} | |
1505 | \end{figure} | |
1506 | ||
1507 | We now return to proving that our extractor exists and functions as claimed. | |
1508 | The following two trivial lemmas will be useful, both now and later. | |
1509 | \begin{lemma}[Uniqueness of discrete-logs] | |
1510 | \label{lem:unique-dl} | |
1511 | Let $G = \langle P \rangle$ be a cyclic group. For any $X \in G$ there is | |
1512 | a unique integer $x$ where $0 \le x < |G|$ and $X = x P$. | |
1513 | \end{lemma} | |
1514 | \begin{proof} | |
1515 | Certainly such an $x$ exists, since $G$ is cyclic and finite. Suppose $X = | |
1516 | x P = x' P$: then $0 = x P - x' P = (x - x') P$. Hence $(x - x')$ is a | |
1517 | multiple of $|G|$. | |
1518 | \end{proof} | |
1519 | \begin{lemma}[Uniqueness of check values] | |
1520 | \label{lem:unique-c} | |
1521 | Let $G = \langle P \rangle$ be a cyclic group; let $H_I$ be a function | |
1522 | $H_I\colon \Bin^{2\ell_G} \to \Bin^{\ell_I}$. Fix some $x \in | |
1523 | \Nupto{|G|}$ and define the set | |
1524 | \[ V_x = \bigl\{\, (R, c) \in G \times \Bin^{\ell_I} \bigm| | |
1525 | R = \bigl( c \xor H_I(R, x R) \bigr) P \,\bigr\}. | |
1526 | \] | |
1527 | Then, for any $R$, $c$, $c'$, if $(R, c) \in V_x$ and $(R, c') \in V_x$ | |
1528 | then $c = c'$. | |
1529 | \end{lemma} | |
1530 | \begin{proof} | |
1531 | From lemma~\ref{lem:unique-dl}, we see that there is a unique $r \in | |
1532 | \Nupto{|G|}$ for which $R = r P$. Now, if $(R, c) \in V_x$, we must have | |
1533 | $r = c \xor H_I(R, x R)$. It follows that $c = r \xor H_I(R, x R)$. | |
1534 | \end{proof} | |
1535 | ||
1536 | \begin{proof}[Proof of lemma~\ref{lem:dlext}] | |
1537 | Our extractor $T_\Wident$ is shown in figure~\ref{fig:twident}. | |
1538 | ||
1539 | \begin{figure} | |
1540 | \begin{program} | |
1541 | Extractor $T_\Wident(R, c, Q_H)$: \+ \\ | |
1542 | \FOR $(R', Y', h)$ \IN $Q_H$ \DO \\ \ind | |
1543 | $r \gets h \xor c$; \\ | |
1544 | \IF $R = R' = r P \land Y' = r X$ \THEN \RETURN $(r, Y')$; \- \\ | |
1545 | \RETURN $(\bot, \bot)$; | |
1546 | \end{program} | |
1547 | ||
1548 | \caption{The discrete-log extractor $T_\Wident$} | |
1549 | \label{fig:twident} | |
1550 | \end{figure} | |
1551 | ||
1552 | Let $B$ be any randomized algorithm, and let $(R, c, Q_H)$ be as given to | |
1553 | the extractor by $\Game{dl-ext}{G}(T_\Wident, B)$. Let the quantities | |
1554 | $H_I$, $Q_C$, $r$, $r'$, $x$ and $X$ be as in that game. | |
1555 | ||
1556 | Suppose that the extractor returns values $(r, Y) \ne (\bot, \bot)$. Let | |
1557 | $h = r \xor c$; then there must be a query $(R, Y, h) \in Q_H$, and we have | |
1558 | $R = r P$ and $Y = r X = r (x P) = x (r P) = x R = Y'$, so the extractor's | |
1559 | output must be correct unless it fails. | |
1560 | ||
1561 | Furthermore, in the case where the extractor did not fail, we have $h = | |
1562 | H_I(R, Y) = H_I(R, Y')$ and $c = r \xor h$, so the challenge was valid. | |
1563 | Therefore, if the challenge was invalid, the extractor will fail. | |
1564 | ||
1565 | We now deal with the challenge-generation oracle. Suppose that $(R, c') | |
1566 | \in Q_C$ for some $c'$. Now, if $c = c'$ then $(R, c')$ is a repeat of | |
1567 | some challenge from the challenge-generation oracle, and the extractor is | |
1568 | permitted to fail. On the other hand, suppose $c \ne c'$; then, the | |
1569 | challenge $(R, c)$ must be invalid by lemma~\ref{lem:unique-c}, so the | |
1570 | extractor is required to fail, and we have established that indeed it will. | |
1571 | From now on, suppose that $R$ is distinct from all the $R$-values returned | |
1572 | by $C()$. | |
1573 | ||
1574 | Let $Y = x R$. Suppose that $B$ queried its random oracle at $(R, Y)$. | |
1575 | Let $h = H_I(Y)$, so $r' = c \xor h$. If the challenge is valid then $R = | |
1576 | r' P$; therefore $Y = x R = x r' P = r' X$, so we have $(R, Y, h) \in Q_H$ | |
1577 | with $R = r P$ and $Y = r X$. Hence the extractor returns $r = r'$ as | |
1578 | required. | |
1579 | ||
1580 | It remains to deal with the case where there is no random-oracle query at | |
1581 | $(R, Y)$. But then $h = H_I(R, Y)$ is uniformly distributed, and | |
1582 | independent of the entire game up to this point. Let $r$ be the correct | |
1583 | discrete log of $R$; by lemma~\ref{lem:unique-dl} there is only one | |
1584 | possible value. The extractor always fails under these circumstances, but | |
1585 | a correct responder would reply with probability | |
1586 | \[ \Pr[h = c \xor r] = \frac{1}{2^{\ell_I}}. \] | |
1587 | This concludes the proof. | |
1588 | \end{proof} | |
1589 | \begin{remark} | |
1590 | Note that the fact that the algorithm~$B$ was given the private key is | |
1591 | irrelevant to the above argument. However, we shall need this property | |
1592 | when we come to prove deniability for the key-exchange protocol. | |
1593 | \end{remark} | |
1594 | \begin{remark} | |
1595 | It's easy to see from the above proof that the extractor works flawlessly | |
1596 | on the `honest verifier' algorithm $\id{challenge}$ shown in | |
1597 | figure~\ref{fig:wident-ro}. This shows that $\Wident$ is perfect | |
1598 | zero-knowledge against honest verifiers. We're much more interested in | |
1599 | dishonest verifiers, though. | |
1600 | \end{remark} | |
1601 | ||
1602 | ||
1603 | \subsection{An identity-based identification scheme} | |
1604 | \label{sec:wident-id} | |
1605 | ||
1606 | Boneh and Franklin \cite{Boneh:2001:IBE} showed how to construct an | |
1607 | identity-based encryption scheme using bilinear pairings. The resulting | |
1608 | encryption scheme looks somewhat like a pairing-based version of ElGamal's | |
1609 | encryption scheme \cite{ElGamal:1984:PKC}. We can easily apply their | |
1610 | techniques to our identification protocol, and thereby obtain an | |
1611 | identity-based identification scheme. Providing the necessary formalisms to | |
1612 | prove theorems analogous to our theorems~\ref{thm:wident-sound} | |
1613 | and~\ref{thm:wident-zk} would take us too far from our objectives; but given | |
1614 | appropriate security notions, we can readily adapt our existing proofs to the | |
1615 | new setting. | |
1616 | ||
1617 | \subsubsection{Bilinear pairings} | |
1618 | Before we describe the necessary modifications to the protocol, we first give | |
1619 | a (very brief!) summary of cryptographic pairings. (The Boneh-Franklin paper | |
1620 | \cite{Boneh:2001:IBE} gives more detail; also \cite{Menezes:2006:IPB} | |
1621 | provides a useful introduction to the topic.) | |
1622 | ||
1623 | Let $(G, +)$, $(G', +)$ and $(G_T, \times)$ be cyclic groups with prime order | |
1624 | $q$; let $P \in G$ and $P' \in G'$ be elements of order $q$ in $G$ and $G'$ | |
1625 | respectively. We say that a mapping $\hat{e}\colon G \times G' \to G_T$ is a | |
1626 | \emph{non-degenerate bilinear pairing} if it satisfies the following | |
1627 | properties. | |
1628 | \begin{description} | |
1629 | \item[Bilinearity] For all $R \in G$ and $S', T' \in G'$, we have $\hat{e}(R, | |
1630 | S' + T') = \hat{e}(R, S') \hat{e}(R, T')$; and for all $R, S \in G$ and $T' | |
1631 | \in G'$ we have $\hat{e}(R + S, T') = \hat{e}(R, T') \hat{e}(S, T')$. | |
1632 | \item[Non-degeneracy] $\hat{e}(P, P') \ne 1$. | |
1633 | \end{description} | |
1634 | For practical use, we also want $\hat{e}(\cdot, \cdot)$ to be efficient to | |
1635 | compute. The reader can verify that $\hat{e}(a P, b P') = \hat{e}(P, | |
1636 | P')^{ab}$. It is permitted for the two groups $G$ and $G'$ to be equal. | |
1637 | ||
1638 | We require a different intractability assumption, specifically that the | |
1639 | \emph{bilinear} Diffie-Hellman problem (BDH) -- given $(a P, b P, a P', c P') | |
1640 | \in G^2 \times G'^2$, find $\hat{e}(P, P')^{abc} \in G_T$ -- is difficult. | |
1641 | This implies the difficulty of the computational Diffie-Hellman problem in | |
1642 | all three of $G$, $G'$ and~$G_T$. | |
1643 | ||
1644 | \subsubsection{The identity-based scheme} | |
1645 | We need a trusted authority; following \cite{Schneier:1996:ACP} we shall call | |
1646 | him Trent. Trent's private key is $t \in \Nupto{q}$; his public key is $T = | |
1647 | t P$. | |
1648 | ||
1649 | Finally, we need cryptographic hash functions $H_I\colon G \times G_T \to | |
1650 | \Bin^{\ell_I}$ and $\Hid\colon \Bin^* \to G'$; a formal security analysis | |
1651 | would model these as random oracles. | |
1652 | ||
1653 | Alice's public key is $A = \Hid(\texttt{Alice}) \in G'$. Her private key is | |
1654 | $K_A = t A \in G'$ -- she needs Trent to give this to her. Bob can interact | |
1655 | with Alice in order to verify her identity as follows. | |
1656 | \begin{enumerate} | |
1657 | \item Bob computes $\gamma_A = \hat{e}(T, A) \in G_T$. (He can do this once | |
1658 | and store the result if he wants, but it's not that onerous to work it out | |
1659 | each time.) | |
1660 | \item Bob chooses $r \inr \Nupto{q}$, and sets $R = r P$. He also computes | |
1661 | $\psi = \gamma_A^r$, $h = H_I(R, \psi)$ and $c = r \xor h$. He sends his | |
1662 | challenge $(R, c)$ to Alice. | |
1663 | \item Alice receives $(R', c')$. She computes $\psi' = \hat{e}(R, K_A)$, $h' | |
1664 | = H_I(R', \psi')$, and $r' = c' \xor h')$. She checks that $R' = r' P$; if | |
1665 | so, she sends $\psi'$ back to Bob; otherwise she refuses to talk to him. | |
1666 | \item Bob receives $\psi'$. If $\psi = \psi'$ then he accepts that he's | |
1667 | talking to Alice. | |
1668 | \end{enumerate} | |
1669 | This works because $\psi = \gamma_A^r = \hat{e}(T, A)^r = \hat{e}(t P, A)^r = | |
1670 | \hat{e}(r P, A)^t = \hat{e}(R, t A) = \psi'$. | |
1671 | ||
1672 | \subsubsection{Informal analysis} | |
1673 | An analogue to lemma~\ref{lem:dlext} can be proven to show how to extract $r$ | |
1674 | from a verifier's random-oracle queries; statistical zero knowledge would | |
1675 | then follow easily, as in theorem~\ref{thm:wident-zk}. Soundness is | |
1676 | intuitively clear, since an adversary must compute $\psi = \hat{e}(P, | |
1677 | P')^{art}$ given $A = a P'$, $R = r P$ and $T = t P$, which is an instance of | |
1678 | the BDH problem. An analogue of theorem~\ref{thm:wident-sound} would have to | |
1679 | prove this for an adversary capable of making identity requests as well as | |
1680 | obtaining challenges. Finally, our key-exchange protocol can be constructed | |
1681 | out of this identity-based identification scheme, yielding an identity-based | |
1682 | authenticated key-exchange protocol. We leave it to the reader to work | |
1683 | through the details. | |
1684 | ||
1685 | ||
1686 | \subsection{Comparison with the protocol of Stinson and Wu} | |
1687 | \label{sec:stinson-ident} | |
1688 | ||
1689 | Our protocol is similar to a recent proposal by Stinson and Wu | |
1690 | \cite{Stinson:2006:EST}. They restrict their attention to Schnorr groups $G | |
1691 | \subset \F_p^*$. Let $\gamma$ be an element of order $q = |G|$. The | |
1692 | prover's private key is $a \inr \Nupto{q}$ and her public key is $\alpha = | |
1693 | \gamma^a$. In their protocol, the challenger chooses $r \inr \Nupto{q}$, | |
1694 | computes $\rho = \gamma^r$ and $\psi = \alpha^r$, and sends a challenge | |
1695 | $(\rho, H(\rho, \psi))$. The prover checks that $\rho^q \ne 1$, computes | |
1696 | $\psi = \rho^a$, checks the hash, and sends $\psi$ back by way of response. | |
1697 | They prove their protocol's security in the random-oracle model. | |
1698 | ||
1699 | Both the Wrestlers protocol and Stinson-Wu require both prover and verifier | |
1700 | to compute two exponentiations (or scalar multiplications) each. The | |
1701 | sizes of the messages used by the two protocols are also identical. | |
1702 | ||
1703 | (An earlier version of the Stinson-Wu protocol used a cofactor | |
1704 | exponentiation: if we set $f = (p - 1)/q$, then we use $\psi = \alpha^{rf}) = | |
1705 | \rho^{af} = \gamma^{afr}$. This is more efficient in typical elliptic curve | |
1706 | subgroups, since the cofactor of such subgroups is usually small: indeed, | |
1707 | \cite{SEC1} recommends rejecting groups with cofactor $f > 4$. However, in | |
1708 | the Schnorr groups used by Stinson and Wu, the cofactor is much larger than | |
1709 | $q$, and their new variant is more efficient.) | |
1710 | ||
1711 | We note that the zero-knowledge property of the Stinson-Wu protocol requires | |
1712 | the Diffie-Hellman knowledge of exponent assumption (KEA). Very briefly: | |
1713 | suppose $A$ is a randomized algorithm which takes as input $X \in G$ and | |
1714 | outputs a pair $(r P, r X)$; intuitively, the KEA asserts $A$ must have done | |
1715 | this by choosing $r$ somehow and then computing its output from it. | |
1716 | Formally, it asserts the existence of an `extractor' algorithm which takes as | |
1717 | input the element $X$ and the random coins used by $A$ and outputs $r$ with | |
1718 | high probability. This is a very strong assumption, and one which is | |
1719 | unnecessary for our protocol, since we can present an \emph{explicit} | |
1720 | extractor. | |
1721 | ||
1722 | The KEA assumption as stated in \cite{Stinson:2006:EST} allows the extractor | |
1723 | to fail with some negligible probability, over and above the probability that | |
1724 | a dishonest verifier managed to guess the correct $h = H(\rho, \psi)$ without | |
1725 | making this random-oracle query. Not only does our protocol achieve zero- | |
1726 | knowledge without the KEA, our extractor is, in this sense, `perfect'. | |
1727 | ||
1728 | Our protocol is just as strong as Stinson-Wu under attack from active | |
1729 | intruders: see table~\ref{tab:wident-active} for a very brief sketch of the | |
1730 | case-analysis which would be the basis of a proof of this. | |
1731 | ||
1732 | \begin{table} | |
1733 | \begin{tabular}[C]{|*{3}{c|}p{8cm}|} | |
1734 | \hlx{hv[1]} | |
1735 | \multicolumn{2}{|c|}{\textbf{Challenge}} & | |
1736 | \textbf{Response} & | |
1737 | \textbf{Security} | |
1738 | \\ \hlx{v[1]hv} | |
1739 | %% unpleasant hacking to make the R and c columns the same width :-( | |
1740 | \settowidth{\dimen0}{\textbf{Challenge}}% | |
1741 | \dimen0=.5\dimen0 | |
1742 | \advance\dimen0by-\tabcolsep | |
1743 | \advance\dimen0by-.5\arrayrulewidth | |
1744 | \hbox to\dimen0{\hfil$R$\hfil} | |
1745 | & $c$ & $Y$ & Nothing to prove. \\ \hlx{v} | |
1746 | $R$ & $c'$ & --- & Prover rejects by lemma~\ref{lem:unique-c}; | |
1747 | $Y'$ probably wrong by | |
1748 | theorem~\ref{thm:wident-sound}. \\ \hlx{v} | |
1749 | $R$ & $c$ & $Y'$ & Response is incorrect. \\ \hlx{v} | |
1750 | $R'$ & --- & $Y$ & Response is incorrect. \\ \hlx{v} | |
1751 | $R'$ & $c$ & $Y'$ & Prover rejects with probability $1 - 2^{-\ell_I}$; | |
1752 | $Y'$ probably wrong by | |
1753 | theorem~\ref{thm:wident-sound}. \\ \hlx{v} | |
1754 | $R'$ & $c'$ & $Y'$ & Simulate prover using extractor | |
1755 | (lemma~\ref{lem:dlext}); $Y'$ probably wrong by | |
1756 | theorem~\ref{thm:wident-sound}. \\ \hlx{vh} | |
1757 | \end{tabular} | |
1758 | ||
1759 | \caption{Security of $\Wident$ against active intruders (summary)} | |
1760 | \label{tab:wident-active} | |
1761 | \end{table} | |
1762 | ||
1763 | An identity-based analogue of Stinson-Wu can be defined using a bilinear | |
1764 | pairing, just as we did in section~\ref{sec:wident-id}. However, to prove | |
1765 | the zero-knowledge property, one needs to make a bilinear analogue of the | |
1766 | knowledge of exponent assumption. | |
1767 | ||
1768 | We suspect that a key-exchange protocol like ours can be constructed using | |
1769 | Stinson-Wu rather than the Wrestlers identification scheme. We haven't, | |
1770 | however, gone through all the details, since we believe our protocol is just | |
1771 | as efficient and is based on much more conservative assumptions. | |
1772 | ||
1773 | %%%-------------------------------------------------------------------------- | |
1774 | ||
1775 | \section{A simple key-exchange protocol} | |
1776 | \label{sec:kx} | |
1777 | ||
1778 | In this section, we describe a simple key-exchange protocol built out of the | |
1779 | identification protocol shown previously. | |
1780 | ||
1781 | The key-exchange protocol arises from the following observation. If Bob | |
1782 | sends a challenge, presumably to Alice, and gets a correct response, then not | |
1783 | only did he really send the challenge to Alice but he knows that she received | |
1784 | it correctly. | |
1785 | ||
1786 | So, if Alice and Bob authenticate each other, by the end of it, they should | |
1787 | each have chosen a random private value, sent the corresponding public value | |
1788 | to the other, and been convinced that it arrived safely. | |
1789 | ||
1790 | Unfortunately, life isn't quite this kind, and we have to do some more work | |
1791 | to make this scheme secure. | |
1792 | ||
1793 | ||
1794 | Our key exchange protocol essentially consists of two parallel instances of | |
1795 | the identification protocol. If Alice receives a correct response to her | |
1796 | challenge, she will know that Bob received her challenge correctly, and | |
1797 | \emph{vice versa}. If we let Alice's challenge be $R_0 = r_0 P$ and Bob's | |
1798 | challenge be $R_1 = r_1 P$ then each can compute a shared secret $Z = r_0 R_1 | |
1799 | = r_0 r_1 P = r_1 R_0$ unknown to an adversary. There are, unfortunately, a | |
1800 | few subtleties involved in turning this intuition into a secure key-exchange | |
1801 | protocol, which we now describe. | |
1802 | ||
1803 | ||
1804 | \subsection{Overview} | |
1805 | \label{sec:kx-overview} | |
1806 | ||
1807 | We present a quick, informal description of our basic key-exchange protocol. | |
1808 | In addition to our group $G$, we shall also need a secure symmetric | |
1809 | encryption scheme $\E = (\kappa, E, D)$, and two secure hash functions | |
1810 | $H_I\colon \Bin^{2\ell_G} \to \Bin^{\ell_I}$ and $H_K\colon \Bin^{\ell_G+1} | |
1811 | \to \Bin^\kappa$. | |
1812 | ||
1813 | Suppose that Alice's and Bob's private keys are $a$ and $b$ respectively, and | |
1814 | their public keys are $A = a P$ and $B = b P$. | |
1815 | \begin{enumerate} | |
1816 | \item Alice chooses a random index $r \inr \Nupto{|G|}$. She computes $R = r | |
1817 | P$ and $c = r \xor H_I(R, r B)$. She sends the pair $(R, c)$ to Bob. | |
1818 | \item Similarly, Bob chooses a random $s \inr \Nupto{|G|}$. He computes $S | |
1819 | = s P$ and $d = s \xor H_I(S, s A)$. He sends $(S, d)$ to Alice. | |
1820 | \item Alice receives $(S', d')$ from Bob. She computes $s' = d' \xor H_I(S', | |
1821 | a S')$, and verifies that $S' = s' P$. If so, she computes $K_A = H_K(0 | |
1822 | \cat r S')$, and sends $R, E_{K_A}(a S')$ to Bob. | |
1823 | \item Similarly, Bob receives $(R', c')$ from Alice. He verifies that $R' = | |
1824 | \bigl( c' \xor H_I(R', b R') \bigr) P$. If so, he computes $K_B = H_K(0 | |
1825 | \cat s R')$ and sends S, $E_{K_B}(b R')$ to Alice. | |
1826 | \item Alice receives a ciphertext $(S'', \chi_B)$ from Bob. She checks that | |
1827 | $S'' = S'$, decrypts $\chi_B$, and checks that $D_{K_A}(\chi_B) = r B$. If | |
1828 | so, she uses $H_K(1 \cat r S')$ as her shared secret. | |
1829 | \item Similarly, Bob receives $(R'', \chi_A)$ from Alice, and checks $R'' = | |
1830 | R'$ and $D_{K_B}(\chi_A) = s A$. If so, he uses $H_K(1 \cat s R')$ as his | |
1831 | shared secret. | |
1832 | \end{enumerate} | |
1833 | This is the Wrestlers Key Exchange protocol, $\Wkx^{G, \E}$ (again, we omit | |
1834 | the superscripts when referring to the general protocol, or when confusion is | |
1835 | unlikely). A diagrammatic summary of the protocol is shown in | |
1836 | figure~\ref{fig:wkx}. | |
1837 | ||
1838 | \begin{figure} | |
1839 | \begin{description} | |
1840 | \item[Setup] Group $G = \langle P \rangle$; $|G| = q$ is prime. | |
1841 | $H_I(\cdot, \cdot)$ and $H_K(\cdot)$ are secure hashes. $\E = (\kappa, | |
1842 | E, D)$ is an IND-CCA2 symmetric encryption scheme. | |
1843 | \item[Parties] $U_i$ for $0 \le i < n$. | |
1844 | \item[Private keys] $x_i \inr \Nupto{q}$. | |
1845 | \item[Public keys] $X_i = x_i P$. | |
1846 | \end{description} | |
1847 | \[ \begin{graph} | |
1848 | !{0; <8cm, 0cm>: <0cm, 3cm>::} | |
1849 | *+[F]\dbox{$r_i \getsr I$; $R_i \gets r_i P$ \\ | |
1850 | $c_i \gets r_i \xor H_I(R_i, r_i X_j)$} ="i0" | |
1851 | [d] | |
1852 | *+[F]\dbox{Check $R_j = \bigl(c_j \xor H_I(x_i R_j)\bigr) P$ \\ | |
1853 | $Z \gets r_i R_j$; $K \gets H_K(0, Z)$ \\ | |
1854 | $\chi_i \gets E_K(x_i R_j)$} ="i1" | |
1855 | [d] | |
1856 | *+[F]\dbox{Check $D_K(\chi_j) = r_i X_j$ \\ | |
1857 | Shared key is $H_K(1, Z)$} ="i2" | |
1858 | "i0" [r] | |
1859 | *+[F]\dbox{$r_j \getsr I$; $R_j \gets r_j P$ \\ | |
1860 | $c_j \gets r_j \xor H_I(R_j, r_j X_i)$} ="j0" | |
1861 | [d] | |
1862 | *+[F]\dbox{Check $R_i = \bigl(c_i \xor H_I(x_j R_i)\bigr) P$ \\ | |
1863 | $Z \gets r_j R_i$; $K \gets H_K(0, Z)$ \\ | |
1864 | $\chi_j \gets E_K(x_j R_i)$} ="j1" | |
1865 | [d] | |
1866 | *+[F]\dbox{Check $D_K(\chi_i) = r_j X_i$ \\ | |
1867 | Shared key is $H_K(1, Z)$} ="j2" | |
1868 | % | |
1869 | "i0" : |(0)/3.25cm/*+{(R_i, c_i)} "j1" | |
1870 | "i1" : |(0)/3.25cm/*+{(R_i, \chi_i)} "j2" | |
1871 | "j0" : |(0)/3.25cm/*+{(R_j, c_j)} "i1" | |
1872 | "j1" : |(0)/3.25cm/*+{(R_j, \chi_j)} "i2" | |
1873 | \end{graph} \] | |
1874 | ||
1875 | \caption{Summary of the Wrestlers Key Exchange protocol, $\Wkx$} | |
1876 | \label{fig:wkx} | |
1877 | \end{figure} | |
1878 | ||
1879 | Assume, for the moment, that Alice and Bob's messages are relayed honestly. | |
1880 | Then: | |
1881 | \begin{itemize} | |
1882 | \item $a S' = a S = a (s P) = s (a P) = s A$, so $s' = d' \xor H_I(S' a S') = | |
1883 | d \xor H_I(S, s A) = s$, and $S' = S = s P = s' P$, and therefore Alice | |
1884 | responds to Bob's message; | |
1885 | \item similarly $b R' = r B$, so $r' = r$ and $R' = r' P$, and therefore Bob | |
1886 | responds to Alice's message; | |
1887 | \item $b R' = b R = b (r P) = r (b P) = r B$, and $a S' = a S = a (s P) = s | |
1888 | (a P) = s A$, and therefore both parties compute their responses correctly; | |
1889 | and | |
1890 | \item $r S' = r S = r (s P) = s (r P) = s R = s R'$, so $K_A = K_B$, and | |
1891 | therefore they can decrypt each others' responses, and agree the same | |
1892 | shared secret. | |
1893 | \end{itemize} | |
1894 | This shows that the protocol is basically valid, but says little about its | |
1895 | security. The remainder of this section will describe our protocol in more | |
1896 | formal detail, and prove its security in a model with multiple parties and an | |
1897 | adversary who controls the network. | |
1898 | ||
1899 | Observe that the protocol as we've presented here is \emph{symmetrical}. | |
1900 | There's no notion of `initiator' or `responder'. There are a total of four | |
1901 | messages which must be sent before both parties accept. However, this can be | |
1902 | reduced to three by breaking the symmetry of the protocol and combining one | |
1903 | or other party's challenge and response messages. We choose to analyse the | |
1904 | symmetrical version, since to do so, it suffices to consider only the two | |
1905 | different kinds of messages. Since our security model allows the messages to | |
1906 | be adversarially delayed and reordered, it is easy to show that the security | |
1907 | of an optimized, asymmetrical protocol is no worse than the symmetrical | |
1908 | version we present here. | |
1909 | ||
1910 | ||
1911 | \subsection{Security model and security definition} | |
1912 | \label{sec:um} | |
1913 | ||
1914 | Our model is very similar to that of Canetti and Krawczyk | |
1915 | \cite{Canetti:2002:???}, though we have modified it in two ways. | |
1916 | \begin{enumerate} | |
1917 | \item We allow all the participants (including the adversary) in the protocol | |
1918 | access to the various random oracles required to implement it. | |
1919 | \item Since we want to analyse a specific, practical scheme, asymptotic | |
1920 | results are useless. We measure the adversary's resource usage carefully, | |
1921 | and produce a quantitative bound on the adversary's advantage in the | |
1922 | SK-security game. | |
1923 | \end{enumerate} | |
1924 | ||
1925 | \subsubsection{Overview} | |
1926 | We briefly describe our modified model, pointing out the changes we have | |
1927 | made, and how they apply to our protocol. Much of Canetti and Krawczyk's | |
1928 | model (for example, the local and global outputs) is useful for proving more | |
1929 | general security properties such as demonstrating that SK-security suffices | |
1930 | for constructing secure channels, and we shall not concern ourselves with | |
1931 | such details. Other parts deal with issues such as security parameters and | |
1932 | ensuring that all the computation is polynomially bounded, which are | |
1933 | irrelevant since we are dealing with a single concrete protocol rather than a | |
1934 | family of them. | |
1935 | ||
1936 | The entities in the model are the \emph{adversary}~$A$, and a (fixed) number | |
1937 | of \emph{parties}~$P_i$, for $0 \le i < n$. If the protocol under | |
1938 | consideration makes use of random oracles, then all the participants -- the | |
1939 | adversary and the parties -- are all allowed access to the random oracles. | |
1940 | ||
1941 | The parties and the adversary play a `game'. At the beginning of the game, | |
1942 | the participants are given some inputs computed by a randomized | |
1943 | \emph{initialization procedure}~$\id{init}$. This produces as output a pair | |
1944 | $(i_U, \mathbf{i})$; the value $i_U$ is the \emph{global input}, and is given | |
1945 | to all the participants including the adversary. The vector $\mathbf{i}$ has | |
1946 | $n$ components, and party $P_i$ is given $(i_U, \mathbf{i}[i])$ as input. | |
1947 | ||
1948 | \subsubsection{Sessions} | |
1949 | Parties don't act directly. Instead, each party runs a number of | |
1950 | \emph{sessions}. A session a triple $S = (P_i, P_j, s)$, where $i, j \in | |
1951 | \Nupto{n}$ identify the owning party and a \emph{partner}, and $s \in | |
1952 | \Bin^{\ell_S}$ is a \emph{session-id}. (The original model includes a | |
1953 | r\^ole, for distinguishing between initiators and responders. Our protocol | |
1954 | is symmetrical, so this distinction isn't useful.) If $P_i$ runs a session | |
1955 | $S = (P_i, P_j, s)$ and $P_j$ runs a session $S' = (P_j, P_i, s)$ then we say | |
1956 | that $S$ and $S'$ are \emph{matching}, and that $P_j$ is $P_i$'s | |
1957 | \emph{partner} for the session. | |
1958 | ||
1959 | At most one participant in the game is \emph{active} at any given time. | |
1960 | Initially the adversary is active. The adversary may \emph{activate} a | |
1961 | session in one of two ways. | |
1962 | \begin{enumerate} | |
1963 | \item It may \emph{create a session} of a party~$P_i$, by selecting a | |
1964 | session-id~$s \in \Bin^{\ell_S}$ and a partner $j$. There is no | |
1965 | requirement that $P_j$ ever have a matching session. However, all sessions | |
1966 | of a party must be distinct, i.e., sessions with the same partner must have | |
1967 | different session-ids. | |
1968 | \item It may \emph{deliver a message}~$\mu \in \Bin^*$, from party~$P_j$, to | |
1969 | an existing session~$S = (P_i, P_j, s)$. There is no requirement that any | |
1970 | party previously sent $\mu$: the adversary is free to make up messages as | |
1971 | it sees fit. | |
1972 | \end{enumerate} | |
1973 | The adversary becomes inactive, and the session becomes active. The session | |
1974 | performs some computation, according to its protocol, and may request a | |
1975 | message~$\mu$ be delivered to the matching session running in its partner | |
1976 | (which may not exist). The session may also \emph{terminate}. In the case | |
1977 | we are interested in, of key-exchange protocols, a session~$S = (P_i, P_j, | |
1978 | s)$ may terminate in one of two ways: | |
1979 | \begin{enumerate} | |
1980 | \item it may \emph{complete}, outputting $(i, j, s, K)$, for some | |
1981 | \emph{session key}~$K$, or | |
1982 | \item it may \emph{abort}, outputting $(i, j, s, \bot)$. | |
1983 | \end{enumerate} | |
1984 | Once it has performed these actions, the session deactivates and the | |
1985 | adversary becomes active again. The adversary is given the message~$\mu$, if | |
1986 | any, and informed of whether the session completed or aborted, but, in the | |
1987 | case of completion, not of the value of the key~$K$. A session is | |
1988 | \emph{running} if it has been created and has not yet terminated. | |
1989 | ||
1990 | \subsubsection{Other adversarial actions} | |
1991 | As well as activating sessions, the adversary has other capabilities, as | |
1992 | follows. | |
1993 | \begin{itemize} | |
1994 | \item It may \emph{expire} any session~$S$, causing the owning party to | |
1995 | `forget' the session key output by that session. | |
1996 | \item It may \emph{corrupt} any party~$P_i$, at will: the adversary learns | |
1997 | the entire state of the corrupted party, including its initial | |
1998 | input~$\mathbf{i}[i]$, the state of any sessions it was running at the | |
1999 | time, and the session keys of any completed but unexpired sessions. Once | |
2000 | corrupted, a party can no longer be activated. Of course, the adversary | |
2001 | can continue to send messages allegedly from the corrupted party. | |
2002 | \item It may \emph{reveal the state} of a running session~$S$, learning any | |
2003 | interesting values specific to that session, but \emph{not} the owning | |
2004 | party's long-term secrets. | |
2005 | \item It may \emph{reveal the session-key} of a completed session~$S$. | |
2006 | \item It may elect to be \emph{challenged} with a completed session~$S$, | |
2007 | provided. Challenge sessions form part of the security notion for | |
2008 | key-exchange protocols. See below for more details. | |
2009 | \end{itemize} | |
2010 | We say that a session $S = (P_i, P_j, s)$ is \emph{locally exposed} if | |
2011 | \begin{itemize} | |
2012 | \item it has had its state revealed, | |
2013 | \item it has had its session-key revealed, or | |
2014 | \item $P_i$ has been corrupted, and $S$ had not been expired when this | |
2015 | happened. | |
2016 | \end{itemize} | |
2017 | A session is \emph{exposed} if it is locally exposed, or if its matching | |
2018 | session exists and has been locally exposed. | |
2019 | ||
2020 | At the beginning of the game, a bit $b^*$ is chosen at random. The adversary | |
2021 | may choose to be \emph{challenged} with any completed, unexposed | |
2022 | session;\footnote{% | |
2023 | The original Canetti-Krawczyk definition restricts the adversary to a | |
2024 | single challenge session, but our proof works independent of the number of | |
2025 | challenge sessions, so we get a stronger result by relaxing the requirement | |
2026 | here.)} | |
2027 | the adversary is then given either the session's key -- if $b^* = 1$ -- or a | |
2028 | string chosen at random and independently of the game so far from a | |
2029 | protocol-specific distribution -- if $b^* = 0$. At the end of the game, the | |
2030 | adversary outputs a single bit~$b$. | |
2031 | ||
2032 | \subsubsection{SK-security} | |
2033 | We've now described the game; it is time to explain the adversary's goal in | |
2034 | it. The adversary \emph{wins} the game if either | |
2035 | \begin{enumerate} | |
2036 | \item two unexposed, matching sessions complete, but output different | |
2037 | keys,\footnote{% | |
2038 | The original Canetti-Krawczyk definition differs slightly here. It | |
2039 | requires that `if two \emph{uncorrupted} parties complete matching | |
2040 | sessions then they both output the same key' [original emphasis]. This | |
2041 | can't be taken at face value, since none of the protocols they claim to | |
2042 | be secure actually meet this requirement: they meet only the weaker | |
2043 | requirement that parties completing matching sessions output different | |
2044 | keys with negligible probability. We assume here that this is what they | |
2045 | meant.} | |
2046 | or | |
2047 | \item the adversary correctly guesses the hidden bit~$b^*$. | |
2048 | \end{enumerate} | |
2049 | More formally, we make the following definition. | |
2050 | \begin{definition}[SK-security] | |
2051 | \label{def:sk} | |
2052 | Let $\Pi^{H_0(\cdot), H_1(\cdot), \ldots}$ be a key-exchange protocol | |
2053 | which makes use of random oracles $H_0(\cdot)$, $H_1(\cdot)$, \dots, and | |
2054 | let $A$ be an adversary playing the game described previously, where $n$ | |
2055 | parties run the protocol~$\Pi$. Let $V$ be the event that any pair of | |
2056 | matching, unexposed sessions completed, but output different session keys. | |
2057 | Let $W$ be the event that the adversary's output bit matches the game's | |
2058 | hidden bit~$b^*$. We define the adversary's \emph{advantage against the | |
2059 | SK-security of the protocol~$\Pi$} to be | |
2060 | \[ \Adv{sk}{\Pi}(A, n) = \max(\Pr[V], 2\Pr[W] - 1). \] | |
2061 | Furthermore, we define the \emph{SK insecurity function of the | |
2062 | protocol~$\Pi$} to be | |
2063 | \[ \InSec{sk}(\Pi; t, n, q_S, q_M, q_{H_0}, q_{H_1}, \dots) = | |
2064 | \max_A \Adv{sk}{\Pi}(A, n) | |
2065 | \] | |
2066 | where the maximum is taken over all adversaries~$A$ with total running | |
2067 | time~$t$ (not including time taken by the parties), create at most $q_S$ | |
2068 | sessions, deliver at most $q_M$~messages, and (if applicable) make at most | |
2069 | $q_{H_i}$ random-oracle queries to each random oracle $H_i(\cdot)$. | |
2070 | \end{definition} | |
2071 | ||
2072 | ||
2073 | \subsection{Security} | |
2074 | ||
2075 | In order to analyse our protocol $\Wkx^{G, \E}$ properly, we must describe | |
2076 | exactly how it fits into the formal model described in our formal model. | |
2077 | ||
2078 | \subsubsection{Sessions and session-ids} | |
2079 | Our formal model introduced the concept of sessions, which the informal | |
2080 | description of section~\ref{sec:kx-overview} neglected to do. (One could | |
2081 | argue that we described a single session only.) As we shall show in | |
2082 | section~\ref{sec:kx-insecure}, our protocol is \emph{insecure} unless we | |
2083 | carefully modify it to distinguish between multiple sessions. | |
2084 | ||
2085 | In the model, distinct key-exchange sessions are given distinct partners and | |
2086 | session-ids. In order to prevent sessions interfering with each other, we | |
2087 | shall make explicit use of the session-ids. | |
2088 | ||
2089 | Suppose the session-ids are $\ell_S$-bit strings. We expand the domain of | |
2090 | the random oracle $H_I$ so that it's now | |
2091 | \[ H_I\colon G \times \Bin^{\ell_S} \times G \times G \to \Bin_{\ell_I}. \] | |
2092 | ||
2093 | \subsubsection{Messages} | |
2094 | We split the messages our protocols into two parts: a \emph{type}~$\tau$ and | |
2095 | a \emph{body}~$\mu$. We assume some convenient, unambiguous encoding of | |
2096 | pairs $(\tau, \mu)$ as bit-strings. For readability, we present message | |
2097 | types as text strings, e.g., `\cookie{challenge}', though in practice one | |
2098 | could use numerical codes instead. | |
2099 | ||
2100 | The message body itself may be a tuple of values, which, again, we assume are | |
2101 | encoded as bit-strings in some convenient and unambiguous fashion. We shall | |
2102 | abuse the notation for the sake of readability by dropping a layer of nesting | |
2103 | in this case: for example, we write $(\cookie{hello}, x, y, z)$ rather than | |
2104 | $\bigl(\cookie{hello}, (x, y, z)\bigr)$. | |
2105 | ||
2106 | \subsubsection{The protocol} | |
2107 | Our protocol is represented by three functions, shown in | |
2108 | figure~\ref{fig:wkx-formal}. | |
2109 | \begin{itemize} | |
2110 | \item $\id{init}(n)$ is the initialization function, as described in | |
2111 | section~\ref{sec:um}. It outputs a pair $(\mathbf{p}, \mathbf{i})$, where | |
2112 | $\mathbf{i}[i]$ is the private key of party~$P_i$ and $\mathbf{p}[i]$ is | |
2113 | the corresponding public key. Only $P_i$ is given $\mathbf{i}[i]$, whereas | |
2114 | all parties and the adversary are given $\mathbf{p}$. | |
2115 | \item $\id{new-session}^{H_I(\cdot, \cdot, \cdot, \cdot), H_K(\cdot)} | |
2116 | (\mathbf{p}, x, i, j, s)$ is the new-session function. This is executed by | |
2117 | party~$P_i$ when the adversary decides to create a new session~$S = (P_i, | |
2118 | P_j, s)$. It is also given the relevant outputs of $\id{init}$, and | |
2119 | allowed access to the random oracles $H_I$ and $H_K$. | |
2120 | \item $\id{message}^{H_I(\cdot, \cdot, \cdot, \cdot), H_K(\cdot)} (\tau, | |
2121 | \mu)$ is the incoming-message function. This is executed by a session when | |
2122 | the adversary decides to deliver a message $(\tau, \mu)$ to it. It makes | |
2123 | use of the subsidiary functions $\id{msg-challenge}$ and | |
2124 | $\id{msg-response}$ to handle the messages. | |
2125 | \end{itemize} | |
2126 | We observe that the protocol never aborts. We could make it do so if it | |
2127 | receives an invalid message, but we prefer to ignore invalid messages for the | |
2128 | sake of robustness.\footnote{% | |
2129 | Note that this protocol would therefore require modification before it was | |
2130 | acceptable in the simulation-based model of \cite{Shoup:1999:OFM}. There | |
2131 | it is required that a key-exchange protocol terminate after a | |
2132 | polynomially-bounded number of messages are delivered to it.} | |
2133 | ||
2134 | \begin{figure} | |
2135 | \begin{program} | |
2136 | Function $\id{init}(n)$: \+ \\ | |
2137 | \FOR $i \in \Nupto{n}$ \DO \\ \ind | |
2138 | $x \getsr \Nupto{|G|}$; \\ | |
2139 | $\mathbf{i}[i] \gets x$; \\ | |
2140 | $\mathbf{p}[i] \gets x P$; \- \\ | |
2141 | \RETURN $(\mathbf{p}, \mathbf{i})$; | |
2142 | \- \\[\medskipamount] | |
2143 | Function $\id{new-session}^{H_I(\cdot, \cdot, \cdot, \cdot), H_K(\cdot)} | |
2144 | (\mathbf{p}, x, i, j, s)$: \+ \\ | |
2145 | $X \gets \mathbf{p}[i]$; | |
2146 | $X' \gets \mathbf{p}[j]$; | |
2147 | $C \gets \emptyset$; \\ | |
2148 | $r \getsr \Nupto{|G|}$; | |
2149 | $R \gets r P$; | |
2150 | $Y \gets r X'$; \\ | |
2151 | $h \gets H_I(X, s, R, Y)$; | |
2152 | $c \gets r \xor h$; \\ | |
2153 | \SEND $(\cookie{challenge}, R, c)$; | |
2154 | \- \\[\medskipamount] | |
2155 | Function $\id{message}^{H_I(\cdot, \cdot, \cdot, \cdot), H_K(\cdot)} | |
2156 | (\tau, \mu)$: \+ \\ | |
2157 | \IF $\tau = \cookie{challenge}$ \THEN $\id{msg-challenge}(\mu)$; \\ | |
2158 | \ELSE \IF $\tau = \cookie{response}$ \THEN $\id{msg-response}(\mu)$; | |
2159 | \next | |
2160 | Function $\id{msg-challenge}(\mu)$: \+ \\ | |
2161 | $(R', c') \gets \mu$; \\ | |
2162 | $Y' \gets x R'$; \\ | |
2163 | $h' \gets H_I(X', s, R', Y')$; \\ | |
2164 | $r' \gets c' \xor h'$; \\ | |
2165 | \IF $R' \ne r' P$ \THEN \RETURN; \\ | |
2166 | $C \gets C \cup \{R\}$; \\ | |
2167 | $Z \gets r R'$; \\ | |
2168 | $(K_0, K_1) \gets H_K(Z)$; \\ | |
2169 | $\chi \gets E_{K_0}(Y')$; \\ | |
2170 | \SEND $(\cookie{response}, R, \chi)$; | |
2171 | \- \\[\medskipamount] | |
2172 | Function $\id{msg-response}(\mu)$: \+ \\ | |
2173 | $(R', \chi') \gets \mu$; \\ | |
2174 | \IF $R' \notin C$ \THEN \RETURN; \\ | |
2175 | $Z \gets r R'$; \\ | |
2176 | $(K_0, K_1) \gets H_K(Z)$; \\ | |
2177 | $Y' \gets D_{K_0}(\chi')$; \\ | |
2178 | \IF $Y' \ne Y$ \THEN \RETURN; \\ | |
2179 | \OUTPUT $K_1$; | |
2180 | \STOP; | |
2181 | \end{program} | |
2182 | ||
2183 | \caption{Formalization of $\Wkx$} | |
2184 | \label{fig:wkx-formal} | |
2185 | \end{figure} | |
2186 | ||
2187 | \subsubsection{Session states} | |
2188 | We must specify what the adversary obtains when it chooses to reveal a | |
2189 | session's state. Given the program in figure~\ref{fig:wkx-formal}, we can | |
2190 | see that the session state consists of the variables $(x, X, X', r, R, Y, | |
2191 | C)$. | |
2192 | ||
2193 | However, $x$ is the owning party's long-term secret, and it seems | |
2194 | unreasonable to disclose this to an adversary who stops short of total | |
2195 | corruption. | |
2196 | ||
2197 | The public keys $X$ and $X'$ are part of the adversary's input anyway, so | |
2198 | revealing them doesn't help. Similarly, the set $C$ of valid challenges | |
2199 | could have been computed easily by the adversary, since a group element $R' | |
2200 | \in C$ if and only if the session $S$ responded to some message | |
2201 | $(\cookie{challenge}, R', c')$. | |
2202 | ||
2203 | The value $R = r P$ is easily computed given $r$, and besides is sent in the | |
2204 | clear in the session's first message. The expected response $Y = r X'$ is | |
2205 | also easily computed from $r$. The converse is also true, since $r$ can be | |
2206 | recovered from $R$ and $c$ in the session's challenge message and the value | |
2207 | $Y$. Besides, $r$ is necessary for computing $Z$ in response to incoming | |
2208 | challenges. | |
2209 | ||
2210 | We conclude that the only `interesting' session state is $r$. | |
2211 | ||
2212 | \subsubsection{Security} | |
2213 | Having formally presented the protocol, we can now state our main theorem | |
2214 | about its security. The proof is given in appendix~\ref{sec:sk-proof}. | |
2215 | \begin{theorem}[SK-security of $\Wkx$] | |
2216 | \label{thm:sk} | |
2217 | Let $G$ be a cyclic group. Let $\E = (\kappa, E, D)$ be a symmetric | |
2218 | encryption scheme. Then | |
2219 | \begin{spliteqn*} | |
2220 | \InSec{sk}(\Wkx^{G, \E}; t, n, q_S, q_M, q_I, q_K) \le | |
2221 | \frac{n (n - 1)}{|G|} + | |
2222 | \frac{2 q_M}{2^{\ell_I}} + {}\\ | |
2223 | 2 q_S \bigl( \InSec{mcdh}(G; t', q_K) + | |
2224 | n \cdot \InSec{mcdh}(G; t', q_M + q_I) + | |
2225 | \InSec{ind-cca}(\E; t', q_M, q_M) \bigr) | |
2226 | \end{spliteqn*} | |
2227 | where $t' = t + O(n) + O(q_S) + O(q_M q_I) + O(q_K)$. | |
2228 | \end{theorem} | |
2229 | ||
2230 | ||
2231 | \subsection{Insecure protocol variants} | |
2232 | \label{sec:kx-insecure} | |
2233 | ||
2234 | It's important to feed the session-id and verifier's public key to the random | |
2235 | oracle $H_I$ when constructing the check-value~$c$. Without these, the | |
2236 | protocol is vulnerable to attack. In this section, we consider some variants | |
2237 | of our protocol which hash less information, and show attacks against them. | |
2238 | ||
2239 | To simplify the presentation, we shall consider Alice and Bob, and a third | |
2240 | character Carol. We shall be attacking a pair of matching sessions $A$ | |
2241 | and~$B$, run by Alice and Bob respectively. Let Alice and Bob's private keys | |
2242 | be $x_A$ and~$x_B$, and let their public keys be $X_A = x_A P$ and $X_B = x_B | |
2243 | P$ respectively. | |
2244 | ||
2245 | \subsubsection{Protocol diagram notation} | |
2246 | In order to keep the presentation as clear as possible, we use a simple | |
2247 | diagrammatic notation for describing protocol runs. A line of the form | |
2248 | \protocolrun{\textit{action} \ar[r] & \PRsession{S} & \textit{result}} | |
2249 | states that the adversary performs the given \textit{action} on session~$S$, | |
2250 | with the stated \textit{result}. The \textit{action} may be | |
2251 | \begin{itemize} | |
2252 | \item \textsf{Create session $(P_i, P_j, s)$}: the session is created, | |
2253 | running in party~$P_i$, with partner~$P_j$ and session-id~$s$. | |
2254 | \item \textsf{Receive $\mu$}: the session is activated with an incoming message~$\mu$. | |
2255 | \item \textsf{Session-state reveal}: The adversary requests the session's | |
2256 | internal state. | |
2257 | \end{itemize} | |
2258 | The \textit{result} may be | |
2259 | \begin{itemize} | |
2260 | \item \textsf{Send $\mu'$}: the session requests the delivery of the | |
2261 | message~$\mu'$. | |
2262 | \item \textsf{Complete: $K$}: the session completes, outputting the key~$K$. | |
2263 | \item \textsf{State: $\sigma$}: the session's state is revealed to | |
2264 | be~$\sigma$. | |
2265 | \item \textsf{(Ignore)}: the result of the action is unimportant. | |
2266 | \end{itemize} | |
2267 | ||
2268 | \subsubsection{Omitting the session-id} | |
2269 | Consider a protocol variant where session $S$ sets $h_S = H_I(X_N, R_S, | |
2270 | Y_S)$, where $N$ is the session's partner. That is, we've omitted the | |
2271 | session-id from the hash. An adversary can cross over two sessions between | |
2272 | Alice and Bob. Here's how. | |
2273 | ||
2274 | The attack assumes that Alice and Bob set up two pairs of matching sessions | |
2275 | with each other, thus. | |
2276 | \protocolrun{ | |
2277 | \PRcreate{Alice}{Bob}{s} & \PRsession{A} & | |
2278 | \PRsend{challenge}{R_A, c_A} \\ | |
2279 | \PRcreate{Bob}{Alice}{s} & \PRsession{B} & | |
2280 | \PRsend{challenge}{R_B, c_B} \\ | |
2281 | \PRcreate{Alice}{Bob}{s'} & \PRsession{A'} & | |
2282 | \PRsend{challenge}{R_{A'}, c_{A'}} \\ | |
2283 | \PRcreate{Bob}{Alice}{s'} & \PRsession{B'} & | |
2284 | \PRsend{challenge}{R_{B'}, c_{B'}} | |
2285 | } | |
2286 | Observe that the session pairs use distinct session-ids $s \ne s'$, so this | |
2287 | is allowed. Now the adversary crosses over the challenges, using the second | |
2288 | pair of sessions to provide responses to the challenges issued by the first | |
2289 | pair. By revealing the state in the second pair of sessions, the adversary | |
2290 | can work out the (probably different) session keys accepted by the first | |
2291 | pair. | |
2292 | \protocolrun{ | |
2293 | \PRreceive{challenge}{R_B, c_B} & \PRsession{A'} & | |
2294 | \PRsend{response}{R_{A'}, E_{K_{A'B,0}}(x_A R_B)} \\ | |
2295 | \PRreceive{challenge}{R_A, c_A} & \PRsession{B'} & | |
2296 | \PRsend{response}{R_{B'}, E_{K_{B'A,0}}(x_B R_A)} \\ | |
2297 | \PRreceive{challenge}{R_{A'}, c_{A'}} & \PRsession{A} & \PRignore \\ | |
2298 | \PRreceive{challenge}{R_{B'}, c_{B'}} & \PRsession{B} & \PRignore \\ | |
2299 | \PRreveal & \PRsession{A'} & r_{A'} \\ | |
2300 | \PRreveal & \PRsession{B'} & r_{B'} \\ | |
2301 | \PRreceive{response}{R_{B'}, E_{K_{B'A,0}}(x_B R_A)} & \PRsession{A} & | |
2302 | \PRcomplete{K_{AB',1}} \\ | |
2303 | \PRreceive{response}{R_{A'}, E_{K_{A'B,0}}(x_A R_B)} & \PRsession{B} & | |
2304 | \PRcomplete{K_{BA',1}} \\ | |
2305 | } | |
2306 | The adversary can now compute $K_{AB'} = H_K(r_{B'} R_A)$ and $K_{B'A} = | |
2307 | H_K(r_{A'} R_B)$. Safely in possession of both keys, the adversary can now | |
2308 | read and impersonate freely. | |
2309 | ||
2310 | \subsubsection{Omitting the partner's public key} | |
2311 | Now consider a protocol variant where session $S$ sets $h_S = H_I(s, R_S, | |
2312 | Y_S)$, where $s$ is the session-id. An adversary can use a sessions with | |
2313 | Carol to attack a session between Alice and Bob. Here's how the sessions are | |
2314 | set up. | |
2315 | \protocolrun{ | |
2316 | \PRcreate{Alice}{Bob}{s} & \PRsession{A} & | |
2317 | \PRsend{challenge}{R_A, c_A} \\ | |
2318 | \PRcreate{Bob}{Alice}{s} & \PRsession{B} & | |
2319 | \PRsend{challenge}{R_B, c_B} \\ | |
2320 | \PRcreate{Alice}{Carol}{s} & \PRsession{A'} & | |
2321 | \PRsend{challenge}{R_{A'}, c_{A'}} \\ | |
2322 | \PRcreate{Bob}{Carol}{s} & \PRsession{B'} & | |
2323 | \PRsend{challenge}{R_{B'}, c_{B'}} | |
2324 | } | |
2325 | Although each of Alice and Bob have two sessions with session-id~$s$, this is | |
2326 | allowed, since they are with different partners. The rest of the attack in | |
2327 | fact proceeds identically to the previous case. | |
2328 | ||
2329 | ||
2330 | \subsection{Deniability} | |
2331 | \label{sec:denial} | |
2332 | ||
2333 | We have claimed that the Wrestlers key-exchange protocol is \emph{deniable}. | |
2334 | In this section, we define what we mean, explain the limits of the | |
2335 | deniablility of the protocol as currently presented, fix the protocol with an | |
2336 | additional pass (which can be collapsed to a single message flow by breaking | |
2337 | the protocol's symmetry), and prove the deniability of the resulting | |
2338 | protocol. | |
2339 | ||
2340 | Our notion of deniability is taken from Di~Raimondo, Gennaro and Krawczyk | |
2341 | \cite{DiRaimondo:2006:DAK}, except that, as usual, we opt for a concrete | |
2342 | security approach. | |
2343 | ||
2344 | \subsubsection{Discussion} | |
2345 | Our definition for deniability is that, for any adversary interacting with | |
2346 | participants in the protocol, a simulator exists which can compute the same | |
2347 | things as the adversary. In particular, since an adversary could output a | |
2348 | transcript of the interactions between itself and the parties, it would | |
2349 | follow that a simulator could do this too. If the simulator is effective, | |
2350 | its output is indistinguishable from that of the real adversary, and hence no | |
2351 | `judge' (distinguisher) should be persuaded by evidence presented by someone | |
2352 | who claims to have witnessed or participated in an interaction. | |
2353 | ||
2354 | We work again the model described in~\ref{sec:um}. That is, our adversary | |
2355 | has complete control over the ordering and delivery of all messages. The | |
2356 | adversary is also able, at any time, to reveal the state of any session. | |
2357 | However, deniability is obviously impossible against an adversary who can | |
2358 | \emph{corrupt} other parties, since simulating such an adversary's actions | |
2359 | would necessarily require the simulator to compute private keys corresponding | |
2360 | to the known public keys, and this is (we believe) difficult, because an | |
2361 | efficient algorithm for doing this could easily attack our protocol, which we | |
2362 | already proved secure. Therefore, we forbid the adversary from corrupting | |
2363 | parties. | |
2364 | ||
2365 | In order to allow the adversary to participate in the protocol, rather than | |
2366 | merely observing it, we need to give it one or more private keys. We could | |
2367 | modify the initialization function \id{init} from figure~\ref{fig:wkx-formal} | |
2368 | to give the adversary a private key, but there's an easier way: we can just | |
2369 | give the adversary a number of private keys in its auxiliary input. | |
2370 | ||
2371 | \subsubsection{Definitions} | |
2372 | Let $\Pi$ be a key-exchange protocol, in the model described in | |
2373 | section~\ref{sec:um}. We use the simulation framework of | |
2374 | section~\ref{sec:sim}. We define the initialization function $I_\Pi$ to be | |
2375 | the initialization function of $\Pi$, as before, and the corresponding | |
2376 | world~$W_\Pi(\iota, \sigma, \tau, \mu)$ is a fairly straightforward mapping | |
2377 | of the adversary's possible actions to the simulation model: | |
2378 | \begin{itemize} | |
2379 | \item The invocation $\cookie{new-session}$ with $\mu = (i, j, s)$ creates a | |
2380 | new session on party~$P_i$, with partner~$P_j$ and session-id~$s$. The | |
2381 | reply $\rho = (\delta, m)$ is a \emph{decision} $\delta \in | |
2382 | \{\cookie{continue}, \cookie{abort}, \cookie{complete}\}$ and an output | |
2383 | message $m \in \Bin^* \cup \{\bot\}$. If $m \ne \bot$ then $m$ is a | |
2384 | message to be sent to the matching session (if any). | |
2385 | \item The invocation $\cookie{deliver}$ with $\mu = (i, j, s, m)$ delivers | |
2386 | message $m$ to the session $S = (P_i, P_j, s)$. The response $\rho$ is as | |
2387 | for $\cookie{new-session}$ invocations. | |
2388 | \item The invocation $\cookie{reveal-session-state}$ with $\mu = (i, j, s)$ | |
2389 | reveals to the adversary the state of the running session $S = (P_i, P_j, | |
2390 | s)$. The response $\rho$ is the session's state if $S$ is indeed a running | |
2391 | session, or $\bot$ otherwise. | |
2392 | \item The invocation $\cookie{reveal-session-key}$ with $\mu = (i, j, s)$ | |
2393 | reveals to the adversary the session-key of the completed session~$S = | |
2394 | (P_i, P_j, s)$. The response $\rho$ is the session key~$K$ if the session | |
2395 | is indeed complete, or $\bot$ otherwise. | |
2396 | \end{itemize} | |
2397 | There are no invocations corresponding to the adversary actions of corrupting | |
2398 | parties (since deniability against an corrupting adversary is impossible, as | |
2399 | discussed earlier), or session expiry or challenging (since they are useless | |
2400 | in this context). | |
2401 | ||
2402 | We measure the deniability of a protocol~$\Pi$, using a given simulator~$S$, | |
2403 | by the insecurity function $\InSec{sim}(W_\Pi, I_\Pi, S; t_D, t_A, | |
2404 | \mathcal{Q}_D, \mathcal{Q}_A, \mathcal{R}, \mathcal{U})$ of | |
2405 | definition~\ref{def:sim}. The interaction bounds $\mathcal{R} = (q_S, q_M)$ | |
2406 | we place on the adversary are on the number ($q_S$) of \cookie{new-session} | |
2407 | and ($q_M$) \cookie{deliver} invocations it makes. | |
2408 | ||
2409 | We shall (informally) say that a protocol~$\Pi$ is deniable if there is a | |
2410 | simulator~$S_\Pi$ for which the insecurity function is small for appropriate | |
2411 | resource bounds on the adversary and distinguisher. | |
2412 | ||
2413 | \subsubsection{The current protocol} | |
2414 | As it stands, $\Wkx$ isn't deniable, according to our definition, for | |
2415 | arbitrary auxiliary inputs. Let's see why. | |
2416 | ||
2417 | Suppose that Bob is an informant for the secret police, and wants to convince | |
2418 | a judge that Alice is involved in subversive activities in cyberspace. | |
2419 | Unfortunately, Bob's job is difficult, because of the strong zero-knowledge | |
2420 | nature of the Wrestlers identification protocol. However, Bob can work with | |
2421 | the judge to bring him the evidence necessary to convict Alice. Here's how. | |
2422 | ||
2423 | Alice's public key is $A$, and Bob's public key is $B$. The judge chooses | |
2424 | some session-id $s$, and $r \inr \Nupto{q}$. He computes $R = r P$ and $c = | |
2425 | r \xor H_I(B, s, R, r A)$, and gives Bob the triple $(s, R, c)$, keeping $r$ | |
2426 | secret. Bob can now persuade Alice to enter into a key-exchange with him, | |
2427 | with session-id $s$. He uses $(R, c)$ as his challenge message. When Alice | |
2428 | sends back her response $(R', \chi)$ (because Bob's challenge is correctly | |
2429 | formed), Bob aborts and shows $(R', \chi)$ to the judge. The judge knows $r$ | |
2430 | and can therefore decrypt $\chi$ and check the response. If it's wrong, then | |
2431 | Bob was cheating and gets demoted -- he can't get the right answer by himself | |
2432 | because that would require him to impersonate Alice. If it's right, Alice is | |
2433 | really a subversive element and `disappears' in the night. | |
2434 | ||
2435 | We shall show in theorem~\ref{thm:denial} below that this is basically the | |
2436 | only attack against the deniability of the protocol. However, we can do | |
2437 | better. | |
2438 | ||
2439 | \subsubsection{Fixing deniability} | |
2440 | We can fix the protocol to remove even the attack discussed above. The | |
2441 | change is simple: we feed \emph{both} parties' challenges to the hash | |
2442 | function~$H_I$ rather than just the sender's. We use a five-argument hash | |
2443 | function (random oracle) $H_I\colon G^2 \times \Bin^{\ell_S} \times G^2 \to | |
2444 | \Bin^{\ell_I}$. We introduce a new message pass at the beginning of the | |
2445 | protocol: each session simply sends its challenge point $R = r P$ in the | |
2446 | clear as a `pre-challenge'. The actual challenge is $R$ and $c = r \xor | |
2447 | H_I(X, R', s, R, c)$, where $R'$ is the challenge of the matching session. | |
2448 | ||
2449 | By breaking symmetry, we can reduce the communication complexity of this | |
2450 | variant to four messages. As before, we analyse the symmetrical version. | |
2451 | The extra flow might seem a high price to pay, but we shall see that it has | |
2452 | additional benefits beyond deniability. | |
2453 | ||
2454 | A summary of the new protocol is shown in figure~\ref{fig:wdkx}, and the | |
2455 | formal description is shown in figure~\ref{fig:wdkx-formal}. | |
2456 | ||
2457 | \begin{figure} | |
2458 | \begin{description} | |
2459 | \item[Setup] Group $G = \langle P \rangle$; $|G| = q$ is prime. | |
2460 | $H_I(\cdot, \cdot, \cdot, \cdot, \cdot)$ and $H_K(cdot)$ are secure | |
2461 | hashes. $\E = (\kappa, E, D)$ is an IND-CCA2 symmetric encryption | |
2462 | scheme. | |
2463 | \item[Parties] $U_i$ for $0 \le i < n$. | |
2464 | \item[Private keys] $x_i \inr \Nupto{q}$. | |
2465 | \item[Public keys] $X_i = x_i P$. | |
2466 | \end{description} | |
2467 | \[ \begin{graph} | |
2468 | !{0; <8cm, 0cm>: <0cm, 3cm>::} | |
2469 | *+[F]\dbox{$r_i \getsr I$; $R_i \gets r_i P$} ="i-1" | |
2470 | [d] | |
2471 | *+[F]\dbox{$c_i \gets r_i \xor H_I(R_j, X_i, s, R_i, r_i X_j)$} ="i0" | |
2472 | [d] | |
2473 | *+[F]\dbox{Check $R_j = \bigl(c_j \xor H_I(x_i R_j)\bigr) P$ \\ | |
2474 | $Z \gets r_i R_j$; $K \gets H_K(0, Z)$ \\ | |
2475 | $\chi_i \gets E_K(x_i R_j)$} ="i1" | |
2476 | [d] | |
2477 | *+[F]\dbox{Check $D_K(\chi_j) = r_i X_j$ \\ | |
2478 | Shared key is $H_K(1, Z)$} ="i2" | |
2479 | "i-1" [r] | |
2480 | *+[F]\dbox{$r_j \getsr I$; $R_j \gets r_j P$} ="j-1" | |
2481 | [d] | |
2482 | *+[F]\dbox{$c_j \gets r_j \xor H_I(R_i, X_j, s, R_j, r_j X_i)$} ="j0" | |
2483 | [d] | |
2484 | *+[F]\dbox{Check $R_i = \bigl(c_i \xor H_I(x_j R_i)\bigr) P$ \\ | |
2485 | $Z \gets r_j R_i$; $K \gets H_K(0, Z)$ \\ | |
2486 | $\chi_j \gets E_K(x_j R_i)$} ="j1" | |
2487 | [d] | |
2488 | *+[F]\dbox{Check $D_K(\chi_i) = r_j X_i$ \\ | |
2489 | Shared key is $H_K(1, Z)$} ="j2" | |
2490 | % | |
2491 | "i-1" : |(0)/3.25cm/*+{R_i} "j0" | |
2492 | "i0" : |(0)/3.25cm/*+{(R_i, c_i)} "j1" | |
2493 | "i1" : |(0)/3.25cm/*+{(R_i, \chi_i)} "j2" | |
2494 | "j-1" : |(0)/3.25cm/*+{R_j} "i0" | |
2495 | "j0" : |(0)/3.25cm/*+{(R_j, c_j)} "i1" | |
2496 | "j1" : |(0)/3.25cm/*+{(R_j, \chi_j)} "i2" | |
2497 | \end{graph} \] | |
2498 | ||
2499 | \caption{Summary of the Deniable Wrestlers Key Exchange protocol, $\Wdkx$} | |
2500 | \label{fig:wdkx} | |
2501 | \end{figure} | |
2502 | ||
2503 | \begin{figure} | |
2504 | \begin{program} | |
2505 | Function $\id{init}(n)$: \+ \\ | |
2506 | \FOR $i \in \Nupto{n}$ \DO \\ \ind | |
2507 | $x \getsr \Nupto{|G|}$; \\ | |
2508 | $\mathbf{i}[i] \gets x$; \\ | |
2509 | $\mathbf{p}[i] \gets x P$; \- \\ | |
2510 | \RETURN $(\mathbf{p}, \mathbf{i})$; | |
2511 | \- \\[\medskipamount] | |
2512 | Function $\id{new-session}^{H_I(\cdot, \cdot, \cdot, \cdot, \cdot), H_K(\cdot)} | |
2513 | (\mathbf{p}, x, i, j, s)$: \+ \\ | |
2514 | $X \gets \mathbf{p}[i]$; | |
2515 | $X' \gets \mathbf{p}[j]$; | |
2516 | $C \gets \emptyset$; \\ | |
2517 | $r \getsr \Nupto{|G|}$; | |
2518 | $R \gets r P$; | |
2519 | $Y \gets r X'$; \\ | |
2520 | \SEND $(\cookie{pre-challange}, R)$; | |
2521 | \- \\[\medskipamount] | |
2522 | Function $\id{message}^{H_I(\cdot, \cdot, \cdot, \cdot, \cdot), H_K(\cdot)} | |
2523 | (\tau, \mu)$: \+ \\ | |
2524 | \IF $\tau = \cookie{pre-challenge}$ \THEN | |
2525 | $\id{msg-pre-challenge}(\mu)$; \\ | |
2526 | \ELSE \IF $\tau = \cookie{challenge}$ \THEN | |
2527 | $\id{msg-challenge}(\mu)$; \\ | |
2528 | \ELSE \IF $\tau = \cookie{response}$ \THEN $\id{msg-response}(\mu)$; | |
2529 | \next | |
2530 | Function $\id{msg-pre-challenge}(\mu)$: \+ \\ | |
2531 | $R' \gets \mu$; \\ | |
2532 | $h \gets H_I(R', X, s, R, c)$; \\ | |
2533 | $c \gets r \xor h$; \\ | |
2534 | \SEND $(\id{msg-challenge}, R, c)$; | |
2535 | \- \\[\medskipamount] | |
2536 | Function $\id{msg-challenge}(\mu)$: \+ \\ | |
2537 | $(R', c') \gets \mu$; \\ | |
2538 | $Y' \gets x R'$; \\ | |
2539 | $h' \gets H_I(R, X', s, R', Y')$; \\ | |
2540 | $r' \gets c' \xor h'$; \\ | |
2541 | \IF $R' \ne r' P$ \THEN \RETURN; \\ | |
2542 | $C \gets C \cup \{R\}$; \\ | |
2543 | $Z \gets r R'$; \\ | |
2544 | $(K_0, K_1) \gets H_K(Z)$; \\ | |
2545 | $\chi \gets E_{K_0}(Y')$; \\ | |
2546 | \SEND $(\cookie{response}, R, \chi)$; | |
2547 | \- \\[\medskipamount] | |
2548 | Function $\id{msg-response}(\mu)$: \+ \\ | |
2549 | $(R', \chi') \gets \mu$; \\ | |
2550 | \IF $R' \notin C$ \THEN \RETURN; \\ | |
2551 | $Z \gets r R'$; \\ | |
2552 | $(K_0, K_1) \gets H_K(Z)$; \\ | |
2553 | $Y' \gets D_{K_0}(\chi')$; \\ | |
2554 | \IF $Y' \ne Y$ \THEN \RETURN; \\ | |
2555 | \OUTPUT $K_1$; | |
2556 | \STOP; | |
2557 | \end{program} | |
2558 | ||
2559 | \caption{Deniable key-exchange: formalization of $\Wdkx$} | |
2560 | \label{fig:wdkx-formal} | |
2561 | \end{figure} | |
2562 | ||
2563 | The security of this variant is given by the following theorem, whose proof | |
2564 | is in appendix~\ref{sec:sk2-proof}. | |
2565 | \begin{theorem}[SK-security of $\Wdkx$] | |
2566 | \label{thm:sk2} | |
2567 | Let $G$ be a cyclic group. Let $\E = (\kappa, E, D)$ be a symmetric | |
2568 | encryption scheme. Then | |
2569 | \[ \InSec{sk}(\Wdkx^{G, \E}; t, n, q_S, q_M, q_I, q_K) = | |
2570 | \InSec{sk}(\Wkx^{G, \E}; t, n, q_S, q_M, q_I, q_K) | |
2571 | \] | |
2572 | \end{theorem} | |
2573 | ||
2574 | \subsubsection{Deniability of the Wrestlers protocols} | |
2575 | In order to quantify the level of deniability our protocols provide, we shall | |
2576 | impose a limit on the auxiliary input to the adversary. In particular, we | |
2577 | shall use $\mathcal{U}$ of definition~\ref{def:sim} to count the number of | |
2578 | \emph{challenges} in the auxiliary input. That is, $\mathcal{U} = n_C$ is | |
2579 | the number of tuples $(i, j, s, R', R, c)$ for which there is an $r$ such | |
2580 | that $R = r P$ and $c = r \xor H_I(R', X_j, s, R, r X_i)$ (or without the | |
2581 | $R'$ for $\Wkx$). | |
2582 | ||
2583 | With this restriction in place, we can state the following theorem about the | |
2584 | deniability of our protocols. | |
2585 | \begin{theorem}[Deniability of $\Wkx$ and $\Wdkx$] | |
2586 | \label{thm:denial} | |
2587 | There exist simulators $S_\Wkx$ and $\Wdkx$ such that | |
2588 | \[ \InSec{sim}(W_{\Wkx^{G, \E}}, I_{\Wkx^{G, \E}}, S_{\Wkx^{G, \E}}; | |
2589 | t_D, t_A, \mathcal{Q}_D, \mathcal{Q}_A, (q_S, q_M), 0) \le | |
2590 | \frac{q_M}{2^{\ell_I}} | |
2591 | \] | |
2592 | and | |
2593 | \[ \InSec{sim}(W_{\Wdkx^{G, \E}}, I_{\Wdkx^{G, \E}}, S_{\Wdkx^{G, \E}}; | |
2594 | t_D, t_A, \mathcal{Q}_D, \mathcal{Q}_A, (q_S, q_M), n_C) \le | |
2595 | \frac{n_C q_S}{|G|} + | |
2596 | \frac{q_M}{2^{\ell_I}}. | |
2597 | \] | |
2598 | The running time of the simulators is $O(t_A) + O(\mathcal{Q}_A q_M)$. | |
2599 | \end{theorem} | |
2600 | \begin{proof} | |
2601 | The simulators $S_\Wkx$ and $S_\Wdkx$ are very similar. We describe both | |
2602 | here. Both are fake-world simulators, working as follows. | |
2603 | \begin{enumerate} | |
2604 | \item Initially, it constructs simulated parties $P_i$, for $0 \le i < n$, | |
2605 | giving each the public key $X_i$ from the common input. | |
2606 | \item Suppose the adversary requests creation of a new session $S = (P_i, | |
2607 | P_j, s)$. Then the simulator creates a new session, including a random | |
2608 | value $r_S \inr \Nupto{|G|}$, and computes $R_S = r_S P$, and $Y_S = r_S | |
2609 | X_j$. For $\Wdkx$, it sends the message $(\cookie{pre-challenge}, R_S)$; | |
2610 | for $\Wkx$, it additionally computes $h = H_I(X_i, s, R_S, Y_S)$ and | |
2611 | sends $(\cookie{challenge}, R_S, r_S \xor h)$. | |
2612 | \item Suppose, for $\Wdkx$, the adversary sends a message | |
2613 | $(\cookie{pre-challenge}, R')$ to a session~$S = (P_i, P_j, s)$. The | |
2614 | simulator computes $h = H_I(R', X_i, s, R_S, Y_S)$, and sends | |
2615 | $(\cookie{challenge}, R_S, r_S \xor h)$. | |
2616 | \item Suppose the adversary sends a message $(\cookie{challenge}, R', c')$ | |
2617 | to session $S = (P_i, P_j, s)$. The simulator doesn't know $x_i$. | |
2618 | \begin{enumerate} | |
2619 | \item If $R' = R_T$ for some other simulated session $T$, then the | |
2620 | simulator knows $r_T$ such that $R_T = r_T P$. Let $Y' = r_T X_i$. | |
2621 | The simulator computes $h = H_I(X_j, s, R', Y')$ (resp.\ $h = H_I(R_S, | |
2622 | X_j, s, R', Y')$) for $\Wkx$ (resp.\ $\Wdkx$) and checks that $r_T = c' | |
2623 | \xor h$. If not, the simulator discards the message. Otherwise, it | |
2624 | computes $(K_0, K_1) = H_K(r_S R')$, and sends the message | |
2625 | $(\cookie{response}, R, E_{K_0}(Y'))$. | |
2626 | \item \label{en:simextract} Otherwise the simulator runs the extractor | |
2627 | $T_\Wident$ on the adversary's history of queries $H_I(X_j, s, R', | |
2628 | \cdot)$ (resp.\ $H_I(R_S, X_j, s, R', \cdot)$) for $\Wkx$ (resp.\ | |
2629 | $\Wdkx$). The extractor returns $(r', Y')$. If $Y' = \bot$ then the | |
2630 | simulator ignores the message. Otherwise, the simulator computes | |
2631 | $(K_0, K_1) = H_K(r R')$ and sends back $(\cookie{response}, R, | |
2632 | E_{K_0}(Y'))$. | |
2633 | \end{enumerate} | |
2634 | \item Suppose the adversary sends a message $(\cookie{response}, R', \chi)$ | |
2635 | to session $S = (P_i, P_j, s)$. The simulator computes $(K_0, K_1) = | |
2636 | H_K(r_S R')$, and decrypts $Y' = D_{K_0}(\chi)$. If $Y' \ne Y_S$ then | |
2637 | the simulator discards the message. Otherwise, it makes the simulated | |
2638 | session complete, and outputs key $K_1$. | |
2639 | \item Finally, if the adversary reveals a session's state, the simulator | |
2640 | reveals $r_S$ as required; if the adversary reveals a session-key, the | |
2641 | simulator reveals the $K_1$ it output. | |
2642 | \end{enumerate} | |
2643 | The only point where the simulation fails to be perfect is in | |
2644 | \ref{en:simextract}. Let $R'$ and $c'$ be the values from an incoming | |
2645 | challenge message to session $S = (P_i, P_j, s)$. Let $r'$ be such that | |
2646 | $R' = r' P$ and let $Y' = r' X_i$. If a random-oracle query $H_I(X_j, s, | |
2647 | R', Y')$ (or $H_I(R_S, X_j, s, R', Y')$ for $\Wdkx$) has been issued, then | |
2648 | there are a number of possibilities. Let $h'$ be the result of this query. | |
2649 | \begin{itemize} | |
2650 | \item The adversary made this query. Then the extractor will find it and | |
2651 | return $Y'$ if $c' = h' \xor r'$, or $\bot$ otherwise. | |
2652 | \item Some simulated session $U = (P_{i'}, P_{j'}, s')$ made this query. | |
2653 | But simulated sessions only make $H_I$-queries when constructing | |
2654 | challenges, so $R' = R_U$ for some session~$U$. But the simulator does | |
2655 | something different in that case. | |
2656 | \item In $\Wdkx$, the quadruple $(s, R_S, R', c')$ came from the | |
2657 | adversary's auxiliary input. In this case the simulator must fail. But | |
2658 | $R_S = r_S P$, and $r_S$ was chosen uniformly at random. If there are at | |
2659 | most $n_C$ challenge sets in the auxiliary input then this happens with | |
2660 | probability at most $n_C/|G|$ for any given session. | |
2661 | \end{itemize} | |
2662 | We conclude that the simulator fails with probability | |
2663 | \[ \frac{q_M}{2^{\ell_I}} + \frac{q_S n_C}{|G|}. \] | |
2664 | (Note that we only consider $n_C = 0$ for $\Wkx$.) No adversary can | |
2665 | distinguish the simulator from a real interaction unless the simulator | |
2666 | fails, and the simulator is a fake-world simulator. We therefore apply | |
2667 | proposition~\ref{prop:fakesim}; the theorem follows. | |
2668 | \end{proof} | |
2669 | ||
2670 | ||
2671 | \subsection{Practical issues} | |
2672 | \label{sec:practice} | |
2673 | ||
2674 | \subsubsection{Denial of service from spoofers} | |
2675 | The adversary we considered in~\ref{sec:um} is very powerful. Proving | |
2676 | security against such a powerful adversary is good and useful. However, | |
2677 | there are other useful security properties we might like against weaker | |
2678 | adversaries. | |
2679 | ||
2680 | Eavesdropping on the Internet is actually nontrivial. One needs control of | |
2681 | one of the intermediate routers between two communicating parties. (There | |
2682 | are tricks one can play involving subversion of DNS servers, but this is also | |
2683 | nontrivial.) However, injecting packets with bogus source addresses is very | |
2684 | easy. | |
2685 | ||
2686 | Layering the protocol over TCP \cite{RFC793} ameliorates this problem because | |
2687 | an adversary needs to guess or eavesdrop in order to obtain the correct | |
2688 | sequence numbers for a spoofed packet; but the Wrestlers protocol is | |
2689 | sufficiently simple that we'd like to be able to run it over UDP | |
2690 | \cite{RFC768}, for which spoofing is trivial. | |
2691 | ||
2692 | Therefore, it's possible for anyone on the 'net to send Alice a spurious | |
2693 | challenge message $(R, c)$. She will then compute $Y = a R$, recover $r' = c | |
2694 | \xor H_I(\ldots, R, Y)$ check that $R = r' P$ and so on. That's at least two | |
2695 | scalar multiplications to respond to a spoofed packet, and even with very | |
2696 | efficient group operations, coping with this kind of simple denial-of-service | |
2697 | attack might be difficult. | |
2698 | ||
2699 | A straightforward solution is to use the Deniable variant of the protocol, | |
2700 | and require a challenge to quote its matching session's challenge $R'$ in its | |
2701 | challenge. That is, upon receiving a $(\cookie{pre-challenge}, R')$, the | |
2702 | session sends $(\cookie{challenge}, R', R, c)$. Alice then rejects any | |
2703 | \emph{incoming} challenge message which doesn't quote her current challenge | |
2704 | value. Now only eavesdroppers can force her to perform expensive | |
2705 | computations. | |
2706 | ||
2707 | Indeed, one need not quote the entire challenge $R'$: it suffices to send | |
2708 | some short hard-to-guess hash of it, maybe just the bottom 128 bits or so. | |
2709 | ||
2710 | This can't reduce security. Consider any adversary attacking this protocol | |
2711 | variant. We can construct an adversary which attacks the original protocol | |
2712 | just as efficiently. The new adversary attaches fake $R'$ values to | |
2713 | challenges output by other parties, and strips them off on delivery, | |
2714 | discarding messages with incorrect $R'$ values. | |
2715 | ||
2716 | There's another denial-of-service attack against the Wrestlers protocol. | |
2717 | ||
2718 | \subsubsection{Key confirmation} | |
2719 | Consider an application which uses the Wrestlers protocol to re-exchange keys | |
2720 | periodically. The application can be willing to \emph{receive} incoming | |
2721 | messages using the new key as soon as the key exchange completes | |
2722 | successfully; however, it should refrain from \emph{sending} messages under | |
2723 | the new key until it knows that its partner has also completed. The partner | |
2724 | may not have received the final response message, and therefore be unwilling | |
2725 | to accept a new key; it will therefore (presumably) reject incoming messages | |
2726 | under this new key. | |
2727 | ||
2728 | While key confirmation is unnecessary for \emph{security}, it has | |
2729 | \emph{practical} value, since it solves the above problem. If the | |
2730 | application sends a \cookie{switch} message when it `completes', it can | |
2731 | signal its partner that it is indeed ready to accept messages under the new | |
2732 | key. The \cookie{switch} message can be as simple as $(\cookie{switch}, | |
2733 | E_{K_0}(\cookie{switch}))$. | |
2734 | ||
2735 | \subsubsection{Unreliable transports} | |
2736 | The Internet UDP \cite{RFC768} is a simple, unreliable protocol for | |
2737 | transmitting datagrams. However, it's very efficient, and rather attractive | |
2738 | as a transport for datagram-based applications such as virtual private | |
2739 | networks (VPNs). | |
2740 | ||
2741 | ||
2742 | ||
2743 | \subsubsection{Key reuse} | |
2744 | ||
2745 | ||
2746 | %%%-------------------------------------------------------------------------- | |
2747 | ||
2748 | \section{Acknowledgements} | |
2749 | ||
2750 | The Wrestlers Protocol is named after the Wrestlers pub in Cambridge where | |
2751 | Clive Jones and I worked out the initial design. | |
2752 | ||
2753 | %%%-------------------------------------------------------------------------- | |
2754 | ||
2755 | \bibliography{mdw-crypto,cryptography2000,cryptography,rfc} | |
2756 | ||
2757 | %%%-------------------------------------------------------------------------- | |
2758 | ||
2759 | \appendix | |
2760 | \section{Proofs} | |
2761 | ||
2762 | \subsection{Proof of theorem~\ref{thm:sk}} | |
2763 | \label{sec:sk-proof} | |
2764 | ||
2765 | Before we embark on the proof proper, let us settle on some notation. Let | |
2766 | $P_i$ be a party. Then we write $x_i$ for $P_i$'s private key and $X_i = x_i | |
2767 | P$ is $P_i$'s public key. Let $S = (P_i, P_j, s)$ be a session. We write | |
2768 | $r_S$ for the random value chosen at the start of the session, and $R_S$, | |
2769 | $c_S$ etc.\ are the corresponding derived values in that session. | |
2770 | ||
2771 | ||
2772 | The proof uses a sequence of games. For each game~$\G{i}$, let $V_i$ be the | |
2773 | event that some pair of unexposed, matching sessions both complete but output | |
2774 | different keys, and let $W_i$ be the event that the adversary's final output | |
2775 | equals the game's hidden bit~$b^*$. To save on repetition, let us write | |
2776 | \[ \diff{i}{j} = \max(|\Pr[V_i] - \Pr[V_j]|, |\Pr[W_i] - \Pr[W_j]|). \] | |
2777 | Obviously, | |
2778 | \[ \diff{i}{j} \le \sum_{i\le k<j} \diff{k}{k + 1}. \] | |
2779 | ||
2780 | Here's a quick overview of the games we use. | |
2781 | \begin{itemize} | |
2782 | \item $\G0$ is the original SK-security game. | |
2783 | \item In $\G1$, we abort the game unless all parties' public keys are | |
2784 | distinct. Since keys are generated at random, parties are unlikely to be | |
2785 | given the same key by accident. | |
2786 | \item In $\G2$, we change the way sessions respond to challenge messages, by | |
2787 | using the extractor to fake up answers to most challenges. Since the | |
2788 | extractor is good, the adversary is unlikely to notice. | |
2789 | \item In $\G3$, we abort the game if the adversary ever queries $H_K(\cdot)$ | |
2790 | on the Diffie-Hellman secret $r_S r_T P$ shared between two unexposed | |
2791 | matching sessions. We show that this is unlikely to happen if the | |
2792 | Diffie-Hellman problem is hard. | |
2793 | \item In $\G4$, we abort the game if any unexposed session \emph{accepts} a | |
2794 | response message which wasn't sent by a matching session. | |
2795 | \end{itemize} | |
2796 | Finally, we show that the adversary has no advantage in $\G4$. The theorem | |
2797 | follows. | |
2798 | ||
2799 | For ease of comprehension, we postpone the detailed proofs of some of the | |
2800 | steps until after we conclude the main proof. | |
2801 | ||
2802 | Let $A$ be a given adversary which runs in time~$t$, creates at most~$q_S$ | |
2803 | sessions, delivers at most~$q_M$ messages, and makes at most~$q_I$ queries to | |
2804 | its $H_I(\cdot, \cdot, \cdot, \cdot)$ oracle and at most~$q_K$ queries to its | |
2805 | $H_K(\cdot)$ oracle. Let $\G0$ be the original SK-security game of | |
2806 | definition~\ref{def:sk}, played with adversary~$A$. | |
2807 | ||
2808 | Game~$\G1$ is the same as game~$\G0$ except, if the initialization function | |
2809 | reports two parties as having the same public key (i.e., we have $X_i \ne | |
2810 | X_j$ where $0 \le i < j < n$), we stop the game immediately and without | |
2811 | crediting the adversary with a win. This only happens when the corresponding | |
2812 | private keys are equal, i.e., $x_i = x_j$, and since the initialization | |
2813 | function chooses private keys uniformly at random, this happens with | |
2814 | probability at most $\binom{n}{2}/|G|$. Since if this doesn't happen, the | |
2815 | game is identical to $\G0$, we can apply lemma~\ref{lem:shoup}, and see that | |
2816 | \begin{equation} | |
2817 | \label{eq:sk-g0-g1} | |
2818 | \diff{0}{1} \le \frac{1}{|G|} \binom{n}{2} = \frac{n (n - 1)}{2 |G|}. | |
2819 | \end{equation} | |
2820 | In game~$\G1$ and onwards, we can assume that public keys for distinct | |
2821 | parties are themselves distinct. | |
2822 | ||
2823 | Game~$\G2$ is the same as game~$\G1$, except that we change the way that we | |
2824 | make parties respond to \cookie{challenge} messages $(\cookie{challenge}, R, | |
2825 | c)$. Specifically, suppose that $S = (P_i, P_j, s)$ is a session. | |
2826 | \begin{itemize} | |
2827 | \item Suppose $T = (P_j, P_i, s)$ is the matching session of $S$. The game | |
2828 | proceeds as before if $(R, c) = (R_T, c_T)$ is the challenge issued by $T$. | |
2829 | \item Otherwise, we run the extractor $T_\Wident$ on the adversary's history | |
2830 | so far of oracle queries $H_I(X_i, s, R, \cdot)$ to determine a pair $(r, | |
2831 | Y)$. If $r = \bot$ then we discard the message. Otherwise, we add $R$ to | |
2832 | the list~$C$, and return a fake response to the adversary by computing $K = | |
2833 | H_K(r R_S)$ and handing the adversary $(\cookie{response}, R_S, E_K(Y))$. | |
2834 | \end{itemize} | |
2835 | The following lemma shows how this affects the adversary's probabilities of | |
2836 | winning. | |
2837 | \begin{lemma} | |
2838 | \label{lem:sk-g1-g2} | |
2839 | \begin{equation} | |
2840 | \label{eq:sk-g1-g2} | |
2841 | \diff{1}{2} \le \frac{q_M}{2^{\ell_I}}. | |
2842 | \end{equation} | |
2843 | \end{lemma} | |
2844 | ||
2845 | Let us say that a session $S = (P_i, P_j, s)$ is \emph{ripe} if | |
2846 | \begin{itemize} | |
2847 | \item there is a matching session $T = (P_j, P_i, s)$, and | |
2848 | \item $S$ is unexposed. | |
2849 | \end{itemize} | |
2850 | Suppose that $S$ is a ripe session, and that it has a matching session~$T$: | |
2851 | let $Z_S = Z_T = r_S r_T P$. | |
2852 | ||
2853 | Game~$\G3$ is the same as $\G2$, except that the game is immediately aborted | |
2854 | if ever the adversary queries its random oracle $H_K(\cdot)$ at a value $Z_S$ | |
2855 | for any ripe session~$S$. The following lemma shows how this affects the | |
2856 | adversary's probabilities of winning. | |
2857 | \begin{lemma} | |
2858 | \label{lem:sk-g2-g3} | |
2859 | For some $t' = t + O(n) + O(q_S) + O(q_M q_I) + O(q_K)$ not much | |
2860 | larger than $t$ we have | |
2861 | \begin{equation} | |
2862 | \label{eq:sk-g2-g3} | |
2863 | \diff{2}{3} \le q_S \InSec{mcdh}(G; t', q_K). | |
2864 | \end{equation} | |
2865 | \end{lemma} | |
2866 | ||
2867 | Game~$\G4$ is the same as $\G3$ except that the game is immediately aborted | |
2868 | if ever the adversary sends a response message to a ripe session~$S$ which | |
2869 | wasn't output by its matching session as a response to $S$'s challenge, with | |
2870 | the result that $S$ completes. | |
2871 | ||
2872 | Let's make this more precise. Let $U$ and $V$ be a pair of matching | |
2873 | sessions. Let $C_U = (\cookie{challenge}, R_U, c_U$ be the challenge message | |
2874 | sent by $U$. Let $M_T$ be the set of messages which $T$ has sent upon | |
2875 | delivery of $C_U$. Then, in $\G4$, we abort the game if, for any pair $S$ | |
2876 | and~$T$ of matching, unexposed sessions, $S$ has completed as a result of | |
2877 | being sent a message $\mu \notin M_T$. We have the following lemma. | |
2878 | \begin{lemma} | |
2879 | \label{lem:sk-g3-g4} | |
2880 | \begin{equation} | |
2881 | \label{eq:sk-g3-g4} | |
2882 | \diff{3}{4} \le q_S \bigl( \InSec{ind-cca}(\E; t', q_M, q_M) + | |
2883 | n \cdot \InSec{mcdh}(G; t', q_M + q_I) \bigr) | |
2884 | \end{equation} | |
2885 | \end{lemma} | |
2886 | ||
2887 | Finally, let us consider the state we're in with $\G4$. | |
2888 | \begin{itemize} | |
2889 | \item No ripe session completes except as a result the adversary faithfully | |
2890 | delivering messages between it and its matching session. | |
2891 | \item The adversary never queries $Z_S$ for any ripe session~$S$. If we set | |
2892 | $K_S = (K_{S, 0}, K_{S, 1}) = H_K(Z_S)$, then $K_{S, 1}$ is the key output | |
2893 | by $S$ when it completes. | |
2894 | \item If $S$ and $T$ are matching ripe sessions, then $K_S = K_T$, since $Z_S | |
2895 | = r_S R_T = r_T R_S = Z_T$. | |
2896 | \item For any ripe session~$S$, $K_{S, 1}$ is uniformly distributed in | |
2897 | $\Bin^\kappa$ and independent of the adversary's view. | |
2898 | \item If $S = (P_i, P_j, s)$ and $T = (P_j, P_i, s)$ are matching ripe | |
2899 | sessions, then $Z_S$ depends only $r_S$ and $r_T$. Hence, once $S$ and~$T$ | |
2900 | complete, and erase their states, $Z_S$ is independent of everything except | |
2901 | the messages sent between the two sessions. In particular, $Z_S$ is | |
2902 | independent of the long-term secrets $x_i$ and~$x_j$, so if either player | |
2903 | is later corrupted, the key $K_{S, 1}$ remains independent of the | |
2904 | adversary's view. | |
2905 | \item Hence, the keys output by unexposed sessions are indistinguishable from | |
2906 | freshly-generated random strings, and remain so indefinitely. | |
2907 | \end{itemize} | |
2908 | We conclude that, for any adversary $A$, | |
2909 | \begin{equation} | |
2910 | \label{eq:sk-g4} | |
2911 | \Pr[V_4] = 0 \qquad \text{and} \qquad \Pr[W_4] = \frac{1}{2}. | |
2912 | \end{equation} | |
2913 | Putting equations~\ref{eq:sk-g0-g1}--\ref{eq:sk-g4} together, we find | |
2914 | \fixme{format prettily} | |
2915 | \begin{spliteqn} | |
2916 | \Adv{sk}{\Wident^{G, \E}}(A) \le \\ | |
2917 | q_S \bigl( \InSec{mcdh}(G; t', q_K) + | |
2918 | n \cdot \InSec{mcdh}(G; t', q_M + q_I) + | |
2919 | \InSec{ind-cca}(\E; t', q_M, q_M) \bigr) + {}\\ | |
2920 | \frac{n (n - 1)}{|G|} + | |
2921 | \frac{2 q_M}{2^{\ell_I}}. | |
2922 | \end{spliteqn} | |
2923 | The theorem follows, since $A$ was chosen arbitrarily. | |
2924 | ||
2925 | ||
2926 | \begin{proof}[Proof of lemma~\ref{lem:sk-g1-g2}] | |
2927 | The two games $\G1$ and~$\G2$ differ only in whether they accept or reject | |
2928 | particular challenge messages $(\cookie{challenge}, R, c)$. | |
2929 | ||
2930 | We claim firstly that no message is \emph{accepted} by $\G2$ which would | |
2931 | have been rejected by $\G1$. To prove the claim, it is sufficient to note | |
2932 | that the extractor's output, if not $\bot$, is always correct, and hence if | |
2933 | $\G2$ accepts a message then $\G1$ would have done so too. | |
2934 | ||
2935 | Since $\G2$ also behaves identically when the adversary submits to~$S$ the | |
2936 | challenge from the matching session~$T$, we have nothing to prove in this | |
2937 | case. Let $F$ be the event that the adversary submits a message | |
2938 | $(\cookie{challenge}, R, c)$ to a session~$S$ which $S$ would have accepted | |
2939 | in $\G1$ but would be rejected by the new rule in~$\G2$. By | |
2940 | lemma~\ref{lem:shoup} we have $\diff{1}{2} \le \Pr[F]$. To prove the | |
2941 | current lemma, therefore, we must show that $\Pr[F] \le q_M/2^{\ell_I}$. | |
2942 | ||
2943 | Rather than consider individual challenge messages, we consider | |
2944 | \emph{classes} of messages. We shall refer to a quadruple~$\Cid = (i, j, | |
2945 | s, R)$ as a \emph{class-id}, and define some useful functions: | |
2946 | \begin{itemize} | |
2947 | \item the class's \emph{session} $\Csession(\Cid) = (P_i, P_j, s)$; | |
2948 | \item the class's \emph{index} $\Cindex(\Cid)$ is $r \in I$ where $R = r | |
2949 | P$, which is well-defined by lemma~\ref{lem:unique-dl}; | |
2950 | \item the class's \emph{query} $\Cquery(\Cid) = (X_j, s, R, x_i R)$; | |
2951 | \item the class's \emph{hash} $\Chash(\Cid) = H_I(\Cquery(\Cid)) = H_I(X_j, | |
2952 | s, R, x_i R)$; | |
2953 | \item the class's \emph{check-value} $\Ccheck(\Cid) = \Chash(\Cid) \xor | |
2954 | \Cindex(\Cid)$; | |
2955 | \item the class's \emph{check-set} $\Ccheckset(\Cid)$ is the set of | |
2956 | check-values $c$ such that a message $(\cookie{challenge}, R, c)$ was | |
2957 | sent to session $S = (P_i, P_j, s)$; and | |
2958 | \item the class's \emph{count} $\Ccount(\Cid) = |\Ccheckset(\Cid)|$. | |
2959 | \end{itemize} | |
2960 | ||
2961 | Consider any class-id~$\Cid = (i, j, s, R)$. A natural question which | |
2962 | arises is: which participants have issued $\Cid$'s query, i.e., queried | |
2963 | $H_I$ at $\Cquery(\Cid)$? | |
2964 | ||
2965 | We can characterise the $H_I(\cdot, \cdot, \cdot, \cdot)$ queries of a | |
2966 | session $U = (P_{i'}, P_{j'}, s')$ as follows: | |
2967 | \begin{itemize} | |
2968 | \item computing the check-value for the challenge $R_U$ by querying | |
2969 | $H_I(X_{i'}, s', R_U, r_U X_{j'})$, and | |
2970 | \item checking an incoming challenge~$R'$ by querying $H_I(X_{j'}, s', R', | |
2971 | x_{i'} R')$. | |
2972 | \end{itemize} | |
2973 | The class~$\Cid$'s query $\Cquery(\Cid)$ is $U$'s check-value query if | |
2974 | \[ (j, i, s, R) = (i', j', s', R_U) \] | |
2975 | i.e., $U$ is the matching session of $\Csession(\Cid)$, and moreover $R = | |
2976 | R_U$ is the challenge value issued by $U$. For any $c \in | |
2977 | \Ccheckset(\Cid)$, if $c = \Ccheck(\Cid)$ then $(\cookie{challenge}, R, c)$ | |
2978 | is precisely the challenge message issued by~$U$ to $\Csession(\Cid)$; the | |
2979 | rules for handling this message didn't change. However, if $c \ne | |
2980 | \Ccheck(\Cid)$ then the message would have been rejected in $\G1$, and we | |
2981 | have already shown that $\G2$ continues to reject all messages rejected by | |
2982 | $\G1$. | |
2983 | ||
2984 | Let us say that a class-id~$\Cid = (i, j, s, R)$ is \emph{bad} if | |
2985 | \begin{enumerate} | |
2986 | \item the value $R$ is not the challenge issued by $\Csession(\Cid)$'s | |
2987 | matching session, and | |
2988 | \item the adversary has not issued $\Cid$'s query $\Cquery(\Cid)$, | |
2989 | \emph{but} | |
2990 | \item $\Ccheck(\Cid) \in \Ccheckset(\Cid)$, so one of the check-values | |
2991 | submitted to $S$ was actually correct. | |
2992 | \end{enumerate} | |
2993 | We claim that our extractor will work perfectly unless some class-id is | |
2994 | bad. Certainly, if $R$ was issued by the matching session, there is | |
2995 | nothing to prove; if the adversary has issued the relevant query then the | |
2996 | extractor will recover $\Cindex(\Cid)$ just fine; and if $\Ccheck(\Cid) | |
2997 | \notin \Ccheckset(\Cid)$ then all messages in the class would have been | |
2998 | rejected by $\G1$ anyway. | |
2999 | ||
3000 | Let $B(\Cid)$ be the event that the class~$\Cid$ is bad. We claim that | |
3001 | \[ \Pr[B(\Cid)] \le \frac{\Ccount(\Cid)}{2^{\ell_I}}. \] | |
3002 | The present lemma follows, since | |
3003 | \[ \diff{1}{2} | |
3004 | \le \Pr[F] | |
3005 | \le \sum_\Cid \Pr[B(\Cid)] | |
3006 | \le \sum_\Cid \frac{\Ccount(\Cid)}{2^{\ell_I}} | |
3007 | = \frac{1}{2^{\ell_I}} \sum_\Cid \Ccount(\Cid) | |
3008 | \le \frac{q_M}{2^{\ell_I}} | |
3009 | \] | |
3010 | as required. | |
3011 | ||
3012 | Now observe that, in $\G2$, sessions don't actually check incoming | |
3013 | challenges in this way any more -- instead we run the extractor. So, to | |
3014 | prove the claim, we consider a class~$\Cid$ where properties~1 and~2 above | |
3015 | hold. The correct hash $\Chash(\Cid)$ is then independent of the rest of | |
3016 | the game, so the probability that $\Ccheck(\Cid) \in \Ccheckset(\Cid)$ is | |
3017 | precisely $\Ccount(\Cid)/2^{\ell_I}$ as required. | |
3018 | ||
3019 | This completes the proof the lemma. | |
3020 | \end{proof} | |
3021 | ||
3022 | \begin{proof}[Proof of lemma~\ref{lem:sk-g2-g3}] | |
3023 | Let $F$ be the event that the adversary makes a query $H_K(Z_S)$ for some | |
3024 | ripe session~$S$. Since $\G3$ proceeds exactly as $\G2$ did unless $F_2$ | |
3025 | occurs, we apply lemma~\ref{lem:shoup}, which tells us that $\diff{2}{3} | |
3026 | \le \Pr[F_2]$. We must therefore bound this probability. | |
3027 | ||
3028 | To do this, we consider a new game~$\G3'$, which is the same as $\G3$, | |
3029 | except that, at the start of the game, we choose a random number $k \inr | |
3030 | \Nupto{q_S}$. For $0 \le i < q_S$, let $S_i$ be the $i$th session created | |
3031 | by the adversary. We define $F'$ to be the event that the adversary | |
3032 | queries $H_K(Z_{S_k})$ when $S_k$ is ripe. | |
3033 | ||
3034 | The lemma now follows from these two claims. | |
3035 | ||
3036 | \begin{claim} | |
3037 | $\Pr[F] \le q_S \Pr[F']$. | |
3038 | \end{claim} | |
3039 | To see this, for any session~$S$, let $F_S$ be the event that the adversary | |
3040 | queries~$H_K(Z_S)$ when $S$ is ripe. Then | |
3041 | \[ \Pr[F] \le \sum_{0\le i<q_S} \Pr[F_{S_i}]. \] | |
3042 | Hence, | |
3043 | \[ \Pr[F'] = \Pr[F_{S_k}] = \sum_{0\le i<q_S} \Pr[F_{S_i}] \Pr[k = i] | |
3044 | = \frac{1}{q_S} \sum_{0\le i<q_S} \Pr[F_{S_i}] | |
3045 | \ge \frac{\Pr[F]}{q_S} | |
3046 | \] | |
3047 | proving the claim. | |
3048 | ||
3049 | \begin{claim} | |
3050 | For some $t' = t + O(n) + O(q_S q_M) + O(q_I) + O(q_K)$, we have | |
3051 | $\Pr[F'] \le \InSec{mcdh}(G; t', q_K).$ | |
3052 | \end{claim} | |
3053 | To prove this claim, we construct an adversary~$B$ which solves the MCDH | |
3054 | problem in~$G$. The adversary works as follows. | |
3055 | \begin{enumerate} | |
3056 | \item It is given a pair $(R^*, S^*) = (r^* P, s^* P)$ of group elements; | |
3057 | its objective is to make a verification-oracle query $V(Z^*)$ where $Z^* | |
3058 | = r^* s^* P$. | |
3059 | \item It sets up a simulation of the game~$\G3'$, by running the | |
3060 | $\id{init}$ function, and simulating all of the parties. In particular, | |
3061 | it chooses a random~$k \in \Nupto{q_S}$. | |
3062 | \item It sets up accurate simulations of the random oracles $H_K(\cdot)$ | |
3063 | and $H_I(\cdot, \cdot, \cdot, \cdot)$, which choose random outputs for | |
3064 | new, fresh inputs. However, whenever $A$ queries $H_K(\cdot)$ on a group | |
3065 | element $Z$, $B$ also queries $V(Z)$. | |
3066 | \item It runs $A$ in its simulated game. It responds to all of $A$'s | |
3067 | instructions faithfully, until the $k$th session-creation. | |
3068 | \item When creating the $k$th session $S = S_k = (P_i, P_j, s)$, $B$ has | |
3069 | party~$P_i$ choose $R^*$ as its challenge, rather than choosing $r_S$ and | |
3070 | setting $R_S = r_S P$. Because it simulates all the parties, $B$ can | |
3071 | compute $Y_S = x_j R$, which is still correct. | |
3072 | \item If $A$ requests the creation of a matching session $T = (P_j, P_i, | |
3073 | s)$ then $B$ has party~$P_j$ choose $S^*$ as its challenge. Again, $B$ | |
3074 | computes $Y_T = x_i S^*$. | |
3075 | \item If $A$ ever corrupts the parties $P_i$ or $P_j$, or reveals the | |
3076 | session state of $S$ or $T$ then $B$ stops the simulation abruptly and | |
3077 | halts. | |
3078 | \end{enumerate} | |
3079 | Adversary $B$'s running time is $t' = t + O(n) + O(q_S q_M) + O(q_I) + | |
3080 | O(q_K)$, and $B$ makes at most $q_K$ queries to $V(\cdot)$; we therefore | |
3081 | have | |
3082 | \[ \Pr[F'] \le \Succ{mcdh}{G}(B) \le \InSec{mcdh}(G; t', q_K) \] | |
3083 | as required. | |
3084 | \end{proof} | |
3085 | ||
3086 | \begin{proof}[Proof of lemma~\ref{lem:sk-g3-g4}] | |
3087 | Let $F_4$ be the event under which we abort the game~$\G4$. Clearly, if | |
3088 | $F$ doesn't occur, games $\G3$ and $\G4$ proceed identically, so we can | |
3089 | apply lemma~\ref{lem:shoup} to see that $\diff{3}{4} \le \Pr[F_4]$. | |
3090 | Bounding $\Pr[F_4]$, however, is somewhat complicated. We use a further | |
3091 | sequence of games. | |
3092 | ||
3093 | Firstly, let $\G5$ be like $\G4$ with the exception that we choose, at | |
3094 | random, an integer~$k \inr \Nupto{q_S}$. As we did in the proof for | |
3095 | lemma~\ref{lem:sk-g3-g4}, let $S_i$ be the $i$th session created by the | |
3096 | adversary. For each session~$S_i$, let $T_i$ be its matching session, if | |
3097 | there is one. We define $F_5$ to be the event that | |
3098 | \begin{itemize} | |
3099 | \item $S_k$ completes immediately following delivery of a message $\mu | |
3100 | \notin M_{T_k}$, and | |
3101 | \item $S_k$ was ripe at this point. | |
3102 | \end{itemize} | |
3103 | For games~$\G{i}$, for $i > 5$, we define the event $F_i$ to be the event | |
3104 | corresponding to $F_5$ in $\G{i}$. Note that if $S_k$ \emph{is} sent a | |
3105 | message in $M_{T_k}$ then $S_k$ immediately completes. | |
3106 | ||
3107 | \begin{claim} | |
3108 | $\Pr[F_4] \le \Pr[F_5]/q_S$. | |
3109 | \end{claim} | |
3110 | This claim is proven exactly as we did for claim~1 of | |
3111 | lemma~\ref{lem:sk-g2-g3}. | |
3112 | ||
3113 | Let~$\G6$ be the same as $\G5$ except that we change the encrypted | |
3114 | responses of session~$S_k$ and its matching session~$T_k$. Let $K^* = | |
3115 | (K_0^*, K_1^*) = H_K(Z_S)$. Then, rather than sending $(\cookie{response}, | |
3116 | R_S, E_{K_0^*}(Y_T))$, session~$S$ sends $(\cookie{response}, R_S, | |
3117 | E_{K_0^*}(1^{\ell_G}))$. | |
3118 | \begin{claim} | |
3119 | $|\Pr[F_6] - \Pr[F_5]| \le \InSec{ind-cca}(\E; t', q_M, q_M).$ | |
3120 | \end{claim} | |
3121 | To prove this claim, we construct an adversary~$B$ which attacks the | |
3122 | IND-CCA security of our encryption scheme $\E$. The adversary~$B$ works as | |
3123 | follows. | |
3124 | \begin{enumerate} | |
3125 | \item It is given no input, but a pair of oracles $E(\cdot, \cdot)$ and | |
3126 | $D(\cdot)$; the former encrypts either the left or right input, according | |
3127 | to a hidden bit, and the latter decrypts ciphertexts other than those | |
3128 | returned by $E(\cdot, \cdot)$. Its goal is to guess the hidden bit. | |
3129 | \item It sets up a simulation of the game~$\G5$, by running the $\id{init}$ | |
3130 | function, and simulating all of the parties. In particular, it chooses a | |
3131 | random $k \in \Nupto{q_S}$. | |
3132 | \item It sets up accurate simulations of the random oracles $H_K(\cdot)$ | |
3133 | and $H_I(\cdot, \cdot, \cdot, \cdot)$. | |
3134 | \item It runs $A$ in its simulated game. It responds to all of $A$'s | |
3135 | instructions faithfully, except for the matching sessions $S_k$ and | |
3136 | $T_k$. Let $S = S_k = (P_i, P_j, s)$, and $T = T_k = (P_j, P_i, s)$. | |
3137 | \item Suppose $T$ is sent the message $C_S = (\cookie{challenge}, R_S, | |
3138 | c_S)$. Rather than computing $K^* = H_K(r_T R_S)$ and performing the | |
3139 | encryption properly, $B$ queries its left-or-right encryption oracle | |
3140 | $E(\cdot, \cdot)$ on $E(1^{\ell_G}, x_j R_S)$, and sends the resulting | |
3141 | ciphertext~$\chi$ back to~$S$ as part of a message $(\cookie{response}, | |
3142 | R_T, \chi)$. The set $M_T$ is precisely the set of messages constructed | |
3143 | in this fashion. (Recall that challenge messages other than $C_S$ aren't | |
3144 | actually delivered to $T$, since we simulate the responses using the | |
3145 | extractor, as of $\G2$.) | |
3146 | \item Suppose $S$ is sent a message $M = (\cookie{response}, R_T, \chi) \in | |
3147 | M_T$. We immediately stop the simulation, and $B$ returns $0$. | |
3148 | \item Suppose, instead, that $S$ is sent some message $M' = | |
3149 | (\cookie{response}, R, \chi) \notin M_T$. There are two cases to | |
3150 | consider. If $R = R_T$ then we must have $\chi$ distinct from the | |
3151 | ciphertexts returned by the $E(\cdot, \cdot)$ oracle, so we can invoke | |
3152 | the decryption oracle $D(\cdot)$ on $\chi$ to obtain a response $Y$. | |
3153 | Alternatively, if $R \ne R_T$, we can compute the key $K = (K_0, K_1) = | |
3154 | H_K(r_S R)$, and recover $Y = D_{K_0}(\chi)$. In either case, if $Y = | |
3155 | r_S X_j)$ then $S$ would complete at this point: $B$ stops the simulation | |
3156 | and returns $1$. | |
3157 | \item If $A$ exposes $S$ (by corrupting $P_i$ or~$P_j$, or revealing $S$ or | |
3158 | $T$) then we stop the simulation and $B$ returns $0$. | |
3159 | \item Finally, if the game stops, either because $A$ halts, or because of | |
3160 | one of the special rules introduced in earlier games, $B$ returns $0$. | |
3161 | \end{enumerate} | |
3162 | It is clear that $B$'s oracle queries are acceptable, since $|x_j R_S| = | |
3163 | \ell_G$ by definition, and $B$ never queries $D(\cdot)$ on a ciphertext | |
3164 | returned by its encryption oracle. By the rules of~$\G3$, we know that the | |
3165 | game stops immediately if $A$ ever queries $Z_S$, so the key $K^*$ is | |
3166 | independent of everything in $A$'s view except the ciphertexts $\chi$ | |
3167 | output by $S$ and $T$. Therefore, if the hidden bit of the IND-CCA game is | |
3168 | $1$, $B$ accurately simulates $\G5$, whereas if the bit is $0$ then $B$ | |
3169 | accurately simulates $\G6$. Finally, we issue no more that $q_M$ | |
3170 | encryption or decryption queries. Therefore, | |
3171 | \[ \Adv{ind-cca}{\E}(B) = \Pr[F_5] - \Pr[F_6] | |
3172 | \le \InSec{ind-cca}(\E; t', q_M, q_M). \] | |
3173 | We construct the adversary~$\bar{B}$ which is the same as $B$ above, except | |
3174 | that $\bar{B}$ returns $0$ whenever $B$ returns~$1$, and \emph{vice versa}. | |
3175 | Clearly | |
3176 | \[ \Adv{ind-cca}{\E}(\bar{B}) | |
3177 | = (1 - \Pr[F_5]) - (1 - \Pr[F_6]) | |
3178 | = \Pr[F_6] - \Pr[F_5] | |
3179 | \le \InSec{ind-cca}(\E; t', q_M, q_M). | |
3180 | \] | |
3181 | This proves the claim. | |
3182 | ||
3183 | Let $\G7$ be the same as $\G6$, except that at the start of the game we | |
3184 | choose a random $m \in \Nupto{n}$, and when the adversary creates the | |
3185 | session $S = S_k = (P_i, P_j, s)$, we abort the game unless $j = m$. | |
3186 | Clearly we have $\Pr[F_6] = n \Pr[F_7]$. | |
3187 | ||
3188 | Finally, we can explicitly bound $F_6$. In $\G6$, the adversary's view is | |
3189 | independent of the correct response $Y_S = r_S X_S = x_j R_S$ to $S$'s | |
3190 | challenge. Therefore, if $A$ manages to send any message $\mu \notin M_T$ | |
3191 | which causes $S$ to complete, then it has impersonated~$P_j$. | |
3192 | \begin{claim} | |
3193 | $\Pr[F_7] \le \InSec{mcdh}(G; t', q_M + q_I)$. | |
3194 | \end{claim} | |
3195 | The present lemma follows from this and the previous claims. | |
3196 | ||
3197 | To prove the claim formally, we construct an adversary~$B'$, which behaves | |
3198 | as follows. | |
3199 | \begin{enumerate} | |
3200 | \item It is given as input a public key $X^*$ and a single challenge $(R^*, | |
3201 | c^*)$, a random oracle $H^*_I(\cdot, \cdot)$, and an oracle $V(\cdot, | |
3202 | \cdot)$, which verifies responses $(R, Y)$. Its goal is to invoke | |
3203 | $V(\cdot, \cdot)$ with a correct response to the challenge. | |
3204 | \item It chooses a random $k \in \Nupto{q_S}$ and $m \in \Nupto{n}$. It | |
3205 | sets up a simulation of the game~$\G7$, by running the $\id{init}$ | |
3206 | function, and simulating all of the parties, except that it gives party | |
3207 | $P_m$ the public key $X^*$. This makes no difference, since $P_m$ | |
3208 | doesn't actually need to give any `honest' responses because of the | |
3209 | change we made in $\G6$. | |
3210 | \item It sets up accurate simulations of the random oracles $H_K(\cdot)$ | |
3211 | and $H_I(\cdot, \cdot, \cdot, \cdot)$, with one exception -- see below. | |
3212 | \item It runs $A$ in its simulated game. It responds to all of $A$'s | |
3213 | instructions faithfully, except for the session $S_k$. Let $S = S_k = | |
3214 | (P_i, P_j, s)$, and let $T = T_k = (P_j, P_i, s)$ be its matching | |
3215 | session. | |
3216 | \item When session~$S$ is created, $B'$ checks that $j = m$, and if not | |
3217 | stops the simulation and halts. Otherwise, $B'$ invokes its oracle~$C()$ | |
3218 | to obtain a pair $(R, c)$. Session~$S$ sends $C_S = (\cookie{challenge}, | |
3219 | R, c)$ as its challenge to~$T$. | |
3220 | \item When $A$ makes a query $H_I(X^*, s, R, Y)$, $B$ answers it by | |
3221 | querying its \emph{own} random oracle $H^*_I(R, Y)$. | |
3222 | \item When $S$ receives a message $(\cookie{response}, R, \chi)$, we | |
3223 | compute $(K_0, K_1) = r_S R$, and $Y = D_{K_0}(\chi)$. If $Y \ne \bot$ | |
3224 | then $B'$ calls $V(R, Y)$. | |
3225 | \item If $A$ reveals $S$ or corrupts $P_i$ or $P_j$ then $B'$ stops the | |
3226 | simulation immediately and halts. | |
3227 | \end{enumerate} | |
3228 | Clearly $B'$ succeeds whenever $F_7$ occurs; hence we can apply | |
3229 | theorem~\ref{thm:wident-sound}. The claim follows. | |
3230 | \end{proof} | |
3231 | ||
3232 | ||
3233 | \subsection{Proof of theorem~\ref{thm:sk2}} | |
3234 | \label{sec:sk2-proof} | |
3235 | ||
3236 | The proof is almost identical to the proof of theorem~\ref{thm:sk}, in | |
3237 | appendix~\ref{sec:sk-proof}. Unfortunately a black-box reduction doesn't | |
3238 | seem possible. | |
3239 | ||
3240 | We use the games and notation of section~\ref{sec:sk-proof}. | |
3241 | ||
3242 | The change to the check-value calculation doesn't affect key-generation at | |
3243 | all, so the transition to $\G1$ goes through as before. | |
3244 | ||
3245 | The transition from $\G1$ to $\G2$ -- answering challenges using the | |
3246 | extractor -- needs a little care. Let $S = (P_i, P_j, s)$ be a session, and | |
3247 | consider an incoming message $(\cookie{challenge}, R, c)$. | |
3248 | \begin{itemize} | |
3249 | \item If $T = (P_j, P_i, s)$ is the matching session to $S$, and $R = R_T$ is | |
3250 | the public challenge value of $T$, and $c = r_T \xor H_I(R_S, X_j, s, R_T, | |
3251 | r_T X_i)$ is the check-value output by $T$ when it received | |
3252 | $(\cookie{pre-challenge}, R_S)$ as input, then $S$ replies as it did in | |
3253 | $\G1$. | |
3254 | \item If the challenge message is any other message, then we use the | |
3255 | extractor. | |
3256 | \end{itemize} | |
3257 | As in lemma~\ref{lem:sk-g1-g2}, we examine which sessions could have queried | |
3258 | $H_I(R_S, X_j, s, R, x_i R)$, and for the same reasons conclude that only the | |
3259 | matching session would have done this, and only in response to the | |
3260 | pre-challenge $R_S$. It follows that $\diff{1}{2} \le q_M/2^{\ell_I}$ as | |
3261 | before. | |
3262 | ||
3263 | The remaining game steps go through unchanged. In particular, we conclude | |
3264 | that a ripe session will only complete if the adversary has transmitted | |
3265 | messages from its matching session correctly, and the session key is | |
3266 | independent of the adversary's view. The theorem follows. | |
3267 | ||
3268 | \end{document} | |
3269 | ||
3270 | %%% Local Variables: | |
3271 | %%% mode: latex | |
3272 | %%% TeX-master: t | |
3273 | %%% End: |