2 GUESS-AND-DETERMINE
ATTACK
Assuming the cipher satisfies our attack criteria, let
the minimum number of state bits that needs to be
guessed, given l known keystream bits, be k
min
. This
minimum value can depend on n, l and properties
of the cipher. We can, of course, choose to guess
more than this minimum number. If we let k, such
that k
min
≤ k ≤ n, be the number of internal state bits
guessed in the attack, then the attack complexity T is
T = 2
k
× G [n,l, k], (1)
where function G [·] is the complexity of solving the
system of equations for each guess. The exact form
of this function will differ from cipher to cipher.
3 GUESS-AND-DETERMINE
TIME-MEMORY-DATA
TRADE-OFF ATTACK
The attack time complexity in (1) can be improved
upon when we apply the Time-Memory-Data Trade-
Off attack of (Biryukov and Shamir, 2000), which is
based on Hellman’s original time-memory trade-off
attack in (Hellman, 1980). Oeschlin’s rainbow attack
(Oeschlin, 2003) is not discussed here since the time-
memory-data trade-off curve of the rainbow method
has been shown in (Biryukov et. al., 2006) to be infe-
rior to that for Hellman’s method.
Our procedure is similar to that described in Theo-
rem 2 of (Khoo et. al., 2007). Defining n, k and l as in
the previous section, we choose a fixed string c such
that c ∈ GF(2)
l
. We define the function f : GF(2)
n
→
GF(2)
k+l
so that
f(˜x) = (k+ l)-bit output of the keystream generator
when the internal state is initialized to ˜x ∈ GF(2)
n
.
Given x ∈ GF(2)
k
, and c, we can solve for u ∈
GF(2)
n−k
such that the first l output keystream bits
of the stream cipher when initialized to the state (x||u)
is the string c, where ‘||’ denotes concatenation of bit
strings. With this initial state, we can further generate
k additional keystream bits y, so that y ∈ GF(2)
k
. We
define (c||y) to be the keystream bits when the cipher
is initialized to the state (x||u):
f(x||u) = (c||y). (2)
Let D = 2
d
be the amount of data. For our case,
D is the number of occurences of the string c in
our keystream. We define the search functions F
(c)
i
:
GF(2)
k
→ GF(2)
k
for i = 1,.. .,t/D as follows:
F
(c)
i
(x) = y⊕ X
i
where x and y are related through (2), and the X
i
’s
are distinct randomly generated bit strings in GF(2)
k
.
This search function will be used to compute the
TMD tables, each with length t, which will be used to
conduct an attack similar to that described in (Khoo
et. al., 2007).
We define m to be the total number of rows
needed in a table if we were to carry out a Time-
Memory (TM) Trade-Off attack as described in (Hell-
man, 1980). The entire state space N is equal to mt
2
by the matrix stopping rule (Hellman, 1980). Since
we are performing a TMD attack, this search space
can be reduced to mt
2
/D according to the amount of
data D that we have. According to (Biryukov and
Shamir, 2000), we shall use t/D tables each of size
m× t. Since we are only storing the start points and
end points, each table will only require m units of
memory. Thus the amount of memory M required
for the t/D tables is M = mt/D. For every one of
the D data points, computing all t iterations of the
t/D search functions would require approximately
t ×t/D× G [n,l,k] units of processing time. Since we
have D units of data, the total online attack time T is
t
2
× G [n,l,k]. Substituting these parameters into the
trade-off equation gives:
TM
2
D
2
= t
2
× G [n, l, k] × (mt/D)
2
× D
2
= m
2
t
4
G [n,l,k]
= N
2
G [n,l,k]
= 2
2k
G [n,l,k],
where we have made use of N = mt
2
to eliminate the
m’s and t’s and derive the trade-off curve equation
TM
2
D
2
= N
2
G [n,l,k].
During pre-processing, t evaluations of functions
F
(c)
i
need to be made for every row, with a complexity
of G [n, l, k] for each evaluation. Thus the complex-
ity in building t/D tables of m rows is t × G [n,l,k] ×
t/D× m = mt
2
/D× G [n, l,k] = N/D × G [n,l,k].
We can summarise the previous discussion with
the following results:
Memory = M = 2
mem
Data = D = 2
d
Pre-processing Complexity = N/D× G [n,l,k]
= 2
k−d
× G [n, l, k]
Length of constant string c = l
Online Attack Complexity = T
= 2
2(k−(d+mem))
× G [n,l,k] (3)
In derivingthe above result, we need to ensure that
conditions implicit in the derivation of TMD Trade-
Off curve are satisfied, i.e. the amount of memory
A GENERAL FRAMEWORK FOR GUESS-AND-DETERMINE AND TIME-MEMORY-DATA TRADE-OFF
ATTACKS ON STREAM CIPHERS
301