Lower rounds. tex stuff

This commit is contained in:
jude 2023-04-28 12:42:58 +01:00
parent 6005cd6aff
commit 663b8ab4de
4 changed files with 17 additions and 13 deletions

View File

@ -1,6 +1,6 @@
import { mod_exp } from "./math.js";
export const KEY_SIZE = 2048;
export const KEY_SIZE = 512;
export function cryptoRandom(bits) {
if (bits === undefined) {

View File

@ -1,6 +1,7 @@
import { cryptoRandom } from "../crypto/random_primes.js";
import { Region } from "./map.js";
import { mod_exp } from "../crypto/math.js";
const ROUNDS = 12;
function cryptoRange(upper) {
// This is ridiculous: why implement a BigInt primitive, have it behave like a number, and then _not_ offer
@ -43,8 +44,6 @@ function cryptoShuffle(l) {
return out;
}
const ROUNDS = 24;
/**
* R-S transform.
*

Binary file not shown.

View File

@ -305,7 +305,7 @@ Despite this approach being centralised, it does emulate a fully P2P environment
In particular, the final point allows for the use of purely JSON messages, which are readily parsed and processed by the client-side JavaScript.
The game is broken down into three main stages, each of which handles events in a different way. These are shown below.
The game is broken down into three main stages, each of which handles events in a different way. These are shown below. Boxes in blue are messages received from other players (or transmitted by ourselves). Boxes in green require networking to complete.
\begin{landscape}\begin{tikzpicture}[every node/.style={anchor=north west}]
% Create outlines
@ -361,7 +361,7 @@ The game is broken down into three main stages, each of which handles events in
% Player disconnect handling
\node[draw=blue!50,rectangle,very thick,rounded corners=0.1mm,anchor=north] (Disconnect) at (170pt, 0.5\textheight-4pt) {Player disconnects};
\node[draw=red!50,rectangle,very thick,rounded corners=0.1mm,anchor=north] (Removeplayer) at (170pt, 0.5\textheight-36pt) {Remove player $P_i$};
\node[draw=black!50,rectangle,very thick,rounded corners=0.1mm,anchor=north] (Removeplayer) at (170pt, 0.5\textheight-36pt) {Remove player $P_i$};
\draw[very thick,dashed,->] (Starttimer)-- (170pt, 0.5\textheight-109.5pt)-- node[right] {Timer expires} ++(Removeplayer);
\draw[very thick,->] (Disconnect) -- (Removeplayer);
@ -399,6 +399,11 @@ The game is broken down into three main stages, each of which handles events in
\node[draw=black!50,fill=white,rotate=270,rectangle,very thick,rounded corners=0.1mm,anchor=north] (Update2) at (0.5\paperwidth + 60pt, -155.5pt) {Update game stage};
\draw[very thick,->,dashed] (End1)-- node[below] {All reinf. placed} ++(Update2);
% Player act handling 2
\node[draw=blue!50,rectangle,very thick,rounded corners=0.1mm,anchor=north] (Act2) at (0.5\paperwidth+120pt, 0.5\textheight-4pt) {Current player acts};
\end{tikzpicture}\end{landscape}
\section{Message structure}
@ -654,7 +659,7 @@ This is used in point (2), as one player can then convince a neighbour in zero-k
Consider point (1). One option is to prove that the sum of the committed values is 1 by using the additive homomorphic property. However, this allows a player to cheat by using negative values. To overcome this, we want a new protocol that is still in zero-knowledge, but proves additional properties of a reinforce action.
\begin{figure}[htp]
\begin{figure}[H]
\centering
\begin{tikzpicture}
\tikzstyle{style}=[circle,minimum size=15mm,draw=black,fill=white]
@ -1044,9 +1049,9 @@ All measurements were taken on Brave 1.50.114 (Chromium 112.0.5615.49) 64-bit, u
\label{table1}
\begin{tabularx}{\hsize}{c *4{>{\Centering}X}}
\toprule
Modulus size & Paillier encrypt & Jurik encrypt & Jurik encrypt with pre-computation & RSA encrypt \\
Modulus & Paillier encrypt & Jurik encrypt & Jurik encrypt with pre-computation & RSA encrypt \\
\midrule
$|n| = 1024$ & 6.0ms & 4.0ms & 1.4ms & 0.015ms \\
$|n| = 1024$ & 6ms & 4ms & 1.4ms & 0.015ms \\
$|n| = 2048$ & 34ms & 22ms & 7.6ms & 0.040ms \\
$|n| = 4096$ & 189ms & 128ms & -- & 0.093ms \\
\bottomrule
@ -1058,7 +1063,7 @@ All measurements were taken on Brave 1.50.114 (Chromium 112.0.5615.49) 64-bit, u
\caption{Time\parnote{$|n| = 4096$ uses a less-optimised encryption method, as the browser frequently timed out attempting to pre-compute for the more-optimised version.} to process non-interactive proofs}
\begin{tabularx}{\hsize}{c *8{>{\Centering}X}}
\toprule
\multirow{2}{*}{Modulus size} &
\multirow{2}{*}{Modulus} &
\multicolumn{2}{c}{Proof-of-zero} &
\multicolumn{2}{c}{\hyperref[protocol1]{Protocol~\ref*{protocol1}} with $t = 24$} &
\multicolumn{2}{c}{BCDG Range with $t = 24$} &
@ -1069,7 +1074,7 @@ All measurements were taken on Brave 1.50.114 (Chromium 112.0.5615.49) 64-bit, u
\midrule
$|n| = 1024$ & 10ms & 18ms & 1,420ms & 2,140ms & 443ms & 655ms & 3,530ms & 5,310ms \\
$|n| = 2048$ & 44ms & 68ms & 6,390ms & 8,140ms & 1,980ms & 2,400ms & 15,800ms & 19,000ms \\
$|n| = 4096$ & 225ms & 292ms & 41,500ms & 34,400ms & 14,300ms & 11,400ms & & \\
$|n| = 4096$ & 225ms & 292ms & 41,500ms & 34,400ms & 14,300ms & 11,400ms & 112,000ms & 79,300ms \\
\bottomrule
\end{tabularx}
\parnotes
@ -1081,14 +1086,14 @@ All measurements were taken on Brave 1.50.114 (Chromium 112.0.5615.49) 64-bit, u
\label{table3}
\begin{tabularx}{\hsize}{c *8{>{\Centering}X}}
\toprule
\multirow{2}{*}{Modulus size} & \multicolumn{2}{c}{Proof-of-zero non-interactive} & \multicolumn{2}{c}{\hyperref[protocol1]{Protocol~\ref*{protocol1}} with $t = 24$} & \multicolumn{2}{c}{BCDG Range with $t = 24$} & \multicolumn{2}{c}{\hyperref[protocol1]{Protocol~\ref*{protocol4}} with $t = 24$}
\multirow{2}{*}{Modulus} & \multicolumn{2}{c}{Proof-of-zero non-interactive} & \multicolumn{2}{c}{\hyperref[protocol1]{Protocol~\ref*{protocol1}} with $t = 24$} & \multicolumn{2}{c}{BCDG Range with $t = 24$} & \multicolumn{2}{c}{\hyperref[protocol1]{Protocol~\ref*{protocol4}} with $t = 24$}
\tabularnewline
\cmidrule(l){2-3}\cmidrule(l){4-5}\cmidrule(l){6-7}\cmidrule(l){8-9}
& JSON & with LZ-String & JSON & with LZ-String & JSON & with LZ-String & JSON & with LZ-String \\
\midrule
$|n| = 1024$ & 1,617B & 576B & 338,902B & 95,738B & 123,354B & 34,857B & 895,474B & 248,420B \\
$|n| = 2048$ & 3,153B & 1,050B & 662,233B & 187,333B & 252,230B & 70,868B & 1,746,017B & 485,787B \\
$|n| = 4096$ & 6,226B & 1,999B & 1,315,027B & 368,646B & 484,117B & 135,990B & & \\
$|n| = 4096$ & 6,226B & 1,999B & 1,315,027B & 368,646B & 484,117B & 135,990B & 3,458,376B & 964,913B \\
\bottomrule
\end{tabularx}
\parnotes