\section{Results}

So the raw results presented in appendix \ref{app-tables} were obtained by running 3 nodes and 500 clients on the same computer. The clients and nodes operated in the way you would normally see a cMix setup. All connections, either from node to node or clien to node, are TCP connections encrypted using TLS. 

Latency is off course negligible because all the participants are running on the same computer but the goal is not to measure network latency. Rather we want to know if there is a benefit in using elliptic curve as apposed to multiplicative group el-gamal. 

The reason behind running 3 nodes is simple. There are subtle distinctions between nodes do depending on the position in the network. The first node needs to aggregate messages and initiate the mix when enough messages have been received. The last node needs to do additional calculations to prevent the tagging attack mentioned in section \ref{sec:tagging}. Additionally the last node needs to decrypt the final message en send it to its destination. So the minimal testcase should contain 3 nodes. 1 first, 1 middle and 1 last node. Now I don't expect to see much difference between these nodes with the exception of the ``RealPost'' step as the last node needs to prepare buffers with the plaintext to send out to the clients.

The reasoning behind running 500 clients is 2-fold. in the original cMix paper \cite{TODO} The largest test was with 500 clients. So I wanted to mimic that. The second reason is that it still feasible to do 500 clients using a single pc with 12GB or RAM. We still could increase the number of clients but running 500 of them gives us large enough timings that we don't need to worry about the timer resolution of the used CPU timers.

For the timings I used the \emph{boost::timer::cpu\_timer}\cite{BoostCpuTimer} which has a timer resolution of $10000000ns$ for both user and system clocks on a Linux environment. This is why all the results are accurate to one-hundredth of a second. The timings used are the so called ``User'' timings. This eliminates the time spend context switching, which gives us slightly more accurate results. The system and wall times are recorded though, just filtered out in the results table as they are not relevant. 

So for gathering results I created a program called statsd, it is included in the repository. The program receives timer snapshots over TCP. So each node sends a snapshot just before they start working on a phase of the cMix algorithm. After we are done with computational work but before sending the data to the next node another snapshot of the clock state is send to the statsd. So the results are purely the computation of that cMix phase. With some additional conversions to the wireformat, but not the overhead of sending the message over the socket. This is done just after the cMIx operation complete courtesy of the implicit strand of the boost::asio async socket operations.

The following results were gathered with the pc specs as listed in appendix \ref{app-specs}.

\begin{table}

\resizebox{\columnwidth}{!}{
\begin{tabular}{|c||c|c|c|c|c|c|}
\hline
Node & prepre & premix & prepost & realpre & realmix & realpost \\\hline\hline  
Node1 ec 500 & 3.662 (0.030) & 2.819 (0.015) & 1.163 (0.029) & 0.299 (0.004) & 0.122 (0.004) & 0.123 (0.004) \\\hline
Node2 ec 500 & 3.676 (0.025) & 2.818 (0.020) & 1.170 (0.029) & 0.302 (0.005) & 0.124 (0.005) & 0.123 (0.005) \\\hline
Node3 ec 500 & 3.680 (0.026) & 2.819 (0.018) & 1.169 (0.028) & 0.302 (0.004) & 0.212 (0.004) & 0.451 (0.020) \\\hline
\end{tabular}
}
\caption{Node time average over runs with standard deviation in seconds using ed25519.}
\end{table}

\begin{table}
\resizebox{\columnwidth}{!} {
\begin{tabular}{|c||c|c|c|c|c|c|}
\hline
Node & prepre & premix & prepost & realpre & realmix & realpost \\\hline\hline  
Node1 mg 500 & 19.145 (0.039) & 19.142 (0.035) & 20.125 (0.560) & 24.769 (1.373) & 0.074 (0.005) & 0.140 (0.005) \\\hline
Node2 mg 500 & 19.215 (0.041) & 19.140 (0.035) & 20.114 (0.661) & 24.509 (2.063) & 0.072 (0.005) & 0.139 (0.006) \\\hline
Node3 mg 500 & 19.219 (0.073) & 19.152 (0.066) & 20.235 (1.183) & 24.560 (2.845) & 0.074 (0.006) & 1.475 (0.018) \\\hline
\end{tabular}
}
\caption{Node time average over runs with standard deviation in seconds using 2048 bit multiplicative group.}

\end{table}
