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.
History Tradeoff attacks on symmetric cryptosystems date back to 1980, when Martin Hellman suggested a time/memory tradeoff method to break block ciphers with N {\displaystyle N} possible keys in time T {\displaystyle T} and memory M {\displaystyle M} related by the tradeoff curve T M 2 = N 2 {\displaystyle T{M^{2}}={N^{2}}} where 1 ≤ T ≤ N {\displaystyle 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 T M = N {\displaystyle TM=N} for 1 ≤ T ≤ D {\displaystyle 1\leq T\leq D} where D {\displaystyle D} is the output data available to the cryptanalyst at real time.
Attack mechanics This attack is a special version of the general cryptanalytic time/memory tradeoff attack, which has two main phases:
Preprocessing: During this phase, the attacker explores the structure of the cryptosystem and is allowed to record their findings in large tables. This can take a long time. Realtime: In this phase, the cryptanalyst is granted real data obtained from a specific unknown key. They then try to use this data with the precomputed table from the preprocessing phase to find the particular key in as little time as possible. Any time/memory/data tradeoff attack has the following parameters:
N {\displaystyle N} search space size
P {\displaystyle P} time required for the preprocessing phase
T {\displaystyle T} time required for the realtime phase
M {\displaystyle M} amount of memory available to the attacker
D {\displaystyle D} amount of realtime data available to the attacker
Hellman's attack on block ciphers For block ciphers, let N {\displaystyle N} be the total number of possible keys and also assume the number of possible plaintexts and ciphertexts to be N {\displaystyle 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 {\displaystyle x} to the ciphertext y {\displaystyle y} as a random permutation function f {\displaystyle f} over an N {\displaystyle N} point space, and if this function f {\displaystyle f} is invertible; we need to find the inverse of this function f − 1 ( y ) = x {\displaystyle {f}^{-1}(y)=x} . Hellman's technique to invert this function:
During the preprocessing stage Try to cover the N {\displaystyle N} point space by an m × t {\displaystyle m\times t} rectangular matrix that is constructed by iterating the function f {\displaystyle f} on m {\displaystyle m} random starting points in N {\displaystyle N} for t {\displaystyle 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.
… excerpt ends here. Continue reading the full article.

