<!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>
      <journal-title-group>
        <journal-title>" Journal of Biomedical Informatics</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1016/j.jbi.2012.09.006</article-id>
      <title-group>
        <article-title>improving and the strategy development for performance of the Paillier cryptosystem algorithm in medical data processing</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Volodymyr Semchyshyn</string-name>
          <email>vmsemchyshyn@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dmytro Mykhalyk</string-name>
          <email>dmykhalyk@gnail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ITTAP'2024: 4th International Workshop on Information Technologies: Theoretical and Applied Problems</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Paillier Cryptosystem, Medical Data Processing</institution>
          ,
          <addr-line>Data Confidentiality, Cloud Computing, Encryption Algorithms</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <volume>46</volume>
      <issue>4</issue>
      <fpage>675</fpage>
      <lpage>685</lpage>
      <abstract>
        <p>The Paillier cryptosystem, known for its additive homomorphic properties, plays a crucial role in preserving the confidentiality of computations with encrypted medical data. However, its computational complexity poses significant challenges when applied to large-scale medical datasets, affecting both performance and efficiency. This study focuses on analyzing the performance limitations of the Paillier cryptosystem and developing strategies to improve its performance for medical data processing. This study provides a comprehensive framework for improving the performance of the Paillier cryptosystem, contributing to its effectiveness in the secure processing of medical data and paving the way for future advances in privacy-preserving cryptographic techniques.</p>
      </abstract>
      <kwd-group>
        <kwd>Paillier</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The appearance of digital health technologies has transformed the management of medical
records, making it possible to have more efficient storage, retrieval and analysis of patient
information. The rise in the use of electronic health records (EHRs) and telemedicine platforms
poses a significant threat in medical data privacy and integrity. Protection involves encrypting
sensitive health information in order to prevent unauthorized access or breaches.</p>
      <p>
        Out of diverse cryptographic techniques, Paillier cryptosystem distinguishes itself by its
additive homomorphic properties. In other words, computations can be done on encrypted data
without decrypting it first. This is especially useful in medical data processing where
privacypreserving computations may make tasks such as statistical analysis and data mining easier
while keeping the underlying data secure[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>While traditional encryption algorithms like RSA and AES operate efficiently in standard
scenarios, advanced algorithms that support operations on encrypted data, such as Paillier’s
homomorphic encryption, can benefit from the high-performance computing techniques.
Implementing these techniques could lead to more efficient encryption and decryption
processes, especially for large datasets or in cloud-based environments.</p>
      <p>
        By applying high-performance computing strategies, we can address some of the limitations
associated with the computational complexity of advanced encryption algorithms. This
approach not only enhances the practicality of such algorithms but also opens up new
possibilities for their application in secure data processing[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>Review of encryption algorithms</p>
      <p>There are several alternative encryption algorithms that can be used instead of or in addition
to the Paillier algorithm, depending on your security and performance needs. Here are some of
them:
1. RSA (Rivest-Shamir-Adleman)
Type: Asymmetric encryption</p>
      <p>Features: RSA is one of the most common algorithms for asymmetric encryption and digital
signatures. It is based on the complexity of factorization of large numbers.</p>
      <p>Advantages: Widely supported, used for secure key exchange.</p>
      <p>Disadvantages: Slower compared to symmetric algorithms; large key sizes for a high level of
security.</p>
      <p>2. ElGamal
Type: Asymmetric encryption</p>
      <p>Features: Based on the complexity of calculating the discrete logarithm in finite fields. It
provides privacy and is used to create digital signatures.</p>
      <p>Benefits: Provides privacy and authentication.</p>
      <p>Disadvantages: Requires larger ciphertext size than other algorithms.
3. ECC (Elliptic Curve Cryptography)
Type: Asymmetric encryption</p>
      <p>Features: Uses properties of elliptic curves to provide security with smaller key sizes. This
makes ECC particularly effective for resource-intensive environments.</p>
      <p>Advantages: High level of security with smaller key sizes.</p>
      <p>Disadvantages: More complex implementation compared to other algorithms.
4. AES (Advanced Encryption Standard)
Type: Symmetric encryption
Features: Encryption standard to protect confidential data. Uses keys of 128, 192, or 256 bits.
Advantages: Very fast and efficient encryption for large amounts of data.</p>
      <p>Disadvantages: Requires secure key exchange, as one key is used for encryption and
decryption.</p>
      <p>5. Homomorphic Encryption
Type: Specialized encryption</p>
      <p>Features: Allows you to perform calculations on encrypted data without the need to decrypt
it. Examples include Gentry and CKKS (Cheon-Kim-Kim-Song) schemes.</p>
      <p>
        Advantages: Ideal for cloud computing where sensitive data needs to be processed.
Disadvantages: Very high computational complexity and slow processing speed[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>The Paillier algorithm is a cryptographic algorithm that provides homomorphic encryption.
It allows you to perform certain calculations on encrypted data without decrypting it, making it
useful for secure computing and data storage.
2. Description of the Paillier algorithm</p>
      <p>The main components of the Paillier algorithm</p>
      <p>Public key: (n, g), where n is the product of two large prime numbers p and q, and g is a
number that satisfies certain conditions.</p>
      <p>Private key: (λ, μ), where λ is the Least Common Multiple (LCM) of (p-1) and (q-1), and μ is
the modular inverse of n for λ.</p>
      <p>The main stages of the algorithm
Key generation:
1) Choose two large prime numbers p and q.
2) Calculate n = p * q and n² = n * n.
3) Define g, often g = n + 1.
4) Calculate λ = LCM(p-1, q-1).
5) Calculate μ = λ^(-1) mod n.</p>
      <p>Encryption:
1) Choose a random number r from {1, ..., n-1}.
2) Compute c1 = g^m mod n², where m is the plaintext.
3) Calculate c2 = r^n mod n².
4) Encrypted message c = c1 * c2 mod n².</p>
      <p>Decryption:
1) Calculate x1 = c^λ mod n² - 1.
2) Calculate x2 = x1 / n mod n.</p>
      <p>3) Decrypted message m = x2 * μ mod n.
3. Advantages and disadvantages of the Paillier
algorithm</p>
      <p>Advantages:
1) Homomorphic properties and data analysis. Paillier allows you to perform addition
operations on encrypted data, which is particularly useful for statistical analyzes and
calculations on encrypted data. Calculations can be performed without data decryption, which
preserves data confidentiality during processing.</p>
      <p>2) Security level: Based on the complexity of solving the problem of factorization of large
numbers. Keys can be large for increased security.</p>
      <p>3) Privacy:</p>
      <p>Can provide a high level of privacy for data by storing data in encrypted form during
processing.</p>
      <p>4) Flexibility:</p>
      <p>Application: Suitable for scenarios where you need to perform analytics on encrypted data
without decrypting it.</p>
      <p>Disadvantages:
1) Productivity:</p>
      <p>Encryption and decryption with Paillier is significantly slower than symmetric encryption
algorithms such as AES. This can be a problem when working with large amounts of data. High
computational cost for encryption and decryption, which can require significant resources.
2) Storage capacity:</p>
      <p>The size of the encrypted data is often much larger than the size of the original data. This can
lead to high storage costs.</p>
      <p>3) Difficulty of implementation:</p>
      <p>The implementation of homomorphic algorithms can be more complex compared to
symmetric algorithms, requiring additional knowledge and skills for proper implementation.
4) Scaling:</p>
      <p>The efficiency of the algorithm may decrease when scaling to large volumes of data due to
computational costs and overhead.</p>
      <p>The Paillier algorithm is a powerful tool for processing data with high privacy requirements,
where computations must be performed on encrypted data. However, its performance and
storage capacity can be a problem for large data sets or scenarios where speed is critical. For
most applications that require fast encryption and decryption, symmetric algorithms such as
AES may be more appropriate.
4. Comparison of Paillier Algorithm and AES</p>
      <p>Paillier: Encrypted data can be larger due to encryption overhead. The volume may increase
depending on the size of the key and data.</p>
      <p>AES: Usually stores data more compactly, due to lower overhead. AES encryption does not
increase data volume as much as it can with Paillier.</p>
      <p>6) Resource requirements:
Paillier: High computational resources due to the complexity of mathematical operations.
AES: Low computing resources, fast encryption and decryption.
7) Parallelization:</p>
      <p>
        Paillier: Can be parallelized, but the complexity of the math operations may limit
efficiency[
        <xref ref-type="bibr" rid="ref4">4,5</xref>
        ].
      </p>
      <p>AES: Parallelizes quickly and supports SIMD instructions, making it very efficient on modern
processors.</p>
      <p>8) Security:</p>
      <p>
        Paillier: Provides a high level of security for scenarios where computations over encrypted
data are required. However, security may depend on implementation parameters and may be
less effective for large amounts of data[
        <xref ref-type="bibr" rid="ref4">4,5</xref>
        ].
      </p>
      <p>AES: High security with many proven attacks. A good choice for general data encryption.</p>
      <p>Homomorphic encryption allows to perform calculations on encrypted data, which can be
useful in certain scenarios, such as processing data without decrypting it. However, these
algorithms typically have higher computational overhead and a larger volume of encrypted
data, which can lead to increased cloud costs. The performance of algorithms such as Paillier is
often lower due to the complexity of the mathematical calculations.</p>
      <p>For general medical data storage where data processing without decryption is not a primary
priority, AES provides an efficient balance between speed, security and resources.</p>
      <p>If the system requires data processing without decryption, homomorphic algorithms can be
considered as an additional solution but considering possible resource costs[6].
5. Implementation of the optimized Paillier algorithm</p>
      <p>This is the encrypted text.</p>
      <p>Input parameters for decryption(Fig 1):
encryptedData: This is encrypted data that needs to be decrypted.
publicKey: The public key that contains the parameters for decryption.
privateKey: private key containing parameters λ (lambda) and μ (mu).</p>
      <p>Decryption:</p>
      <p>Calculates the value of u as encryptedData.modPow(privateKey.lambda, nSquared). This is
the operation of raising the encrypted data to the power of λ, followed by taking the module by
nSquared.</p>
      <p>For each element in the textData list, a separate encryption task is created, which is started in
a new thread using executor.submit(). EncryptTask is a class that implements the encryption of
each individual item (this class is probably a separate implementation where the encryption
process is described). The submit method returns a Future object that represents the result of an
asynchronous operation (in this case, encryption). All these Future objects are stored in the
futures list.
an InterruptedException or an</p>
      <p>Figu
re 3: Parallel algorithm for decryption</p>
      <p>An ExecutorService is created that manages the thread pool. The number of threads is
determined by the number of available processors
(Runtime.getRuntime().availableProcessors()). This allows efficient use of system hardware
resources for parallel execution of decryption. For each item in the encryptedText list
(encrypted data), a separate decryption task is created, which is passed to the execution of a new
thread via executor.submit(). The DecryptTask class performs the decryption operation for each
encrypted block. The submit method returns a Future object that represents the result of
asynchronous execution. All these Future objects are added to the futures list.</p>
      <p>To check algorithm was created test data(Fig 4).</p>
      <p>According to results encryption and decryption is correct. However, performance for small
data set is better for sequential realization(Fig 5).</p>
      <p>Parallel methods are significantly more efficient for processing large amounts of data, both
for encryption and for decryption. This is especially noticeable when processing data with a
volume of 50 MB, where the advantages of parallelization are most pronounced. For small data
amounts (309 bytes), the thread management overhead of parallel methods outweighs the
benefits, making them less efficient than the sequential approach. As data amounts increase, the
advantages of parallel methods become more apparent. Parallel encryption and decryption
demonstrate a significant reduction in processing time for large amounts of data compared to
sequential methods.</p>
    </sec>
    <sec id="sec-2">
      <title>Conclusions</title>
      <p>In this work analyzed the Paillier algorithm, which provides additive homomorphic
properties for processing encrypted medical data. The main emphasis was placed on studying
the performance of the algorithm and developing strategies for its optimization, which will
allow more efficient processing of large volumes of data. The conducted analysis showed that
the Paillier algorithm has significant advantages in preserving data confidentiality due to its
homomorphic properties, which allow performing calculations on encrypted data without
decrypting it. This is particularly useful for medical data where privacy protection is critical.</p>
      <p>However, the high computational complexity of the algorithm creates performance
problems, especially when processing large amounts of data. To improve processing speed,
parallel encryption and decryption methods were implemented, which demonstrated significant
advantages in the processing speed of large data sets compared to sequential methods.</p>
      <p>The results of the work confirm the expediency of using the Paillier algorithm for tasks that
require data processing without decoding them, and suggest effective optimization strategies to
improve the performance of this algorithm in the conditions of large medical data sets. In the
future, this may contribute to the further development of cryptographic methods to ensure the
confidentiality and security of medical data.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Paillier</surname>
          </string-name>
          ,
          <article-title>"Public-Key Cryptosystems Based on Composite Degree Residuosity Classes,"</article-title>
          <source>in Advances in Cryptology - EUROCRYPT'99, Lecture Notes in Computer Science</source>
          , vol.
          <volume>1592</volume>
          , Springer, Berlin, Heidelberg,
          <year>1999</year>
          , pp.
          <fpage>223</fpage>
          -
          <lpage>238</lpage>
          , doi: 10.1007/3-540-48910-X_
          <fpage>16</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Petryk</surname>
            ,
            <given-names>M.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boyko</surname>
            ,
            <given-names>I.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khimich</surname>
            ,
            <given-names>O.M.</given-names>
          </string-name>
          et al.
          <article-title>High-Performance Supercomputer Technologies of Simulation and Identification of Nanoporous Systems with Feedback for nComponent Competitive Adsorption</article-title>
          .
          <source>Cybern Syst Anal</source>
          <volume>57</volume>
          ,
          <fpage>316</fpage>
          -
          <lpage>328</lpage>
          (
          <year>2021</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>V.</given-names>
            <surname>Vaikuntanathan</surname>
          </string-name>
          ,
          <article-title>"Computing Blindfolded: New Developments in Fully Homomorphic Encryption,"</article-title>
          <source>in Proceedings of the 2011 IEEE 52nd Annual Symposium on Foundations of Computer Science (FOCS '11)</source>
          , Palm Springs, CA, USA,
          <year>2011</year>
          , pp.
          <fpage>5</fpage>
          -
          <lpage>16</lpage>
          , doi: 10.1109/FOCS.
          <year>2011</year>
          .
          <volume>45</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>X.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Hu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Bao</surname>
          </string-name>
          ,
          <article-title>"Efficient Homomorphic Encryption Protocol for Scalable Encrypted Data Processing in Health Systems,"</article-title>
          <source>IEEE Access</source>
          , vol.
          <volume>7</volume>
          , pp.
          <fpage>143746</fpage>
          -
          <lpage>143758</lpage>
          ,
          <year>2019</year>
          , doi: 10.1109/ACCESS.
          <year>2019</year>
          .
          <volume>2945273</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>