r < 2 or c < 2 as these have the matrices for the op-
erations MixColumns and ShiftRows reduced to (1).
Recall that the dimensions of the state array r and c
are restricted to the values 1, 2 and 4; the exponent e
can be either 4 or 8; and for the number of rounds n,
we have 1 ≤ n ≤ 10.
The column named Vars contains the number of
variables in the whole polynomial system and the col-
umn named Polys contains the number of polynomi-
als in the system. We measured the runtime and mem-
ory consumption only during the solving of the poly-
nomials since the preparation of the system takes only
a fraction of the resources relative to solving it.
Recall that the key size for SR(n,r, c, e) is given by
the product rce. Notice that we were not able to com-
pute the solution for even one round of SR(n, 4, 4, 8),
the key size of which is 128 bits. On the other hand,
the SAT solver could quickly compute the solution for
all ten rounds of SR(n,2, 2, 4). We limited the time of
each computation to 100 hours. Missing values in the
tables denote computations that exceeded this time.
Table 2 contains the results of experiments with
systems that contain only the variables of the initial
secret key. We eliminated the auxiliary variables by
a gradual substitution of the variables of the initial
key through the system, starting by adding the known
plaintext bits and ending by adding the known cipher-
text bits. The time required for this substitution is
stated in the column named PT. This system always
contains k polynomials in k variables where k is the
number of the key bits. Since k is the number of vari-
ables and we work over GF(2), k is also the maximal
limit of the total degree of the polynomials.
Table 2: Experiments with systems with no auxiliary vari-
ables.
Cipher
Key
bits
PT
a
AMP
b
F4 SAT
Time Mem. Time
SR(1, 2, 2, 4) 16 1 s 20 1 s 33 MB 1 s
SR(2, 2, 2, 4) 16 1 s 2475 2.5 m 4.8 GB 1 m
SR(3, 2, 2, 4) 16 8 s 32784 8.5 m 18.5 GB 13 m
SR(10, 2, 2, 4) 16 2.5 m 32814 9 m 19.5 GB 14 m
SR(1, 4, 2, 4) 32 1 s 37 55 s 1.2 GB 1 s
SR(1, 2, 4, 4) 32 1 s 23 13 s 671 MB 1 s
SR(1, 4, 4, 4) 64 4 s 40 — — 2 m
SR(1, 2, 2, 8) 32 8 s 314 — — 1.5 m
SR(1, 4, 2, 8) 64 18 s 567 — — 33 m
SR(1, 2, 4, 8) 64 14 s 348 — — 1.5 h
a
Preprocessing Time — the time required to obtain the
system
b
Average number of Monomials per Polynomial
All further experiments will be carried out with
systems of polynomials involving only the variables
of the initial key. In systems with auxiliary vari-
ables, the structure of the polynomial systems derived
from different plaintexts remains unchanged. Only
the initial and final polynomials that add the bits of
the plaintext and ciphertext differ by this bitwise addi-
tion. Since we have eliminated the auxiliary variables
by a gradual substitution of the initial key bits starting
from the initial plaintext addition, each of the k poly-
nomials now depends on the choice of plaintext and
its corresponding ciphertext. Since the structure of
each polynomial system is now different, the time and
memory required for obtaining the solution started to
differ as well, especially the time required by the SAT
solver. For this reason, all the following tables contain
average results of five different runs for each experi-
ment. We can still see that the results for the SAT
solver differ across tables for the same experiment, so
even more than five runs would be required for further
investigation. Nevertheless, we restricted ourselves to
such number due to limited time resources.
The column named AMP contains the average
number of monomials per polynomial in the whole
system. We can see that this number grows fast as n
increases. The maximal limit of the number of mono-
mials in one polynomial is 2
k
− 1. When n = 1 and
e = 4, the average degree of monomials is 2 and the
highest degree is 3. When n = 2, the average and
highest degrees are 5 and 9, respectively. Note that
the average degree has its maximum at
k
2
. We were
not able to generate systems with n > 2 and r, c > 2
for e = 4. For n = 1 and e = 8, the average degree
is 4 and the maximal degree is 7. We were not able
to generate systems with e = 8 and n > 1 (recall that
we do not consider the cases when r < 2 or c < 2).
We can see in the table that the overall performance
is worse compared to the previous table and that the
SAT solver still outperforms the F4 algorithm. More-
over, we were able to solve less systems than in the
previous experiments.
In the table above, we can see that the the AMP
value and the solving time and memory are almost
the same for SR(3, 2, 2, 4) and SR(10, 2, 2, 4).
This means that the full diffusion for SR(n,2,2,4) is
reached in the third round of the cipher and the sub-
sequent rounds do not provide any further security
as regards the algebraic cryptanalysis, except for a
longer time required for the generation of the polyno-
mial system. This observation is in line with the state-
ments made in (Aumasson, 2019). Table 3 provides
a deeper insight into the distribution of monomials in
SR(3, 2, 2, 4).
At full diffusion, the expected degree of monomi-
als should be equal to
1
2
k
d
where k is the number of
variables and d is the degree. Since we have SR(3,
2, 2, 4), we get k = 2 · 2 · 4 = 16. Recall that we also
have k polynomials in the whole system. In Table 3,
the expected value is stated in the last row. We see
Yet Another Algebraic Cryptanalysis of Small Scale Variants of AES
423