Time/memory/data tradeoff attack

Uses your system voice; voice and rate in settings.

Snapshot

≈ 8 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

A time/memory/data tradeoff attack is a type of cryptographic attack where an attacker tries to achieve a situation similar to the space–time tradeoff but with the additional parameter of data, representing the amount of data available to the attacker. An attacker balances or reduces one or two of those parameters in favor of the other one or two.

This type of attack is very difficult, so most of the ciphers and encryption schemes in use were not designed to resist it.

A time/memory/data tradeoff attack is a type of cryptographic attack where an attacker tries to achieve a situation similar to the space–time tradeoff but with the additional parameter of data, representing the amount of data available to the attacker. An attacker balances or reduces one or two of those parameters in favor of the other one or two.

This type of attack is very difficult, so most of the ciphers and encryption schemes in use were not designed to resist it. Tradeoff attacks on symmetric cryptosystems date back to 1980, when Martin Hellman suggested a time/memory tradeoff method to break block ciphers with N possible keys in time T and memory M related by the tradeoff curve T{M^2}={N^2} where 1 \leq T \leq N . Later, in 1995, Babbage and Golic devised a different tradeoff attack for stream ciphers with a new bound such that TM=N for 1 \leq T \leq D where D is the output data available to the cryptanalyst at real time.

For block ciphers, let N be the total number of possible keys and also assume the number of possible plaintexts and ciphertexts to be N . Also let the given data be a single ciphertext block of a specific plaintext counterpart. If we consider the mapping from the key x to the ciphertext y as a random permutation function f over an N point space, and if this function f is invertible; we need to find the inverse of this function {f}^{-1}(y)=x . Hellman's technique to invert this function: During the preprocessing stage Try to cover the N point space by an m \times t rectangular matrix that is constructed by iterating the function f on m random starting points in N for t times.

The start points are the leftmost column in the matrix and the end points are the rightmost column. Then store the pairs of start and end points in increasing order of end points values. Now, only one matrix will not be able to cover the whole N space.

But if we add more rows to the matrix, we will end up with a huge matrix that includes recovered points more than once. So, we find the critical value of m at which the matrix contains exactly m different points.

Consider the first m paths from start points to end points are all disjoint with mt points, such that the next path which has at least one common point with one of those previous paths and includes exactly t points. Those two sets of mt and t points are disjoint by the birthday paradox if we make sure that t \sdot mt \leq N . We achieve this by enforcing the matrix stopping rule: m{t}^2=N . Nevertheless, an m \times t matrix with m{t}^2=N covers a portion mt/N=1/t of the whole space.

To generate t to cover the whole space, we use a variant of f defined: {f}_{i}(x)={h}_{i}(f(x)) and {h}_{i} is simple out manipulation such as reordering of bits of f(x) (refer to the original paper for more details). And one can see that the total preprocessing time is P \approx N . Also M=mt since we only need to store the pairs of start and end points and we have t matrices each of m pairs.

During the real time phase The total computation required to find f^{-1}(y) is T=t^{2} because we need to do t inversion attempts as it is likely to be covered by one matrix and each of the attempts takes t evaluations of some f_{i} . The optimum tradeoff curve is obtained by using the matrix stopping rule m{t}^2=N and we get T{M^2}={N^2}, P=N, D=1 and choice of T and M depends on the cost of each resource.

According to Hellman, if the block cipher at hand has the property that the mapping from its key to cipher text is a random permutation function f over an N point space, and if this f is invertible, the tradeoff relationship becomes much better: TM=N . For stream ciphers, is specified by the number of internal states of the bit generator probably different from the number of keys. is the count of the first pseudorandom bits produced from the generator. Finally, the attacker's goal is to find one of the actual internal states of the bit generator to be able to run the generator from this point on to generate the rest of the key.

Associate each of the possible internal states of the bit generator with the corresponding string that consists of the first \log(N) bits obtained by running the generator from that state by the mapping f(x)=y from states to output prefixes . This previous mapping is considered a random function over the points common space. To invert this function, an attacker establishes the following.

During the preprocessing phase, pick random {x}_i states and compute their corresponding {y}_i output prefixes. Store the pairs ({x}_i,{y}_i) in increasing order of {y}_i in a large table. During the realtime phase, you have D+\log(N)-1 generated bits.

Calculate from them all possible combinations of {y}_1,{y}_2,...,{y}_D, of consecutive bits with length \log(N) . Search for each {y}_i in the generated table which takes log time. If you have a hit, this {y}_i corresponds to an internal state {x}_i of the bit generator from which you can forward run the generator to obtain the rest of the key.

By the Birthday Paradox, you are guaranteed that two subsets of a space with points have an intersection if the product of their sizes is greater than . This result from the Birthday attack gives the condition DM=N with attack time T=D and preprocessing time P=M which is just a particular point on the tradeoff curve TM=N . We can generalize this relation if we ignore some of the available data at real time and we are able to reduce T from T=D to and the general tradeoff curve eventually becomes TM=N with 1 \leq T \leq D and P=M . For this new attack, we have M=mt/D because we reduced the number of matrices to t/D and the same for the preprocessing time P=N/D . The realtime required for the attack is T=(t/D) \sdot t \sdot D=t^{2} which is the product of the number of matrices, length of each iteration and number of available data points at attack time.

Eventually, we again use the matrix stopping rule to obtain the tradeoff curve TM^{2}D^{2}=t^{2}\sdot (m^{2}t^{2}/D^{2})\sdot D^{2}=m^{2}t^{4}=N^{2} for D^{2}\leq T\leq N (because t\geq D ). Now, we can define the sampling resistance of a stream cipher to be R=2^{-k} with k the maximum value which makes such enumeration feasible. Let the stream cipher be of N=2^{n} states each has a full name of n bits and a corresponding output name which is the first n bits in the output sequence of bits.

If this stream cipher has sampling resistance R=2^{-k} , then an efficient enumeration can use a short name of n-k bits to define the special states of the generator. Each special state with n-k short name has a corresponding short output name of n-k bits which is the output sequence of the special state after removing the first k leading bits.

Now, we are able to define a new mapping over a reduced space of NR=2^{n-k} points and this mapping is equivalent to the original mapping. If we let DR\geq 1 , the realtime data available to the attacker is guaranteed to have at least one output of those special states. Otherwise, we relax the definition of special states to include more points.

If we substitute for D by DR and N by NR in the new time/memory/data tradeoff attack by Shamir and Biryukov, we obtain the same tradeoff curve TM^{2}D^{2}=N^{2} but with (DR)^{2}\leq T\leq NR . This is actually an improvement since we could relax the lower bound on T since (DR)^{2} can be small up to 1 which means that our attack can be made faster.

This technique reduces the number of expensive disk access operations from t to tR since we will be accessing only the special DR points, and makes the attack faster because of the reduced number of expensive disk operations.

Text derived from https://en.wikipedia.org/w/index.php?oldid=1378937227 under CC BY-SA 4.0; modifications have been made.

Provenance

snapshot enwiki-001378937227 · captured 1791326129.0 · version history

Cite this page as: encyclopegia.org, “Time/memory/data tradeoff attack”, snapshot enwiki-001378937227. https://encyclopegia.org/a/time-memory-data-tradeoff-attack

Sources cited in this revision

2 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.