How Homomorphic Encryption Safeguards Data in the Cloud Environment

2023-11-28

디지털 트윈의 콘셉트를 나타낸 그림. 실제 항공기 옆에 가상 공간에 구현한 디지털 트윈이 있다.

With the increasing demand for AI technology based on cloud and big data, there is a growing need for more advanced security measures. When many companies utilize AI to provide personalized services to customers, there is a significant risk of exposing sensitive personal information. The manufacturing industry has been attempting to collect data in a cloud environment and analyze it using industrial AI for prediction. Concerns about data leaks are rising too.

Fortunately, security technology is rapidly advancing. Traditional encryption technologies primarily focus on protecting data during storage and transmission. However, there is a recent emergence of technologies that safeguard the process of computing data. This article is written to introduce the next-generation encryption technology called ‘homomorphic encryption.

What is homomorphic encryption?

(1) Concept

Homomorphic encryption is a cryptographic technology that performs operations on encrypted data. It derives its name from the fact that the computed values in the encrypted state and those in the unencrypted state are identical. Hence, use the term ‘homomorphic.’

Conventional cryptographic systems such as RSA, ECC, and AES unlock a safe with a key every time we want to use valuables (data), called the decryption process. It compromises data security whenever the data is used for computation.

Conventional cryptographic systems require decryption in the cloud before computation, which can expose the decryption key to third parties. -Image Credit: AHHA Labs

On the other hand, the key feature of homomorphic encryption is that it allows us to use data without unlocking the safe. A third party can process encrypted data in the cloud and return the results to the data owner without viewing the original data.[1]

Homomorphic encryption technology was conceptualized by mathematicians in the 1970s, and it was practically developed in 2009 by Craig Gentry, a scientist from Stanford University and IBM. At that time, Gentry described this technology as “a box with gloves used to handle toxic chemicals”, explaining that “since all manipulations occur within the box, the chemicals are never exposed to the outside world.”[2]

The specific application process is as follows: the data owner submits a homomorphically encrypted query. The data analyst produces a ciphertext for the analytical result through homomorphic encryption operations and then delivers it to the data owner.

During this process, the data analyst cannot comprehend the produced result. Only the data owner, possessing the secret key, can decrypt it. Therefore, the data owner can obtain analytical results without exposing their data.[3]

Illustration explaining homomorphic encryption computation.

The data analyst produces a ciphertext for the analytical result through homomorphic encryption operations and then delivers it to the data owner. – Image Credit : AHHA Labs

(2) Stability of Homomorphic Encryption

How secure is homomorphic encryption? The homomorphic encryption technologies currently under research are mostly based on lattice encryption algorithms. Lattice encryption algorithms are designed based on mathematical challenges such as Learning with Errors (LWE). Since these problems are complex to solve even for quantum computers, decrypting encrypted data is considered impossible. Because of this, homomorphic encryption is regarded as a next-generation encryption that remains viable even after the emergence of quantum computers.

(3) Types of Homomorphic Encryption

Homomorphic encryption can be broadly classified into three types:

– Partial Homomorphic Encryption (PHE): Allows only one type of operation (addition or multiplication) for an unlimited time on a given dataset.

– Somewhat Homomorphic Encryption (SHE): Allows a limited number of additions and multiplications for a given dataset. This limitation exists because the length of data increases exponentially with repeated operations.

– Fully Homomorphic Encryption (FHE): Allows various types of operations without limitations on the given dataset. It supports bootstrapping to remove noise generated during repeated operations.

When considering practical applications in scenarios like smart factories, homomorphic encryption is a good choice if it is not overly complex. While fully homomorphic encryption is conceptually superior, its operation speed and computing resource usage efficiency is lower due to the time-consuming bootstrapping process. Addressing specific cases through technology proofs of concept (PoC) is crucial.

Implementation of Fully Homomorphic Encryption

(1) Fully homomorphic encryption scheme

The fully homomorphic encryption schemes that are actively researched are mainly categorized into three widely used schemes.

Firstly, in 2012, the BGV and FV schemes were introduced, supporting *modular operations on *finite fields. Packing technology, enabling the storage of hundreds to thousands of numbers in a single ciphertext, was also developed around this time. In 2016, the TFHE scheme was developed, supporting single-bit operations.

The CKKS scheme, introduced in 2017, marked the beginning of supporting real (complex) number operations. It is praised for its faster speed and the ability to handle a significantly larger amount of data at once due to transforming operations into more manageable approximations (*polynomial approximations). Consequently, it is considered most suitable for big data analysis, including machine learning, which involves real-number operations.[4]

  • Finite fields: A field that consists of finite elements and forms algebraic structures within that set. In other words, the results of operations (addition, multiplication, etc.) on elements within the finite field set remain within that set.
  • Modular operations: A method of defining the sum and product of integers using the remainder when divided by a given number. (e.g., [13 ÷ 5 = 2..3] → [13 mod 5 = 3])
  • Polynomial approximation: A method of representing any function as a more manageable polynomial. Finding the tangent line of a function is one example of linear approximation.

(2) Current Status of Open-Source Libraries [5]

Numerous domestic and international institutions and companies are actively developing open-source libraries for implementing fully homomorphic encryption schemes.

-HELib: Developed by IBM in 2013, HELib was the first homomorphic encryption library, supporting CKKS, BGV schemes, and bootstrapping.

-Microsoft SEAL: An open-source library from Microsoft that supports BFV and CKKS schemes. It allows integer addition and multiplication but does not support bootstrapping.

-OpenFHE: A library supporting all major FHE schemes, including BGV, BFV, CKKS, FHEW, and TFHE. It is widely used in partnership with NumFocus, a consortium of FHE developers.

-PALISADE: Widely used in defense contracts supported by the U.S. Defense Advanced Research Projects Agency (DARPA), PALISADE supports various schemes like BGV, BFV, CKKS, TFHE, and FHEW.

-NFLlib: An outcome of the European ‘H2020’ HEAT project for developing high-performance homomorphic encryption.

-cuHE: A library focused on accelerating homomorphic encryption through GPU and CPU.

-Concrete: A library that supports custom variations of the TFHE scheme.

-EVA: A compiler and optimization program for the CKKS scheme (targeting Microsoft SEAL).

-HEaaN: An implementation library for the CKKS scheme that supports fixed-point approximation arithmetic. It developed by Professor Cheon Jung Hee’s team at Seoul National University in 2017 and shows world-class performance.

The Potential of Homomorphic Encryption

(1) Expansion of Data Utilization Scope

Homomorphic encryption performs a good role in enhancing existing security systems and it also holds much greater potential. It allows the utilization of vast amounts of data previously dormant in secure vaults for data analysis or AI developments to create new value.

One notable field that can benefit from this technology is healthcare. So far, patient information such as diagnoses, medical histories, and DNA data for personalized treatments is highly sensitive personal information and laws and regulations exist to protect it. So, utilizing personal data for medical advancements has been very limited.

In the future, with homomorphic encryption technology, multiple healthcare institutions will collaborate more actively while still protecting patient information.

(2) Improvement in AI Accuracy

Applying homomorphic encryption can improve data analysis and AI accuracy compared to traditional methods.

For example, machine learning involves analyzing extensive data to predict the future and solve problems. However, in environments where privacy protection is a concern, the accuracy of the data used for machine learning becomes an issue. Anonymized data has lower data resolution, meaning its value is diminished due to the reduced association with personal information.

By applying homomorphic encryption, pure data can be encrypted directly, and an AI model can be trained using the encrypted data. This allows the AI model to identify relevant patterns more accurately for utilization while maintaining privacy.

Use Cases by Industry

(1) IT

Microsoft has been offering a homomorphic encryption-based service for password breach checks targeting Edge browser users since 2021. Based on the Microsoft SEAL library, this service provides periodic checks to see if passwords stored in the Edge browser have been leaked to the server.

When passwords are stored in the Edge browser, the browser periodically checks with the server to determine if the passwords have been leaked. It is very important to point to emphasize that the Edge server never learns any information about the client’s username or password. As the service provider, Microsoft cannot verify the password leakage status (operation value). Only the user can check the data.

(2) Finance

In the financial sector, where protecting personal information is crucial while requiring more accurate analysis, interest in homomorphic encryption is growing among credit card companies, insurance companies, and other entities. Various use cases, such as fraud detection and individual credit evaluation, are being explored.

In June 2022, in South Korea, Cryptolab conducted a homomorphic encryption technology verification with one of the biggest financial groups in Korea. Cryptolab combined and analyzed ‘insurance contract customer data’ and ‘loan customer data’ held by subsidiaries in a homomorphically encrypted state. They implemented homomorphic encryption for the machine learning models (random forest model and XGBoost model) used by the client and obtained predicted values using encrypted data. The results showed a 99.99% probability of matching the original predicted values.

(3) Use Case Scenario for Manufacturing Scene (based on a Paper)

Based on the paper, let’s explore how homomorphic encryption can be applied in the manufacturing industry, specifically in the context of predictive maintenance in plastic extrusion processes.[9]

Predictive maintenance using AI technology is a strategic approach to ensure product quality and enhance overall equipment efficiency. However, developing such systems requires a significant amount of time, cost, and advanced computing power. Many companies lack in-house data analysts and AI experts. In such cases, considering the use of external predictive maintenance solutions in a cloud environment can be a viable option. This approach offers the advantage of developing a system without significant costs and time, and cloud providers offer readily available solutions, eliminating the need to build expertise in-house.

Despite these advantages, many companies hesitate to adopt such solutions due to concerns about the security of their internal data when uploaded to the cloud. However, it is anticipated that the use of homomorphic encryption can address these security concerns, allowing companies to leverage cloud-based AI predictive maintenance services in the future confidently.

Cloud architecture for predictive maintenance of an extrusion process. -Image Credit: Reorganized by AHHA Labs based on the paper.

In the first step of the extrusion process, various state data, such as process temperature, raw material flow, coil speed, and more are recorded. All of this data is confidential and undergoes homomorphic encryption on-premises for secure protection. Subsequently, the predictive maintenance AI model and the homomorphically encrypted data are transmitted to the cloud. The model is trained and computed in its encrypted state in the cloud environment. The model execution results comprise a report containing specific information about the machine’s maintenance time. The results are also encrypted, so the cloud service provider cannot access the content. This encrypted report is then transmitted to the enterprise, which can be decrypted using the secret key, allowing the company to gain insights for maintaining and managing the process.

In essence, by leveraging homomorphic encryption, the resource-intensive process is delegated to the cloud while ensuring security throughout the data lifecycle. Homomorphic encryption enables both aspects.

Effortlessly conduct the data collection and analysis needed for implementing Digital Twins with AHHA Labs' innovative solutions.

Recent Research Trends

Homomorphic encryption is considered to have significant potential in various fields, but it still faces several challenges before widespread commercialization.

(1) Improvement in Computational Speed [4]

The first challenge is the computational speed. Currently, homomorphic encryption technology is known for its slower speed compared to traditional methods. The process involves mapping operations to an nth-degree polynomial, adding noise to generate ciphertext, and additional operations to prevent noise from becoming too long, leading to a substantial increase in computational complexity.[10]

Multiplicative operations in schemes like BGV or CKKS, which store thousands of real numbers, show performance ranging from 10 ms to 0.1 s (specific situations may vary). The bootstrapping process in the TFHE scheme takes approximately 13 ms (results obtained solely on CPU).[13] This can be tens to hundreds of times slower than situations without homomorphic encryption. The adequacy of such speed depends on the context in which homomorphic encryption is applied. For instance, it might be sufficient for assessing a customer’s creditworthiness using banking data. Still, it may pose limitations when applied to autonomous vehicles where microsecond-level precision is crucial or in complex machine-learning scenarios.

To overcome this challenge, academia and industry are conducting various research efforts. For example, in the software domain, research is underway to apply parallel processing techniques that can encrypt more than 1000 pieces of data simultaneously.

(2) Hardware Development

There is a growing trend in actively researching hardware-based solutions to implement homomorphic encryption smoothly.

The Defense Advanced Research Projects Agency (DARPA) in the United States has initiated the “Data Protection in Virtual Environments (DPRIVE)” project and entered into collaborative agreements with Microsoft and Intel to develop hardware accelerators. The goal is to achieve a performance ten times greater than the processing speed when data is not encrypted by 2025.[1]

In this project, Intel and Microsoft are designing Application-Specific Integrated Circuit (ASIC) accelerators for AI developers to reduce the performance overhead associated with fully homomorphic encryption.[11] Leveraging their experience developing cryptocurrency mining accelerators released in 2022, they aim to address the lessons learned from developing the first-generation ASIC accelerator and are now working on second-generation technology. Intel has announced plans to release a trial version of cryptographic software tools for developers related to this development later this year.

(3) Standardization

Another crucial gateway to commercialization is standardization. The need for standardization in the industry has been recognized, leading to the formation of consortiums for standardization voluntarily. Since 2020, public standardization organizations have also initiated standardization efforts.

-Homomorphic Encryption Standardization: The International Homomorphic Encryption Standardization Consortium is developing standards for homomorphic encryption based on three whitepapers covering security, API, and applications. In 2018, the standardization draft for parameter selection in homomorphic encryption was first approved at the second workshop held at MIT in the United States.[12] Annual conferences on related topics are held, and the 6th conference took place at Seoul National University in March 2023.[13]

-ITU-T SG17: The International Telecommunication Union Telecommunication Standardization Sector (ITU-T) Study Group 17 has selected machine learning as one of the areas where homomorphic encryption can be applied. They are developing guidelines for the structure, procedures, and characteristics required to protect personal information when using homomorphic encryption technology for data analysis.[14]

-ISO/IEC JTC 1/SC27: In 2019, the existing ISO-IEC 18033-6, “Encryption algorithms – Part 6: Homomorphic encryption,” standard was revised. This standard consists of two mechanisms: exponential ElGamal encryption (for multiplication) and Paillier encryption (for addition), specifically designed for partially homomorphic encryption. The goal is to publish international standards (working drafts) for fully homomorphic encryption in 2024.

(4) Compiler

Recently, there has been a diverse trend in research to lower the entry barriers for non-experts. The focus is creating compilers that automatically select the parameters and algorithms for schemes to perform desired computations. This allows programming without extensive background knowledge of homomorphic encryption, making it more accessible for non-experts.

Various compilers and optimization programs have been introduced, targeting Microsoft SEAL for CKKS [15], E3 compiler supporting most homomorphic encryption libraries such as SEAL, HElib, FHEW, TFHE, PALISADE[16], and CHET compiler supporting HEaaN[17].

While current capabilities are primarily focused on assisting with basic operations like matrix-vector multiplication, it is expected that compilers supporting more complex programming tasks, such as statistical analysis and machine learning, will emerge soon.

Utilizing Homomorphic Encryption in Manufacturing Business

To leverage homomorphic encryption in manufacturing businesses, it is essential to conduct specific technology proofs of concept (PoC) to apply optimized homomorphic encryption algorithms. Since there is no one-size-fits-all solution for homomorphic encryption, evaluating and adapting the algorithms based on concrete use cases is crucial. Additionally, it’s important to consider that the accuracy of machine learning results may slightly decrease when compared to running the same analysis on unencrypted data. This discrepancy can arise during the process of polynomial approximation involving addition and multiplication, introducing errors.

While the technology evolves, AHHA Labs is considering using homomorphic encryption to provide improved solutions. AHHA Labs’ data collection and integration solution, DATA CAMP, is preparing for a cloud service launch in 2024. This solution enables the transmission of selected data, collected and preprocessed from various factory equipment to the cloud, allowing for real-time monitoring and process improvement from anywhere, whether at the headquarters or international branches. AHHA Labs plans to enhance security using homomorphic encryption encoding during this process.

Most importantly, homomorphic encryption offers robust security performance. By leveraging this technology, businesses can unlock the potential of previously dormant data accumulated due to industrial security regulations to create new value.

Mastering Real-Time Anomaly Detection with LISA: Your Gateway to Industrial Excellence

Chloe Woo | Content Strategist

Reference

  1. https://www.comworld.co.kr/news/articleView.html?idxno=50372
  2. http://www.itdaily.kr/news/articleView.html?idxno=204289
  3. https://www.kdata.or.kr/kr/whitePaper/view.do
  4. https://sti.kostat.go.kr/window/2021a/main/2021_sum_07.html
  5. Homomorphic Encryption Standardization
  6. “Password Monitor: Safeguarding passwords in Microsoft Edge” Microsoft Research Blog
  7. http://www.itdaily.kr/news/articleView.html?idxno=100661
  8. https://www.newswire.co.kr/newsRead.php?no=953306
  9. Kiesel R, Lakatsch M, Mann A, Lossie K, Sohnius F, Schmitt RH. Potential of Homomorphic Encryption for Cloud Computing Use Cases in Manufacturing. Journal of Cybersecurity and Privacy. 2023; 3(1):44-60. 
  10. https://doi.org/10.22648/ETRI.2021.J.360601
  11. https://www.ajunews.com/view/20230921075438171
  12. Second Homomorphic Encryption Standardization Workshop
  13. 6th HomomorphicEncryption.org Standards Meeting
  14. SG17: Security
  15. Chowdhary, S., Dai, W., Laine, K., and Saarikivi, O. “EVA Improved: Compiler and Extension Library for CKKS.” 9th on Workshop on Encrypted Computing & Applied Homomorphic Cryptography (WAHC ’21), Association for Computing Machinery, New York, NY, USA, 43–55. (2021).
  16. Chielle, E., Mazonka, O., Tsoutsos, N.G., and Maniatakos, M. “E3: A Framework for Compiling C++ Programs with Encrypted Operands.” IACR Cryptol, ePrint Arch, 1013. (2018). 
  17. Dathathri, R., Saarikivi, O., Chen, H., Laine, K., Lauter, K., Maleki, S., Musuvathi, M., and Mytkowicz, T. “CHET: An Optimizing Compiler for Fully-Homomorphic Neural-Network Inferencing.” 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, 142–156, Phoenix, AZ, USA. (2019).

Related Stories