# Parallel Privacy-Preserving Shortest Path Algorithms

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

- We present a privacy-preserving implementation of the Bellman–Ford SSSD algorithm [13] for sparse graphs, where the number of vertices and number of edges is public, but the endpoints and lengths of edges are private. An implementation with this set of features was presented before by Keller [11], using heavyweight constructions for oblivious RAM (ORAM) on top of SMC protocols. Our implementation uses the parallel oblivious reading subroutine by Laud [14], which is an excellent fit for the Bellman–Ford algorithm.
- –
- We also present a novel method for a necessary privacy-preserving subroutine of the Bellman–Ford algorithm—computing the minima of several lists of private values, where the lengths of individual lists are private, and only their total length is public.

- We present a privacy-preserving implementation of Dijkstra’s SSSD algorithm [15] for dense graphs, where the number of vertices (and edges) is public, but the lengths of edges are private. While an implementation with this set of features has been given before [9], we make use of state-of-the-art subroutines for all parts of the algorithm, thereby learning its actual performance.
- By combining both algorithms, we present the privacy-preserving implementation of the Johnson APSD algorithm, converting the graph from a sparse one to a dense one in the process. We compare the performance of this algorithm with the privacy-preserving implementation of the Floyd–Warshall APSD algorithm and with the private computation of the transitive closure of the graph.
- We perform an extensive benchmarking of our algorithms and their parts on graphs with different sizes, thereby obtaining a reasonable estimate for their performance in larger applications, including those where specific shortcuts (e.g., not running the whole number of iterations) are justified.

## 2. Materials and Methods

#### 2.1. Secure Multiparty Computation

#### 2.2. Abstractions and Notations for SMC

`public`and

`private`to denote that a value is known to the computation parties resp. that a value is stored inside the ABB.

#### 2.3. Sharemind Protocol Set

#### 2.4. Graphs

#### 2.5. Privacy-Preserving SSSD and APSD

#### 2.6. Parallel SSSD and APSD

## 3. Results

#### 3.1. Single-Source Shortest Distances Algorithms

#### 3.1.1. Bellman–Ford Algorithm for Sparse Graphs (Version 1)

Algorithm 1: SIMD-Bellman–Ford, main program |

Algorithm 2: GenIndicesVector |

Algorithm 3: prefixMin2 (version 1) |

#### 3.1.2. Bellman–Ford Algorithm for Sparse Graphs (Version 2)

Algorithm 4: prefixMin2 (version 2) |

#### 3.1.3. Dijkstra’s Algorithm for Dense Graphs

Algorithm 5: Dijkstra’s algorithm |

Algorithm 6: minLs: computing the pair with the minimal first component |

#### 3.1.4. Complexity of Algorithms

#### 3.1.5. Security of Algorithms

#### 3.2. All-Pairs Shortest Path Algorithms

#### 3.2.1. Johnson Algorithm

Algorithm 7: Johnson’s Algorithm |

#### 3.2.2. Floyd–Warshall Algorithm

Algorithm 8: Floyd–Warshall algorithm |

#### 3.2.3. Transitive Closure Algorithm

#### 3.2.4. Complexity of Algorithms

Algorithm 9: Transitive closure algorithm |

#### 3.2.5. Security of Algorithms

#### 3.3. Benchmarking Results in Previous Work

#### 3.4. Setup for Our Experiments

#### 3.5. Bellman–Ford Algorithm Experiments

#### 3.5.1. Bellman–Ford Algorithm in the HBLL Environment

#### 3.5.2. Effect of Network Bandwidth and Latency to Bellman–Ford Algorithm

#### 3.6. Dijkstra’s Algorithm Experiments

#### 3.6.1. Dijkstra’s Algorithm in the HBLL Environment

#### 3.6.2. Effect of Network Bandwidth and Latency to Dijkstra’s Algorithm

#### 3.7. All Pairs Shortest Paths EXPERIMENTS

#### 3.7.1. APSD Algorithms in the HBLL Environment

- If the number of edges is smaller, then the execution of the Bellman–Ford step needs less time.
- The execution time of the Bellman–Ford step may be smaller if it is run for a smaller number of iterations (see discussion in Section 3.5).
- If the shortest distances have to be found only from a subset of vertices, then a smaller number of instances of Dijkstra’s algorithm has to be executed.

#### 3.7.2. Bandwidth vs. Latency of Privacy-Preserving APSD Algorithms

## 4. Discussion

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## Appendix A. Execution Time and Bandwidth Consumption for Privacy-Preserving Shortest Distance Algorithms in Different Network Environments

**Table A1.**Benchmarking results (bandwidth for a single computing server) for Bellman–Ford algorithms in different network environments.

Size of | Version 1 (with Algorithm 3) | Version 2 (with Algorithm 4) | |||||||
---|---|---|---|---|---|---|---|---|---|

Graph | Band- | Running Time (s) | Band- | Running Time (s) | |||||

n | m | Width | HBLL | HBHL | LBHL | Width | HBLL | HBHL | LBHL |

50 | 400 | 32 MB | 2.8 | 799 | 799.5 | 65 MB | 2.8 | 448 | 451 |

50 | 1225 | 74 MB | 5.2 | 1155 | 1145 | 206 MB | 7.2 | 550 | 559 |

200 | 600 | 165 MB | 17.9 | 3270 | 3261 | 465 MB | 22.2 | 1823 | 1841 |

200 | 19.9 k | 2900 MB | 162 | 5626 | 5806 | 15.8 GB | 356.2 | 3122 | 4219 |

700 | 2100 | 1570 MB | 147 | 15.4 k | 15.4 k | 6.3 GB | 237.7 | 7529 | 7956 |

700 | 10 k | 5 GB | 348 | 18.5 k | 18.7 k | 27 GB | 661.7 | 9158 | 11.1 k |

700 | 244 k | 110 GB | 5823 | 35.9 k | 42.9 k | 810 GB | 16.4 k | 54.2 k | 111 k |

1 k | 3 k | 4 GB | 288 | 22 k | 22.2 k | 12.7 GB | 435.8 | 10.8 k | 13.5 k |

1 k | 20 k | 13 GB | 917 | 25.9 k | 26.7 k | 90 GB | 1879 | 14.8 k | 20.6 k |

1 k | 499 k | 320 GB | 16.6 k | 63.4 k | 81.7 k | 2.4 TB | 49.8 k | 156 k | 318 k |

3 k | 9 k | 65 GB | 2318 | 79.6 k | 81.1 k | 145 GB | 3889 | 39.8 k | 49.3 k |

3 k | 50 k | 133 GB | 6675 | 93.3 k | 100 k | 630 GB | 15 k | 56.3 k | 104 k |

**Table A2.**Benchmarking results for the parallel execution of Dijkstra’s algorithm on several graphs of the same size, in different network environments.

Num. of | Size of | Running Time (s) | ||
---|---|---|---|---|

Graphs | Graph | HBLL | HBHL | LBHL |

1 | 10 | 0.09 | 21.6 | 29.3 |

10 | 10 | 0.2 | 54.1 | 54.1 |

1 | 25 | 0.23 | 73.4 | 100.7 |

25 | 25 | 1.0 | 158.4 | 160.6 |

1 | 50 | 0.53 | 166.8 | 228.9 |

5 | 50 | 1.6 | 326.0 | 326.8 |

10 | 50 | 2.6 | 329.8 | 331.8 |

25 | 50 | 3.9 | 336.9 | 341.9 |

50 | 50 | 6.3 | 371.1 | 388.4 |

1 | 100 | 1.29 | 373.8 | 513.7 |

10 | 100 | 7.5 | 745.4 | 755.2 |

25 | 100 | 16.1 | 764.2 | 792.2 |

50 | 100 | 28.6 | 793.5 | 852.3 |

75 | 100 | 42.6 | 834.7 | 920.8 |

100 | 100 | 42.3 | 898.1 | 1019 |

1 | 200 | 3.37 | 828.3 | 1144 |

20 | 200 | 46.0 | 1699 | 1792 |

50 | 200 | 104.8 | 1800 | 2075 |

100 | 200 | 189.3 | 2138 | 2787 |

200 | 200 | 337.6 | 2657 | 3669 |

1 | 500 | 12.5 | 2884 | 4042 |

100 | 500 | 1049 | 7524 | 10.8 k |

500 | 500 | 3715 | 17.2 k | 34.6 k |

1 | 1000 | 46.1 | 6356 | 8933 |

50 | 1000 | 2129 | 15.7 k | 21.0 k |

500 | 1000 | 21.1 k | 62.2 k | 125 k |

1000 | 1000 | 42.5 k | 109 k | 235 k |

1 | 5000 | 853.4 | 40.8 k | 61.2 k |

100 | 5000 | 230 k | 390 k | 648.9 k |

**Table A3.**Benchmarking results (bandwidth for a single computing server) for Floyd–Warshall and transitive closure algorithms in different network environments.

Size | Floyd–Warshall | Transitive Closure | ||||||
---|---|---|---|---|---|---|---|---|

of | Band- | Running Time (s) | Band- | Running Time (s) | ||||

Graph | Width | HBLL | HBHL | LBHL | Width | HBLL | HBHL | LBHL |

5 | 0.08 MB | 0.01 | 2.22 | 2.22 | 0.46 MB | 0.02 | 4.01 | 4.01 |

10 | 0.48 MB | 0.03 | 4.44 | 4.46 | 1.64 MB | 0.05 | 7.37 | 7.53 |

20 | 3.52 MB | 0.1 | 9.1 | 9.35 | 16.4 MB | 0.29 | 12.9 | 14.2 |

50 | 54.1 MB | 0.92 | 23.6 | 28.6 | 318 MB | 5.56 | 26.9 | 66.3 |

100 | 402.2 MB | 6.91 | 52.9 | 90.5 | 3019 MB | 51.1 | 157.7 | 426.6 |

200 | 3417 MB | 62.4 | 153.6 | 526 | 27.3 GB | 460.5 | 1336 | 2529 |

500 | 53.3 GB | 934 | 2753 | 7469 | 490 GB | 7987 | 23.5 k | |

1 k | 426 GB | 7268 | 21.5 k | 57.4 k |

## References

- Brickell, J.; Shmatikov, V. Privacy-preserving graph algorithms in the semi-honest model. In International Conference on the Theory and Application of Cryptology and Information Security; Springer: Berlin/Heidelberg, Germany, 2005; pp. 236–252. [Google Scholar]
- Yao, A.C. Protocols for Secure Computations (Extended Abstract). In Proceedings of the 23rd Annual Symposium on Foundations of Computer Science, Chicago, IL, USA, 3–5 November 1982; pp. 160–164. [Google Scholar] [CrossRef]
- Chaum, D.; Crépeau, C.; Damgård, I. Multiparty Unconditionally Secure Protocols (Extended Abstract). In Symposium on Theory of Computing (STOC); ACM: New York, NY, USA, 1988; pp. 11–19. [Google Scholar]
- Goldreich, O.; Micali, S.; Wigderson, A. How to Play any Mental Game or A Completeness Theorem for Protocols with Honest Majority. In Symposium on Theory of Computing (STOC); ACM: New York, NY, USA, 1987; pp. 218–229. [Google Scholar]
- Pippenger, N.; Fischer, M.J. Relations among complexity measures. J. ACM
**1979**, 26, 361–381. [Google Scholar] [CrossRef] [Green Version] - Shamir, A. How to Share a Secret. Commun. ACM
**1979**, 22, 612–613. [Google Scholar] [CrossRef] - Cormen, T.H.; Leiserson, C.E.; Rivest, R.L.; Stein, C. Introduction to Algorithms; MIT Press: Cambridge, MA, USA, 2009. [Google Scholar]
- Aly, A.; Cuvelier, E.; Mawet, S.; Pereira, O.; Van Vyve, M. Securely Solving Simple Combinatorial Graph Problems. In Financial Cryptography; Springer: Berlin/Heidelberg, Germany, 2013; pp. 239–257. [Google Scholar]
- Aly, A.; Cleemput, S. An Improved Protocol for Securely Solving the Shortest Path Problem and its Application to Combinatorial Auctions. Cryptol. EPrint Arch. Rep.
**2017**, 2017, 971. [Google Scholar] - Goldreich, O.; Ostrovsky, R. Software Protection and Simulation on Oblivious RAMs. J. ACM
**1996**, 43, 431–473. [Google Scholar] [CrossRef] [Green Version] - Keller, M.; Scholl, P. Efficient, oblivious data structures for MPC. In International Conference on the Theory and Application of Cryptology and Information Security; Springer: Berlin/Heidelberg, Germany, 2014; pp. 506–525. [Google Scholar]
- Liu, C.; Huang, Y.; Shi, E.; Katz, J.; Hicks, M. Automating Efficient RAM-Model Secure Computation. In Proceedings of 2014 IEEE Symposium on Security and Privacy, Berkeley, CA, USA, 18–21 May 2014; pp. 623–638. [Google Scholar]
- Bellman, R. On a routing problem. Q. Appl. Math.
**1985**, 16, 87–90. [Google Scholar] [CrossRef] [Green Version] - Laud, P. Parallel oblivious array access for secure multiparty computation and privacy-preserving minimum spanning trees. Proc. Priv. Enhancing Technol.
**2015**, 2015, 188–205. [Google Scholar] [CrossRef] [Green Version] - Dijkstra, E.W. A note on two problems in connexion with graphs. Numer. Math.
**1959**, 1, 269–271. [Google Scholar] [CrossRef] [Green Version] - Bogdanov, D.; Niitsoo, M.; Toft, T.; Willemson, J. High-performance secure multi-party computation for data mining applications. Int. J. Inf. Secur.
**2012**, 11, 403–418. [Google Scholar] [CrossRef] - Bogdanov, D.; Laur, S.; Willemson, J. Sharemind: A framework for fast privacy-preserving computations. In European Symposium on Research in Computer Security (ESORICS); Springer: Berlin/Heidelberg, Germany, 2008; pp. 192–206. [Google Scholar]
- Damgård, I.; Nielsen, J.B. Universally Composable Efficient Multiparty Computation from Threshold Homomorphic Encryption. In Proceedings of the Advances in Cryptology—CRYPTO 2003, 23rd Annual International Cryptology Conference, Santa Barbara, CA, USA, 17–21 August 2003; Proceedings (Lecture Notes in Computer Science, Vol. 2729). Boneh, D., Ed.; Springer: Berlin/Heidelberg, Germany, 2003; pp. 247–264. [Google Scholar]
- Gennaro, R.; Rabin, M.O.; Rabin, T. Simplified VSS and Fast-Track Multiparty Computations with Applications to Threshold Cryptography. In Proceedings of the Seventeenth Annual ACM Symposium on Principles of Distributed Computing, PODC ’98, Puerto Vallarta, Mexico, 28 June–2 July 1998; Yehuda Afek, B.A.C., Ed.; ACM: New York, NY, USA, 1998; pp. 101–111. [Google Scholar]
- Agrawal, R.; Srikant, R. Privacy-preserving data mining. In Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, Dallas, TX, USA, 15–18 May 2000; pp. 439–450. [Google Scholar]
- Lindell, Y.; Pinkas, B. Privacy Preserving Data Mining. J. Cryptol.
**2000**, 15, 177–206. [Google Scholar] [CrossRef] - Mendes, R.; Vilela, J.P. Privacy-preserving data mining: Methods, metrics, and applications. IEEE Access
**2017**, 5, 10562–10582. [Google Scholar] [CrossRef] - Ostrak, A.; Randmets, J.; Sokk, V.; Laur, S.; Kamm, L. Implementing Privacy-Preserving Genotype Analysis with Consideration for Population Stratification. Cryptography
**2021**, 5, 21. [Google Scholar] [CrossRef] - Freedman, M.J.; Nissim, K.; Pinkas, B. Efficient private matching and set intersection. In International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2004; pp. 1–19. [Google Scholar]
- Saldamli, G.; Ertaul, L.; Dholakia, K.; Sanikommu, U. An Efficient Private Matching and Set Intersection Protocol: Implementation PM-Malicious Server. In Proceedings of the International Conference on Security and Management (SAM), The Steering Committee of the World Congress in Computer Science, Las Vegas, NV, USA, 29 July–1 August 2019; pp. 16–22. [Google Scholar]
- Naor, M.; Pinkas, P.; Sumner, R. Privacy preserving auctions and mechanism design. In Proceedings of the 1st ACM Conference on Electronic Commerce, Denver, CO, USA, 3–5 November 1999; pp. 129–139. [Google Scholar]
- Kissner, L.; Song, D. Privacy-preserving set operations. In Annual International Cryptology Conference; Springer: Berlin/Heidelberg, Germany, 2005; pp. 241–257. [Google Scholar]
- Anagreh, M.; Vainikko, E.; Laud, P. Parallel Privacy-preserving Computation of Minimum Spanning Trees. In Proceedings of the 7th International Conference on Information Systems Security and Privacy—ICISSP, online, 11–13 February 2021; pp. 181–190, ISBN 978-989-758-491-6. ISSN 2184-4356. [Google Scholar] [CrossRef]
- Laud, P.; Pankova, A.; Kamm, L.; Veeningen, M. Basic Constructions of Secure Multiparty Computation. In Applications of Secure Multiparty Computation; Laud, P., Kamm, L., Eds.; IOS Press: Amsterdam, The Netherlands, 2015; pp. 1–25. [Google Scholar]
- Laud, P. Stateful abstractions of secure multiparty computation. In Applications of Secure Multiparty Computation; Laud, P., Kamm, L., Eds.; IOS Press: Amsterdam, The Netherlands, 2015; pp. 26–42. [Google Scholar]
- Canetti, R. Security and composition of multiparty cryptographic protocols. J. Cryptol.
**2000**, 13, 143–202. [Google Scholar] [CrossRef] - Laur, S.; Pullonen-Raudvere, P. Foundations of Programmable Secure Computation. Cryptography
**2021**, 5, 22. [Google Scholar] [CrossRef] - Bogdanov, D.; Laud, P.; Randmets, J. Domain-Polymorphic Programming of Privacy-Preserving Applications. In Proceedings of the Ninth Workshop on Programming Languages and Analysis for Security, PLAS@ECOOP2014, Uppsala, Sweden, 29 July 2014; Russo, A., Tripp, O., Eds.; ACM: New York, NY, USA, 2014; pp. 53–65. [Google Scholar]
- Damgård, I.; Pastro, V.; Smart, P.; Zakarias, S. Multi-party Computation from Somewhat Homomorphic Encryption. In Proceedings of the Advances in Cryptology—CRYPTO 2012—32nd Annual Cryptology Conference, Santa Barbara, CA, USA, 19–23 August 2012; Proceedings (Lecture Notes in Computer Science, Vol. 7417). Reihaneh Safavi-Naini, R., Canetti, R., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 643–662. [Google Scholar]
- Laur, S.; Willemson, J.; Zhang, B. Round-Efficient Oblivious Database Manipulation. In Proceedings of the Information Security, 14th International Conference, ISC 2011, Xi’an, China, 26–29 October 2011; Proceedings (Lecture Notes in Computer Science, Vol. 7001). Lai, X., Zhou, J., Li, H., Eds.; Springer: Berlin/Heidelberg, Germany, 2011; pp. 262–277. [Google Scholar]
- Laud, P. Linear-time oblivious permutations for SPDZ. 2021; submitted. [Google Scholar]
- Bogdanov, D.; Laur, S.; Talviste, R. A Practical Analysis of Oblivious Sorting Algorithms for Secure Multi-party Computation. In Proceedings of the Secure IT Systems-19th Nordic Conference, NordSec 2014, Tromsø, Norway, 15–17 October 2014; Proceedings (Lecture Notes in Computer Science, Vol. 8788). Bernsmed, K., Fischer-Hübner, S., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; pp. 59–74. [Google Scholar]
- Anagreh, M.; Vainikko, E.; Laud, P. Parallel Privacy-Preserving Shortest Paths by Radius-Stepping. In Proceedings of the 2021 29th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP), Valladolid, Spain, 10–12 March 2021; pp. 276–280. [Google Scholar]
- Blelloch, G.E.; Gu, Y.; Sun, Y.; Tangwongsan, K. Parallel shortest paths using radius stepping. In Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures, Pacific Grove, CA, USA, 11–13 July 2016; ACM: New York, NY, USA, 2016; pp. 443–454. [Google Scholar]
- Meyer, U.; Sanders, P. Δ-stepping: A parallelizable shortest path algorithm. J. Algorithms
**2003**, 49, 114–152. [Google Scholar] [CrossRef] [Green Version] - Wu, D.J.; Zimmerman, J.; Planul, J.; Mitchell, J.C. Privacy-Preserving Shortest Path Computation. In Proceedings of the 23rd Annual Network and Distributed System Security Symposium, NDSS 2016, San Diego, CA, USA, 21–24 February 2016; The Internet Society: Reston, VA, USA, 2016. [Google Scholar]
- Ramezanian, S.; Meskanen, T.; Niemi, V. Privacy Preserving Shortest Path Queries on Directed Graph. In Proceedings of the 2018 22nd Conference of Open Innovations Association (FRUCT), Jyvaskyla, Finland, 15–18 May 2018; pp. 217–223. [Google Scholar]
- Matsumoto, K.; Nakasato, N.; Sedukhin, S.G. Blocked united algorithm for the all-pairs shortest paths problem on hybrid CPU-GPU systems. IEICE Trans. Inf. Syst.
**2012**, 95, 2759–2768. [Google Scholar] [CrossRef] [Green Version] - Nepomniaschaya, A.S. Concurrent selection of the shortest paths and distances in directed graphs using vertical processing systems. Bull. Novosib. Comput. Cent.
**2003**, 19, 61–72. [Google Scholar] - Han, S.C.; Kang, S.C. Optimizing All Pairs Shortest Path Algorithm Using Vector Instructions. Project Report, Carnegie-Mellon University. 2005. Available online: https://users.ece.cmu.edu/~pueschel/teaching/18-799B-CMU-spring05/material/sungchul-sukchan.pdf (accessed on 12 October 2021).
- Takei, Y.; Hariyama, M.; Kameyama, M. Evaluation of an FPGA-based shortest-path-search accelerator. In Proceedings of the International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA), Las Vegas, USA, 27–30 July 2015; p. 613. [Google Scholar]
- Nagavalli, S. Dynamic Optimization—Using Hardware Parallelism for Faster Search via Dynamic Programming. Project Report, Carnegie-Mellon University. 2013. Available online: https://www.andrew.cmu.edu/user/snagaval/16-745/Project/16-745-Project-Report-SasankaNagavalli.pdf (accessed on 12 October 2021).
- Klein, P.N.; Subramanian, S. A randomized parallel algorithm for single-source shortest paths. J. Algorithms
**1997**, 25, 205–220. [Google Scholar] [CrossRef] [Green Version] - Meyer, U. Design and Analysis of Sequential and Parallel Single-Source Shortest-Paths Algorithms. Ph.D. Dissertation, University of Saarland, Saarbrücken, Germany, 2002. [Google Scholar]
- Träff, J.L.; Zaroliagis, C.D. A simple parallel algorithm for the single-source shortest path problem on planar digraphs. In Proceedings of the International Workshop on Parallel Algorithms for Irregularly Structured Problems, Santa Barbara, CA, USA, 19–21 August 1996; Springer: Berlin/Heidelberg, Germany, 1996; pp. 183–194. [Google Scholar]
- Gentry, C.; Halevi, S.; Lu, S.; Ostrovsky, R.; Raykova, M.; Wichs, D. Garbled RAM Revisited. In Proceedings of the Advances in Cryptology—EUROCRYPT 2014—33rd Annual International Conference on the Theory and Applications of Cryptographic Techniques, Copenhagen, Denmark, 11–15 May 2014; Proceedings (Lecture Notes in Computer Science, Vol. 8441). Nguyen, P.Q., Oswald, E., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; pp. 405–422. [Google Scholar]
- Ladner, R.E.; Fischer, M.J. Parallel prefix computation. J. ACM
**1980**, 27, 831–838. [Google Scholar] [CrossRef] - Hillis, W.; Steele, G. Data parallel algorithms. Commun. ACM
**1986**, 29, 1170–1183. [Google Scholar] [CrossRef] - Kerschbaum, F.; Schaad, A. Privacy-preserving social network analysis for criminal investigations. In Proceedings of the 2008 ACM Workshop on Privacy in the Electronic Society, WPES 2008, Alexandria, VA, USA, 27 October 2008; Atluri, V., Winslett, M., Eds.; ACM: New York, NY, USA, 2008; pp. 9–14. [Google Scholar]
- Geisler, M. Cryptographic Protocols: Theory and Implementation. Ph.D. Dissertation, Aarhus University, Aarhus, Denmark, 2010. [Google Scholar]
- Ben-Or, M.; Goldwasser, S.; Wigderson, A. Completeness Theorems for Non-Cryptographic Fault-Tolerant Distributed Computation (Extended Abstract). In Proceedings of the 20th Annual ACM Symposium on Theory of Computing, Chicago, IL, USA, 2–4 May 1988; Simon, J., Ed.; ACM: New York, NY, USA, 1988; pp. 1–10. [Google Scholar]
- Toft, T. Primitives and Applications for Multi-Party Computation. Ph.D. Dissertation, University of Aarhus, Aarhus, Denmark, 2007. [Google Scholar]
- Carter, H.; Mood, B.; Traynor, P.; Butler, K.R. Secure Outsourced Garbled Circuit Evaluation for Mobile Devices. In Proceedings of the 22th USENIX Security Symposium, Washington, DC, USA, 14–16 August 2013; King, S.T., Ed.; USENIX Association: Berkeley, CA, USA, 2013; pp. 289–304. [Google Scholar]
- Liu, C.; Wang, X.S.; Nayak, N.; Huang, Y.; Shi, E. ObliVM: A Programming Framework for Secure Computation. In Proceedings of the 2015 IEEE Symposium on Security and Privacy, SP 2015, San Jose, CA, USA, 17–21 May 2015; pp. 359–376. [Google Scholar] [CrossRef]
- Wangat, X.S. Oblivious Data Structures. In Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security, Scottsdale, AZ, USA, 3–7 November 2014; Ahn, G.J., Yung, M., Li, N., Eds.; ACM: New York, NY, USA, 2014; pp. 15–226. [Google Scholar]
- Bellare, M.; Hoang, V.T.; Keelveedhi, S.; Rogaway, P. Efficient Garbling from a Fixed-Key Block cipher. In Proceedings of the 2013 IEEE Symposium on Security and Privacy, SP 2013, Berkeley, CA, USA, 19–22 May 2013; pp. 478–492. [Google Scholar]
- Blanton, M.; Steele, A.; Aliasgari, M. Data-oblivious graph algorithms for secure computation and outsourcing. In Proceedings of the 8th ACM Symposium on Information, Computer and Communications Security, ASIA CCS ’13, Hangzhou, China, 8–10 May 2013; Chen, K., Xie, Q., Qiu, W., Li, N., Tzeng, W.G., Eds.; ACM: New York, NY, USA, 2013; pp. 207–218. [Google Scholar]
- Karp, A.H.; Flatt, H.P. Measuring Parallel Processor Performance. Commun. ACM
**1990**, 33, 539–543. [Google Scholar] [CrossRef]

**Figure 1.**Bellman-Ford algorithm performance (time in seconds) in different networks for different $(n,m)$ (red: HBLL, green: HBHL, blue: LBHL, dark: Version 1, light: Version 2).

**Figure 2.**Performance (in seconds) comparison of Dijkstra’s (blue) and Bellman–Ford (red) algorithms on sparse and dense graphs.

**Figure 3.**Performance (in seconds) comparison of Dijkstra’s (blue) and Bellman–Ford (light red: $m=3n$; dark red: $m=2n$) algorithms on planar-like graphs.

**Figure 4.**Performance (in seconds) of Dijkstra’s algorithm on graphs with given numbers of vertices in different network environments (red: HBLL, green: HBHL, blue: LBHL).

**Figure 5.**Dijkstra’s algorithm performance (as serial fraction; lower is better) on multiple graphs of various sizes (number of vertices given on the graph) in different network environments (red: HBLL, green: HBHL, blue: LBHL).

**Figure 6.**Performance (time in seconds) of Floyd–Warshall and transitive closure algorithms on graphs of different sizes in different network environments (red: HBLL, green: HBHL, blue: LBHL, dark: Floyd–Warshall, light: transitive closure).

Graph | BF Version 2 | BF Version 1 | ||||
---|---|---|---|---|---|---|

n | m | Pre. | Loop | Total | Loop | Total |

10 | 25 | 0.18 | 0.27 | |||

20 | 100 | 0.53 | 0.70 | |||

50 | 400 | 2.68 | 2.70 | |||

85 | 1200 | 11.3 | 8.10 | |||

170 | 2500 | 37.8 | 25.8 | |||

350 | 1050 | 9.4 | 42.7 | 52.1 | 27.5 | 36.9 |

350 | 2000 | 9.4 | 68.9 | 78.3 | 41.6 | 51.0 |

500 | 1500 | 18.9 | 87.3 | 106.2 | 54.1 | 73.0 |

500 | 5000 | 19.7 | 195.0 | 214.7 | 121.4 | 140.7 |

700 | 2100 | 37.3 | 165.5 | 202.8 | 109.5 | 146.8 |

700 | 10 k | 38.2 | 476.1 | 514.3 | 291.1 | 329.3 |

3000 | 9 k | 663 | 2541 | 3204 | 1545 | 2208 |

3000 | 50 k | 676 | 10,511 | 11,187 | 5415 | 6091 |

4500 | 13.5 k | 1515 | 5830 | 7345 | 3239 | 4754 |

4500 | 100 k | 1.5 k | 16.2 k | 17.7 k | ||

7000 | 21 k | 3.6 k | 7.7 k | 11.3 k | ||

7000 | 200 k | 3.6 k | 46.6 k | 50.2 k | ||

8500 | 25.5 k | 5.2 k | 11.2 k | 16.4 k | ||

8500 | 300 k | 5.3 k | 81.7 k | 87 k | ||

9500 | 28.5 k | 6.6 k | 12.9 k | 19.4 k | ||

9500 | 500 k | 6.6 k | 144 k | 151 k |

Graph | Dijkstra | |||
---|---|---|---|---|

n | m | Perm. | Loop | Total |

10 | 25 | 0.01 | 0.08 | 0.09 |

20 | 100 | 0.02 | 0.016 | 0.18 |

50 | 1225 | 0.09 | 0.48 | 0.57 |

64 | 2016 | 0.12 | 0.69 | 0.81 |

85 | 3500 | 0.19 | 1.02 | 1.2 |

150 | 11 k | 0.5 | 2.5 | 3.0 |

300 | 44.8 k | 1.63 | 6.42 | 8.1 |

450 | 100 k | 3.43 | 13.66 | 17.1 |

700 | 3000 | 8.2 | 29.0 | 37.2 |

700 | 244 k | 7.94 | 29.28 | 37.2 |

900 | 244 k | 13.3 | 40.18 | 53.5 |

2000 | 1.9 M | 57.5 | 196.3 | 253.8 |

3000 | 4.4 M | 137.9 | 479.4 | 617.3 |

4500 | 10 M | 312.9 | 1006.4 | 1319.3 |

5000 | 12.4 M | 380.9 | 1196.6 | 1577.5 |

7000 | 24 M | 745.6 | 2266.9 | 3012.5 |

10 k | 49.9 M | 1572.9 | 4488.7 | 6061.6 |

15 K | 112 M | 3601 | 9807 | 13.4 k |

Graph | Privacy-Preserving Johnson V1 | Privacy-Preserving Johnson V2 | V1, V2 | Floyd- | Transitive- | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|

n | m | BF. | upd. | Dijk. | Total | BF. | upd. | Dijk. | Total | Speed-Up | Warshall | Closure |

5 | 10 | 0.18 | 0.03 | 0.10 | 0.31 | 0.18 | 0.03 | 0.06 | 0.27 | 1.2x | 0.01 | 0.02 |

10 | 45 | 0.45 | 0.45 | 0.51 | 1.41 | 0.45 | 0.45 | 0.18 | 1.08 | 1.3x | 0.03 | 0.05 |

20 | 190 | 1.04 | 0.07 | 2.22 | 3.33 | 1.04 | 0.07 | 0.55 | 1.66 | 2.0x | 0.10 | 0.29 |

50 | 1225 | 5.28 | 0.23 | 20.7 | 26.2 | 5.28 | 0.23 | 6.19 | 11.7 | 2.2x | 0.92 | 5.56 |

100 | 4950 | 27.22 | 1.0 | 109.9 | 138.1 | 27.2 | 1.0 | 43.6 | 71.8 | 1.9x | 6.91 | 51.1 |

200 | 19.9 k | 166.3 | 3.55 | 583.2 | 752.9 | 166.3 | 3.55 | 339.0 | 508.8 | 1.5x | 62.4 | 460.5 |

500 | 124 k | 2282 | 26.9 | 6644 | 8954 | 2282 | 26.9 | 5015 | 7324 | 1.2x | 933.8 | 7987 |

1 k | 499 k | 16,392 | 117.4 | 48,582 | 65477 | 16,392 | 117.4 | 43,599 | 60,494 | 1.08x | 7268 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Anagreh, M.; Laud, P.; Vainikko, E.
Parallel Privacy-Preserving Shortest Path Algorithms. *Cryptography* **2021**, *5*, 27.
https://doi.org/10.3390/cryptography5040027

**AMA Style**

Anagreh M, Laud P, Vainikko E.
Parallel Privacy-Preserving Shortest Path Algorithms. *Cryptography*. 2021; 5(4):27.
https://doi.org/10.3390/cryptography5040027

**Chicago/Turabian Style**

Anagreh, Mohammad, Peeter Laud, and Eero Vainikko.
2021. "Parallel Privacy-Preserving Shortest Path Algorithms" *Cryptography* 5, no. 4: 27.
https://doi.org/10.3390/cryptography5040027