Static-Memory-Hard Functions, and Modeling the Cost of Space vs. Time
- 519 Downloads
A series of recent research starting with (Alwen and Serbinenko, STOC 2015) has deepened our understanding of the notion of memory-hardness in cryptography—a useful property of hash functions for deterring large-scale password-cracking attacks—and has shown memory-hardness to have intricate connections with the theory of graph pebbling. Definitions of memory-hardness are not yet unified in the somewhat nascent field of memory-hardness, however, and the guarantees proven to date are with respect to a range of proposed definitions. In this paper, we observe two significant and practical considerations that are not analyzed by existing models of memory-hardness, and propose new models to capture them, accompanied by constructions based on new hard-to-pebble graphs. Our contribution is two-fold, as follows. First, existing measures of memory-hardness only account for dynamic memory usage (i.e., memory read/written at runtime), and do not consider static memory usage (e.g., memory on disk). Among other things, this means that memory requirements considered by prior models are inherently upper-bounded by a hash function’s runtime; in contrast, counting static memory would potentially allow quantification of much larger memory requirements, decoupled from runtime. We propose a new definition of static-memory-hard function (SHF) which takes static memory into account: we model static memory usage by oracle access to a large preprocessed string, which may be considered part of the hash function description. Static memory requirements are complementary to dynamic memory requirements: neither can replace the other, and to deter large-scale password-cracking attacks, a hash function will benefit from being both dynamic-memory-hard and static-memory-hard. We give two SHF constructions based on pebbling. To prove static-memory-hardness, we define a new pebble game (“black-magic pebble game”), and new graph constructions with optimal complexity under our proposed measure. Moreover, we provide a prototype implementation of our first SHF construction (which is based on pebbling of a simple “cylinder” graph), providing an initial demonstration of practical feasibility for a limited range of parameter settings. Secondly, existing memory-hardness models implicitly assume that the cost of space and time are more or less on par: they consider only linear ratios between the costs of time and space. We propose a new model to capture nonlinear time-space trade-offs: e.g., how is the adversary impacted when space is quadratically more expensive than time? We prove that nonlinear tradeoffs can in fact cause adversaries to employ different strategies from linear tradeoffs.
Please refer to the full version of our paper for all results, proofs, appendices, and implementation details [DLP18].
We are grateful to Jeremiah Blocki, Krzysztof Pietrzak, and Joël Alwen for valuable feedback on earlier versions of this paper. We thank Ling Ren for helpful technical discussions. We also thank Erik D. Demaine and Shafi Goldwasser for their advice on this paper. Finally, we thank our anonymous reviewers for insightful comments.
Sunoo’s research is supported by NSF MACS (CNS-1413920), DARPA IBM (W911NF-15-C-0236), SIMONS Investigator Award Agreement Dated June 5th, 2012, and the Center for Science of Information (CSoI), an NSF Science and Technology Center, under grant agreement CCF-0939370.
- [AAC+17]Abusalah, H., Alwen, J., Cohen, B., Khilko, D., Pietrzak, K., Reyzin, L.: Beyond Hellman’s time-memory trade-offs with applications to proofs of space. 10625, 357–379 (2017)Google Scholar
- [ABH17]Alwen, J., Blocki, J., Harsha, B.: Practical graphs for optimal side-channel resistant memory-hard functions. In: CCS, pp. 1001–1017. ACM (2017)Google Scholar
- [ABP17b]Alwen, J., Blocki, J., Pietrzak, K.: Sustained space complexity. CoRR, abs/1705.05313 (2017)Google Scholar
- [ACK+16]Alwen, J., Chen, B., Kamath, C., Kolmogorov, V., Pietrzak, K., Tessaro, S.: On the complexity of scrypt and proofs of space in the parallel random oracle model. In: Fischlin, M., Coron, J.-S. (eds.) EUROCRYPT 2016. LNCS, vol. 9666, pp. 358–387. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49896-5_13CrossRefzbMATHGoogle Scholar
- [ACP+16]Alwen, J., Chen, B., Pietrzak, K., Reyzin, L., Tessaro, S.: Scrypt is maximally memory-hard. IACR Cryptology ePrint Archive 2016:989 (2016)Google Scholar
- [AdRNV17]Alwen, J., de Rezende, S.F., Nordström, J., Vinyals, M.: Cumulative space in black-white pebbling and resolution. In: ITCS, LIPIcs, vol. 67, pp. 38:1–38:21. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2017)Google Scholar
- [AS15]Alwen, J., Serbinenko, V.: High parallel complexity graphs and memory-hard functions. In: Servedio, R.A., Rubinfeld, R. (eds.) Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, Portland, OR, USA, 14–17 June 2015, pp. 595–603. ACM (2015)Google Scholar
- [BR93]Bellare, M., Rogaway, P.: Random oracles are practical: a paradigm for designing efficient protocols. In: Denning, D.E., Pyle, R., Ganesan, R., Sandhu, R.S., Ashby, V. (eds.) CCS 1993, Proceedings of the 1st ACM Conference on Computer and Communications Security, Fairfax, Virginia, USA, 3–5 November 1993, pp. 62–73. ACM (1993)Google Scholar
- [BZ16]Blocki, J., Zhou, S.: On the computational complexity of minimal cumulative cost graph pebbling. CoRR, abs/1609.04449 (2016)Google Scholar
- [Cha73]Chandra, A.K.: Efficient compilation of linear recursive programs. In: SWAT (FOCS), pp. 16–25. IEEE Computer Society (1973)Google Scholar
- [CLW06]Di Crescenzo, G., Lipton, R.J., Walfish, S.: Perfectly secure password protocols in the bounded retrieval model. In: Halevi and Rabin [HR06], pp. 225–244Google Scholar
- [Coo73]Cook, S.A.: An observation on time-storage trade off. In: Proceedings of the Fifth Annual ACM Symposium on Theory of Computing, STOC 1973, pp. 29–33. ACM, New York (1973)Google Scholar
- [CS74]Cook, S., Sethi, R.: Storage requirements for deterministic/polynomial time recognizable languages. In: Proceedings of the Sixth Annual ACM Symposium on Theory of Computing, STOC 1974, pp. 33–39. ACM, New York (1974)Google Scholar
- [DKW10]Dziembowski, S., Kazana, T., Wichs, D.: One-time computable and uncomputable functions. IACR Cryptology ePrint Archive 2010:541 (2010)Google Scholar
- [DLP18]Dryja, T., Liu, Q.C., Park, S.: Static-memory-hard functions and nonlinear space-time tradeoffs via pebbling. IACR Cryptology ePrint Archive 2018:205 (2018)Google Scholar
- [FLW13]Forler, C., Lucks, S., Wenzel, J.: Catena: a memory-consuming password scrambler. IACR Cryptology ePrint Archive 2013:525 (2013)Google Scholar
- [GLT80]Gilbert, J.R., Lengauer, T., Tarjan, R.E.: The pebbling problem is complete in polynomial space. 9, 513–524 (1980)Google Scholar
- [JWK81]Jia-Wei, H., Kung, H.T.: I/o complexity: the red-blue pebble game. In: Proceedings of the 13th Annual ACM Symposium on Theory of Computing, STOC 1981, pp. 326–333 (1981)Google Scholar
- [Mer79]Merkle, R.C.: Secrecy, authentication, and public key systems. Ph.D. thesis, Stanford, CA, USA (1979). AAI8001972Google Scholar
- [Nor15]Nordstrom, J.: New wine into old wineskins: a survey of some pebbling classics with supplemental results (2015)Google Scholar
- [Per09]Percival, C.: Stronger key derivation via sequential memory-hard functions. Presented at BSDCan 2009 (2009). http://www.tarsnap.com/scrypt/scrypt.pdf
- [PH70]Paterson, M.S., Hewitt, C.E.: Comparative Schematology. In: Record of the Project MAC Conference on Concurrent Systems and Parallel Computation, pp. 119–127. ACM, New York (1970)Google Scholar
- [SS79b]Swamy, S., Savage, J.E.: Space-time tradeoffs for linear recursion. In: Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL 1979, pp. 135–142. ACM, New York (1979)Google Scholar
- [Val77]Valiant, L.G.: Graph-theoretic arguments in low-level complexity. In: Proceedings of 6th Symposium on Mathematical Foundations of Computer Science 1977, Tatranska Lomnica, Czechoslovakia, 5–9 September 1977, pp. 162–176 (1977)Google Scholar