\section{Results} \label{sec: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 client to node, are TCP connections encrypted using TLS. Network 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 ElGamal. The reason behind running 3 nodes is simple. There are subtle distinctions between what 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 test case should contain 3 nodes. 1 first, 1 middle and 1 last node. I don't expect to see much difference between these nodes with the exception of the ``RealPost'' step as the last node needs to decrypt the ciphertext, and prepare plaintext buffers to send out to the clients. The reasoning behind running 500 clients is 2-fold. In the original \cmix paper \cite{cMix} 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 could still increase the number of clients by about 100 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. And not running the extra 100 clients just gives us some headroom when other applications needs some extra ram. 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 also recorded, but 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 about the computation of that \cmix phase. With some additional conversions to the wire format of the timer snapshots, 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 asynchronous socket operations. Gathering the results over TCP with a separate daemon enables people to run this same benchmark over separate servers. Enabling some nice test vectors as you can control network congestion and packet loss. \subsection{summary of the results} The following results were gathered with the pc specs as listed in appendix \ref{app-specs}. The optimization specific flags that were used are listed in appendix \ref{app-ccopts}. \begin{table}[!ht] \centering \begin{footnotesize} \begin{tabular}{|r|r|r|r|r|r|r|} \hline \input{results/ec_summary.tab} \end{tabular} \end{footnotesize} \caption{Node time average over 100 runs with standard deviation in seconds using ed25519 and running 500 clients.} \end{table} \begin{table}[!ht] \centering \begin{footnotesize} \begin{tabular}{|r|r|r|r|r|r|r|} \hline \input{results/mg_summary.tab} \end{tabular} \end{footnotesize} \caption{Node time average over 100 runs with standard deviation in seconds using 2048 bit multiplicative group and running 500 clients.} \end{table} \clearpage \tikzset{every picture/.style={line width=2pt}} \begin{figure}[!ht] \centering \begin{tikzpicture} \begin{axis}[ xmin=0, xmax=500, xtick=data, ymin=0, ymax=200, ymajorgrids=true, grid style=dashed, legend pos=north west, width=.98*\columnwidth, height=.63*\columnwidth, xlabel={Number of clients}, ylabel={Time in s} ] \input{results/prePre.graph} \legend{Node1 ec prepre,,,,Node2 ec prepre,,,,Node3 ec prepre,,,,Node1 mg prepre,,,,Node2 mg prepre,,,,Node3 mg prepre} \end{axis} \end{tikzpicture} \caption{A graph of the average times for the precomputation precomputation step.} \label{fig:prepre} \end{figure} \begin{figure}[!ht] \centering \begin{tikzpicture} \begin{axis}[ xmin=0, xmax=500, xtick=data, ymin=0, ymax=80, ymajorgrids=true, grid style=dashed, legend pos=north west, width=.98*\columnwidth, height=.63*\columnwidth, xlabel={Number of clients}, ylabel={Time in s} ] \input{results/preMix.graph} \legend{Node1 ec premix,,,,Node2 ec premix,,,,Node3 ec premix,,,,Node1 mg premix,,,,Node2 mg premix,,,,Node3 mg premix} \end{axis} \end{tikzpicture} \caption{A graph of the average times for the precomputation mix step.} \label{fig:premix} \end{figure} \begin{figure}[!ht] \centering \begin{tikzpicture} \begin{axis}[ xmin=0, xmax=500, xtick=data, ymin=0, ymax=22, ymajorgrids=true, grid style=dashed, legend pos=north west, width=.98*\columnwidth, height=.63*\columnwidth, xlabel={Number of clients}, ylabel={Time in s} ] \input{results/prePost.graph} \legend{Node1 ec prepost,,,,Node2 ec prepost,,,,Node3 ec prepost,,,,Node1 mg prepost,,,,Node2 mg prepost,,,,Node3 mg prepost} \end{axis} \end{tikzpicture} \caption{A graph of the average times for the precomputation postcomputation step.} \label{fig:prepost} \end{figure} \begin{figure}[!ht] \centering \begin{tikzpicture} \begin{axis}[ xmin=0, xmax=500, xtick=data, ymin=0, ymax=15, ymajorgrids=true, grid style=dashed, legend pos=north west, width=.98*\columnwidth, height=.64*\columnwidth, xlabel={Number of clients}, ylabel={Time in s} ] \input{results/realPre.graph} \legend{Node1 ec realpre,,,,Node2 ec realpre,,,,Node3 ec realpre,,,,Node1 mg realpre,,,,Node2 mg realpre,,,,Node3 mg realpre} \end{axis} \end{tikzpicture} \caption{A graph of the average times for the realtime precomputation step.} \label{fig:realpre} \end{figure} \begin{figure}[!ht] \centering \begin{tikzpicture} \begin{axis}[ scaled ticks=false, tick label style={/pgf/number format/fixed}, xmin=0, xmax=500, xtick=data, ymin=0, ymax=1.2, ymajorgrids=true, grid style=dashed, legend pos=north west, width=.98*\columnwidth, height=.64*\columnwidth, xlabel={Number of clients}, ylabel={Time in s} ] \input{results/realMix.graph} \legend{Node1 ec realmix,,,,Node2 ec realmix,,,,Node3 ec realmix,,,,Node1 mg realmix,,,,Node2 mg realmix,,,,Node3 mg realmix} \end{axis} \end{tikzpicture} \caption{A graph of the average times for the realtime mix step.} \label{fig:realmix} \end{figure} \begin{figure}[!ht] \centering \begin{tikzpicture} \begin{axis}[ scaled ticks=false, tick label style={/pgf/number format/fixed}, xmin=0, xmax=500, xtick=data, ymin=0, ymax=2.5, ymajorgrids=true, grid style=dashed, legend pos=north west, width=.98*\columnwidth, height=.63*\columnwidth, xlabel={Number of clients}, ylabel={Time in s} ] \input{results/realPost.graph} \legend{Node1 ec realpost,,,,Node2 ec realpost,,,,Node3 ec realpost,,,,Node1 mg realpost,,,,Node2 mg realpost,,,,Node3 mg realpost} \end{axis} \end{tikzpicture} \caption{A graph of the average times for the realtime postcomputation step.} \label{fig:realpost} \end{figure} \pagebreak