Abstract
Cuckoo hashing is a powerful primitive that enables storing items using small space with efficient querying. At a high level, cuckoo hashing maps n items into b entries storing at most \(\ell \) items such that each item is placed into one of k randomly chosen entries. Additionally, there is an overflow stash that can store at most s items. Many cryptographic primitives rely upon cuckoo hashing to privately embed and query data where it is integral to ensure small failure probability when constructing cuckoo hashing tables as it directly relates to the privacy guarantees.
As our main result, we present a more query-efficient cuckoo hashing construction using more hash functions. For construction failure probability \(\epsilon \), the query overhead of our scheme is \(O(1 + \sqrt{\log (1/\epsilon )/\log n})\). Our scheme has quadratically smaller query overhead than prior works for any target failure probability \(\epsilon \). We also prove lower bounds matching our construction. Our improvements come from a new understanding of the locality of cuckoo hashing failures for small sets of items.
We also initiate the study of robust cuckoo hashing where the input set may be chosen with knowledge of the hash functions. We present a cuckoo hashing scheme using more hash functions with query overhead \(\tilde{O}(\log \lambda )\) that is robust against \(\textsf{poly}(\lambda )\) adversaries. Furthermore, we present lower bounds showing that this construction is tight and that extending previous approaches of large stashes or entries cannot obtain robustness except with \(\varOmega (n)\) query overhead.
As applications of our results, we obtain improved constructions for batch codes and PIR. In particular, we present the most efficient explicit batch code and blackbox reduction from single-query PIR to batch PIR.
The full version of this paper may be found at [66].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Ali, A., et al.: Communication-computation trade-offs in PIR. In: 30th USENIX Security (2021)
Angel, S., Chen, H., Laine, K., Setty, S.: PIR with compressed queries and amortized query processing. In: 2018 IEEE S &P (2018)
Angel, S., Setty, S.: Unobservable communication over fully untrusted infrastructure. In: 12th USENIX OSDI (2016)
Arbitman, Y., Naor, M., Segev, G.: De-amortized cuckoo hashing: provable worst-case performance and experimental results. In: ICALP (2009)
Asharov, G., Komargodski, I., Lin, W.-K., Nayak, K., Peserico, E., Shi, E.: OptORAMa: optimal oblivious RAM. In: Canteaut, A., Ishai, Y. (eds.) EUROCRYPT 2020. LNCS, vol. 12106, pp. 403–432. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45724-2_14
Asharov, G., Naor, M., Segev, G., Shahaf, I.: Searchable symmetric encryption: optimal locality in linear space via two-dimensional balanced allocations. In: ACM STOC (2016)
Aumüller, M., Dietzfelbinger, M., Woelfel, P.: Explicit and efficient hash families suffice for cuckoo hashing with a stash. Algorithmica 70(3), 428–456 (2014)
Azar, Y., Broder, A.Z., Karlin, A.R., Upfal, E.: Balanced allocations. In: ACM Symposium on Theory of Computing (1994)
Ben-Eliezer, O., Jayaram, R., Woodruff, D.P., Yogev, E.: A framework for adversarially robust streaming algorithms. In: ACM PODS (2020)
Berman, I., Haitner, I., Komargodski, I., Naor, M.: Hardness-preserving reductions via cuckoo hashing. J. Cryptol. 32(2), 361–392 (2019)
Bossuat, A., Bost, R., Fouque, P.-A., Minaud, B., Reichle, M.: SSE and SSD: page-efficient searchable symmetric encryption. In: Malkin, T., Peikert, C. (eds.) CRYPTO 2021. LNCS, vol. 12827, pp. 157–184. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-84252-9_6
Boyle, E., LaVigne, R., Vaikuntanathan, V.: Adversarially robust property-preserving hash functions. In: 10th Innovations in Theoretical Computer Science (2019)
Breslow, A.D., Zhang, D.P., Greathouse, J.L., Jayasena, N., Tullsen, D.M.: Horton tables: fast hash tables for in-memory data-intensive computing. In: 2016 USENIX Annual Technical Conference (2016)
Chen, H., Huang, Z., Laine, K., Rindal, P.: Labeled PSI from fully homomorphic encryption with malicious security. In: ACM CCS (2018)
Chen, H., Laine, K., Rindal, P.: Fast private set intersection from homomorphic encryption. In: ACM CCS (2017)
Chor, B., Gilboa, N.: Computationally private information retrieval. In: ACM Symposium on Theory of Computing (1997)
Chor, B., Kushilevitz, E., Goldreich, O., Sudan, M.: Private information retrieval. J. ACM 53, 68–73 (1998)
Clayton, D., Patton, C., Shrimpton, T.: Probabilistic data structures in adversarial environments. In: ACM CCS (2019)
Cong, K., et al.: Labeled psi from homomorphic encryption with reduced computation and communication. In: Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pp. 1135–1150 (2021)
Demmler, D., Rindal, P., Rosulek, M., Trieu, N.: PIR-PSI: scaling private contact discovery. Proc. Priv. Enh. Technol. 2018(4), 159–178 (2018)
Devroye, L., Morin, P.: Cuckoo hashing: further analysis. Inf. Process. Lett. 86(4), 215–219 (2003)
Dietzfelbinger, M., Goerdt, A., Mitzenmacher, M., Montanari, A., Pagh, R., Rink, M.: Tight thresholds for cuckoo hashing via XORSAT. In: Abramsky, S., Gavoille, C., Kirchner, C., Meyer auf der Heide, F., Spirakis, P.G. (eds.) ICALP 2010. LNCS, vol. 6198, pp. 213–225. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14165-2_19
Dietzfelbinger, M., Weidling, C.: Balanced allocation and dictionaries with tightly packed constant size bins. Theoret. Comput. Sci. 380, 47–68 (2007)
Duong, T., Phan, D.H., Trieu, N.: Catalic: delegated PSI cardinality with applications to contact tracing. In: Moriai, S., Wang, H. (eds.) ASIACRYPT 2020. LNCS, vol. 12493, pp. 870–899. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-64840-4_29
Fan, B., Andersen, D.G., Kaminsky, M.: MemC3: compact and concurrent MemCache with dumber caching and smarter hashing. In: USENIX NSDI (2013)
Fan, B., Andersen, D.G., Kaminsky, M., Mitzenmacher, M.D.: Cuckoo filter: practically better than bloom. In: Proceedings of the 10th ACM International on Conference on emerging Networking Experiments and Technologies (2014)
Fleischhacker, N., Larsen, K.G., Simkin, M.: Property-preserving hash functions for hamming distance from standard assumptions. In: Dunkelman, O., Dziembowski, S. (eds.) EUROCRYPT 2022. LNCS, vol. 13276, pp. 764–781. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-07085-3_26
Fotakis, D., Pagh, R., Sanders, P., Spirakis, P.: Space efficient hash tables with worst case constant access time. Theory Comput. Syst. 38, 229–248 (2005)
Fountoulakis, N., Panagiotou, K., Steger, A.: On the insertion time of cuckoo hashing. SIAM J. Comput. 42(6), 2156–2181 (2013)
Frieze, A., Melsted, P., Mitzenmacher, M.: An analysis of random-walk cuckoo hashing. In: Dinur, I., Jansen, K., Naor, J., Rolim, J. (eds.) APPROX/RANDOM -2009. LNCS, vol. 5687, pp. 490–503. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03685-9_37
Garimella, G., Pinkas, B., Rosulek, M., Trieu, N., Yanai, A.: Oblivious key-value stores and amplification for private set intersection. In: Malkin, T., Peikert, C. (eds.) CRYPTO 2021, Part II. LNCS, vol. 12826, pp. 395–425. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-84245-1_14
Gentry, C., Ramzan, Z.: Single-database private information retrieval with constant communication rate. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 803–815. Springer, Heidelberg (2005). https://doi.org/10.1007/11523468_65
Goodrich, M.T., Mitzenmacher, M.: Privacy-preserving access of outsourced data via oblivious RAM simulation. In: Aceto, L., Henzinger, M., Sgall, J. (eds.) ICALP 2011. LNCS, vol. 6756, pp. 576–587. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22012-8_46
Groth, J., Kiayias, A., Lipmaa, H.: Multi-query computationally-private information retrieval with constant communication rate. In: Nguyen, P.Q., Pointcheval, D. (eds.) PKC 2010. LNCS, vol. 6056, pp. 107–123. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13013-7_7
Hall, P.: On representatives of subsets. In: Classic Papers in Combinatorics (1987)
Hardt, M., Woodruff, D.P.: How robust are linear sketches to adaptive inputs? In: ACM Symposium on Theory of Computing (2013)
Hemenway Falk, B., Noble, D., Ostrovsky, R.: Alibi: a flaw in cuckoo-hashing based hierarchical ORAM schemes and a solution. In: Canteaut, A., Standaert, F.-X. (eds.) EUROCRYPT 2021. LNCS, vol. 12698, pp. 338–369. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-77883-5_12
Holmgren, J., Liu, M., Tyner, L., Wichs, D.: Nearly optimal property preserving hashing. Cryptology ePrint Archive (2022)
Ishai, Y., Kushilevitz, E., Ostrovsky, R., Sahai, A.: Batch codes and their applications. In: ACM Symposium on Theory of Computing (2004)
Khosla, M.: Balls into bins made faster. In: Bodlaender, H.L., Italiano, G.F. (eds.) ESA 2013. LNCS, vol. 8125, pp. 601–612. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40450-4_51
Kirsch, A., Mitzenmacher, M., Wieder, U.: More robust hashing: Cuckoo hashing with a stash. SIAM J. Comput. 39(4), 1543–1561 (2010)
Kushilevitz, E., Lu, S., Ostrovsky, R.: On the (in) security of hash-based oblivious ram and a new balancing scheme. In: Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms (2012)
Kutzelnigg, R.: Bipartite random graphs and cuckoo hashing. Discrete Math. Theor. Comput. Sci. (2006)
Menon, S.J., Wu, D.J.: Spiral: fast, high-rate single-server PIR via FHE composition. Cryptology ePrint Archive (2022)
Minaud, B., Papamanthou, C.: Note on generalized cuckoo hashing with a stash. arXiv preprint arXiv:2010.01890 (2020)
Mironov, I., Naor, M., Segev, G.: Sketching in adversarial environments. SIAM J. Comput. 40(6), 1845–1870 (2011)
Mohassel, P., Rindal, P., Rosulek, M.: Fast database joins and PSI for secret shared data. In: ACM CCS (2020)
Mughees, M.H., Chen, H., Ren, L.: OnionPIR: response efficient single-server PIR. In: ACM CCS (2021)
Naor, M., Segev, G., Wieder, U.: History-independent cuckoo hashing. In: Aceto, L., Damgård, I., Goldberg, L.A., Halldórsson, M.M., Ingólfsdóttir, A., Walukiewicz, I. (eds.) ICALP 2008. LNCS, vol. 5126, pp. 631–642. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-70583-3_51
Naor, M., Yogev, E.: Bloom filters in adversarial environments. In: Gennaro, R., Robshaw, M. (eds.) CRYPTO 2015. LNCS, vol. 9216, pp. 565–584. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48000-7_28
Pagh, A., Pagh, R.: Uniform hashing in constant time and optimal space. SIAM J. Comput. 38(1), 85–96 (2008)
Pagh, R., Rodler, F.F.: Cuckoo hashing. J. Algorithms 51, 122–144 (2004)
Patel, S., Persiano, G., Raykova, M., Yeo, K.: PanORAMa: oblivious RAM with logarithmic overhead. In: IEEE FOCS (2018)
Patel, S., Persiano, G., Yeo, K.: What storage access privacy is achievable with small overhead? In: ACM PODS (2019)
Patel, S., Persiano, G., Yeo, K., Yung, M.: Mitigating leakage in secure cloud-hosted data structures: Volume-hiding for multi-maps via hashing. In: CCS (2019)
Pinkas, B., Reinman, T.: Oblivious RAM revisited. In: Rabin, T. (ed.) CRYPTO 2010. LNCS, vol. 6223, pp. 502–519. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14623-7_27
Pinkas, B., Rosulek, M., Trieu, N., Yanai, A.: PSI from PaXoS: fast, malicious private set intersection. In: Canteaut, A., Ishai, Y. (eds.) EUROCRYPT 2020. LNCS, vol. 12106, pp. 739–767. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-45724-2_25
Pinkas, B., Schneider, T., Segev, G., Zohner, M.: Phasing: private set intersection using permutation-based hashing. In: USENIX Security Symposium (2015)
Pinkas, B., Schneider, T., Weinert, C., Wieder, U.: Efficient circuit-based PSI via cuckoo hashing. In: Nielsen, J.B., Rijmen, V. (eds.) EUROCRYPT 2018. LNCS, vol. 10822, pp. 125–157. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-78372-7_5
Pinkas, B., Schneider, T., Zohner, M.: Scalable private set intersection based on OT extension. ACM Trans. Priv. Secur. (TOPS) 21(2), 1–35 (2018)
Polychroniou, O., Raghavan, A., Ross, K.A.: Rethinking SIMD vectorization for in-memory databases. In: ACM SIGMOD (2015)
Pǎtraşcu, M., Thorup, M.: The power of simple tabulation hashing. J. ACM (JACM) 59, 1–50 (2012)
Rawat, A.S., Song, Z., Dimakis, A.G., Gál, A.: Batch codes through dense graphs without short cycles. IEEE Trans. Inf. Theory 62, 1592–1604 (2016)
Richa, A.W., Mitzenmacher, M., Sitaraman, R.: The power of two random choices: a survey of techniques and results. Combinatorial Optimization (2001)
Schoppmann, P., Gascón, A., Reichert, L., Raykova, M.: Distributed Vector-OLE: improved constructions and implementation. In: Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pp. 1055–1072 (2019)
Yeo, K.: Cuckoo hashing in cryptography: optimal parameters, robustness and applications. Cryptology ePrint Archive, Paper 2022/1455 (2022). https://eprint.iacr.org/2022/1455
Yeo, K.: Lower bounds for (batch) PIR with private preprocessing. In: Hazay, C., Stam, M. (eds.) EUROCRYPT 2023, Part I. LNCS, vol. 14004, pp. 518–550. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-30545-0_18
Zhang, K., Wang, K., Yuan, Y., Guo, L., Lee, R., Zhang, X.: Mega-KV: a case for GPUs to maximize the throughput of in-memory key-value stores. VLDB 8, 1226–1237 (2015)
Acknowledgements
The author would like to thank Mo (Helen) Zhou for feedback on earlier manuscripts and Daniel Noble for pointing out an error and fix in a proof. This research was supported in part by the Algorand Centres of Excellence programme managed by Algorand Foundation. Any opinions, findings, and conclusions or recommendations expressed in this material are solely those of the authors.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 International Association for Cryptologic Research
About this paper
Cite this paper
Yeo, K. (2023). Cuckoo Hashing in Cryptography: Optimal Parameters, Robustness and Applications. In: Handschuh, H., Lysyanskaya, A. (eds) Advances in Cryptology – CRYPTO 2023. CRYPTO 2023. Lecture Notes in Computer Science, vol 14084. Springer, Cham. https://doi.org/10.1007/978-3-031-38551-3_7
Download citation
DOI: https://doi.org/10.1007/978-3-031-38551-3_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-38550-6
Online ISBN: 978-3-031-38551-3
eBook Packages: Computer ScienceComputer Science (R0)