<!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>Using Fully Homomorphic Encryption in IoT</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Zhanerke E. Temirbekova</string-name>
          <email>temyrbekovazhanerke2@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gulzat Turken</string-name>
          <email>turken.gulzat@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Manuel M. Barata</string-name>
          <email>manuel.barata@isel.pt</email>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Al-Farabi Kazakh National University</institution>
          ,
          <addr-line>al-Farabi Ave. 71, Almaty, A15E3B9</addr-line>
          ,
          <country country="KZ">Kazakhstan</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>DTESI 2023: Proceedings of the 8th International Conference on Digital Technologies in Education</institution>
          ,
          <addr-line>Science and Industry</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Instituto Superior de Engenharia de Lisboa</institution>
          ,
          <addr-line>Lizbon</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>International Information Technology University</institution>
          ,
          <addr-line>Manas St. 34/1, Almaty, A15M0F0</addr-line>
          ,
          <country country="KZ">Kazakhstan</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>to protect the confidentiality of basic data. Recent advances in homomorphic encryption have made it possible to protect confidential and personal data in Internet of Things applications using schemes based on homomorphic encryption. However, being relatively young in this field of cryptography, standards and guidelines for the use of fully homomorphic encryption schemes are still evolving. The article analyzes the existing libraries in the field of homomorphic encryption. As a result of the analysis, the necessity of carrying out the operation of homomorphic encryption and division, as well as the relevance of developing the implementation of the library of homomorphic encryption of integers, is revealed. The method of homomorphic division is proposed, which allows performing the operation of separating homomorphic encrypted data. To ensure the secure storage and exchange of data between IoT constructs, a complete homomorphic encryption libraries architecture has been created and implemented, allowing all arithmetic operations to be performed on the data encrypted in various AtmelAVR microcontrollers.</p>
      </abstract>
      <kwd-group>
        <kwd>1 IoT system</kwd>
        <kwd>homomorphic encryption</kwd>
        <kwd>microcontroller</kwd>
        <kwd>library</kwd>
        <kwd>security</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>IoT (Internet of things) devices are widely used in all sectors, from the health sector to
manufacturing [1]. The main purpose of IoT technologies is to allow internet – connected devices
to communicate with each other, exchange data, store data and perform calculations according to
user requirements.</p>
      <p>Although IoT devices are projected to reach 83 billion by 2024, the security of these devices is
a major concern, with the risk of any IoT-enabled device stealing the functionality, as well as user
data, if appropriate security measures are not taken [2]. According to a 2022 report by Palo Alto
Networks [3], 98% of all IoT device traffic is unencrypted, indicating that personal and
confidential data on the network is not stored in secret, and allows attackers to spy on
unencrypted network traffic, collect personal or confidential information, and then use that data
by the attacker for their personal purposes. According to SAM Seamless Network, more than 1.5
billion IoT devices were attacked in 2021, including about 900 million phishing attacks [4].
IoT devices are not by themselves an analogue of computers, they cannot perform any
resourceintensive task from start to finish, they perform only some part of it, and the rest of the parts are
completed by other IoT devices [5]. IoT work in a specific group or cluster, they jointly solve some
problem. To protect the information transmitted between the IoT cluster of devices, they must be
encrypted and we must be able to perform operations such as those with encrypted data in an
unencrypted state so as not to compromise the overall result of the work.</p>
      <p>We can create this capability through homomorphic encryption, which can be implemented in
AtmelAVR microcontrollers (DFRobot Beetle BLUE, Atmega 328, Atmega 32u4, Atmega 2560)
that control IoT devices in medicine, consumer electronics, and manufacturing.
0000-0003-3909-0210 (Zh. Temirbekova); 0000-0003-4981-514X (G. Turken); 0000-0002-8335-4052 (M. Barata)
© 2023 Copyright for this paper by its authors.</p>
      <p>Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>One of the new directions of modern cryptosystems is homomorphic cryptography. Its
distinctive feature is that this type of cryptography allows you to process encrypted data without
a prior secret key, so that the result of operations with encrypted data is equal to the result of
operations with open data after decryption [6]. This solves one of the problems of cryptography
– the generation, storage and distribution of common session keys. This increases the level of data
security – the server receives encrypted data, processes them and returns the encrypted result,
while open data and encryption keys do not leave the secure segment during network interaction.</p>
      <p>In recent years, there has been a lot of work on FHE (Full homomorphic encryption) for IoT
devices in the world. S.R. Sujoy, P. Goyuri, N. Deepika (2021) show in their work that fully
homomorphic encryption algorithms can be applied to IoT applications and devices, as well as
aimed at ensuring higher computing speed while maintaining data confidentiality [7].</p>
      <p>D. Goran, M. Milan, V. Pavle [8] in their work «Evaluating the implementation of homomorphic
encryption in an IoT device» evaluated the features of the homomorphic encryption mechanisms
of BFV and BGV and measured computational performance. The Raspberry Pi 4 evaluates the
encryption schemes on the IoT platform based on the B model, showing that homomorphic
encryption operations can be used in embedded devices and is primarily aimed at improving
privacy and providing high bandwidth and low latency to speed up applications.</p>
      <p>Among the representatives of the Russian scientific community, the works of the following
scientists can be especially noted: I.B. Saenko, V.A. Desnitsky (Moscow), I.V. Kotenko (Sverlosk),
P.D. Zegzhda (St. Petersburg).</p>
      <p>Taking into the analyzes made, there is a need for methods, algorithms that effectively ensure
the security of IoT applications and devices and determine whether the topic under consideration
is an urgent problem.</p>
      <p>The homomorphism property is used in many cryptographic systems, in particular in secure
voting systems, in all kinds of collision-resistant hash functions, in the creation of closed
information of search engines, and in cloud computing. The Homomorphism property guarantees
the confidentiality of the processed data.</p>
      <p>Currently, active research is being conducted in the field of homomorphic encryption. The
following can be noted as the main directions of its development:</p>
      <p>First, to create a symmetric full homomorphic encryption, you can use invariant matrix
polynomials. Russian cryptographic scientist F.B. Burtyka works in this area, who proposed to
carry out encryption in three rounds: in the first step, open texts are obtained that are elements
of the ring, in the second step they are encoded into matrices using a secret vector, in the third
step these matrices are displayed in matrix polynomials using a secret invariant matrix
polynomial. Then, reverse encryption is implemented in both rounds [9, 10].</p>
      <p>Secondly, the development of symmetric fully homomorphic linear cryptosystems based on
the problem of factorization of numbers. Among the Russian scientists working in this direction,
one can name A.V. Trepacheva [11], P.K. Babenka [12]. The cryptographic stability of these
systems is justified by the use of complexity in solving the problem of factorization of large
numbers.</p>
      <p>Thirdly, the development of marginal systems of homomorphic encryption and information
protection in cloud computing. Research in this direction is carried out by N.P. Varnovsky,
S.A. Martishin, M.V. Khrapchenko, A.V. Shakurov. In conclusion, a system was obtained that does
not require an additional public key and replaces the not very efficient and problematic
reencryption procedure (bootstrapping) performed on cryptographically dedicated servers [13].</p>
    </sec>
    <sec id="sec-2">
      <title>2. Fully homomorphic encryption (FHE)</title>
      <p>FHE – based data protection is a new type of security that allows you to calculate encrypted data
without first re-encrypting it. However, the practical FHE solution is not available for
implementation today. The most popular asymmetric and symmetric homomorphic encryption
algorithms for analyzing process time, taking into account the effective and security component:
Benalo [14], El Gamal [15], RSA [16], Paillier [17], Gentry's bit homomorphic encryption [18], A.
Abramov's homomorphic encryption in the field of polynomials with rational coefficients [19]
and homomorphic encryption in the field of polynomials with a variable S.F. Krendelev [20] was
studied. The homomorphic features and disadvantages and similarities of each of the algorithms
were studied. In addition, comparisons were made with the calculation of encryption, reverse
encryption times for each of the algorithms. The work carried out testing of homomorphic
encryption algorithms on the microcontroller AtmelAVR (DFRobot Beetle BLUE, Atmega 328,
Atmega 32u4, Atmega 2560, ESP 32). Testing to compare the performance of the encryption and
reverse encryption operation calculated the average run time for 8 iterations. The work carried
out testing of homomorphic encryption algorithms on the microcontroller AtmelAVR (DFRobot
Beetle BLUE, Atmega 328, Atmega 32u4, Atmega 2560, ESP 32). The experimental result is shown
in Table 1.</p>
      <p>Based on comparisons, it was found that homomorphic encryption in the field of polynomials
with a variable proposed by S.F. Krendelev is effective in terms of time in the AtmelAVR (DFRobot
Beetle BLUE, Atmega 328, Atmega 32u4, Atmega 2560, ESP 32) microcontroller, in terms of the
measure of memory use in the microcontroller, and in terms of current strength and voltage use.
Due to the need for full homomorphic encryption algorithms for secure storage and transmission
of data on IoT devices. It was found that the homomorphic encryption algorithm in the field of
polynomials with a variable proposed by S.F. Krendelev requires all arithmetic operations.</p>
      <p>In 2011, S.F. Krendelev proposed his fully homomorphic cryptosystem, the work of which is
based on homomorphism in the field of polynomials with variables. Each a ∈ Zn number a(x) = a0
+ a1x + ... + akxk is related to the polynomial, where k and ai are randomly selected. For two
polynomial images of numbers a0 and b0 in terms of structure, the free term of their sum a(x) +
b(x) and the product a(x)*b(x) is a(0) + b(0) and a(0 )*b(0).</p>
      <p>Then φ:Zn[x] → Zn[y], x = c0 + c1y + ... + ctyt = φ(y) is a homomorphism that preserves addition
and multiplication. The implementation of S.F. Krendelev is more profitable than Gentry. In
addition, it has a number of disadvantages:
1. An infinite increase in the degrees of polynomials can lead to inefficiency in the calculation;
2. Although all operations are actually performed on empty terms, it is necessary to store in
memory and perform calculations on polynomials of a large degree;
3. In the system of S. F. Krendelev, the operations of division and subtraction on encrypted
data were not performed.</p>
      <p>In the article, division and subtraction operations were added to the system proposed by S.F.
Krendelev to encrypted data.</p>
      <p>Implementation of the division operation into encrypted data in the system of S.F. Krendelev:
Definition 1. Z – some kind of field. A polynomial in a single variable in the field Z is the formal
sum of the form:</p>
      <p>( ) =     +   −1  −1 +  1 +  0,
where,   ∈  ,  ∈ {0,1, … ,  }  ∈  .</p>
      <p>Any element of the field  is considered a polynomial of zero degree, a polynomial of arbitrary
degree with zero coefficients – a zero polynomial, a unit polynomial of the field  – and they are
denoted by  ( ) and  ( ), respectively.</p>
      <p>In the set of all polynomials in one variable in the Z field, you can define the operations of
addition and multiplication of polynomials according to the following rules. Suppose  ( ) – 2 is a
polynomial and</p>
      <p>( ) =     +   −1  −1 +  1 +  0,
where   ∈  ,  ∈ {0,1, … ,  }</p>
      <p>∈  is a type of the polynomial.</p>
      <p>Now let's look at the problem of creating a homomorphism from a Z ring in A Z[x] ring.</p>
      <p>
        Definition 1. (Ring homomorphism). let f: А-&gt; В, where A and B are the rings of addition,
multiplication, zero and one ring homomorphism if the following conditions implement [21]:
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
4)
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
(
        <xref ref-type="bibr" rid="ref6">6</xref>
        )
(
        <xref ref-type="bibr" rid="ref7">7</xref>
        )
(8)
 ( +  ) =  ( )+  ( )
 ( −  ) =  ( )−  ( )
f (aA b) = f (a)B f (b)
( /  ) =  ( )/  ( )
f (0 A ) = 0
      </p>
      <p>B
f (1A ) = 1B</p>
      <p>Let Z be given a ring of integers, a ring of polynomials Z[x], and P(x) compiled according to the
1 – algorithm. Then P(x), P:Z→Z[x] homomorphism.</p>
      <p>Encryption and reverse encryption algorithm</p>
      <p>
        Key generation. x0 if the secret key of a given cipher is, say,  1,  2 ∈  ,  1 &gt;  2, let's show that
the (
        <xref ref-type="bibr" rid="ref6">6</xref>
        ) property is executed, i.e.:
      </p>
      <p>( 1/  2) =  ( 1)/ [ ] ( 2)
 ( 1) =    1( ) −    1 ( ) +  1 =    0 +    1 +    2 2 + ⋯ −    0 −
−  −1 1 −   −2 2 2 − ⋯ +  1 =  1  −1(</p>
      <p>−  ) +  2  −2( 2 2 −  2) + ⋯  1
−  ) +  2  −2( 2 2 −  2) + ⋯ +  2
 2
 2
 ( 1) =  1  −1( −  ) +  2  −2( 2 2 −  2) + ⋯ +  1
−  ) +  2  −2( 2 2 −  2) + ⋯ +  1 =
 1 ∗  2] + ⋯ +  1
 2 ∗  1  −1( −  ) +  2  −2( 2 2 −  2) + ⋯ +  2
 2 ∗  1  −1( −  ) +  2  −2( 2 2 −  2)+ ⋯ +  2
∗   −2( 2 2 −  2) + ⋯
 1  −1( −  ) +  2  −2( 2 2 −  2) + ⋯ +  1
=  1  −1(</p>
      <p>−  ) +  2  −2( 2 2 −  2) + ⋯ +  1</p>
      <p>Since  ( 1) =  ( 1) the image of  is a homomorphism.
(  −   )(    −   ) +  1 −  2.</p>
      <p>
        Proof. let  1,  2 ∈  show that the property (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) is executed, i.e.:  ( 1−  2) =  ( 1)− [ ] ( 2),
 ( 1)− [ ] ( 2) = (   1( ) −    1 (
 ) +  1) − (   2( ) −    2 (

) +  2 ==    0 +
   1 + ⋯ +       −    0 −   −1
1 − ⋯ −    
+  1 −    0 −    1 − ⋯ −       +
   0 +   −1
      </p>
      <p>1 + ⋯ +     − 2 = ( 1 −  1)(   −   −1 ) + ( 2 −  2)(   2 −   −2 2) + ⋯ +
Let's show that one part is equal to the other:</p>
      <p>( 1−  2) = (   1( ) −    1 (
) +  1) − (   2( ) −    2 (
 ) +  2 =   ( 0 −  0) +   ( 1 −
 1)(   −   −1 ) + ( 2 −  2)(   2 −   −2 2) + ⋯ + (  −   )(    −   ) +  1 −  2.</p>
      <p>
        It is also clear that the representation of P compares 1 to 1 and 0 to 0, corresponding to the
properties (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) and (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ). Therefore, the representation of P is a homomorphism.
      </p>
      <p>Key generation. x0 = q
p</p>
      <p>here pZ,q N - any numbers.</p>
      <p>Algorithm 2 (encryption). The encryption algorithm Enc : Z → Zx is displayed as follows.
1) z  Z — let be the number to be encrypted,  1 &gt;  2,  2 ≠ 0;
2) We construct a polynomial so that the coefficients a0,a1,...an Z are chosen at random
f (x) = a0 + a1x + ... + anxn ;
3) f (x0 ) = f 

 p 
 q </p>
      <p>q
 = a0 + a1( p ) + ... + an ( p )
q n
calculated.</p>
      <p>From
this

 q 
qn f  p 
 = qna0 + qn−1 pa1 + ... + pnan it is obtained that, where qn f  p 
</p>
      <p>  Z ;
 q 
gz (x) = qn f (x) − qn f (x) + z  Zx
4) Then the encryption polynomial for z will look like this:</p>
      <p>Algorithm 3 (decryption). Let's look at the reverse encryption algorithm Dec : Zx → Z this
is reverse to the 2 algorithm.</p>
      <p>1) Polynomial g z' ''  Zx- encrypted data x0 Q - is a secret key.
2) For decrypted x0 at the point gz' '' is calculated.
3) Then z' = gz' '' (x0 ) Z - decrypted data.</p>
      <p>According to theorem 1, for z1, z2  Z the encryption is homomorphic if the following
properties are met:</p>
      <p>z1 + z2 = Dec(Enc(z1 )+ Enc(z2 ))
z1 * z2 = Dec(Enc(z1 )* Enc(z2 ))
(9)
(10)</p>
      <p>In the work of S.F. Krendelev homomorphic encryption for the addition and multiplication
operation was considered, in this work the method of full homomorphic encryption, which
performs subtraction and division operations, is proposed.</p>
      <p>Example of system operation:
:  0 = 7</p>
      <p>.
1)  1 =7,  2 = 5;</p>
      <p>3)    1 (</p>
      <p>2 (</p>
      <p>) = 73 ∗ 2 + 72 ∗ 11 ∗ 4 − 6 ∗ 7 ∗ 112 + 3 ∗ 113 = 175 ;
) = 73 ∗ 5 − 8 ∗ 72 ∗ 11 + 6 ∗ 7 ∗ 112 + 113 ∗ 9 = 14464 ;
4) Encryptable polynomial for  1and  2:
  1=1029 3 − 2058 2 + 1372 − 1060,   2=3087 3 + 2058 2 − 2744 − 12744;
  1 −   2 = −2058 3 − 4116 2 + 4116 + 11684;
  2 0
  1 0 = 1 +</p>
    </sec>
    <sec id="sec-3">
      <title>3. Development a library for fully homomorphic encryption</title>
      <p>Building a library for full homomorphic encryption in a ring of polynomials with an advanced
variable</p>
      <p>In the Arduino IDE integrated development environment, in C++, a static library was created
for full homomorphic encryption in a ring of polynomials with a homomorphic modified variable
in a ring of polynomials with a variable for different microcontrollers.</p>
      <p>The boost library, which supports large numbers, is used to support performing multiple
operations on encrypted numbers and reduce computational inaccuracies (value
approximations) [22].</p>
      <p>When implementing the modified library, it was faced with the following tasks:
- ability to edit integers;
- full homomorphic encryption;
- support for all mathematical operations, including the arithmetic division operation.</p>
      <p>To support the separation operation, a library architecture was implemented based on the
homomorphic separation method mentioned above. The library is represented by cryptographic,
mathematical classes and a class responsible for basic information. The architecture of the
created library is shown in Figure 2.</p>
      <p>The Secret Key class works with data about the Secret Key used in the cryptographic algorithm.
This provides the ability to create a new key, generate random and use it. The current library
implementation uses a random number generator from the standard library with automatic
randomization relative to the current time to generate keys and polynomial coefficients. A
pseudo-random number generator from the standard library is recognized as cryptographically
unreliable because it uses a linear congruent method. In this regard, an interface was introduced
that allowed the use of random generator inputs. By agreement, it is recommended to use a
random number generator from the Boost library. It uses non-deterministic random number
generation and is cryptographically secure.</p>
      <p>Encrypted Data is a module in which the main data type is a homomorphic encrypted number.
In the encryption class, the possibilities of creating new cipher texts using open texts and secret
keys (data encryption operation), obtaining open data from encrypted data based on the
encryption key (data encryption operation) are implemented.</p>
      <p>Homomorphism-performs the basic mathematical operations of subtraction, addition,
division, multiplication on encrypted data. Encryption and reverse encryption are performed
using pre-generated keys or by transmitting secret parameters. The class also implements all the
mathematical operations necessary for polynomials, namely division, multiplication, subtraction
and addition.</p>
      <p>Decrypted Data encrypts encrypted data using a secret key and reverse Homomorphism.</p>
      <p>Checking for Homomorphism. An array named resBuf is opened to check Homomorphism by
the addition operation. Its measure is taken in accordance with which the length of the
polynomial is greater. Next, all elements of the resBuf are taken as 0. Then the index polynomial
values corresponding to each index are added throughout the cycle. To calculate the sum value,
open the variable resu=0 and find resu+=resbuff[0]*x0. The same is done for the rest of the
polynomial.</p>
      <p>The Homomorphism check by subtraction operation is the same as checking the algorithm for
adding the numbers of the first polynomial to the resBuf array and subtracting the numbers of
the second polynomial from it.</p>
      <p>Checking Homomorphism by the multiplication operation. The array named Kob will open. Its
Dimension is [(first polynomial dimension)*(second polynomial dimension)]. Divided into two
columns, in the first column are the coefficients that precede x, and in the second column are the
degrees of that X. The Resu array is opened and the same ranks are added to it.</p>
      <p>Checking Homomorphism by the division operation. The Gorner scheme was used to perform
the division operation into encrypted data. When dividing a polynomial by a polynomial, the
quotient and the remainder are obtained. The created library can be used in the client program
in 3 Types: 1. HomomorphicControllerVersion_01.C, that is, the library is stored on the computer
as a file, connecting the microcontroller to the computer through the Com port and calling the
necessary functions. 2.Download The created library from GitHub in the form of a zip archive, and
the user will use it by installing it in the form of a driver. 3.built-in library architecture written in
microcontroller construction from Figures 3 can be seen.</p>
      <p>One of the most important tasks of the research work is to evaluate the performance of the
created libraries in various AtmelAVR microcontrollers. The Atmel ATmega328P provides the
following features: 32K bytes of in-system programmable flash with read-while-write
capabilities, 1K bytes EEPROM, 2K bytes SRAM, 23 general purpose I/O lines, 32 general purpose
working registers, three flexible Timer/Counters with compare modes, internal and external
interrupts, a serial programmable USART, a byte oriented 2-wire serial interface, an SPI serial
port, a 6-channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages), a programmable
watchdog timer with internal oscillator, and five software selectable power saving modes. The
idle mode stops the CPU while allowing the SRAM, Timer/Counters, USART, 2-wire serial
interface, SPI port, and interrupt system to continue functioning. The power-down mode saves
the register contents but freezes the oscillator, disabling all other chip functions until the next
interrupt or hardware reset. Initially, on the Atmega 328 microcontroller TGSH in a ring of
polynomials with a modified variable, comparisons were made with different pairs of two-digit
numbers: key generation, encryption, reverse encryption, (addition, subtraction, multiplication,
division) times, and the complexity of the algorithm was considered. The result can be seen in
Table 2.</p>
      <p>Compared to the multiplication operation with the addition operation, the fact that the
multiplication operation is performed worse than the addition operation shows that the
complexity of the algorithm is higher. It was also found that memory operations take up most of
the processor time. It can be concluded that these schemes may be suitable for use in specific
software products. The table shows linear growth, which is a consequence of the increase in the
amount of memory divided by polynomial coefficients as a result of addition, as well as the
complication of the addition operation on data of a larger length. However, since the operation of
adding polynomials  ( ) has algorithmic complexity, this increase can be considered
Insignificant. When multiplying, there is a quadratic increase and, unlike adding, there is a
significant decrease in speed. This is because when multiplying polynomials, their coefficients are
multiplied, which requires more memory allocation than adding coefficients, and the operation
of multiplying polynomials has a higher algorithmic complexity - O(n2).
a-data encryption by the number of different characters</p>
      <p>b – decryption by the number of different characters</p>
      <p>When testing open data on various AtmelAVR microcontrollers, the Atmega 2560
microcontroller showed good calculations in terms of performance. Mega is designed in such a
way that before writing a new code, the reboot is carried out not by pressing a button on the
platform, but by the program itself. One of the ATmega8U2 data flow control lines is connected to
the ATmega2560 recovery PIN via a 100 NF capacitor. This is network activation, i.e. a low-level
signal resets the microcontroller. The Arduino program, using this function, loads the code with
one click of the Download button in the programming environment. Low-level signaling in the
data flow control network is coordinated with the start of code writing, which reduces bootstrap
timeout.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>The article investigated the problems of full homomorphic encryption modified in the AtmelAVR
microcontroller and obtained the following results:</p>
      <p>1. Analysis of data protection methods and devices in the IoT device cluster has been
developed;
2. Improved homomorphic encryption library used in AtmelAVR microcontroller;
3. A library architecture has been created on the AtmelAVR microcontroller to ensure the
security of the IoT device cluster;</p>
      <p>Currently, Data Protection during the exchange of information is one of the most important
tasks not only for traditional networks, but also for the rapidly developing segment of the Internet
of things. In order to ensure data security for users of AtmelAVR microcontrollers, the
homomorphiccontroller_version01 library was implemented in the work. It contains encryption
library files compiled for different AtmelAVR microcontroller families.</p>
      <p>As part of this work, the problem of homomorphic division of integers is considered, a method
for implementing homomorphic division is proposed and described, and practical examples of
using the above method are given. The practical value of the work lies in solving one of the
problems of homomorphic encryption - the implementation of homomorphic separation makes
it possible to expand the scope of practical application of homomorphic encryption in such areas
as cloud computing, solving information protection problems, and machine learning.</p>
    </sec>
    <sec id="sec-5">
      <title>5. References</title>
      <p>[8] Sujoy S.R., Goyuri P., Deepika N. (2021). Interoperability in IoT for Smart Systems. SMIT.</p>
      <p>Vol.2, Issue 1. P. 364-402.
[9] Burtyka F.B. (2014). Symmetric fully homomorphic encryption using irreducible matrix
polynomials. Izvestiya SFU. Technical sciences. No. 8. P. 107-122.
[10] Burtyka F.B. (2014). Batch symmetric fully homomorphic encryption based on matrix
polynomials. Proceedings of the Institute of System Programming of the Russian Academy of
Sciences. Vol. 26. No. 5. P. 99-116.
[11] Trepacheva A.V. (2015). Cryptanalysis of symmetric fully homomorphic linear
cryptosystems based on the number factorization problem. Izvestiya SFU. Technical sciences.
№ 5 (166). Pp. 89-102.
[12] Trepacheva A.V., Babenko L. K. (2015). Formal cryptanalysis of completely homomorphic
systems using the problem of factorization of numbers. Information counteraction to threats
of terrorism. No. 24. P. 283-286.
[13] Varnovsky N. P., Martishin S. A., Khrapchenko M. V., Shakurov A.V. (2015). Threshold systems
of homomorphic encryption and information protection in cloud computing. Programming.</p>
      <p>No. 4. P. 47-51.
[14] Benaloh B., Lindell Y. (2007). Introduction to Modern Cryptography: Principles and</p>
      <p>Protocols. Chapman &amp; Hall/CRC. P. 385-395.
[15] Evaluation of the strength of the El Gamal cryptosystem. Technical Sciences in Russia and
abroad: materials of the IV International Scientific Conference. Moscow: Buki Vedi, 2015. P.
14-16.
[16] Naehrig, Michael, Kristin Lauter, and Vinod Vaikuntanathan (2018). Can homomorphic
encryption be practical? International Journal of Electrical &amp; Computer Engineering. Vol. 8,
Issue 3. P. 1720-1730.
[17] Paillier P. (2016). Public-Key Cryptosystems Based on Composite Degree Residuosity</p>
      <p>Classes. Appl. Sci. Vol. 6. P. 162-1-162-17.
[18] Gentry, Craig (2009). Fully homomorphic encryption using ideal lattices. In Proceedings of
the forty-first annual ACM symposium on Theory of computing, pp. 169-178.
[19] Abramov A. (2009). Homomorphic encryption. News of the SFU. Technical sciences. № 5
(166). P. 89-102.
[20] A.O. Zhirov, O.V. Zhirova, S.F. Krendelev (2011). Secure cloud computing using homomorphic
cryptography. Izvestiya MSU. Technical sciences. № 3 (106). P. 45-67.
[21] Smart N.P., Vercauteren F. (2010). Fully homomorphic encryption with relatively small key
and ciphertext sizes, public Key Cryptography. PKC Springer Berlin Heidelberg, Vol. 6056, P.
420-443.
[22] Temirbekova Zh.E., Pyrkova A.Yu. (20220. Improving teachers’ skills to integrate the
microcontroller technology in computer engineering education. Education and information
technology. Vol. 6. P. 656-692.
[23] Temirbekova Zh.E., Pyrkova A.Yu. (2020). Using FHE in a binary ring Encryption and
Decryption with BLE Nano kit microcontroller. E3S Web of Conferences 202 (ICENIS 2020),
P. 687-712.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Syed</surname>
            <given-names>A.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sierra-Sosa</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
            <given-names>A.</given-names>
          </string-name>
          et al. (
          <year>2021</year>
          ).
          <article-title>IoT in Smart Cities: A Survey of Technologies, Practices and Challenges</article-title>
          .
          <source>Smart Cities</source>
          . Vol.
          <volume>4</volume>
          , Issue 2. P.
          <volume>429</volume>
          -
          <fpage>475</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Smith</surname>
            <given-names>S.</given-names>
          </string-name>
          (
          <year>2024</year>
          ).
          <article-title>IoT Connections to reach 83 billion by 2024 driven by maturing industrial use cases</article-title>
          . URL: https://www.juniperresearch.com/press/iot-connections-to-reach-83
          <string-name>
            <surname>-</surname>
          </string-name>
          bnby-
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Divy</surname>
            <given-names>T.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Akash</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aishwariya</surname>
            <given-names>B.</given-names>
          </string-name>
          , et al. (
          <year>2022</year>
          ).
          <article-title>Recent Advancements of Internet of Medical Things (IoMT): Challenges and Future Opportunities with Emerging Technologies</article-title>
          .
          <source>ICACRS</source>
          . Vol.
          <volume>3</volume>
          , Issue 2. P.
          <volume>278</volume>
          -
          <fpage>283</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Iliar</given-names>
            <surname>Ch</surname>
          </string-name>
          .,
          <string-name>
            <surname>Shea</surname>
            <given-names>Sh..</given-names>
          </string-name>
          <article-title>IoT security (internet of things security)</article-title>
          . URL: https://www.techtarget.com/iotagenda/definition/IoT-security-Internet-of-Thingssecurity.
          <volume>12</volume>
          .02.
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Dong</surname>
            <given-names>D.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peng</surname>
            <given-names>H.T.</given-names>
          </string-name>
          (
          <year>2020</year>
          ).
          <article-title>Secured Data Transmission in IoT using Homomorphic Encryption. Computers and Electrical Engineering</article-title>
          . Vol.
          <volume>4</volume>
          , № 3,
          <string-name>
            <surname>P.</surname>
          </string-name>
          845-
          <fpage>867</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Brakerski</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Gentry</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Vaikuntanathan</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Fully homomorphic encryption without bootstrapping</article-title>
          .
          <source>In Proceedings of the Conference on Innovations in Theoretical Computer Science (ITCS)</source>
          , Cambridge: MA USA, P.
          <fpage>309</fpage>
          -
          <lpage>325</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Goran</surname>
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Milan</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pavle</surname>
            <given-names>V.</given-names>
          </string-name>
          (
          <year>2021</year>
          ).
          <article-title>Evaluation of Homomorphic Encryption Implementation in IoT Device</article-title>
          .
          <source>Journal of Electrical Systems and Information Technology</source>
          . Vol.
          <volume>8</volume>
          , № 3. P.
          <volume>568</volume>
          -
          <fpage>592</fpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>