Skip to main content
Log in

Comparison of perfect table cryptanalytic tradeoff algorithms

  • Published:
Designs, Codes and Cryptography Aims and scope Submit manuscript

Abstract

The performances of three major time memory tradeoff algorithms were compared in a recent paper. The algorithms considered there were the classical Hellman tradeoff and the non-perfect table versions of the distinguished point method and the rainbow table method. This paper adds the perfect table versions of the distinguished point method and the rainbow table method to the list, so that all the major tradeoff algorithms may now be compared against each other. Even though there are existing claims as to the superiority of one tradeoff algorithm over another algorithm, the algorithm performance comparisons provided by the current work and the recent paper mentioned above are of higher practical value. We provide comparisons of algorithms at parameters that achieve a common success rate of inversion and which take both the cost of pre-computation and the efficiency of the online phase into account. The comparisons are based on the average case execution behaviors rather than the worst case situations, and non-negligible details such as the effects of false alarms and various storage optimization techniques are no longer ignored. A large portion of this paper is allocated to analyzing the execution behavior of the perfect table distinguished point method. In particular, we obtain a closed-form formula for the average length of chains associated with a perfect distinguished point table.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

Notes

  1. Let us mention just one example. The objective of any tradeoff algorithm discussed in this work will be to recover the randomly chosen specific input that was used to create the given inversion target, rather than to recover any pre-image corresponding to the inversion target. This detail, which the previous sentence has not explained in full, is important when attempting an analysis of the accuracy aimed for in this work. However, even this most basic definition of a successful inversion is seldom made clear in the tradeoff literature.

  2. The analyses of [2] and [13] both extend further to the use of the checkpoint technique [2] on the perfect rainbow tradeoff, where the two are not in agreement.

  3. The single \(e^{c_{\mathrm{R}}}\) appearing in [13, p.312] should be corrected to \(e^{c_{\mathrm{R}}\ell }\).

References

  1. Ågren M., Johansson T., Hell M.: Improving the rainbow attack by reusing colours. CANS 2009. LNCS, vol. 5888, pp. 362–378. Springer, Berlin (2009).

  2. Avoine G., Junod P., Oechslin P.: Characterization and improvement of time-memory trade-off based on perfect tables. ACM Trans. Inf. Syst. Secur. 11(4), 17:1–17:22 (2008). Preliminary version presented at INDOCRYPT 2005.

  3. Barkan E.P.: Cryptanalysis of Ciphers and Protocols. Ph.D. Thesis, Technion—Israel Institute of Technology, Haifa (2006).

  4. Barkan E., Biham E., Shamir A.: Rigorous bounds on cryptanalytic time/memory tradeoffs. Advances in Cryptology—CRYPTO 2006. LNCS, vol. 4117, pp. 1–21. Springer, Heidelberg (2006).

  5. Biryukov A., Shamir A.: Cryptanalytic time/memory/data tradeoffs for stream ciphers. In: Advances in Cryptology—ASIACRYPT 2000. LNCS, vol. 1976, pp. 1–13. Springer, Heidelberg (2000).

  6. Biryukov A., Shamir A., Wagner D.: Real time cryptanalysis of A5/1 on a PC. In: FSE 2000, LNCS, vol. 1978, pp. 1–18. Springer, Heidelberg (2001).

  7. Borst J.: Block Ciphers: Design, Analysis, and Side-Channel Analysis. Ph.D. Thesis, Katholieke Universiteit Leuven, Leuven (2001).

  8. Borst J., Preneel B., Vandewalle J.: On the time-memory tradeoff between exhaustive key search and table precomputation. In: Proceedings of the 19th Symposium on Information Theory in the Benelux, pp. 111–118. WIC (1998).

  9. Denning D.E.: Cryptography and Data Security. Addison-Wesley, Reading (1982).

  10. Fiat A., Naor M.: Rigorous time/space tradeoffs for inverting functions. In: Proceedings of the twenty-third annual ACM Symposium on Theory of Computing, pp. 534–541. ACM, New York (1991).

  11. Hellman M.E.: A cryptanalytic time-memory trade-off. IEEE Trans. Inf. Theory 26, 401–406 (1980).

  12. Hoch Y.Z.: Security analysis of generic iterated hash functions. Ph.D. Thesis, Weizmann Institute of Science, Rehovot (2009).

  13. Hong J.: The cost of false alarms in Hellman and rainbow tradeoffs. Des. Codes Cryptogr. 57(3), 293–327 (2010).

  14. Hong J., Moon S.: A comparison of cryptanalytic tradeoff algorithms. J. Cryptol. 26(4), 559–637 (2013).

  15. Hong J., Jeong K.C., Kwon E.Y., Lee I.-S., Ma D.: Variants of the distinguished point method for cryptanalytic time memory trade-offs. In: ISPEC 2008. LNCS, vol. 4991, pp. 131–145. Springer, Heidelberg (2008).

  16. Hong J., Lee G.W., Ma D.: Analysis of the parallel distinguished point tradeoff. In: Progress in Cryptology—INDOCRYPT 2011. LNCS, vol. 7107, pp. 161–180. Springer, Heidelberg (2011).

  17. Kim B.-I., Hong J.: Analysis of the non-perfect table fuzzy rainbow tradeoff. In: ACISP 2013. LNCS, vol. 7959, pp. 347–362. Springer, Heidelberg (2013).

  18. Kim B.-I., Hong J.: Analysis of the perfect table fuzzy rainbow tradeoff. J. Appl. Math. 2014, 765394 (2014). doi:10.1155/2014/765394.

  19. Kim J.W., Seo J., Hong J., Park K., Kim S.-R.: High-speed parallel implementations of the rainbow method based on perfect tables in a heterogeneous system. Softw. Pract. Exper. 45(6), 837–855 (2015).

  20. Mukhopadhyay S., Sarkar P.: Nearly orthogonal rainbow tables. Indian Statistical Institute Technical Report, No. ASD/2004/9, November (2004).

  21. Oechslin P.: Making a faster cryptanalytic time-memory trade-off. In: Advances in Cryptology—CRYPTO 2003, LNCS, vol. 2729, pp. 617–630. Springer, Heidelberg (2003).

  22. Quisquater J.-J., Stern J.: Time-Memory Tradeoff Revisited. Unpublished, December (1998).

  23. Saran N.: Time Memory Trade Off Attack on Symmetric Ciphers. Ph.D. Thesis, Middle East Technical University, Ankara (2009).

  24. Shamir A.: Random Graphs in Security and Privacy. Invited talk at ICITS (2009).

  25. Standaert F.-X., Rouvroy G., Quisquater J.-J., Legat J.-D.: A time-memory tradeoff using distinguished points: New analysis & FPGA results. In: Cryptographic Hardware and Embedded Systems—CHES 2002, LNCS, vol. 2523, pp. 593–609. Springer, Heidelberg (2003).

  26. Thing V.: Virtual expansion of rainbow tables. In: Advances in Digital Forensics VI, pp. 243–256. IFIP AICT 337 (2010).

  27. Thing V.L.L., Ying H.-M.: A novel time-memory trade-off method for password recovery. Digital Investigation 6, S114–S120 (2009).

  28. Thing V.L.L., Ying H.-M.: Rainbow table optimization for password recovery. Int. J. Adv. Softw. 4, 479–488 (2011).

  29. Tomašević V., Tomašević M.: An analysis of chain characteristics in the cryptanalytic TMTO method. Theor. Comput. Sci. 501, 52–61 (2013).

  30. Wang W., Lin D.: Analysis of multiple checkpoints in non-perfect and perfect rainbow tradeoff revisited. In: ICICS 2013. LNCS, vol. 8233, pp. 288–301. Springer, Heidelberg (2013).

  31. Wang W., Lin D., Li Z., Wang T.: Improvement and analysis of VDP method in time/memory tradeoff applications. In: ICICS 2011. LNCS, vol. 7043, pp. 282–296. Springer, Heidelberg (2011).

  32. Wiener M.J.: The full cost of cryptanalytic attacks. J. Cryptol. 17(2), 105–124 (2004).

  33. Ying H.-M., Thing V.L.L.: A novel rainbow table sorting method. CYBERLAWS 2011, 35–40 (2011).

  34. Zhang W., Zhang M., Liu Y., Wang R.: A new time-memory-resource trade-off method for password recovery. In: ICCIIS 2010, pp. 75–79. IEEE, New York (2010).

Download references

Acknowledgments

The authors thank Wenhao Wang of IIE CAS for bringing a critical error that appeared in an earlier version of this paper to our attention. This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Science, ICT & Future Planning (NRF-2012R1A1B4003379). G. W. Lee was also supported by Global Ph.D. Fellowship Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (NRF-2011-0030901). Part of this work was done while J. Hong was visiting Department of Mathematics, U. C. Davis, and he is grateful for their hospitality.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jin Hong.

Additional information

Communicated by C. Cid.

Appendices

Appendix 1: Effects of chain length bounds and parallelization on the DP tradeoff

Let us briefly comment on the two techniques for the DP tradeoff that were not considered during our complexity analyses. Specifically, these were the use of upper and lower bounds on the chain lengths and the parallel processing of tables during the online phase.

The use of chain length bounds will increase the number of pre-computation chains that are discarded, so that the amount of pre-computation must be increased in order to maintain the success rate. The effect of chain length bounds on the online efficiency is unclear, but making the pre-computation chain lengths shorter has the tendency to reduce chain merges and false alarms, so this could have a positive effect. However, a quick review of Fig. 4 shows that no small enhancement in the online efficiency is likely to make the perfect DP tradeoff more preferable over the perfect rainbow tradeoff, even if no penalty on the pre-computation cost was involved. Hence, there seems to be little reason to consider the perfect DP tradeoff variant that utilizes chain length bounds, except possibly at low success rates.

The work [12, 24] suggested that all the pre-computation tables be processed in parallel, rather than sequentially, during the online phase. Parallel processing causes the shorter online chains to be treated before the longer ones, and since the online phase is likely to terminate with the correct answer before any of the pre-computation tables are fully processed, this leads to a larger portion of the online computation being spent on processing the shorter chains. Since shorter chains are less likely to induce false alarms, this has a positive effect of reducing the cost of dealing with alarms. However, the recent analysis on the non-perfect parallel DP tradeoff [16] indicates that one cannot hope to see any drastic improvement of the perfect DP tradeoff performance through parallelization. For now, there seems to be no reason to expect the parallel perfect DP tradeoff to perform better than the perfect rainbow tradeoff, especially under the high success rate requirements which are of interest.

Appendix 2: Appropriate chain length upper bound

Let us analyze how often one can expect to see over-length chains when an upper bound on the chain length is set. This information will give us an indication of how large a bound qualifies as a sufficiently large chain length bound.

We first wish to write down the probability for a chain generated from a given starting point to fall into an infinite loop without reaching a DP within its first \(\hat{t}\) iterations. The chain can fall into a loop if the first iteration lands on the given starting point itself. The probability for such an event can be stated to be \(\frac{1}{\mathsf{N }}\), when the chain is treated as a random walk. If the first iteration lands on a non-DP that is different from the starting point, which happens with probability \(1-\frac{1}{t}-\frac{1}{\mathsf{N }}\), then the chain can fall into a loop if the second iteration lands on either of the first two points, which happens with probability \(\frac{2}{\mathsf{N }}\). Continuing, the probability in question may be written as

$$\begin{aligned} \begin{aligned} \frac{1}{\mathsf{N }}&+ \left( 1-\frac{1}{t}-\frac{1}{\mathsf{N }}\right) \frac{2}{\mathsf{N }} + \left( 1-\frac{1}{t}-\frac{1}{\mathsf{N }}\right) \left( 1-\frac{1}{t}-\frac{2}{\mathsf{N }}\right) \frac{3}{\mathsf{N }} +\cdots \cdots \\&\qquad \cdots \cdots + \left( 1-\frac{1}{t}-\frac{1}{\mathsf{N }}\right) \left( 1-\frac{1}{t}-\frac{2}{\mathsf{N }}\right) \cdots \left( 1-\frac{1}{t}-\frac{\hat{t}-2}{\mathsf{N }}\right) \frac{\hat{t}-1}{\mathsf{N }}. \end{aligned} \end{aligned}$$
(35)

If we assume \(t\hat{t}\ll \mathsf{N }\), the \(\frac{i}{\mathsf{N }}\) term appearing inside each set of parentheses can be ignored and the above may be approximated by

$$\begin{aligned} \frac{1}{\mathsf{N }} + \left( 1-\frac{1}{t}\right) \frac{2}{\mathsf{N }} + \cdots + \left( 1-\frac{1}{t}\right) ^{\hat{t}-2}\frac{\hat{t}-1}{\mathsf{N }}. \end{aligned}$$
(36)

Arguing as before, we can state that the probability for a chain not to reach a DP within its first \(\hat{t}\) iterations, without falling into a loop, is

$$\begin{aligned} \left( 1-\frac{1}{t}-\frac{1}{\mathsf{N }}\right) \left( 1-\frac{1}{t}-\frac{2}{\mathsf{N }}\right) \cdots \left( 1-\frac{1}{t}-\frac{\hat{t}-2}{\mathsf{N }}\right) \left( 1-\frac{1}{t}-\frac{\hat{t}-1}{\mathsf{N }}\right) , \end{aligned}$$
(37)

and this can be approximated by

$$\begin{aligned} \left( 1-\frac{1}{t}\right) ^{\hat{t}-1}, \end{aligned}$$
(38)

under the assumption that \(t\hat{t}\ll \mathsf{N }\).

The sum of (36) and (38)

$$\begin{aligned} \frac{1}{\mathsf{N }} + \left( 1-\frac{1}{t}\right) \frac{2}{\mathsf{N }} + \cdots + \left( 1-\frac{1}{t}\right) ^{\hat{t}-2}\frac{\hat{t}-1}{\mathsf{N }} + \left( 1-\frac{1}{t}\right) ^{\hat{t}-1}, \end{aligned}$$
(39)

is the probability for a chain not to reach a DP within its first \(\hat{t}\) iterations. If we further assume that \(\frac{\hat{t}}{t}\) is not too large, we can approximate and rewrite this in the form

$$\begin{aligned} \frac{t^2}{\mathsf{N }} \left( \frac{1}{t}+ e^{-\frac{1}{t}}\frac{2}{t} + e^{-\frac{2}{t}}\frac{3}{t} + \cdots + e^{-\frac{\hat{t}-2}{t}}\frac{\hat{t}-1}{t} \right) \frac{1}{t}+ e^{-\frac{\hat{t}-1}{t}}, \end{aligned}$$
(40)

and approximate the above once more with the definite integral

$$\begin{aligned} \frac{t^2}{\mathsf{N }}\int _0^{\frac{\hat{t}}{t}} e^{-u}u \;du + e^{-\frac{\hat{t}}{t}} = \frac{t^2}{\mathsf{N }}\left\{ 1-\left( 1+\frac{\hat{t}}{t}\right) e^{-\frac{\hat{t}}{t}}\right\} + e^{-\frac{\hat{t}}{t}}. \end{aligned}$$
(41)

This probability approaches \(\frac{t^2}{\mathsf{N }} = O\big (\frac{1}{m}\big )\) very quickly, as \(\frac{\hat{t}}{t}\) is increased. For example, even at the moderately large chain length bound of \(\hat{t}= 15\,t\), the probability for a randomly generated chain to be discarded due to its length is \(\frac{t^2}{\mathsf{N }}0.999995 + 3.05902\times 10^{-7}\), which is small enough for our purposes.

As a word of caution, we add that, due to the first term of \(O\big (\frac{1}{m}\big )\) order, the number of long chains expected during the generation of a full DP matrix cannot be made arbitrarily close to zero by increasing the chain length bound, since each DP matrix contains m chains. Only the fraction of over-length chains among all chains approaches zero with the increase of the chain length bound.

Appendix 3: Rigorous proof of Lemma 3

The very short proof of Lemma 3 given in the main body of this paper will seem sufficient to most cryptographers. However, there are subtle issues involving random functions that were ignored in the proof. This section is an attempt at resolving these issues. We strongly urge any interested reader to review [14, Appendix B] before reading this section.

Recall that we are using \(\mathscr {D}_k(F)\) to denote the set of elements of \(\mathscr {N}\) that are k-many \(F\)-iterations away from their closest DPs, and suppose that \(D_0\), \(D_1\), ..., \(D_k\) are any collection of mutually disjoint subsets of \(\mathscr {N}\), with \(D_0\) denoting the set of all DPs. Let us consider any function \(F: \mathscr {N}\rightarrow \mathscr {N}\) and discuss when the series of conditions

  1. C1:

    \(D_i = \mathscr {D}_i(F)\), for \(i = 1, \dots , k\)

would be satisfied by the function. Note that the omitted condition \(D_0 = \mathscr {D}_0(F)\) is always satisfied.

The series of conditions C1 is satisfied by the function \(F\) if and only if the following three items are all satisfied:

  1. C2:

    \(D_i = \mathscr {D}_i(F)\), for \(i=1, \dots , k-1\).

  2. C3:

    \(F(D_k) \subset D_{k-1}\).

  3. C4:

    \(F(\mathscr {N}\setminus D_k) \cap D_{k-1} = \emptyset \).

Repeating this argument, we see that the satisfaction of Condition-C1 by an \(F\) is equivalent to the satisfaction of the following two series of conditions.

  1. C5:

    \(F(D_k) \subset D_{k-1}\), ..., \(F(D_2) \subset D_1\), and \(F(D_1) \subset D_0\).

  2. C6:

    \(F(\mathscr {N}\setminus D_k) \cap D_{k-1} = \emptyset \), ..., \(F(\mathscr {N}\setminus D_2) \cap D_1 = \emptyset \), and \(F(\mathscr {N}\setminus D_1) \cap D_0 = \emptyset \).

Suppose that we are now trying to construct a function that satisfies these conditions. Then the condition \(F(D_k) \subset D_{k-1}\) would certainly places a restriction on how we may define \(F\) on \(D_k\). However, since the set \(D_k\) does not overlap with any of the other sets \(D_0, \dots , D_{k-1}\), none of the other sub-conditions of C5 places any restriction on the definition of \(F\) on \(D_k\). Next, the sub-condition \(F(\mathscr {N}\setminus D_k) \cap D_{k-1} = \emptyset \) of C6 is certainly irrelevant to the definition of \(F\) on \(D_k\). The other sub-conditions of C6 are not quite so irrelevant, but since \(D_{k-1}\) does not overlap with any of the sets \(D_0, \dots , D_{k-2}\), as long as the condition \(F(D_k) \subset D_{k-1}\) is adhered to, they are automatically satisfied and do not places any additional restriction of how we may define \(F\) on \(D_k\). More generally, for each \(i = 1, \dots , k\), the condition \(F(D_{i}) \subset D_{i-1}\) is the only restriction placed on the definition of \(F\) on \(D_{i}\) by C5 and C6. In other words, asking for C1 to be satisfied by a function \(F\) places no restriction on the definition of \(F\) on \(D_i\) other than that \(F(D_i)\subset D_{i-1}\) be satisfied.

The discussion given so far can be reinterpreted as follows. Let \(D_0, D_1, \dots , D_k\) be any collection of mutually disjoint subsets of \(\mathscr {N}\), with \(D_0\) denoting the set of all DPs. By choosing a function \(F: \mathscr {N}\rightarrow \mathscr {N}\) satisfying Condition-C1, one determines functions \(F_i:D_{i} \rightarrow D_{i-1}\) for each \(i=1,\dots , k\). Let us fix any i. If the choice of \(F\) is made uniformly at random from the set of all function satisfying Condition-C1, the distribution of the corresponding \(F_i: D_i \rightarrow D_{i-1}\), defined on the set of all functions having domain \(D_i\) and co-domain \(D_{i-1}\), also becomes the uniform distribution.

We are now ready to prove the lemma. Choose any explicit family of disjoint sets \(D_0\), ..., \(D_k\) such that \(D_0\) is the set of all DPs. For a random function satisfying Condition-C1, since each \(F_i: D_i \rightarrow D_{i-1}\) is a random function, we can expect to see

$$\begin{aligned} \frac{|F(D')|}{|D_{i-1}|} = 1 - \exp \left( -\frac{|D'|}{|D_{i-1}|} \right) \end{aligned}$$
(42)

for every set \(D' \subset D_i\) and \(i=1,\dots , k\). So far, we have fixed \(D_0\), ..., \(D_k\) first and have claimed information on iterated image sizes only for functions \(F\) satisfying Condition-C1, which is associated with the sets \(D_0\), ..., \(D_k\). However, observe that this iterative equation depends only on the set sizes \(|D'|\), \(|D_0|\), ..., \(|D_k|\) and not on the specific sets \(D', D_0, \dots , D_k\). Also recall that (11) is expected of a random function. Interpreting this as (11) holding accurately for the vast majority of functions \(F\), the truth of Lemma 3 follows. A review of [14, Appendix B] is required to fully understand this final statement.

Appendix 4: Optimal rainbow tradeoff parameters

In this section we discuss the parameter set for the perfect rainbow tradeoff that the previous analysis [2] suggested and claimed to be optimal. Let us explain the steps they take to fix the parameters, in the language of this work. The required success rate \(\bar{\mathtt {R}}_{\mathrm{ps}}\) and the total number of table entries M are treated as the externally supplied parameters. First (28) is used to fix the number of tables \(\ell = \lceil -\frac{1}{2}\ln (1-\bar{\mathtt {R}}_{\mathrm{ps}})\rceil \). This forces the number of starting points per table to \(m = \frac{M}{\ell }\) and we know from (26) that the remaining parameter t must be fixed to

$$\begin{aligned} t = -\frac{\mathsf{N }}{m\ell }\ln (1-\bar{\mathtt {R}}_{\mathrm{ps}}) = -\frac{\mathsf{N }}{M}\ln (1-\bar{\mathtt {R}}_{\mathrm{ps}}), \end{aligned}$$
(43)

if the requested success rate is to be achieved. In short, the number of tables is chosen to be as small as possible, subject to the condition (28), and the rest of the parameters are set to what they must be in order to satisfy the externally given requirements.

It is not hard to show that the tradeoff coefficient \(\bar{\mathtt {R}}_{\mathrm{tc}}\) of Theorem 2, when combined with (27), is an increasing function of \(\ell \) in the range \(\ell \ge 1\) and \(0\le \bar{\mathtt {R}}_{\mathrm{ps}}< 1\). This implies that the parameters suggested by [2] are optimal in the sense that it gives the smallest possible tradeoff coefficient among those achieving the intended success rate. An easier approach would be to state that, the optimal parameter set of [2] corresponds to the rightmost empty circle in each box of Fig. 4, which is clearly the lowest dot in each box.

However, we want to emphasize that the rightmost circle of each box is just one of the many options that are available to the tradeoff algorithm implementer, and that this specific option is not likely to be favored over others when the pre-computation cost is taken into account, except possibly at low success rates. Furthermore, Fig. 6 demonstrates that there are success rates for which using parameters corresponding to the rightmost dot is certainly impractical.

Fig. 6
figure 6

Pre-computation cost versus tradeoff coefficient for the perfect rainbow tradeoff at success rates slightly lower than \(1-\frac{1}{e^2}=86.466\) %

The parameter set that is most efficient in terms of the online resource requirements is very often not the most practical or reasonable parameter set option among those made available by a tradeoff method. The current work provides the information which enables the tradeoff implementer to decide on the most sensible, rather than the most online-efficient, parameter to use.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Lee, G.W., Hong, J. Comparison of perfect table cryptanalytic tradeoff algorithms. Des. Codes Cryptogr. 80, 473–523 (2016). https://doi.org/10.1007/s10623-015-0116-0

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10623-015-0116-0

Keywords

Mathematics Subject Classification

Navigation