From 2eb3cbaa3aca625914903dd2b6386595052029e6 Mon Sep 17 00:00:00 2001 From: Markus Teich Date: Fri, 2 Dec 2016 12:18:35 +0100 Subject: [PATCH] make byte plural consistent --- brandt.h | 8 ++++---- crypto.c | 4 ++-- fp_priv.c | 4 ++-- fp_pub.c | 4 ++-- mp_pub.c | 4 ++-- tex-stuff/math.tex | 12 ++++++------ 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/brandt.h b/brandt.h index 00f1b91..ceee3d1 100644 --- a/brandt.h +++ b/brandt.h @@ -79,7 +79,7 @@ typedef uint16_t * @param[in] auction_closure Closure pointer representing the respective * auction. This is the Pointer given to BRANDT_join() / BRANDT_new(). * @param[in] msg The message to be delivered - * @param[in] msg_len The length of the message @a msg in bytes. + * @param[in] msg_len The length of the message @a msg in byte. * @return 0 on success, -1 on failure. */ typedef int @@ -116,7 +116,7 @@ BRANDT_init (struct GNUNET_CRYPTO_EccDlogContext *dlogctx); * for an explanation of the different auction description fields. * * @param[in] auction_desc The auction description blob published by the seller. - * @param[in] auction_desc_len Length of @a auction_desc in bytes. + * @param[in] auction_desc_len Length of @a auction_desc in byte. * @param[out] time_start Starting time of the auction. May be NULL. * @param[out] time_round Maximum round time of the auction. May be NULL. * @param[out] num_prices Amount of possible prices. May be NULL. @@ -176,7 +176,7 @@ BRANDT_join (BRANDT_CbResult result, * structure. It is generated by this function and should be distributed to * all possibly interested bidders. The seller MUST sign this data block before * publishing it! - * @param[out] auction_desc_len The length in bytes of the @a auction_desc + * @param[out] auction_desc_len The length in byte of the @a auction_desc * structure. Will be filled by BRANDT_new(). * @param[in] time_start The time when the auction will start. Bidders have * until then to register. @@ -243,7 +243,7 @@ BRANDT_destroy (struct BRANDT_Auction *auction); * which message @a msg was received. * @param[in] sender The id of the sender. * @param[in] msg The message that was received. - * @param[in] msg_len The length in bytes of @a msg. + * @param[in] msg_len The length in byte of @a msg. */ void BRANDT_got_message (struct BRANDT_Auction *auction, diff --git a/crypto.c b/crypto.c index dea1617..e067f04 100644 --- a/crypto.c +++ b/crypto.c @@ -636,7 +636,7 @@ smc_prep_keyshare (struct BRANDT_Auction *ad) * public key share * * @param[in] ad Pointer to the BRANDT_Auction struct to operate on - * @param[out] buflen Size of the returned message buffer in bytes + * @param[out] buflen Size of the returned message buffer in byte * @return A buffer containing the public key share * which needs to be broadcast */ @@ -730,7 +730,7 @@ smc_prep_bid (struct BRANDT_Auction *ad) * into a message together with proofs of correctnes. * * @param[in] ad Pointer to the BRANDT_Auction struct to operate on - * @param[out] buflen Size of the returned message buffer in bytes + * @param[out] buflen Size of the returned message buffer in byte * @return A buffer containing the encrypted bid * which needs to be broadcast */ diff --git a/fp_priv.c b/fp_priv.c index 201e643..0fdaa79 100644 --- a/fp_priv.c +++ b/fp_priv.c @@ -149,7 +149,7 @@ fp_priv_prep_outcome (struct BRANDT_Auction *ad) * a message buffer together with proofs of correctnes. * * @param[in] ad Pointer to the BRANDT_Auction struct to operate on - * @param[out] buflen Size of the returned message buffer in bytes + * @param[out] buflen Size of the returned message buffer in byte * @return A buffer containing the encrypted outcome vectors * which needs to be broadcast */ @@ -396,7 +396,7 @@ fp_priv_decrypt_outcome_bidder (struct BRANDT_Auction *ad, size_t *buflen) * buffer from all received decryption shares to broadcast back to all bidders. * * @param[in] ad Pointer to the BRANDT_Auction struct to operate on - * @param[out] buflen Size of the returned message buffer in bytes + * @param[out] buflen Size of the returned message buffer in byte * @return A buffer containing the share of the decrypted outcome * which needs to be broadcast */ diff --git a/fp_pub.c b/fp_pub.c index cc8cf28..ff6cfaf 100644 --- a/fp_pub.c +++ b/fp_pub.c @@ -132,7 +132,7 @@ fp_pub_prep_outcome (struct BRANDT_Auction *ad) * correctnes. * * @param[in] ad Pointer to the BRANDT_Auction struct to operate on - * @param[out] buflen Size of the returned message buffer in bytes + * @param[out] buflen Size of the returned message buffer in byte * @return A buffer containing the encrypted outcome vectors * which needs to be broadcast */ @@ -290,7 +290,7 @@ fp_pub_prep_decryption (struct BRANDT_Auction *ad) * message buffer together with proofs of correctnes. * * @param[in] ad Pointer to the BRANDT_Auction struct to operate on - * @param[out] buflen Size of the returned message buffer in bytes + * @param[out] buflen Size of the returned message buffer in byte * @return A buffer containing the own share of the decrypted outcome * which needs to be broadcast */ diff --git a/mp_pub.c b/mp_pub.c index 68705cf..712c148 100644 --- a/mp_pub.c +++ b/mp_pub.c @@ -182,7 +182,7 @@ mp_pub_prep_outcome (struct BRANDT_Auction *ad) * a message buffer together with proofs of correctnes. * * @param[in] ad Pointer to the BRANDT_Auction struct to operate on - * @param[out] buflen Size of the returned message buffer in bytes + * @param[out] buflen Size of the returned message buffer in byte * @return A buffer containing the encrypted outcome vectors * which needs to be broadcast */ @@ -347,7 +347,7 @@ mp_pub_prep_decryption (struct BRANDT_Auction *ad) * message buffer together with proofs of correctnes. * * @param[in] ad Pointer to the BRANDT_Auction struct to operate on - * @param[out] buflen Size of the returned message buffer in bytes + * @param[out] buflen Size of the returned message buffer in byte * @return A buffer containing the own share of the decrypted outcome * which needs to be broadcast */ diff --git a/tex-stuff/math.tex b/tex-stuff/math.tex index 929d658..8df2064 100644 --- a/tex-stuff/math.tex +++ b/tex-stuff/math.tex @@ -112,7 +112,7 @@ the price $p_{b_a}$ bidder $a$ is willing to pay. $\forall j: p_j < p_{j+1}$. The message has $k$ parts, each consisting of $10$ Points plus an additional $3$ Points for the last proof. Therefore the message is $10k*32 + 3*32 = 320k + 96$ -bytes large. +byte large. \begin{enumerate} \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$. @@ -125,7 +125,7 @@ bytes large. \subsubsection{Round 2: Compute outcome} The message has $nk$ parts, each consisting of $5$ Points. Therefore the message -is $5nk*32 = 160nk$ bytes large. +is $5nk*32 = 160nk$ byte large. $\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] @@ -157,7 +157,7 @@ $\delta_j^{\times a} = m_j^{+a}\displaystyle\left(\sum_{h=1}^n\sum_{d=j+1}^k \be 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 $5k*32 = 160k$ bytes large. Note that compared to auctions with private +is $5k*32 = 160k$ byte 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 @@ -170,7 +170,7 @@ 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 $4k*32 = 128k$ bytes large. +is $4k*32 = 128k$ byte large. \subsubsection{Epilogue: Outcome determination} @@ -219,12 +219,12 @@ M+1st highest bid. 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] 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. +prevent ties. This increases the message size by $96$ byte. \subsubsection{Round 2: Compute outcome} The message has $nk$ parts, each consisting of $5$ Points. Therefore the message -is $5nk*32 = 160nk$ bytes large. +is $5nk*32 = 160nk$ byte large. $\forall i,j:$ Compute and publish \\[2.0ex] $\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(2M+2\right)\sum_{d=1}^{j}\alpha_{id} - \left(2M+1\right)G \right)$ and \\[2.0ex]