Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Time/memory/data tradeoff attack

From Wikipedia, the free encyclopedia
Cryptographic attack

Atime/memory/data tradeoff attack is a type ofcryptographic attack where an attacker tries to achieve a situation similar to thespace–time tradeoff but with the additional parameter ofdata, 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.[citation needed]

History

[edit]

Tradeoff attacks onsymmetric cryptosystems date back to 1980, whenMartin Hellman suggested a time/memory tradeoff method to breakblock ciphers withN{\displaystyle N} possible keys in timeT{\displaystyle T} and memoryM{\displaystyle M} related by the tradeoff curveTM2=N2{\displaystyle T{M^{2}}={N^{2}}} where1TN{\displaystyle 1\leq T\leq N}.[1] Later, in 1995, Babbage and Golic devised a different tradeoff attack forstream ciphers with a new bound such thatTM=N{\displaystyle TM=N} for1TD{\displaystyle 1\leq T\leq D} whereD{\displaystyle D} is the output data available to the cryptanalyst at real time.[2][3]

Attack mechanics

[edit]

This attack is a special version of the general cryptanalytic time/memory tradeoff attack, which has two main phases:

  1. 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.
  2. 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 thepreprocessing 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 thepreprocessing phase
T{\displaystyle T} time required for therealtime 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

[edit]

For block ciphers, letN{\displaystyle N} be the total number of possible keys and also assume the number of possible plaintexts and ciphertexts to beN{\displaystyle N}. Also let the given data be a single ciphertext block of a specific plaintext counterpart. If we consider the mapping from the keyx{\displaystyle x} to the ciphertexty{\displaystyle y} as a random permutation functionf{\displaystyle f} over anN{\displaystyle N} point space, and if this functionf{\displaystyle f} is invertible; we need to find the inverse of this functionf1(y)=x{\displaystyle {f}^{-1}(y)=x}.Hellman's technique to invert this function:

During the preprocessing stage
Try to cover theN{\displaystyle N} point space by anm×t{\displaystyle m\times t} rectangular matrix that is constructed by iterating the functionf{\displaystyle f} onm{\displaystyle m} random starting points inN{\displaystyle N} fort{\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.
Hellman's Matrix
Hellman's Matrix
Now, only one matrix will not be able to cover the wholeN{\displaystyle 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 ofm{\displaystyle m} at which the matrix contains exactlym{\displaystyle m} different points. Consider the firstm{\displaystyle m} paths from start points to end points are all disjoint withmt{\displaystyle mt} points, such that the next path which has at least one common point with one of those previous paths and includes exactlyt{\displaystyle t} points. Those two sets ofmt{\displaystyle mt} andt{\displaystyle t} points are disjoint by thebirthday paradox if we make sure thattmtN{\displaystyle t\cdot mt\leq N}. We achieve this by enforcing thematrix stopping rule:mt2=N{\displaystyle m{t}^{2}=N}.
Nevertheless, anm×t{\displaystyle m\times t} matrix withmt2=N{\displaystyle m{t}^{2}=N} covers a portionmt/N=1/t{\displaystyle mt/N=1/t} of the whole space. To generatet{\displaystyle t} to cover the whole space, we use a variant off{\displaystyle f} defined:fi(x)=hi(f(x)){\displaystyle {f}_{i}(x)={h}_{i}(f(x))} andhi{\displaystyle {h}_{i}} is simple out manipulation such as reordering of bits off(x){\displaystyle f(x)}[1] (refer to the original paper for more details). And one can see that the total preprocessing time isPN{\displaystyle P\approx N}. AlsoM=mt{\displaystyle M=mt} since we only need to store the pairs of start and end points and we havet{\displaystyle t} matrices each ofm{\displaystyle m} pairs.
During the real time phase
The total computation required to findf1(y){\displaystyle f^{-1}(y)} isT=t2{\displaystyle T=t^{2}} because we need to dot{\displaystyle t} inversion attempts as it is likely to be covered by one matrix and each of the attempts takest{\displaystyle t} evaluations of somefi{\displaystyle f_{i}}. The optimum tradeoff curve is obtained by using the matrix stopping rulemt2=N{\displaystyle m{t}^{2}=N} and we getTM2=N2,P=N,D=1{\displaystyle T{M^{2}}={N^{2}},P=N,D=1} and choice ofT{\displaystyle T} andM{\displaystyle 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 functionf{\displaystyle f} over anN{\displaystyle N} point space, and if thisf{\displaystyle f} is invertible, the tradeoff relationship becomes much better:TM=N{\displaystyle TM=N}.

Babbage-and-Golic attack on stream ciphers

[edit]

For stream ciphers,N is specified by the number of internal states of the bit generator—probably different from the number of keys.D 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 possibleN internal states of the bit generator with the corresponding string that consists of the firstlog(N){\displaystyle \log(N)} bits obtained by running the generator from that state by the mappingf(x)=y{\displaystyle f(x)=y} from statesx to output prefixesy. This previous mapping is considered a random function over theN points common space. To invert this function, an attacker establishes the following.

  1. During the preprocessing phase, pickM randomxi{\displaystyle {x}_{i}} states and compute their correspondingyi{\displaystyle {y}_{i}} output prefixes.
  2. Store the pairs(xi,yi){\displaystyle ({x}_{i},{y}_{i})} in increasing order ofyi{\displaystyle {y}_{i}} in a large table.
  3. During the realtime phase, you haveD+log(N)1{\displaystyle D+\log(N)-1} generated bits. Calculate from them allD possible combinations ofy1,y2,...,yD,{\displaystyle {y}_{1},{y}_{2},...,{y}_{D},} of consecutive bits with lengthlog(N){\displaystyle \log(N)}.
  4. Search for eachyi{\displaystyle {y}_{i}} in the generated table which takes log time.
  5. If you have a hit, thisyi{\displaystyle {y}_{i}} corresponds to an internal statexi{\displaystyle {x}_{i}} of the bit generator from which you can forward run the generator to obtain the rest of the key.
  6. By theBirthday Paradox, you are guaranteed that two subsets of a space withN points have an intersection if the product of their sizes is greater thanN.

This result from the Birthday attack gives the conditionDM=N{\displaystyle DM=N} with attack timeT=D{\displaystyle T=D} and preprocessing timeP=M{\displaystyle P=M} which is just a particular point on the tradeoff curveTM=N{\displaystyle TM=N}. We can generalize this relation if we ignore some of the available data at real time and we are able to reduceT fromT=D to1 and the general tradeoff curve eventually becomesTM=N{\displaystyle TM=N} with1TD{\displaystyle 1\leq T\leq D} andP=M{\displaystyle P=M}.

Shamir and Biryukov's attack on stream ciphers

[edit]

This novel idea introduced in 2000 combines the Hellman and Babbage-and-Golic tradeoff attacks to achieve a new tradeoff curve with better bounds for stream cipher cryptoanalysis.[4] Hellman's block cipher technique can be applied to a stream cipher by using the same idea of covering theN{\displaystyle N} points space through matrices obtained from multiple variantsfi{\displaystyle f_{i}} of the functionf{\displaystyle f} which is the mapping of internal states to output prefixes. Recall that this tradeoff attack on stream cipher is successful if any of the givenD{\displaystyle D} output prefixes is found in any of the matrices coveringN{\displaystyle N}. This cuts the number of covered points by the matrices fromN{\displaystyle N} toN/D{\displaystyle N/D} points. This is done by reducing the number of matrices fromt{\displaystyle t} tot/D{\displaystyle t/D} while keepingm{\displaystyle m} as large as possible (but this requirestD{\displaystyle t\geq D} to have at least one table).For this new attack, we haveM=mt/D{\displaystyle M=mt/D} because we reduced the number of matrices tot/D{\displaystyle t/D} and the same for the preprocessing timeP=N/D{\displaystyle P=N/D}. The realtime required for the attack isT=(t/D)tD=t2{\displaystyle T=(t/D)\cdot t\cdot 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 curveTM2D2=t2(m2t2/D2)D2=m2t4=N2{\displaystyle TM^{2}D^{2}=t^{2}\cdot (m^{2}t^{2}/D^{2})\cdot D^{2}=m^{2}t^{4}=N^{2}} forD2TN{\displaystyle D^{2}\leq T\leq N} (becausetD{\displaystyle t\geq D}).

Attacks on stream ciphers with low sampling resistance

[edit]

This attack, invented byBiryukov,Shamir, andWagner, relies on a specific feature of some stream ciphers: that the bit generator undergoes only few changes in its internal state before producing the next output bit.[5]Therefore, we can enumerate those special states that generatek{\displaystyle k} zero bits for small values ofk{\displaystyle k} at low cost. But when forcing large number of output bits to take specific values, this enumeration process become very expensive and difficult.Now, we can define thesampling resistance of a stream cipher to beR=2k{\displaystyle R=2^{-k}} withk{\displaystyle k} the maximum value which makes such enumeration feasible.

Let the stream cipher be ofN=2n{\displaystyle N=2^{n}} states each has afull name ofn{\displaystyle n} bits and a correspondingoutput name which is the firstn{\displaystyle n} bits in the output sequence of bits. If this stream cipher has sampling resistanceR=2k{\displaystyle R=2^{-k}}, then an efficient enumeration can use ashort name ofnk{\displaystyle n-k} bits to define the special states of the generator. Each special state withnk{\displaystyle n-k}short name has a correspondingshort output name ofnk{\displaystyle n-k} bits which is the output sequence of the special state after removing the firstk{\displaystyle k} leading bits. Now, we are able to define a new mapping over a reduced space ofNR=2nk{\displaystyle NR=2^{n-k}} points and this mapping is equivalent to the original mapping. If we letDR1{\displaystyle 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 forD{\displaystyle D} byDR{\displaystyle DR} andN{\displaystyle N} byNR{\displaystyle NR} in the new time/memory/data tradeoff attack by Shamir and Biryukov, we obtain the same tradeoff curveTM2D2=N2{\displaystyle TM^{2}D^{2}=N^{2}} but with(DR)2TNR{\displaystyle (DR)^{2}\leq T\leq NR}. This is actually an improvement since we could relax the lower bound onT{\displaystyle T} since(DR)2{\displaystyle (DR)^{2}} can be small up to1{\displaystyle 1} which means that our attack can be made faster. This technique reduces the number of expensive disk access operations fromt{\displaystyle t} totR{\displaystyle tR} since we will be accessing only the specialDR{\displaystyle DR} points, and makes the attack faster because of the reduced number of expensive disk operations.

References

[edit]
  1. ^abHellman, M.E.,"A cryptanalytic time-memory trade-off", IEEE Transactions on Information Theory, vol.26, no.4, pp. 401, 406, Jul 1980
  2. ^Babbage, S. H.,"Improved “exhaustive search” attacks on stream ciphers", European Convention on Security and Detection, 1995, vol., no., pp.161-166, 16–18 May 1995
  3. ^Golic, J., "Cryptanalysis of Alleged A5 Stream Cipher" Lecture Notes in Computer Science, Advances in Cryptology – EUROCRYPT ’97, LNCS 1233, pp.239-255, Springer-Verlag 1997
  4. ^Biryukov A., Shamir A., "Cryptanalytic Time/Memory/Data Tradeoffs for Stream Ciphers" Lecture Notes in Computer Science, Advances in Cryptology – ASIACRYPT 2000, LNCS 1976, pp.1-13, Springer-Verlag Berlin Heidelberg 2000
  5. ^Biryukov A., Shamir A., Wagner D., "Real Time Cryptanalysis of A5/1 on a PC" Fast Software Encryption 2000, pp.1-18, Springer-Verlag 2000
Common
algorithms
Less common
algorithms
Other
algorithms
Design
Attack
(cryptanalysis)
Standardization
Utilization
General
Mathematics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Time/memory/data_tradeoff_attack&oldid=1280089831"
Category:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp