2016-06-10 16:48:50 +02:00
\documentclass { article}
\usepackage [a4paper, margin=2cm] { geometry}
\usepackage { amsmath}
2016-06-19 17:45:52 +02:00
\usepackage { amsfonts}
2016-06-10 16:48:50 +02:00
\begin { document}
2016-10-08 16:59:01 +02:00
\section { Ed25519 Elliptic Curve Based Algorithms And Protocols}
2016-06-11 09:44:06 +02:00
\subsection { Zero Knowledge Proofs}
2016-06-20 20:48:43 +02:00
\subsubsection { Proof 1: Knowledge of an ECDL}
2016-06-11 09:44:06 +02:00
2016-06-22 22:43:34 +02:00
Alice and Bob know $ V $ , $ G $ and $ q = |G| $ , but only Alice knows $ x $ , so that
$ V = xG $ .
2016-06-11 09:44:06 +02:00
\begin { enumerate}
2016-06-22 22:43:34 +02:00
\item Alice chooses $ z \bmod q $ at random and calculates $ A = zG $ .
\item Alice computes $ c = HASH ( G,V,A ) \bmod q $ .
\item Alice sends $ G, V, A $ and $ r = ( z + cx ) \bmod q $ to Bob.
\item Bob computes $ c $ as above and checks that $ rG = A + cV $ .
2016-06-11 09:44:06 +02:00
\end { enumerate}
2016-06-20 20:48:43 +02:00
\begin { tabular} { r l}
Prover only knowledge: & $ x $ \\
2016-06-22 22:43:34 +02:00
Common knowledge: & $ V, G $ \\
Proof: & $ r, A $
2016-06-20 20:48:43 +02:00
\end { tabular}
\subsubsection { Proof 2: Equality of two ECDL}
2016-06-11 09:44:06 +02:00
2016-06-22 22:43:34 +02:00
Alice and Bob know $ V $ , $ W $ , $ G _ 1 $ and $ G _ 2 $ , but only Alice knows $ x $ , so that
$ V = xG _ 1 $ and $ W = xG _ 2 $ .
2016-06-11 09:44:06 +02:00
\begin { enumerate}
2016-06-22 22:43:34 +02:00
\item Alice chooses $ z \bmod q $ at random and calculates $ A = zG _ 1 $ and $ B = zG _ 2 $ .
\item Alice computes $ c = HASH ( G _ 1 ,G _ 2 ,V,W,A,B ) \bmod q $ .
\item Alice sends $ V, W, G _ 1 , G _ 2 , A, B $ and $ r = ( z + cx ) \bmod q $ to Bob.
\item Bob computes $ c $ as above and checks that $ rG _ 1 = A + cV $ and $ rG _ 2 = B + cW $ .
2016-06-11 09:44:06 +02:00
\end { enumerate}
2016-06-20 20:48:43 +02:00
\begin { tabular} { r l}
Prover only knowledge: & $ x $ \\
2016-06-22 22:43:34 +02:00
Common knowledge: & $ V, W, G _ 1 , G _ 2 $ \\
Proof: & $ r, A, B $
2016-06-20 20:48:43 +02:00
\end { tabular}
\subsubsection { Proof 3: An encrypted value is one out of two values}
2016-06-11 09:44:06 +02:00
2016-06-22 22:43:34 +02:00
Alice proves that an El Gamal encrypted value $ ( \alpha , \beta ) = ( M + rY, rG ) $
either decrypts to $ 0 $ or to the fixed value $ G $ without revealing which is the
case, in other words, it is shown that $ M \in \{ 0 , G \} $ . \\
2016-06-12 15:35:05 +02:00
2016-06-22 22:43:34 +02:00
\noindent If $ M = 0 $ :
2016-06-12 15:35:05 +02:00
\begin { enumerate}
2016-06-22 22:43:34 +02:00
\item Alice chooses $ r _ 1 , d _ 1 , w \bmod q $ at random and calculates $ A _ 1 = r _ 1 G + d _ 1 \beta $ , $ B _ 1 = r _ 1 Y + d _ 1 ( \alpha - G ) $ , $ A _ 2 = wG $ and $ B _ 2 = wY $ .
\item Alice computes $ c = HASH ( G, \alpha , \beta ,A _ 1 ,B _ 1 ,A _ 2 ,B _ 2 ) \bmod q $ .
\item Alice chooses $ d _ 2 = c - d _ 1 \bmod q $ and $ r _ 2 = w - rd _ 2 \bmod q $ .
2016-06-12 15:35:05 +02:00
\end { enumerate}
2016-06-22 22:43:34 +02:00
\noindent If $ M = G $ :
2016-06-12 15:35:05 +02:00
\begin { enumerate}
2016-06-22 22:43:34 +02:00
\item Alice chooses $ r _ 2 , d _ 2 , w \bmod q $ at random and calculates $ A _ 1 = wG $ , $ B _ 1 = wY $ , $ A _ 2 = r _ 2 G + d _ 2 \beta $ and $ B _ 2 = r _ 2 Y + d _ 2 \alpha $ .
\item Alice computes $ c = HASH ( G, \alpha , \beta ,A _ 1 ,B _ 1 ,A _ 2 ,B _ 2 ) \bmod q $ .
\item Alice chooses $ d _ 1 = c - d _ 2 \bmod q $ and $ r _ 1 = w - rd _ 1 \bmod q $ .
2016-06-12 15:35:05 +02:00
\end { enumerate}
2016-06-22 22:43:34 +02:00
\noindent Then regardless of the value of $ M $ :
2016-06-12 15:35:05 +02:00
\begin { enumerate}
2016-06-22 22:43:34 +02:00
\item Alice sends $ G, ( \alpha , \beta ) , A _ 1 , B _ 1 , A _ 2 , B _ 2 , d _ 1 , d _ 2 , r _ 1 , r _ 2 $ to Bob.
\item Bob computes $ c $ as above and checks that $ c = d _ 1 + d _ 2 \bmod q $ , $ A _ 1 = r _ 1 G + d _ 1 \beta $ , $ B _ 1 = r _ 1 Y + d _ 1 ( \alpha - G ) $ , $ A _ 2 = r _ 2 G + d _ 2 \beta $ and $ B _ 2 = r _ 2 Y + d _ 2 \alpha $ .
2016-06-12 15:35:05 +02:00
\end { enumerate}
2016-06-16 00:08:49 +02:00
2016-06-20 20:48:43 +02:00
\begin { tabular} { r l}
Prover only knowledge: & $ r, x $ \\
Common knowledge: & $ \alpha , \beta $ \\
2016-06-22 22:43:34 +02:00
Proof: & $ A _ 1 , A _ 2 , B _ 1 , B _ 2 , d _ 1 , d _ 2 , r _ 1 , r _ 2 $
2016-06-20 20:48:43 +02:00
\end { tabular}
2016-10-08 16:59:01 +02:00
\subsection { public outcome auctions}
TODO: no need to unicast Round 3 to seller, implications
\subsection { M+1st price auctions}
TODO: explain blowing up $ k $ to $ nk $ to prevent ties and the additional check
needed in Round 1.
\subsection { Prologue}
These steps are the same for all following protocols in this section.
2016-06-16 00:08:49 +02:00
2016-06-19 17:45:52 +02:00
Let $ n $ be the number of participating bidders/agents in the protocol and $ k $ be
2016-06-22 22:43:34 +02:00
the amount of possible valuations/prices for the sold good. Let $ G $ be the
base point of Ed25519 and $ q = ord ( G ) $ the order of it. $ 0 $ is the neutral point
2016-06-19 17:45:52 +02:00
for addition on Ed25519. $ a \in \left \{ 1 , 2 , \dots ,n \right \} $ is the index of the
agent executing the protocol, while $ i, h \in \left \{ 1 , 2 , \dots , n \right \} $ are
other agent indizes. $ j, b _ a \in \left \{ 1 , 2 , \dots ,k \right \} $ with $ b _ a $ denoting
the price $ p _ { b _ a } $ bidder $ a $ is willing to pay. $ \forall j: p _ j < p _ { j + 1 } $ .
2016-06-16 00:08:49 +02:00
\subsubsection { Generate public key}
\begin { enumerate}
2016-10-12 14:21:16 +02:00
\item Choose the private key share $ x _ { + a } \in \mathbb { Z } _ q $ and \\
$ \forall i,j: $ Blinding factors $ m _ { ij } ^ { + a } \bmod q $ and \\
$ \forall j: $ El Gamal encryption parameters $ r _ { aj } \bmod q $ at random.
2016-06-22 22:43:34 +02:00
\item Publish $ Y _ { \times a } = { x _ { + a } } G $ along with Proof 1 of $ Y _ { \times a } $ 's ECDL.
\item Compute $ Y = \sum _ { i = 1 } ^ nY _ { \times i } $ .
2016-06-16 00:08:49 +02:00
\end { enumerate}
\subsubsection { Round 1: Encrypt bid}
2016-06-20 01:38:16 +02:00
The message has $ k $ parts, each consisting of $ 10 $ Points plus an additional $ 3 $
Points for the last proof. Therefore the message is $ 10 k * 32 + 3 * 32 = 320 k + 96 $
bytes large.
2016-06-16 00:08:49 +02:00
\begin { enumerate}
2016-06-22 22:43:34 +02:00
\item $ \forall j: $ Set $ B _ { aj } = \begin { cases } G & \mathrm { if } \quad j = b _ a \\ 0 & \mathrm { else } \end { cases } $ and publish $ \alpha _ { aj } = B _ { aj } + r _ { aj } Y $ and $ \beta _ { aj } = r _ { aj } G $ .
\item $ \forall j: $ Use Proof 3 to show that $ ( \alpha _ { aj } , \beta _ { aj } ) $ decrypts to either $ 0 $ or $ G $ .
\item Use Proof 2 to show that $ ECDL _ Y \left ( \left ( \sum _ { j = 1 } ^ k \alpha _ { aj } \right ) - G \right ) = ECDL _ G \left ( \sum _ { j = 1 } ^ k \beta _ { aj } \right ) $ .
2016-06-16 00:08:49 +02:00
\end { enumerate}
2016-10-08 16:59:01 +02:00
\subsection { First Price Auction Protocol With Private Outcome}
2016-06-16 00:08:49 +02:00
\subsubsection { Round 2: Compute outcome}
2016-06-20 01:38:16 +02:00
The message has $ nk $ parts, each consisting of $ 5 $ Points. Therefore the message
is $ 5 nk * 32 = 160 nk $ bytes large.
2016-06-20 20:48:43 +02:00
$ \forall i,j: $ Compute and publish \\ [2.0ex]
$ \gamma _ { ij } ^ { \times a } = m _ { ij } ^ { + a } \displaystyle \left ( \left ( \sum _ { h = 1 } ^ n \sum _ { d = j + 1 } ^ k \alpha _ { hd } \right ) + \left ( \sum _ { d = 1 } ^ { j - 1 } \alpha _ { id } \right ) + \left ( \sum _ { h = 1 } ^ { i - 1 } \alpha _ { hj } \right ) \right ) $ and \\ [2.0ex]
2016-10-09 14:47:09 +02:00
$ \delta _ { ij } ^ { \times a } = m _ { ij } ^ { + a } \displaystyle \left ( \left ( \sum _ { h = 1 } ^ n \sum _ { d = j + 1 } ^ k \beta _ { hd } \right ) + \left ( \sum _ { d = 1 } ^ { j - 1 } \beta _ { id } \right ) + \left ( \sum _ { h = 1 } ^ { i - 1 } \beta _ { hj } \right ) \right ) $ \\ [2.0ex]
2016-06-20 20:48:43 +02:00
with a corresponding Proof 2 for $ ECDL ( \gamma _ { ij } ^ { \times a } ) = ECDL ( \delta _ { ij } ^ { \times a } ) $ .
2016-06-16 00:08:49 +02:00
\subsubsection { Round 3: Decrypt outcome}
2016-06-20 20:48:43 +02:00
$ \forall i,j: $ Send $ \varphi _ { ij } ^ { \times a } =
2016-06-28 16:51:55 +02:00
x_ { +a} \left (\sum _ { h=1} ^ n\delta _ { ij} ^ { \times h} \right )$ with a Proof 2 showing
2016-06-22 22:43:34 +02:00
$ ECDL ( \varphi _ { ij } ^ { \times a } ) = ECDL ( Y _ { \times a } ) $ to the seller who publishes
2016-06-20 20:48:43 +02:00
all $ \varphi _ { ij } ^ { \times h } $ and the corresponding proofs of correctness for
each $ i, j $ and $ h \neq i $ after having received all of them.
2016-06-16 00:08:49 +02:00
\subsubsection { Epilogue: Outcome determination}
\begin { enumerate}
2016-06-22 22:43:34 +02:00
\item $ \forall j: $ Compute $ V _ { aj } = \sum _ { i = 1 } ^ n \gamma _ { aj } ^ { \times i } - \sum _ { i = 1 } ^ n \varphi _ { aj } ^ { \times i } $ .
2016-06-28 17:26:33 +02:00
\item If $ \exists w: V _ { aw } = 0 $ , then bidder $ a $ is the winner of the auction. $ p _ w $ is the selling price.
2016-06-16 00:08:49 +02:00
\end { enumerate}
2016-07-13 14:01:24 +02:00
\subsection { First Price Auction Protocol With Public Outcome}
2016-10-12 14:21:16 +02:00
\subsubsection { Round 2: Compute outcome}
$ \forall j: $ Compute and publish \\ [2.0ex]
$ \gamma _ j ^ { \times a } = m _ j ^ { + a } \displaystyle \left ( \sum _ { h = 1 } ^ n \sum _ { d = j + 1 } ^ k \alpha _ { hd } \right ) + \sum _ { h = 1 } ^ n 2 ^ { h - 1 } \alpha _ { hj } $ and \\ [2.0ex]
$ \delta _ j ^ { \times a } = m _ j ^ { + a } \displaystyle \left ( \sum _ { h = 1 } ^ n \sum _ { d = j + 1 } ^ k \beta _ { hd } \right ) + \sum _ { h = 1 } ^ n 2 ^ { h - 1 } \beta _ { hj } $ \\ [2.0ex]
with a corresponding Proof 2 for $ \displaystyle ECDL \left ( m _ j ^ { + a } \left ( \sum _ { h = 1 } ^ n \sum _ { d = j + 1 } ^ k \alpha _ { hd } \right ) \right ) = ECDL \left ( m _ j ^ { + a } \left ( \sum _ { h = 1 } ^ n \sum _ { d = j + 1 } ^ k \beta _ { hd } \right ) \right ) $ . \\ [2.0ex]
The message has $ k $ parts, each consisting of $ 5 $ Points. Therefore the message
is $ 5 k * 32 = 160 k $ bytes large. Note that compared to auctions with private
outcome the message size is reduced by a factor of $ n $ because we don't need to
compute different outcome functions for each bidder when the outcome should be
public. Therefore we don't need $ nk $ blinding factors $ m _ { ij } ^ { + a } $ in this
scheme, but only $ k $ different ones $ m _ j ^ { + a } $ .
\subsubsection { Round 3: Decrypt outcome}
$ \forall j: $ Compute and publish $ \displaystyle \varphi _ j ^ { \times a } =
x_ { +a} \left (\sum _ { h=1} ^ n\delta _ j^ { \times h} \right )$ with a Proof 2 showing
$ ECDL ( \varphi _ j ^ { \times a } ) = ECDL ( Y _ { \times a } ) $ \\ [2.0ex]
This message has $ k $ parts, each consisting of $ 4 $ Points. Therefore the message
is $ 4 k * 32 = 128 k $ bytes large.
\subsubsection { Epilogue: Outcome determination}
\begin { enumerate}
\item $ \forall j: $ Compute $ \displaystyle V _ j = \sum _ { h = 1 } ^ n \gamma _ j ^ { \times h } - \sum _ { h = 1 } ^ n \varphi _ j ^ { \times h } $ .
\item The $ V _ j $ with the biggest index $ p $ where $ V _ p \neq 0 $ denotes that $ p $ is the selling price.
\item We then compute $ d = ECDL ( V _ p ) / n $ which is doable since it only has small factors.
\item The lowest $ w $ where the bit $ w $ is set in $ d $ denotes the winner.
\end { enumerate}
2016-06-16 00:08:49 +02:00
2016-10-08 16:59:01 +02:00
\subsection { M+1st Price Auction Protocol With Private Outcome}
2016-06-16 00:08:49 +02:00
2016-10-12 14:21:16 +02:00
The tie breaking for M+1st Price Auctions is not only computationally intensive,
but also introduces a lot of protocol complexity if done in an optimized
way\footnote { TODO: quote diploma thesis} . Since this would lead to a huge amount
of additional code which will likely introduce more bugs\footnote { TODO: quote} ,
we decided to keep it simple and take another approach for tie breaking in the
M+1st Price Auction schemes. We took the simplest one, interlacing the bids, so
that no two bidders are allowed to bid the same price. On the application level
we will still handle $ k _ { \text { app } } $ different prices, but within libbrandt we
will multiply that by a factor of $ n $ to get $ k _ { \text { lib } } = nk _ { \text { app } } $ .
Then each bidder $ i $ is only allowed to place his bid $ b $ on prices $ p $ with
$ \exists a \in { [ 1 ,k _ { \text { app } } ] } :b = an - i + 1 $ . This condition will be checked by
an additional proof in the first round of the protocol and ensures that the
bidders with a lower index win in case of ties. This expansion will be done
right at the beginning of an auction by libbrandt. In the remaining part about
the M+1st Price Auction Protocols we will use $ k $ instead of $ k _ { \text { lib } } $ ,
so $ k $ will be divisible by $ n $ without remainder.
Unfortunately this tie breaking simplification has the downside of revealing the
identity and bid of the bidder who had the highest bid amongst the losing
bidders. If there are multiple ones fulfilling this criteria (having a tie on
the M+1st bid), then only the one with the lowest index will be revealed. This
problem can be prevented by using anonymized bidder identities, so the winners
only learn the selling prize (the M+1st highest bid), but not who placed this
M+1st highest bid.
2016-10-08 16:59:01 +02:00
\subsubsection { Addition to Round 1: Encrypt bid}
2016-10-12 19:18:14 +02:00
The bidders also have to use Proof 2 to show that $ \displaystyle ECDL _ Y \left ( \left ( \sum _ { j = 1 } ^ { k / n } \alpha _ { a,jn + a } \right ) - G \right ) = ECDL _ G \left ( \sum _ { j = 1 } ^ { k / n } \beta _ { a,jn + a } \right ) $ . \\ [2.0ex]
2016-10-08 16:59:01 +02:00
This is to ensure bidders have only chosen valid bids for their bid index, since
in M+1st price auctions the amount of possible prices is multiplied by $ n $ to
prevent ties. This increases the message size by $ 96 $ bytes.
\subsubsection { Round 2: Compute outcome}
The message has $ nk $ parts, each consisting of $ 5 $ Points. Therefore the message
is $ 5 nk * 32 = 160 nk $ bytes large.
$ \forall i,j: $ Compute and publish \\ [2.0ex]
2016-10-09 14:47:09 +02:00
$ \gamma _ { ij } ^ { \times a } = m _ { ij } ^ { + a } \displaystyle \left ( \sum _ { h = 1 } ^ n \left ( \sum _ { d = j } ^ k \alpha _ { hd } + \sum _ { d = j + 1 } ^ k \alpha _ { hd } \right ) + \left ( 2 M + 2 \right ) \sum _ { d = 1 } ^ { j } \alpha _ { id } - \left ( 2 M + 1 \right ) Y \right ) $ and \\ [2.0ex]
$ \delta _ { ij } ^ { \times a } = m _ { ij } ^ { + a } \displaystyle \left ( \sum _ { h = 1 } ^ n \left ( \sum _ { d = j } ^ k \beta _ { hd } + \sum _ { d = j + 1 } ^ k \beta _ { hd } \right ) + \left ( 2 M + 2 \right ) \sum _ { d = 1 } ^ { j } \beta _ { id } \right ) $ \\ [2.0ex]
2016-10-08 16:59:01 +02:00
with a corresponding Proof 2 for $ ECDL ( \gamma _ { ij } ^ { \times a } ) = ECDL ( \delta _ { ij } ^ { \times a } ) $ .
\subsubsection { Round 3: Decrypt outcome}
$ \forall i,j: $ Send $ \varphi _ { ij } ^ { \times a } =
x_ { +a} \left (\sum _ { h=1} ^ n\delta _ { ij} ^ { \times h} \right )$ with a Proof 2 showing
$ ECDL ( \varphi _ { ij } ^ { \times a } ) = ECDL ( Y _ { \times a } ) $ to the seller who publishes
all $ \varphi _ { ij } ^ { \times h } $ and the corresponding proofs of correctness for
each $ i, j $ and $ h \neq i $ after having received all of them.
\subsubsection { Epilogue: Outcome determination}
\begin { enumerate}
\item $ \forall j: $ Compute $ V _ { aj } = \sum _ { i = 1 } ^ n \gamma _ { aj } ^ { \times i } - \sum _ { i = 1 } ^ n \varphi _ { aj } ^ { \times i } $ .
\item If $ \exists w: V _ { aw } = 0 $ , then bidder $ a $ is the winner of the auction. $ p _ w $ is the selling price.
\end { enumerate}
2016-06-16 00:08:49 +02:00
2016-06-11 09:44:06 +02:00
2016-06-10 16:48:50 +02:00
\subsection { fixes to step 5 in (M+1)st Price auction from the 2003 paper pages 9 an 10}
\begin { align}
\gamma _ { ij} = & \frac { \prod _ { h=1} ^ n \prod _ { d=j} ^ k (\alpha _ { hd} \alpha _ { h,d+1} )\left (\prod _ { d=1} ^ j \alpha _ { id} \right )^ { 2M+2} } { (2M+1)Y} \\
\text { changed to} & \frac { \prod _ { h=1} ^ n \left (\prod _ { d=j} ^ k \alpha _ { hd} \cdot \prod _ { d=j+1} ^ k \alpha _ { hd} \right )\left (\prod _ { d=1} ^ j \alpha _ { id} \right )^ { 2M+2} } { Y^ { 2M+1} } \\ [2.0ex]
\delta _ { ij} = & \prod _ { h=1} ^ n \prod _ { d=j} ^ k (\beta _ { hd} \beta _ { h,d+1} )\left (\prod _ { d=1} ^ j \beta _ { id} \right )^ { 2M+2} \\
\text { changed to} & \prod _ { h=1} ^ n \left (\prod _ { d=j} ^ k \beta _ { hd} \prod _ { d=j+1} ^ k \beta _ { hd} \right )\left (\prod _ { d=1} ^ j \beta _ { id} \right )^ { 2M+2}
\end { align}
\end { document}