<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Sultan Nurmukhamedov</string-name>
          <email>sultan.nurmukhamedov@nu.edu.kz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Artur Pak</string-name>
          <email>artur.pak@nu.edu.kz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rustem Takhanov</string-name>
          <email>rustem.takhanov@nu.edu.kz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zhenisbek Assylbekov</string-name>
          <email>zhassylbekov@nu.edu.kz</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>AES, Machine Learning, Computational Hardness</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Deparment of Mathematics, Nazarbayev University</institution>
          ,
          <addr-line>53 Kabanbay Batyr ave., Astana, Kazakhstan, 010000</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <abstract>
        <p>We show hardness of learning AES key from pairs of ciphertexts under the assumption of computational closeness of AES to pairwise independence. The latter is motivated by the recent result of Liu et al. [1]. messengers, etc. The US National Security Agency uses AES to encrypt materials classified as top secret.1 It would seem that with such a wide distribution there should be a strong guarantee of the security of this algorithm. However, at the moment, results on the provable security of AES against various cryptanalysis methods are scarce. This is primarily due to the fact that AES is not based on any mathematically hard problem. On the contrary, this algorithm is a heuristic proposed by Daemen and Rijmen [2] in the late 90s. It is noteworthy that since then no one has managed to build a successful attack on the AES. State of the art attacks are only marginally better than brute force: for example, Tao and Wu [3]'s biclique attack requires 2126 operations to recover a 128-bit AES key (compared to 2128 operations with a brute force attack).</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction and Main Result</title>
      <p>Advanced Encryption Standard (AES) is one of the most popular encryption algorithms today.
It underlies the TLS 1.3 protocol, which is used by most modern websites, email services, instant
∗Corresponding author.
CEUR
Workshop
Proceedings
htp:/ceur-ws.org
ISN1613-073</p>
      <p>
        CEUR Workshop Proceedings (CEUR-WS.org)
is a key, and x ∈ {0, 1} is an input. AES is a special case of  with  ∈ {128, 192, 256} and
 = 128 . In this work, we prove the resistance of a permutation family  to attacks based on
machine learning under the following
Assumption 1. For a pair of distinct inputs x and x′, and a uniformly sampled key k, the
distribution of the corresponding pair [ k(x),  k(x′)]is computationally indistinguishable from
the uniform distribution of two random distinct  -bit strings [u, u′], i.e. for any poly() -time
algorithm 
|Pr[( k(x),  k(x′)) = 1] −uP,ur′[( u, u′) = 1]| ≤ 1/poly()
k
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
Note that the result of Liu et al. [1] difers from Assumption 1 in that we require only the initial
key to be random, as is the case in the real AES.
      </p>
      <p>
        We show that existence of a function computable in poly() time that, given a pair of arbitrary
ciphertexts, can recover one of the keys consistent with those ciphertexts, would result in a
polynomial distinguisher that contradicts Assumption 1. Our main result is the following
Theorem 1. Let x and x′ be arbitrary distinct  -bit strings and assume there exists a function
ℎx,x′ ∶ {0, 1}2 → {0, 1} such that
ℎx,x′(y, y′) = {
k, if ∃k ∶ [ k(x),  k(x′)] = [y, y′]
0, otherwise
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
and ℎx,x′ is computable in poly() time. Then for a random uniform  -bit string k the distribution
of [ k(x),  k(x′)]is computationally distinguishable from that of two uniformly sampled distinct
 -bit vectors.
      </p>
      <p>Remark.</p>
      <p>
        Under Assumption 1 there is no eficient learner for the class
{0, 1} , x ≠ x′}, where each ℎx,x′ is given by (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ). If there were such a learner, then by sampling
uniformly at random ℓ = poly() keys {k }ℓ=1 , and computing [ k (x),  k (x′)], we could generate
a labeled training sample of pairs ([ k (x),  k (x′)],k ), which should sufice for our learner to

ifgure out an
      </p>
      <p>(,  ) approximation (in PAC sense) of ℎx,x′, which by Theorem 1 would result in
a polynomial time distinguisher that contradicts Assumption 1.
ℋ ∶= {ℎx,x′ ∣ x, x′ ∈</p>
    </sec>
    <sec id="sec-2">
      <title>2. Proof of Theorem 1</title>
      <p>
        (x′) =  k(x′). Thus Lines 2&amp;3 give us
Fix arbitrary distinct x, x′ ∈ {0, 1} , and let ℎx,x′ be defined by (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ). Consider Algorithm 1,
which we denote  x,x′(y, y′) for brevity. Randomly pick k from a uniform distribution over
{0, 1} . Feeding  k(x),  k(x′) as input to  x,x′, Line 1 produces  such that   (x) =  k(x) and
and algorithm outputs 1. Hence
 ←   −1( k(x)) =
      </p>
      <p>−1(  (x)) =x.

′ ←   −1( k(x′)) =</p>
      <p>
        −1(  (x′)) =x′,
k
Pr [ x,x′( k(x),  k(x′)) = 1] = 1
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
      </p>
      <sec id="sec-2-1">
        <title>Algorithm 1 Distinguisher</title>
        <p>Input: y, y′ ∈ {0, 1} s.t. y ≠ y′
Parameter: x, x′ ∈ {0, 1} s.t. x ≠ x′
1:  ← ℎx,x′(y, y′)
2:  ←   −1(y)
3:  ′ ←   −1(y′)
4: if  = x and  ′ = x′ then
5: return 1.
6: else
7: return 0.
8: end if</p>
        <p>Now randomly pick  -bit strings u, u′ without replacement from the uniform distribution over
{0, 1} and feed them as input to  x,x′. Intuitively, in this case the event  ∶= {ℎ x,x′(u, u′) ≠ 0}
has low probability. Let us upperbound the latter using the union bound:</p>
        <p>Pr[] =</p>
        <p>Pr [ℎx,x′(u, u′) ≠ 0]
u,u′
= uP,ur′ [∃ ≠ 0 ∶ [  (x),   (x′)] = [u, u′]]
= Pr [⋃[  (x),   (x′)] = [u, u′])]</p>
        <p>u,u′  ≠0
≤ ∑ Pr [[  (x),   (x′)] = [u, u′]]
 ≠0 u,u′
uP,ur′[] ≤  ∑≠0 2 (21− 1) = 21 .</p>
        <p>Pr [ x,x′(u, u′) = 1 ∣ ] = 1
u,u′
Notice that [  (x),   (x′)]is a fixed 2 -bit string, and the joint p.d.f. of u, u′ has the form
uP,ur′(u =  , u′ =  ′) = 2 (21− 1),
 ≠  ′.</p>
      </sec>
      <sec id="sec-2-2">
        <title>Combining (4) and (5), we have</title>
        <p>When ℎx,x′(u, u′) =  ≠ 0, we have   −1(u) = x,   −1(u′) = x′, and thus we can write</p>
        <p>
          Now we turn to the event when ℎx,x′(u, u′) outputs the zero key. This happens if one of the
following events occurs:
 ∶= {ℎ x,x′(u, u′) = 0} ∩ {[ 0(x),  0(x′)] = [u, u′]}
 ∶= {ℎ x,x′(u, u′) = 0} ∩ {∄ ∈ {0, 1} ∶ [  (x),   (x′)] = [u, u′]}
By Eq. (5), we have
uP,ur′[] ≤ Pr[[ 0(x),  0(x′)] = [u, u′]] = 2 (21− 1).
(
          <xref ref-type="bibr" rid="ref4">4</xref>
          )
(5)
(6)
(7)
(8)
In the event  , we have [ 0−1(u),  0−1(u′)] = [x, x′], and thus Alg. 1 produces 1 in this case, i.e.
In the event  , ℎ (u, u′) outputs 0 which is not a key that maps [x, x′] to [u, u′] under AES,
and we have
Now we can decompose the probability that  x,x′(u, u′) outputs 1 as follows:
Pr [ x,x′(u, u′) = 1 ∣ ] = 1.
        </p>
        <p>u,u′
Pr [ x,x′(u, u′) = 1 ∣ ]
u,u′
= Pr [ 0−1(u) = x,  0−1(u′) = x′ ∣ ]</p>
        <p>u,u′
= Pr [u =  0(x),u′ =  0(x′) ∣ ] = 0
u,u′
Pr [ x,x′(u, u′) = 1]
u,u′
= Pr [ x,x′(u, u′) = 1 ∣ ] ⋅
u,u′</p>
        <p>Pr []
u,u′
+ Pr [ x,x′(u, u′) = 1 ∣ ] ⋅ Pr []</p>
        <p>u,u′ u,u′
+ Pr [ x,x′(u, u′) = 1 ∣ ] ⋅ uP,ur′[].</p>
        <p>u,u′
(9)
(10)
(11)
(12)
Plugging (6), (7), (9), (8), (10) into (11), we have</p>
        <p>Pr [ x,x′(u, u′) = 1] ≤ 1 ⋅ 1 + 1 ⋅ 2 (21− 1) + 0
u,u′ 2
= 22 (−2 1−+11) = 2 1− 1 .</p>
        <p>
          Finally, combining (
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) and (12), we get
|Pr [ x,x′( k(x),  k(x′)) = 1] − Pr [ x,x′(u, u′) = 1]|
k u,u′
≥ 1 − 2 1− 1 ,
which means that Alg. 1 is a poly() -time distinguisher between the distribution of
[ k(x),  k(x′)]and the distribution of two distinct random  -bit strings, and this concludes the
proof.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Empirical Verification of Assumption 1</title>
      <p>Although Assumption 1 is motivated by the theoretical result of Liu et al. [1], to be more
convincing, we decided to test this assumption experimentally. To do this, we fixed two
arbitrary values x, x′ ∈ {0, 1}128, and generated uniformly at random ℓ keys k1, … , kℓ. Feeding
x and x′ into AES-128 with keys {k }ℓ=1 we get a sample of pairs [ k (x),  k (x′) ]ℓ=1 . Next,
we test whether the distribution from which this sample was generated is  -close to uniform
90% confidence band across 10 runs of the test for each of the bin sizes.
distribution over distinct pairs of 128-bit strings. In total there are 2128 ⋅ (2128 − 1) such pairs
and treating each of them as a bin is not tractable. Therefore, we split them into bins so that
the total number of bins allows for calculations on a regular desktop PC. Note that even after
this procedure, if the bins are not too large, the sample size ℓ is usually still much less than the
total number of bins  . And this means that classical tests based on the chi-square distribution
in this case are not suitable. Therefore, we used the test proposed by Paninski [4], which is
just suitable for the case ℓ ≪  . Formally, let ()
[ k(x),  k(x′)]is in the  -th bin. Then to test the hypothesis
be the true probability that a random vector
we reject the null if</p>
      <p>H0 ∶ () ≡
versus

=1
H1 ∶ ∑ |() −
 ∶= ℓ (
 − 1


1
,</p>
      <p>∀ ∈ {1, … , }
| &gt; 

1
)
ℓ−1
−  1 &gt;   ,
where  is the test statistic,  1 is the number of bins into which just one sample has fallen,
and   is the critical value that depends on  (we refer the reader to [4] for the details). In our
experiments, we set  = 0.01 , ℓ =  3/4, and vary  from 210 to 225 with an exponential step. For
each  we perform 10 runs, i.e. we take a sample of size ℓ 10 times, and compute the values of
test statistics for each run. The choice of x and x′ is specified in the code attached 2. The results
of evaluation are provided in Figure 1. The blue curve corresponds to the threshold value, and
the orange one indicates the average of  accross 10 runs. The shaded band around the orange
curve is the 90% confidence band. As we see, the statistical test of [ 4] fails to reject the null,
especially when the number of bins grows, which supports Assumption 1.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>Inspired by the recent result of Liu et al. [1] on statistical closeness of AES to pairwise
independence under randomness of all round keys, we make a relevant assumption on computational
closeness of AES to pairwise independence under randomness of just the initial key. Under
this assumption we prove the resistance of AES against attacks based on machine learning
algorithms that aim to recover AES key from pairs of ciphertexts. Our proof is elementary and
uses only college-level probability. We argue that Assumption 1 is realistic and is a reasonable
alternative to common cryptographic assumptions such as existence of a one-way function.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>This work was supported by the Program of Targeted Funding “Economy of the Future”
#0054/ПЦФ-НС-19.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>T.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tessaro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Vaikuntanathan</surname>
          </string-name>
          ,
          <article-title>The t-wise independence of substitution-permutation networks</article-title>
          , in: T. Malkin,
          <string-name>
            <surname>C.</surname>
          </string-name>
          Peikert (Eds.),
          <source>Advances in Cryptology - CRYPTO 2021 - 41st Annual International Cryptology Conference, CRYPTO</source>
          <year>2021</year>
          ,
          <string-name>
            <surname>Virtual</surname>
            <given-names>Event</given-names>
          </string-name>
          ,
          <source>August 16-20</source>
          ,
          <year>2021</year>
          , Proceedings,
          <string-name>
            <surname>Part</surname>
            <given-names>IV</given-names>
          </string-name>
          , volume
          <volume>12828</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2021</year>
          , pp.
          <fpage>454</fpage>
          -
          <lpage>483</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>030</fpage>
          -84259-8_
          <fpage>16</fpage>
          .
          <source>doi:1 0 . 1 0</source>
          <volume>0 7 / 9 7 8 - 3 - 0 3 0 - 8 4 2 5 9 - 8</volume>
          \ _ 1
          <fpage>6</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Daemen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Rijmen</surname>
          </string-name>
          ,
          <article-title>The block cipher rijndael</article-title>
          , in: J.
          <string-name>
            <surname>Quisquater</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          Schneier (Eds.),
          <source>Smart Card Research and Applications</source>
          , This International Conference, CARDIS '98,
          <string-name>
            <surname>Louvainla-Neuve</surname>
          </string-name>
          , Belgium,
          <source>September 14-16</source>
          ,
          <year>1998</year>
          , Proceedings, volume
          <volume>1820</volume>
          <source>of Lecture Notes in Computer Science</source>
          , Springer,
          <year>1998</year>
          , pp.
          <fpage>277</fpage>
          -
          <lpage>284</lpage>
          . URL: https://doi.org/10.1007/10721064_26.
          <source>doi:1 0 . 1 0</source>
          <volume>0 7 / 1 0 7 2 1 0 6 4 \ _ 2</volume>
          <fpage>6</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>B.</given-names>
            <surname>Tao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <article-title>Improving the biclique cryptanalysis of AES</article-title>
          , in: E.
          <string-name>
            <surname>Foo</surname>
          </string-name>
          , D. Stebila (Eds.),
          <source>Information Security and Privacy - 20th Australasian Conference, ACISP</source>
          <year>2015</year>
          ,
          <article-title>Brisbane</article-title>
          ,
          <string-name>
            <surname>QLD</surname>
          </string-name>
          , Australia, June 29 - July 1,
          <year>2015</year>
          , Proceedings, volume
          <volume>9144</volume>
          of Lecture Notes in Computer Science, Springer,
          <year>2015</year>
          , pp.
          <fpage>39</fpage>
          -
          <lpage>56</lpage>
          . URL: https://doi.org/10.1007/978-3-
          <fpage>319</fpage>
          -19962-
          <issue>7</issue>
          _3.
          <source>doi:1 0 . 1 0</source>
          <volume>0 7 / 9 7 8 - 3 - 3 1 9 - 1 9 9 6 2 - 7</volume>
          \ _ 3 .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>L.</given-names>
            <surname>Paninski</surname>
          </string-name>
          ,
          <article-title>A coincidence-based test for uniformity given very sparsely sampled discrete data</article-title>
          ,
          <source>IEEE Trans. Inf. Theory</source>
          <volume>54</volume>
          (
          <year>2008</year>
          )
          <fpage>4750</fpage>
          -
          <lpage>4755</lpage>
          . URL: https://doi.org/10.1109/TIT.
          <year>2008</year>
          .
          <volume>928987</volume>
          .
          <source>doi:1 0 . 1 1 0 9 / T I T . 2</source>
          <volume>0 0 8 . 9 2 8 9 8 7 .</volume>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>