<!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>
      <title-group>
        <article-title>Improving the RC5RA Algorithm's Crypto Resistance for Embedded Computers</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrii Sahun</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladyslav Khaidurov</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pavlo Gikalo</string-name>
          <email>p.gikalo@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ukraine</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Engineering Thermophysics of NAS of Ukraine</institution>
          ,
          <addr-line>2а Mariyi Kapnist str., 03057, Kyiv</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute</institution>
          ,”
          <addr-line>37 Peremohy str., 03056</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>National University of Life and Environmental Sciences of Ukraine</institution>
          ,
          <addr-line>15 Heroyiv Oborony str., 03041, Kyiv</addr-line>
        </aff>
      </contrib-group>
      <fpage>268</fpage>
      <lpage>275</lpage>
      <abstract>
        <p>An approach to increase the cryptographic stability of the RC5RA classical cryptographic algorithm. The proposed approach does not increase the computational complexity of the RC5RA algorithm due to the fact that it does not involve increasing the encryption rounds, key or block length. The approach to crypto resistance improvement of this algorithm is based on the use of nonlinear round shift functions. These functions are continuous throughout the entire range of their existence. The obtained model of the RC5RA crypto system demonstrates resistance to encryption of encrypted data up to 210 times (using differential analysis) at 14 rounds of encryption, at 12 rounds-the difference in crypto resistance of the modified RC5RA (unmodified version) is 24. The modified model of the RC5RA crypto system does not show an increase in computational time (compared to the base RC5RA). In the obtained RC5RA crypto system there are no collisions and statistical correlations between the blocks of incoming messages and outgoing blocks. Block cipher, symmetric encryption, nonlinear shift function, RC5RA, symmetric block cipher CPITS-II-2021: Cybersecurity Providing in Information and Telecommunication Systems, October 26, 2021, Kyiv, Ukraine ORCID: 0000-0002-5151-9203 (A. Sahun); 0000-0002-4805-8880 (V. Khaidurov); 0000-0002-8058-8267 (P. Gikalo)</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        protection [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
size;
      </p>
      <p>
        Data encryption in computer network channels can be implemented at any of the seven levels of the
OSI model [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Encryption is more often implemented either at the upper (application) or lower
(channel, network) levels of the OSI model. In addition to "useful" information traffic, information
about the routing of the message, information about the routing protocol are also encrypted. In this case,
the network switch must decrypt the data stream in order to process it correctly. Then the switch
encrypts the traffic again for transmission to another network switch. For this reason, «Internet of
Things» networks, especially those based on low-power controllers (Arduino, NodeMCU, ESP32), use
special methods of information security to protect network traffic. Firewalls are most often used for this
purpose. It should be noted that channel encryption in such cases is an effective means of information
Despite the high efficiency, channel encryption has disadvantages:
– the cost of implementing encryption at the channel level increases sharply with increasing network
– the data must be encrypted each time it is transmitted over a network channel.
      </p>
      <p>
        Trends in the development of cryptographic protection (for example, the hardware implementation
in the computing cores of the microprocessor of the AES encryption algorithm [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]) indicate the
prospects for the implementation of block XOR-ciphers. Thus, a large number of means of
cryptographic computer protection is implemented in the form of hardware units or devices.
      </p>
      <p>2022 Copyright for this paper by its authors.</p>
      <p>
        Hardware encryption has a higher speed. For example, the RC5 cryptographic algorithm consists of
a large number of modulus arithmetic operations that are performed on plaintext bits. However, modern
microcontrollers are practically not adapted to perform efficient bit crypto transformations. The creators
of the RC5 cryptographic algorithm provided that it could be easily implemented by both hardware and
software methods, which allows to protect network traffic for Internet of Things (IoT) technology.
Although at the moment firewalls and some other means and technologies of data protection are more
often used for this [
        <xref ref-type="bibr" rid="ref4 ref5 ref6 ref7">4–7</xref>
        ]. The algorithms of the RC5 family provide for the division of the message into
a certain number of parts of a fixed size. Each of these parts undergoes a separate encryption procedure.
This simplifies the encryption task. The given practical capabilities of the RC5 algorithm can confirm
that the block symmetric RC5 encryption algorithm has prospects in IoT. It provides prospects for
enhancing the quality of encryption and reducing the computational load on the computing mechanisms
of microcontrollers [
        <xref ref-type="bibr" rid="ref3 ref8">3, 8</xref>
        ].
      </p>
      <p>
        In their work [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], the authors of the RC5 crypto algorithm note that the proposed algorithm can be
easily implemented in hardware. At the same time, the ways of enhancing its cryptographic power
without increasing the computational complexity are also proposed [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. This feature of RC5 is important
in its application and is a convenient basis for modification [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Although, the classical algorithm is
built on one shift function, it can be modified by using several sequentially nonlinear shift functions
2. Analysis of the Principle of Operation and Parameters of the RC5 Algorithm
      </p>
      <p>
        Some of the main parameters of the RC5 algorithm are variable parameters [
        <xref ref-type="bibr" rid="ref3 ref8">3, 8</xref>
        ]. As a basic
algorithm for modification, we choose its RC5RA variation [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. In it, the cyclic shift occurs by a
variable number of bits, which depends on the algorithm round number, determined by a function f ().
This function processes all bits of another sub block as an input value. The scheme of cryptographic
transformation in rounds of the RC5RA algorithm is shown in Figure 1. In the algorithms of the RC5RA
family, in addition to the secret key, there are some others, namely:
      </p>
      <p>– the size of the word w (in bits). The algorithm encrypts blocks of two words (hereinafter referred
to as A and B respectively). Valid values of w are natural numbers 16, 32 or 64. The recommended
word size is 32 bits;
– the number of rounds of the R-algorithm (any integer in the range from 0 to 255 inclusive);
– secret key size b (in bytes) – variable value (any integer in the range from 0 to 255 inclusive).
When encrypting for two blocks A and B in the binary representation, the RC5 algorithm is executed
in such a way that before the first encryption round the operations of superimposing the extended key
S on the encrypted data according to expression (1) are performed.</p>
      <p>
        The maximum RC5 key size for RC5 family algorithms is 2040 bits. An example of the formation
of the extended key S is given in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The RC5RA algorithm performs a cryptographic conversion of
the kind:
  +1 = ((  ⊕   ) &lt;&lt;  (⋅)) +  2 ,   +1 = ((  ⊕   ) &lt;&lt;  (⋅)) +  2 +1.
(1)
The proposed approach to improvement involves not so much a modification of the algorithm, but an
increase in its crypto resistance by choosing the nonlinear shift functions used in (1). This function, in
turn, is the basis for modifying the algorithm. Obviously, the main point for improving the RC5RA is
the choice of nonlinear functions of the form  ( ,  ), where the 
– round key and  – number of the
round. The using of the following functions is proposed as nonlinear functions:
1) the first shift function:
(2)
 ( ,  ) = | + [
      </p>
      <p>( 
where</p>
      <p>=  2
 – round number;</p>
      <p>;
 – the length of half of the coded block;

∑     ) ]| 
which is  in a bit representation.</p>
      <p>[ ] – an integer part of the x number;
  – is the length of the initial message block (plaintext) in the encryption round;
 
– a binary representation of the symbol Lm encoded by the symbol of the word  , the length of
*r</p>
      <p>K2</p>
      <p>K2*
r+11
&lt;&lt;
&lt;
&lt;&lt;
&lt;
+
+
+
+
f ()
f ()

10
( 

∑  
 =1

∑  
2) the second offset function:
 ( ,  ) = [ 
( − |
( 
3) the third offset function:
4) the fourth offset function:
 ( ,  ) = ( |

∑  
5) the fifth offset function:
 .</p>
      <p>(6)</p>
      <p>The given nonlinear shift functions (2)–(6) have a range of admissible values for the whole period
of their existence. This is necessary to form the coefficients in the encryption rounds.</p>
    </sec>
    <sec id="sec-2">
      <title>3. Formation of Test Samples for the RC5RA Algorithm</title>
      <p>The implementation of a modified algorithm requires test data for encryption. When forming test
samples, we will assume that for the RC5 cipher or RC5RA modification there are no confirmed direct
relationships between the sizes/multiplicities of the sample text files with open text and the obtained
encryption result. And all the more there is no influence of these parameters on crypto resistance of the
received encrypted text or emergence of collisions. Files containing only integer data were used for test
samples. When encoding graphics and texts using known and current coding systems, we obtain a file
in the form of a sequence of integers. Thus, text test datasets are 81 to 1968 kilobytes long, and graphical
data sets are 351 to 3412 kilobytes long. Text data are files with English characters. Graphic data is a
set of simple images of standard formats, such as the jpg format. Encryption keys are generated using
a pseudo-random number generator with modular arithmetic. In this case, the keys are formed
immediately in the bit representation. 10 keys are generated for each input data set.</p>
    </sec>
    <sec id="sec-3">
      <title>4. Application of a RC5RA Algorithm’s Modification</title>
      <p>A software application in the Matlab modeling environment was created to determine the parameters
of the obtained RC5RA</p>
      <p>modification. The program interface provides the ability to change the
encryption parameters of the modification of the RC5 algorithm. To test the obtained modification of
the RC5RA algorithm and obtain the results of its work, identical data of key parameters, encryption
rounds and function numbers of each series of test samples were used. A sequence of different bits (16,
32, 64 bits) was used as the encryption key. The key sequence was generated by a standard built-in of
the Matlab programming language congruent pseudo-random number generator.</p>
      <p>The results obtained for modifying the RC5RA using the proposed shift functions (2)–(6) for
different parameters of the algorithm are shown in Figures 2–5.</p>
      <p>Text data encryption
2
c
e
s
,
u
R 0
2
c
e
s
,
e
m
i
t
n
u
0</p>
      <p>Graphical data encryption
1350
1850
2350
2850</p>
      <p>3350
32
64</p>
      <p>The data in Figures 2–5 are obtained with the classical round shift and the use of the five nonlinear
functions proposed above. The results of the work obtained as a result of processing the test samples
by the modified RC5RA algorithm are given in Tables 1, 2. Coincidences appear on all used test
samples.</p>
      <p>The Tables 1, 2 show the obtained time parameters of the modified version of the RC5RA algorithm
in the mode of encryption and decryption of graphic information with the number of rounds r = 16 and
different values of the w-parameter.</p>
    </sec>
    <sec id="sec-4">
      <title>5. Cryptanalysis of the Resulting RC5RA Modification</title>
      <p>
        In order to determine the value of crypto resistance of the obtained modification of the RC5RA
crypto algorithm using the above-mentioned shift functions, a classical differential analysis was used
[
        <xref ref-type="bibr" rid="ref11 ref12 ref13">11–13</xref>
        ].
      </p>
      <p>The test data set (texts) consisted of the first 5 characters of the Latin alphabet. These specially
prepared texts contained 2 and 4 consecutive symbols. A "differential" was calculated for different pairs
of texts from this sample. On the basis of the received "differential" the estimation of "differential" of
other pairs of encrypted texts was carried out. The model on the basis of which the cryptanalysis of the
received texts was carried has the form of (7):
 (
5
) =</p>
      <p>The layout of the software interface, which performs cryptanalysis of the obtained modification of
RC5RA is shown in Figure 6.</p>
      <p>Cryptanalysis was performed with the number of rounds of RC5RA modifications from 10 to 14, as
shown in Table 3. The number of plain texts required to hack the modified RC5RA algorithm is
estimated.</p>
      <p>
        The result of cryptanalysis of the encrypted text (Table 3) is considered successful when the
evaluation of the "differential" receives a limit value of 25%. This means that with a probability of 0.25
with such structure of data, you can open half of the key or the whole key. Based on the results shown
in Table 3 (by number of texts), when implementing this algorithm on low-power microcontrollers in
IoT technology, the recommended number of rounds should not be less than 11. Otherwise, the crypto
resistance index will not be satisfactory [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
    </sec>
    <sec id="sec-5">
      <title>6. Conclusion</title>
      <p>
        As a result of the analysis and generalization, the answer to the question of the influence of the
nature of the round shift in RC5 on increase of the crypto resistance of this crypto algorithm was
partially obtained [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>As can be seen in Table 3, the best values of crypto resistance are demonstrated by the modified
algorithm for those functions whose variance of output values is most homogeneous. Selection of a
"strong" nonlinear shift function for the RC5RA improvement reduces the number of rounds to 10,
while the encrypted message will be well protected from differential cryptanalysis. At the same time,
the computational complexity of the algorithm implementation remains comparable to the classic
version of RC5RA.</p>
    </sec>
    <sec id="sec-6">
      <title>7. References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>ITU-T Recommendations</surname>
          </string-name>
          .
          <string-name>
            <surname>ITU-T X</surname>
          </string-name>
          .
          <volume>200</volume>
          , Committed to Connecting the World,
          <year>1994</year>
          . URL: https://www.itu.int/rec/T-REC-X.
          <fpage>200</fpage>
          -199407-I.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Rivest</surname>
          </string-name>
          ,
          <article-title>The RC5 Encryption Algorithm</article-title>
          ,
          <source>in: Proceedings of the Second International Workshop on Fast Software Encryption (FSE)</source>
          <year>1994</year>
          , pp.
          <fpage>86</fpage>
          -
          <lpage>96</lpage>
          . URL: http://people.csail.mit.edu/ rivest/Rivest-rc5rev.
          <fpage>pdf</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>S.</given-names>
            <surname>Gueron</surname>
          </string-name>
          , White Paper:
          <article-title>Intel Advanced Encryption Standard (AES)</article-title>
          ,
          <source>New Instructions Set, Revision</source>
          <volume>3</volume>
          .
          <fpage>01</fpage>
          ,
          <year>2012</year>
          . URL: https://software.intel.com/content/dam/develop/external/us/en/ documents/aes-wp-2012
          <source>-09-22-v01-165683</source>
          .pdf.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Blozva</surname>
          </string-name>
          , et al.,
          <article-title>IoT Devices Integration</article-title>
          and Protection in available Infrastructure of a University computer Network,
          <source>Journal of Theoretical and Applied Information Technology</source>
          <volume>99</volume>
          (
          <issue>08</issue>
          ) (
          <year>2021</year>
          )
          <fpage>1820</fpage>
          -
          <lpage>1830</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>V.</given-names>
            <surname>Lakhno</surname>
          </string-name>
          , et al.,
          <article-title>The information technologies in the tasks of planning of smart city development</article-title>
          ,
          <source>Journal of Theoretical and Applied Information Technology</source>
          <volume>99</volume>
          (
          <issue>14</issue>
          ) (
          <year>2021</year>
          )
          <fpage>3645</fpage>
          -
          <lpage>3662</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>V.</given-names>
            <surname>Lakhno</surname>
          </string-name>
          , et al.,
          <article-title>Methodology for assessing the effectiveness of measures aimed at ensuring information security of the object of informatization</article-title>
          ,
          <source>Journal of Theoretical and Applied Information Technology</source>
          <volume>99</volume>
          (
          <issue>14</issue>
          ) (
          <year>2021</year>
          )
          <fpage>3417</fpage>
          -
          <lpage>3427</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>V.</given-names>
            <surname>Lakhno</surname>
          </string-name>
          , et al.,
          <article-title>Development of a Model for Choosing Strategies for Investing in Information Security</article-title>
          ,
          <source>Eastern-European Journal of Enterprise Technologies</source>
          <volume>2</volume>
          (
          <issue>3</issue>
          ) (
          <year>2021</year>
          )
          <fpage>43</fpage>
          -
          <lpage>51</lpage>
          . doi:
          <volume>10</volume>
          .15587/
          <fpage>1729</fpage>
          -
          <lpage>4061</lpage>
          .
          <year>2021</year>
          .
          <volume>228313</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>O.</given-names>
            <surname>Elkeelan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Olabisi</surname>
          </string-name>
          , Performance Comparisons, Design, and
          <article-title>Implementation of RC5 Symmetric Encryption Core using Reconfigurable Hardware</article-title>
          ,
          <source>Journal of Computers</source>
          <volume>3</volume>
          (
          <issue>3</issue>
          ) (
          <year>2008</year>
          )
          <fpage>48</fpage>
          -
          <lpage>55</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>T.</given-names>
            <surname>Zhovnovach</surname>
          </string-name>
          , et al.,
          <article-title>Modification of RC5 cryptoalgorythm for electronic data encryption systems</article-title>
          ,
          <source>Ukrainian Scientific Journal of Information Security</source>
          <volume>25</volume>
          (
          <issue>3</issue>
          ) (
          <year>2019</year>
          )
          <fpage>138</fpage>
          -
          <lpage>143</lpage>
          . doi:
          <volume>25</volume>
          .
          <fpage>10</fpage>
          .18372/
          <fpage>2225</fpage>
          -
          <lpage>5036</lpage>
          .
          <fpage>25</fpage>
          .14458.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>S.</given-names>
            <surname>Panasenko</surname>
          </string-name>
          , Algorithms are encrypted, Special reference, BHV,
          <string-name>
            <surname>Sankt-Peterburh</surname>
          </string-name>
          ,
          <year>2009</year>
          . (In Russian).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>A.</given-names>
            <surname>Biryukov</surname>
          </string-name>
          , E. Kushilevitz,
          <article-title>Improved cryptanalysis of RC5</article-title>
          , in: K. Nyberg (Eds.), volume
          <volume>1403</volume>
          of Lecture Notes in Computer Science.
          <source>Advances in Cryptology - Eurocrypt</source>
          , Springer, Berlin, Heidelberg,
          <year>1998</year>
          . doi:
          <volume>10</volume>
          .1007/BFb0054119.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>B. S.</given-names>
            <surname>Kaliski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. L.</given-names>
            <surname>Yin</surname>
          </string-name>
          ,
          <article-title>On Differential and Linear Cryptanalysis of the RC5 Encryption Algorithm</article-title>
          , in: D. Coppersmith (Eds.), vol.
          <volume>963</volume>
          of Lecture Notes in Computer Science. Advances in Cryptology, CRYPTO, Springer Verlag, Berlin, Heidelberg,
          <year>1995</year>
          . doi:
          <volume>10</volume>
          .1007/3-540-44750- 4_
          <fpage>14</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>L. R.</given-names>
            <surname>Knudsen</surname>
          </string-name>
          , W. Meier,
          <source>Differential Cryptanalysis of RC5, European Transactions on Telecommunications</source>
          <volume>8</volume>
          (
          <issue>5</issue>
          ) (
          <year>1997</year>
          )
          <fpage>445</fpage>
          -
          <lpage>454</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>