# A Secure Median Implementation for the Federated Secure Computing Architecture
## 3 Materials and Methods
### Implementation
### Compute Time as a Function of the Size of the Data

The running times as a function of varying dataset sizes and data ranges are illustrated in Figure 4. The setup involved a local deployment on a consumer-grade laptop, with two parties each running a server on localhost. For dataset sizes up to \(10^{6}\), the runtimes are consistent, typically between 1 and 4 s, and grow slightly with the data range. However, for datasets larger than \(10^{6}\), the runtime grows exponentially. This exponential growth is evident in datasets containing \(10^{7}\) entries, where runtimes exceed 15 s.

### Compute Time as a Function of the Number of Parties

The runtime as a function of the number of parties is illustrated in Figure 5. This experiment was also conducted locally on a standard laptop, with each party running a server on localhost. In Figure 5a, the dataset size was fixed at \(10^{2}\), while in Figure 5b, the input range was set to \(10^{2}\). Notably, the runtime shows a linear growth pattern as the number of parties increases. Additionally, the effect of the data range becomes more significant as the number of parties increases, while there seems to be no systematic increase in running time due to increasing data size up to \(10^{6}\), as observed in the previous analysis. Figure 4: Runtime as a function of the size of the data on a laptop with 2 parties in local deployment. ### Networking Overhead

To assess the networking overhead, we conducted a series of experiments utilizing AWS EC2 instances. Specifically, we evaluated the computational performance across six regions covering Europe (Frankfurt: eu-central-1, Zurich: eu-central-2), Asia-Pacific (Tokyo: ap-northeast-1, Mumbai: ap-south-1), and Northamerica (N-California: us-west-1, Ohio: us-east-2). We tested both within each continent and across continents to capture the impact of varying round-trip times (RTT) on runtimes. Here, we set both the data range and dataset size to \(10^{2}\). Our measurements revealed an RTT ranging from approximately 7 ms to 200 ms between each pair of AWS regions. Notably, as the RTT increased, so did the runtime. While the runtime remained around 2 s in the local setup, it grew to over 100 s between Frankfurt and Tokyo. See Table 1.

### Real-World Dataset

For a real-world evaluation, we utilized two datasets. We evaluated the split breast cancer dataset using two AWS EC2 instances located in Frankfurt (eu-central-1) and Tokyo (ap-northeast-1). For the heart disease dataset, we leveraged the inherent grouping and selected AWS regions closest to the original recording sites: Ohio (us-east-1), Northern California (us-west-1), Zurich (eu-central-2), and Frankfurt (eu-central-1). To estimate networking overhead, we also conducted a local setup with two and four parties, respectively. For the breast cancer dataset, the runtime ignoring networking overhead (local deployment) was approximately 4 s. However, networking overhead between Europe and Japan extended the runtime to over 260 s. Similarly, for the heart disease dataset, the runtime on a local deployment was around 16-17 s. With networking, this increased to over 800 s. See Table 2. \begin{table}
\begin{tabular}{l l c c} \hline \hline
**Party 1** & **Party 2** & **RTT [ms]** & **Duration [s]** \\ \hline Frankfurt (eu-central-1) & Tokyo (ap-northeast-1) & 222.77 & 128.00 \\ N-California (us-west-1) & Frankfurt (eu-central-1) & 149.80 & 96.69 \\ Tokyo (ap-northeast-1) & N-California (us-west-1) & 106.05 & 61.58 \\ Mumbai(ap-south-1) & Tokyo (ap-northeast-1) & 129.33 & 85.81 \\ Ohio (us-east-2) & N-California (us-west-1) & 50.98 & 34.64 \\ Zurich (eu-central-2) & Frankfurt (eu-central-1) & 7.16 & 6.07 \\ AWS-localhost & AWS-localhost & \(<\)0.1 & 2.04 \\ Localhost & Localhost & \(<\)0.1 & 1.87 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Round trip time (RTT) and duration values between different AWS regions as well as two parties running on localhost. The data size and range were set to \(10^{2}\).