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