Ridesharing is revolutionizing the transportation industry in many countries. Yet, the state of the art is based on heavily centralized services and platforms, where the service providers have full possession of the users’ location data. Recently, researchers have started addressing the challenge of enabling privacy-preserving ridesharing. The initial proposals, however, have shortcomings, as some rely on a central party, some incur high performance penalties, and most do not consider time preferences for ridesharing. TOPPool encompasses ridesharing based on the proximity of end-points of a ride as well as partial itinerary overlaps. To achieve the latter, we propose a simple yet powerful reduction to a private set intersection on trips represented as sets of consecutive road segments. We show that TOPPool includes time preferences while preserving privacy and without relying on a third party. We evaluate our approach on real-world data from the New York’s Taxi & Limousine Commission. Our experiments demonstrate that TOPPool is superior in performance over the prior work: our intersection-based itinerary matching runs in less than 0.3 seconds for reasonable trip length, in contrast, on the same set of trips prior work takes up to 10 hours.
 R. Chen, B. C. M. Fung, and B. C. Desai. Differentially private trajectory data publication. CoRR, abs/1112.2020, 2011.
 M. Ciampi and C. Orlandi. Combining private set-intersection with secure two-party computation. In Security and Cryptography for Networks - 11th International Conference, SCN 2018, Amalfi, Italy, September 5-7, 2018, Proceedings, pages 464–482, 2018.
 I. Damgørd, M. Geisler, and M. Krøigard. Homomorphic Encryption and Secure Comparison. Int. J. Appl. Cryptol., 1(1):22–31, Feb. 2008.
 M. J. Freedman, K. Nissim, and B. Pinkas. Efficient private matching and set intersection. In Advances in Cryptology - EUROCRYPT 2004, International Conference on the Theory and Applications of Cryptographic Techniques, Interlaken, Switzerland, May 2-6, 2004, Proceedings, pages 1–19, 2004.
 D. Freni, C. R. Vicente, S. Mascetti, C. Bettini, and C. S. Jensen. Preserving location and absence privacy in geosocial networks. In Proceedings of the 19th ACM Conference on Information and Knowledge Management, CIKM 2010, Toronto, Ontario, Canada, October 26-30, 2010, pages 309–318, 2010.
 M. Furuhata, M. Dessouky, F. Ordóñez, M.-E. Brunet, X. Wang, and S. Koenig. Ridesharing: The state-of-the-art and future directions. Transportation Research Part B: Methodological, 57:28 – 46, 2013.
 General Data Protection Regulation, EU Regulation 2016/679, 2018.
 C. Gentry. Fully homomorphic encryption using ideal lattices. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31 - June 2, 2009, pages 169–178, 2009.
 G. Ghinita. Private queries and trajectory anonymization: a dual perspective on location privacy. Trans. Data Privacy, 2(1):3–19, 2009.
 P. Hallgren, M. Ochoa, and A. Sabelfeld. InnerCircle: A parallelizable decentralized privacy-preserving location proximity protocol. In 2015 13th Annual Conference on Privacy, Security and Trust (PST), pages 1–6, July 2015.
 P. Hallgren, C. Orlandi, and A. Sabelfeld. PrivatePool: Privacy-Preserving Ridesharing. In 2017 IEEE 30th Computer Security Foundations Symposium (CSF), pages 276–291, Aug 2017.
 P. A. Hallgren, M. Ochoa, and A. Sabelfeld. Innercircle: A parallelizable decentralized privacy-preserving location proximity protocol. In 13th Annual Conference on Privacy, Security and Trust, PST 2015, Izmir, Turkey, July 21-23, 2015, pages 1–6, 2015.
 P. A. Hallgren, M. Ochoa, and A. Sabelfeld. Maxpace: Speed-constrained location queries. In 2016 IEEE Conference on Communications and Network Security, CNS 2016, Philadelphia, PA, USA, October 17-19, 2016, 2016.
 C. Hazay and Y. Lindell. Efficient secure two-party protocols: Techniques and constructions. Springer Science & Business Media, 2010.
 Y. He, J. Ni, X. Wang, B. Niu, F. Li, and X. Shen. Privacy-preserving partner selection for ride-sharing services. IEEE Trans. Vehicular Technology, 67(7):5994–6005, 2018.
 Y. Huang, D. Evans, and J. Katz. Private set intersection: Are garbled circuits better than custom protocols? In 19th Annual Network and Distributed System Security Symposium, NDSS 2012, San Diego, California, USA, February 5-8, 2012, 2012.
 K. Järvinen, Á. Kiss, T. Schneider, O. Tkachenko, and Z. Yang. Faster privacy-preserving location proximity schemes. In CANS, volume 11124 of Lecture Notes in Computer Science, pages 3–22. Springer, 2018.
 H. Kikuchi and K. Takahashi. Zipf distribution model for quantifying risk of re-identification from trajectory data. In 13th Annual Conference on Privacy, Security and Trust, PST 2015, Izmir, Turkey, July 21-23, 2015, pages 14–21, 2015.
 V. Kolesnikov, R. Kumaresan, M. Rosulek, and N. Trieu. Efficient batched oblivious prf with applications to private set intersection. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, pages 818–829. ACM, 2016.
 V. Kolesnikov, R. Kumaresan, M. Rosulek, and N. Trieu. Efficient batched oblivious PRF with applications to private set intersection. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, October 24-28, 2016, pages 818–829, 2016.
 J. Krumm. A survey of computational location privacy. Personal and Ubiquitous Computing, 13(6):391–399, 2009.
 M. Li, L. Zhu, and X. Lin. Efficient and privacy-preserving carpooling using blockchain-assisted vehicular fog computing. IEEE Internet of Things Journal, pages 1–1, 2018.
 S. Mascetti, D. Freni, C. Bettini, X. S. Wang, and S. Jajodia. Privacy in geo-social networks: proximity notification with untrusted service providers and curious buddies. VLDB J., 20(4):541–566, 2011.
 A. Narayanan, N. Thiagarajan, M. Lakhani, M. Hamburg, and D. Boneh. Location privacy via private proximity testing. In Proceedings of the Network and Distributed System Security Symposium, NDSS 2011, San Diego, California, USA, 6th February - 9th February 2011, 2011.
 P. Paillier. Public-Key Cryptosystems Based on Composite Degree Residuosity Classes. In J. Stern, editor, Advances in Cryptology — EUROCRYPT ’99, pages 223–238, Berlin, Heidelberg, 1999. Springer Berlin Heidelberg.
 A. C. Pesara, V. Patil, and P. K. Atrey. Secure computing of gps trajectory similarity: A review. In Proceedings of the 2Nd ACM SIGSPATIAL Workshop on Recommendations for Location-based Services and Social Networks, LocalRec’18, pages 3:1–3:7, New York, NY, USA, 2018. ACM.
 A. Pham, I. Dacosta, G. Endignoux, J. R. Troncoso-Pastoriza, K. Huguenin, and J. Hubaux. Oride: A privacy-preserving yet accountable ride-hailing service. In USENIX Security Symposium, pages 1235–1252. USENIX Association, 2017.
 A. Pham, I. Dacosta, B. Jacot-Guillarmod, K. Huguenin, T. Hajar, F. Tramèr, V. D. Gligor, and J. Hubaux. Privateride: A privacy-enhanced ride-hailing service. PoPETs, 2017(2):38–56, 2017.
 B. Pinkas, T. Schneider, G. Segev, and M. Zohner. Phasing: Private set intersection using permutation-based hashing. In 24th USENIX Security Symposium, USENIX Security 15, Washington, D.C., USA, August 12-14, 2015., pages 515–530, 2015.
 B. Pinkas, T. Schneider, O. Tkachenko, and A. Yanai. Efficient circuit-based psi with linear communication. In Advances in Cryptology - EUROCRYPT 2019, International Conference on the Theory and Applications of Cryptographic Techniques, 2019.
 B. Pinkas, T. Schneider, and M. Zohner. Faster private set intersection based on OT extension. In Proceedings of the 23rd USENIX Security Symposium, San Diego, CA, USA, August 20-22, 2014., pages 797–812, 2014.
 B. Pinkas, T. Schneider, and M. Zohner. Scalable private set intersection based on ot extension. Cryptology ePrint Archive, Report 2016/930, 2016. https://eprint.iacr.org/2016/930.
 A. C. D. Resende and D. de Freitas Aranha. Faster unbalanced private set intersection. Cryptology ePrint Archive, Report 2017/677, 2017. https://eprint.iacr.org/2017/677.
 R. L. Rivest, L. Adleman, and M. L. Dertouzos. On data banks and privacy homomorphisms. Foundations of Secure Computation, Academia Press, 1978.
 J. Sedenka and P. Gasti. Privacy-preserving distance computation and proximity testing on earth, done right. In 9th ACM Symposium on Information, Computer and Communications Security, ASIA CCS ’14, Kyoto, Japan - June 03 - 06, 2014, pages 99–110, 2014.
 A. B. T. Sherif, K. Rabieh, M. M. E. A. Mahmoud, and X. Liang. Privacy-preserving ride sharing scheme for autonomous vehicles in big data era. IEEE Internet of Things Journal, 4(2):611–618, 2017.
 L. Siksnys, J. R. Thomsen, S. Saltenis, and M. L. Yiu. Private and flexible proximity detection in mobile social networks. In Eleventh International Conference on Mobile Data Management, MDM 2010, Kanas City, Missouri, USA, 23-26 May 2010, pages 75–84, 2010.
 L. Siksnys, J. R. Thomsen, S. Saltenis, M. L. Yiu, and O. Andersen. A location privacy aware friend locator. In Advances in Spatial and Temporal Databases, 11th International Symposium, SSTD 2009, Aalborg, Denmark, July 8-10, 2009, Proceedings, pages 405–410, 2009.
 S. Stirbys, O. A. Nabah, P. A. Hallgren, and A. Sabelfeld. Privacy-preserving location-proximity for mobile apps. In PDP, pages 337–345. IEEE Computer Society, 2017.
 M. Terrovitis. Privacy preservation in the dissemination of location data. SIGKDD Explorations, 13(1):6–18, 2011.
 G. Zhong, I. Goldberg, and U. Hengartner. Louis, lester and pierre: Three protocols for location privacy. In Privacy Enhancing Technologies, 7th International Symposium, PET 2007 Ottawa, Canada, June 20-22, 2007, Revised Selected Papers, pages 62–76, 2007.