of a given hypotheses can be verified will be 1/2
24
,
one would expect that the two sets of 2
32
hypotheses
can be reduced to one set of 2
40
hypotheses. A third
set of 2
32
hypotheses can then be generated for one
of the remaining columns of the penultimate subkey
and four bytes of the last subkey. There will be a fur-
ther four bytes of the last subkey that are generated
by bytes for which there are already hypotheses, and
an element from the set of of 2
40
hypotheses will val-
idate a hypothesis from the new set of 2
32
hypotheses
with a probability of 1/2
32
. One would therefore ex-
pect to combine these two sets to produce a set of 2
40
hypotheses for 96 bits of the penultimate and 96 bits
of the last subkey. A set of 2
32
hypotheses can then be
generated for the final column of the penultimate sub-
key and four bytes of the final subkey. At this point
on can verify whether an entire subkey can be gener-
ated from the penultimate subkey. For each of the 2
32
hypotheses generated, hypotheses in the set of 2
40
hy-
potheses for 96 bits of the penultimate and 96 bits of
the last subkey will produce valid keys with a prob-
ability of 1/(2
8
)
9
= 1/2
72
(since there will be nine
bytes in the last subkey that will not have been veri-
fied previously). One would, therefore, expect to gen-
erate two hypotheses from the two sets of hypotheses.
One that is correct and one that fulfills the criteria by
chance.
The time complexity of the entire attack will be
2
38
five-round AES encryption operations and require
2
40
hypotheses to be stored in memory. If a second
δ-set is included the time complexity will increase,
but the memory requirements will become negligi-
ble. The time complexity does not double since an
attacker only requires sufficient information to de-
termine which of the two remaining hypotheses are
false. This should be possible with work equivalent
to 2
36
five-round AES encryptions, i.e. the generation
of hypotheses of 32-bits of the final and 32 bits of the
penultimate subkeys. These attack are summarized in
Table 1.
Table 1: Summary of the Square Attack on Five-round
AES-128.
Number Memory Time Remaining
of δ-sets Complexity Hypotheses
1 2
40
2
38
2
2 1 2
38
1
4.3 Analyzing an Extra Round
The attack described above applied to a five-round
AES can be extended to attack a six-round AES. In
order to permit an extra round to be analyzed a set
of 2
32
plaintexts are chosen that give all the possible
ciphertexts that differ at indexes 1,6,11, and 16. An
attacker will then seek to choose the 256 plaintext-
ciphertext pairs that produce intermediate states that
differ in only one byte after one round, i.e. the input
required to attack a five-round AES, as shown in Fig-
ure 2.
The simplest way of achieving this would be to
choose 256 32-bit values for the first column of the
intermediate state that differ in one byte. These 32-bit
values can be deciphered for a given hypothesis for
four bytes of the first subkey (specifically the bytes
at indexes 1,6,11, and 16). This will produce 256
plaintexts that produce a δ-set after one round that can
be analyzed using the attack described in Section 4.2,
each of which will provide one hypothesis for the se-
cret key given the hypotheses for 32 bits of the first
subkey. This would increase the time complexity of
an attack by a factor of 2
32
, but allow an extra round
to be analyzed.
Ferguson et al. observed that all 2
32
can be used as
a set of acquisitions to conduct the Square attack (Fer-
guson et al., 2001). That is, a set of 2
32
distinct plain-
texts differing at, for example, indexes 1,6,11, and
16 described above can be viewed as 2
24
δ-sets. This
remains true after the first round but an attacker can-
not distinguish individual δ-sets after the first round
without knowing four bytes of the first subkey. How-
ever, an attacker can treat all 2
32
acquisitions together,
i.e. the attack described in the previous section work
in the same manner but with a set of 2
32
, rather than
2
8
, acquisitions. We refer to a set of 2
32
plaintext-
ciphertext pairs that are equivalent to 2
24
δ-sets as a
∆-set.
An attack would proceed in the same manner as
described in Section 4.2. Using the same notation
the computation of the sets of (x
1
,c
2
,c
3
) will require
2
48
executions of the function S. This would result
in 2
32
triples (x
1
,c
2
,c
3
). However, a maximum of
2
24
values distinct values are possible. As described
in Section 4.1, one only needs to keep one example
of the triplets that occur with an odd-numbered fre-
quency. Likewise, this will produce at most 2
16
values
for (x
2
,c
3
) per key hypothesis, and at most 2
8
val-
ues for x
3
per key hypothesis. The time complexity
of the entire analysis requires 2
50
executions of the
function S for all four 32-bit sets for the final subkey,
which given our estimate given above corresponds to
2
42
AES encryptions operations. This is increased to
2
44
where five ∆-sets are required to determine the
key.
Given that only two ∆-sets are required to deter-
mine the key, see Section 4.2, one the complexity
using the “partial sums” method can be reduced to
2
43
. This is not immediately apparent since evalu-
SECRYPT2012-InternationalConferenceonSecurityandCryptography
30