Mapping method and system for performing homomorphic ciphertext operation in processing-in-memory

The method optimizes homomorphic encryption operations by allocating tasks to CPU cores and PIM operators within PIM memory, addressing computational complexity and memory bottlenecks, thereby enhancing system performance.

KR102991333B1Active Publication Date: 2026-07-15KOREA ELECTRONICS TECH INST

Patent Information

Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
KOREA ELECTRONICS TECH INST
Filing Date
2022-11-30
Publication Date
2026-07-15

AI Technical Summary

Technical Problem

Homomorphic encryption operations face high computational complexity and memory bottlenecks due to high memory requests and low memory reuse rates, leading to significant speed reductions and increased costs for high-bandwidth memory configurations.

Method used

A mapping method and system that analyzes the characteristics of each step of homomorphic ciphertext operations and allocates them to appropriate hardware devices, such as CPU cores, homomorphic encryption acceleration IPs, and PIM operators within PIM memory, optimizing task division and resource allocation.

Benefits of technology

Significantly enhances the speed of homomorphic encryption operations by minimizing data movement and maximizing memory bandwidth utilization, improving overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 112022128684030-PAT00004_ABST
    Figure 112022128684030-PAT00004_ABST
Patent Text Reader

Abstract

A mapping method and system for performing homomorphic ciphertext operations in Processing in Memory (PIM) hardware are provided. A mapping method for performing homomorphic ciphertext operations in Processing in Memory according to an embodiment of the present invention comprises: a first step in which a mapping system performs profiling in mission units when there is no profiling information for a homomorphic ciphertext requested by a client; a second step in which, when profiling is completed, the mapping system selects an optimal execution device for each mission unit based on the profiling results and stores the selection results in mapping information; a third step in which, when a homomorphic ciphertext requested by a client is received, the mapping system divides the operation of the homomorphic ciphertext into mission units based on the profiling results; and a fourth step in which the mapping system assigns an optimal execution device to each operation divided into mission units based on the mapping information. By doing so, homomorphic ciphertexts can be assigned to appropriate hardware through a mapping algorithm capable of efficiently dividing and mapping homomorphic ciphertexts in a Processing in Memory system, thereby significantly increasing the speed of homomorphic ciphertext operations compared to the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to a mapping method and system for performing homomorphic ciphertext operations, and more specifically, to a mapping method and system for performing homomorphic ciphertext operations in Processing in Memory (PIM) hardware. Background Technology

[0003] As the demand for big data-based services increases, homomorphic encryption technology is gaining attention as it enables computations without data decryption, thereby protecting user privacy and enhancing security during data transmission and processing.

[0004] While such homomorphic encryption technology has the advantage of being able to process operations in the ciphertext state, it has the problem of having very high computational complexity compared to plaintext operations and complex operation algorithms, which reduces processing speed by hundreds to thousands of times compared to conventional CPU processing.

[0005] Figure 1 illustrates a general method for performing operations on homomorphic ciphertexts. Referring to Figure 1, for example, a client generates ciphertext using an encryption key and transmits the ciphertext to a server to perform operations. The server performs operations on the received ciphertexts and then transmits the result of the operation to the client in the form of ciphertext. The client decrypts the received ciphertext to obtain the result of the operation. The result of the operation at this time is identical to the value obtained by performing operations on plaintext data. Since the operation of homomorphic ciphertexts is performed on the server and operations are performed on ciphertexts without decrypting the ciphertext, the computational complexity and memory usage increase significantly compared to operations on plaintext data, resulting in a disadvantage where the operation speed is hundreds to thousands of times slower than conventional plaintext operations.

[0006] Figure 2 shows the structure of a conventional server system for homomorphic encryption operations. When a server is equipped with a homomorphic encryption accelerator, it can accelerate homomorphic encryption operations using the arithmetic unit within the accelerator or execute them directly on the CPU. The CPU and main memory are connected via a memory interface, and the CPU and the homomorphic encryption accelerator are connected via a separate external interface (PCIe, Ethernet, Infiniband, etc.). Server systems without a homomorphic encryption accelerator must process all operations on the CPU, resulting in low computational parallelism and a significant drop in computational speed.

[0007] Recently, research aimed at accelerating homomorphic ciphertext operations through computational accelerators specialized for homomorphic encryption has been conducted primarily by academia and startups. However, due to the characteristics of homomorphic ciphertext operation algorithms, there are issues such as high memory requests and low memory reuse rates, which cause memory bottlenecks and make it difficult to build efficient systems.

[0008] Specifically, in the case of a server system equipped with a homomorphic encryption accelerator as shown in Fig. 3, continuous data movement between the main memory and the accelerator's memory is required during homomorphic ciphertext operations.

[0009] In particular, since the computational load for homomorphic ciphertext multiplication increases exponentially if the operation is performed directly between ciphertext vectors, the ciphertext vectors are subjected to Number Theoretic Transform (NTT), Point-wise Multiplication is performed between the transformed vectors, and the result is then transformed again into Inverse NTT (iNTT) to derive the result.

[0010] In this case, point-wise multiplication operations have an extremely low data reuse rate, so memory bandwidth has an absolute impact on computation speed. Therefore, improving the computation speed of the accelerator requires the use of high-bandwidth memory such as HBM or GDDR, which incurs significant costs for system configuration. The problem to be solved

[0012] The present invention has been devised to solve the aforementioned problems, and the objective of the present invention is to provide a mapping method and a system capable of improving overall system performance by analyzing the characteristics of each step of homomorphic ciphertext operations in a processing-in-memory system and allocating them to appropriate hardware devices. means of solving the problem

[0014] A mapping method for performing homomorphic ciphertext operations in processing in memory according to an embodiment of the present invention for achieving the above objective comprises: a first step in which a mapping system performs profiling in mission units when there is no profiling information for a homomorphic ciphertext requested by a client; a second step in which, when profiling is completed, the mapping system selects an optimal execution device for each mission unit based on the profiling results and stores the selection results in mapping information; a third step in which, when a homomorphic ciphertext requested by a client is received, the mapping system divides the operation of the homomorphic ciphertext into mission units based on the profiling results; and a fourth step in which the mapping system assigns an optimal execution device to each operation divided into mission units based on the mapping information.

[0015] And in the first step, when an operation on a specific homomorphic ciphertext is requested from a client, it is determined whether profiling information for the requested homomorphic ciphertext exists, and if there is no profiling information for the homomorphic ciphertext, the homomorphic ciphertext is divided into task units, and profiling can be performed for each divided task unit.

[0016] In addition, the first step may perform profiling that records the memory usage and execution time required for the execution of computational operations for each divided task unit when performing profiling.

[0017] And the computational operation of the pre-configured homomorphic ciphertext can be divided into NTT (Numeric Theoretic Transform) transformation tasks, point-wise multiplication tasks, and iNTT (inverse Numeric Theoretic Transform) transformation tasks.

[0018] In addition, the fourth step may assign computational tasks to the execution device with the minimum execution time when allocating each optimal execution device, provided that system resources are sufficient.

[0019] And in the fourth step, when allocating each optimal execution device, if system resources are insufficient, computation tasks can be assigned / reassigned to the execution device showing the minimum memory usage by considering the current resource usage.

[0020] In addition, a mapping method for performing homomorphic ciphertext operations in processing in memory according to one embodiment of the present invention may further include a fifth step of performing an operation on each allocated optimal execution device and producing an operation result when each optimal execution device is allocated.

[0021] And in the fifth step, when the operation result is produced, the produced operation result can be transmitted to the client to terminate the entire homomorphic cipher operation.

[0022] Additionally, depending on the mission characteristics, the execution device may be selected from a CPU Core provided within the SoC (System on Chip) and a PIM arithmetic unit provided within the PIM memory with homomorphic encryption acceleration IP and processing in memory applied.

[0023] Meanwhile, a mapping system for performing homomorphic ciphertext operations in processing in memory according to another embodiment of the present invention comprises: a storage unit in which mapping information is stored; and a processor that, when there is no profiling information for a homomorphic ciphertext requested by a client, performs profiling in mission units, and when profiling is completed, selects an optimal execution device for each mission unit based on the profiling results and stores the selection result in the mapping information of the storage unit, and when a homomorphic ciphertext requested by a client is received, divides the operation of the homomorphic ciphertext into mission units based on the profiling results and assigns an optimal execution device to each operation divided into mission units based on the mapping information.

[0024] A mapping method for performing homomorphic ciphertext operations in processing in memory according to another embodiment of the present invention comprises: a mapping system selecting an optimal execution device for each mission unit based on profiling results performed on a mission unit and storing the selection result in mapping information; when a homomorphic ciphertext requested by a client is received, the mapping system dividing the operation of the homomorphic ciphertext into mission units based on profiling results; the mapping system assigning an optimal execution device to each operation divided into mission units based on mapping information; and when each optimal execution device is assigned, performing the operation on each assigned optimal execution device to produce an operation result.

[0025] Additionally, a mapping system for performing homomorphic ciphertext operations in processing in memory according to another embodiment of the present invention comprises: a processor that selects an optimal execution device for each mission unit based on profiling results performed on a mission unit, stores the selection result in mapping information, and, when a homomorphic ciphertext requested by a client is received, divides the operation of the homomorphic ciphertext into mission units based on profiling results, and assigns an optimal execution device to each operation divided into mission units based on mapping information; and an optimal execution device that performs each assigned operation to produce an operation result. Effects of the invention

[0027] As described above, according to the embodiments of the present invention, memory-intensive tasks can be effectively executed by performing operations within memory, and homomorphic ciphertexts can be assigned to appropriate hardware through a mapping algorithm that can efficiently partition and map homomorphic ciphertexts in a processing-in-memory system by reflecting the processing-in-memory hardware characteristics where complex operations are difficult to perform and the homomorphic ciphertext operations characteristics that require complex operations between ciphertexts.

[0028] In addition, according to embodiments of the present invention, the speed of homomorphic encryption operations can be significantly increased compared to the prior art through an overall system structure that includes processing in memory that is efficient for homomorphic encryption operations. Brief explanation of the drawing

[0030] FIG. 1 is a diagram provided for the explanation of a general homomorphic cipher operation method, Figure 2 is a drawing provided for the explanation of the structure of an existing homomorphic encryption server system, FIG. 3 is a diagram provided for explaining a homomorphic encryption operation method in a server system to which an existing homomorphic encryption accelerator is applied. FIG. 4 is a drawing provided for describing a mapping system for performing homomorphic ciphertext operations in processing in memory according to an embodiment of the present invention. FIG. 5 is a diagram illustrating an example of mapping a homomorphic encryption server system with processing in memory and a homomorphic encryption multiplication operation using a mapping system according to an embodiment of the present invention. FIG. 6 is a flowchart provided to describe a mapping method for performing homomorphic ciphertext operations in processing in memory according to one embodiment of the present invention. Specific details for implementing the invention

[0031] The present invention will be described in more detail below with reference to the drawings.

[0032] FIG. 4 is a diagram provided for describing a mapping system (100) for performing homomorphic ciphertext operations in processing in memory according to one embodiment of the present invention, and FIG. 5 is a diagram illustrating an example of mapping homomorphic ciphertext multiplication operations to a homomorphic ciphertext server system with processing in memory using the mapping system (100) according to one embodiment of the present invention.

[0033] Referring to FIG. 4, a mapping system (100) for performing homomorphic ciphertext operations in processing in memory is configured to map homomorphic ciphertext multiplication operations to each hardware in conjunction with a homomorphic ciphertext operation server (200) to which processing in memory is applied.

[0034] To this end, the mapping system (100) may include a processor (110) and a storage unit (120) that map homomorphic encryption multiplication operations to each hardware.

[0035] The storage unit (120) is a storage medium that stores data necessary for the operation of the processor (110), and mapping information can be stored therein.

[0036] The processor (110) can analyze the characteristics of each step of the homomorphic ciphertext operation and assign it to an appropriate hardware device.

[0037] For example, the processor (110) can perform profiling on a mission unit basis when a homomorphic cipher operation requested by a client is first executed and there is no profiling information for the homomorphic cipher, select an optimal execution device for each mission unit based on the profiling results, and store the selection results in mapping information.

[0038] Specifically, when the processor (110) performs profiling on a task unit basis, if an operation on a specific homomorphic ciphertext is requested from a client, it determines whether profiling information for the requested homomorphic ciphertext exists, and if there is no profiling information for the homomorphic ciphertext, it divides the homomorphic ciphertext into task units and performs profiling for each divided task unit.

[0039] At this time, the processor (110) can perform profiling that records the memory usage and execution time required to execute computation operations for each divided task unit when performing profiling.

[0040] And when the processor (110) receives a homomorphic ciphertext requested by a client, it can divide the operation work of the homomorphic ciphertext into task units based on the profiling results and assign each optimal execution device to each operation work divided into task units based on the mapping information.

[0041] Here, the homomorphic encryption operation server (200) with processing-in-memory applied may be equipped with an SoC (210) including a CPU Core (211) and a homomorphic encryption acceleration IP (212), and a PIM memory (220) including one or more PIM operators (221), and depending on the system configuration, general memory other than the PIM memory (220) may be additionally installed.

[0042] The ciphertext transmitted from the client is stored in the PIM memory (220) cell of the server, and since the hardware logic for NTT / iNTT conversion required for multiplication is a complex operation that is difficult to implement within the PIM memory (220), it can be implemented in the homomorphic encryption IP within the SoC (210).

[0043] And the processor (110) can assign a task divided into task units to any one of the CPU Core (211) and homomorphic encryption acceleration IP (212) provided in the SoC (210) and the PIM operator (221) provided in the PIM memory (220) to which processing in memory is applied, according to the characteristics of each stage of homomorphic ciphertext operation.

[0044] That is, the execution device to which each computational task is assigned by the processor (110) may be selected from among a CPU Core (211) and a homomorphic encryption acceleration IP (212) provided within the SoC (210) and a PIM operator (221) provided within the PIM memory (220) to which processing in memory is applied, depending on the task characteristics of the computational task.

[0045] And the processor (110), when allocating each optimal execution device, may allocate the computational task to the execution device having the minimum execution time when system resources are sufficient (e.g., when current resource usage is below a preset threshold), and when system resources are insufficient (e.g., when current resource usage exceeds a preset threshold), may allocate / reassign the computational task to the execution device showing the minimum memory usage by considering the current resource usage.

[0046] When each optimal execution device is allocated, the operation is performed on each allocated optimal execution device to produce an operation result, and the produced operation result is transmitted to the client to terminate the entire homomorphic ciphertext operation.

[0047] Referring specifically to Figure 5, the operation of a homomorphic ciphertext can be divided into an NTT (Numerical Theoretic Transform) transformation task, a point-wise multiplication task, and an iNTT (inverse Numeric Theoretic Transform) task.

[0048] The operation of the homomorphic ciphertext exemplified in Fig. 5 is an example in which the homomorphic cipher multiplication operation is divided and mapped into three tasks: NTT transformation, Point-wise multiplication, and iNTT transformation. The task division and optimal mapping methods may vary depending on the library and system implementation.

[0049] In order to respond to different computational characteristics depending on the system and algorithm, the processor (110) performs and stores a profiling process that records the memory usage and execution time required for the actual computational operation execution for each task, thereby enabling optimal mapping to be performed using the pre-profiled results when performing the same operation later.

[0050] Once profiling is complete, when a homomorphic ciphertext and operation request are subsequently received from a client, the processor (110) can divide the operation into predefined task units and allocate an optimal execution device for each divided task using the profiling results.

[0051] For example, if system resources are sufficient, the processor (110) may assign an NTT conversion task and an iNTT conversion task targeting ciphertext vectors A and B to the homomorphic encryption IP, respectively, and assign a point-wise multiplication task between vectors to the PIM operator (221).

[0052] In this case, ciphertext vectors A and B are converted into ciphertext vectors A' and B' through homomorphic IP and stored in memory cells, and since the memory used by the SoC (210) is PIM memory (220), unlike conventional accelerator systems, unnecessary data movement does not occur.

[0053] The ciphertext vectors A' and B', after NTT conversion, can perform point-wise multiplication operations through the PIM operator (221) present in the PIM, and at this time, the computational performance can be maximized by utilizing the high internal memory bandwidth of the PIM compared to the existing accelerator system.

[0054] Once the ciphertext vector C' is derived as a result of the operation, the iNTT transformation can be performed on C' again to derive the desired ciphertext C operation result.

[0055] Here, if the resources of the homomorphic encryption IP are insufficient, the processor (110) can assign the NTT conversion task and the iNTT conversion task to a CPU Core (211) with sufficient resources, taking into account the current resource usage.

[0056] Additionally, the processor (110) may assign the vector-to-vector point-wise multiplication task to another PIM operator (221) in consideration of current resource usage when the resources of a specific PIM operator (221) are insufficient, but may assign the vector-to-vector point-wise multiplication task to the homomorphic encryption IP when the resources of all PIM operators (221) are sufficient in consideration of waiting time.

[0057] As homomorphic encryption algorithms are implemented in various ways, the types and order of supported operations differ; therefore, homomorphic encryption operations can generally be supported through predefined library APIs (Application Programming Interfaces).

[0058] Accordingly, the developer of the homomorphic encryption system can determine the execution method of the entire homomorphic encryption operation and the task division method by defining a library for each homomorphic encryption algorithm in advance and store them in the mapping information, and the processor (110) can divide the operation work into task units according to the determined execution method of the entire homomorphic encryption operation and the task division method, and assign each operation work to an optimal execution device (hardware device).

[0059] FIG. 6 is a flowchart provided to describe a mapping method for performing homomorphic ciphertext operations in processing in memory according to one embodiment of the present invention.

[0060] A mapping method for performing homomorphic ciphertext operations in memory according to the present embodiment (hereinafter collectively referred to as the 'mapping method') can, when a request for homomorphic ciphertext operations is received from a client through a mapping system (100), if the request for operations is a request for operations that has never been performed before (when the operation is first executed), divide the entire request into task units and perform task unit profiling (S610).

[0061] Specifically, the mapping method can perform profiling on a mission unit basis when there is no profiling information for a homomorphic ciphertext requested by a client through the mapping system (100), and select an optimal execution device for each mission unit based on the profiling results performed on a mission unit basis, and store the selection results in the mapping information (S620).

[0062] And the mapping method is such that when a homomorphic ciphertext requested by a client is received, the mapping system (100) divides the operation work of the homomorphic ciphertext into task units based on the profiling results (S630), and assigns each optimal execution device to each operation work divided into task units based on the mapping information (S640).

[0063] When each optimal execution device is assigned, the operation is performed on each assigned optimal execution device to produce an operation result, and the produced operation result is transmitted to the client (S650), thereby terminating the entire homomorphic cipher operation.

[0064] Although preferred embodiments of the present invention have been illustrated and described above, the present invention is not limited to the specific embodiments described above. Various modifications are possible by those skilled in the art without departing from the essence of the invention as claimed in the claims, and such modifications should not be understood individually from the technical spirit or perspective of the present invention. Explanation of the symbols

[0066] 100 : Mapping System 110 : Processor 120 : Storage unit 200: Homomorphic encryption operation server 210 : SoC(System on Chip) 211 : CPU Core 212 : Homomorphic encryption acceleration IP 220 : PIM (Processing in Memory) Memory 221 : PIM arithmetic unit

Claims

Claim 1 A mapping method for performing homomorphic ciphertext operations in memory processing, comprising: a first step in which a mapping system performs profiling on a task unit basis when there is no profiling information for a homomorphic ciphertext requested by a client; a second step in which, when profiling is completed, the mapping system selects an execution device for each task unit based on the profiling results and stores the selection results in mapping information; a third step in which, when a homomorphic ciphertext requested by a client is received, the mapping system divides the operation of the homomorphic ciphertext into task units based on the profiling results; and a fourth step in which the mapping system assigns an execution device to each operation divided into task units based on the mapping information. Claim 2 A mapping method for performing homomorphic ciphertext operations in processing in memory according to claim 1, wherein the first step is characterized by determining whether profiling information of the requested homomorphic ciphertext exists when an operation on a specific homomorphic ciphertext is requested from a client, and if there is no profiling information of the homomorphic ciphertext, dividing the homomorphic ciphertext into task units and performing profiling for each divided task unit. Claim 3 A mapping method for performing homomorphic ciphertext operations in memory processing according to claim 2, wherein the first step is characterized by performing profiling that records the memory usage and execution time required for executing operations for each divided task unit when performing profiling. Claim 4 A mapping method for performing homomorphic ciphertext operations in memory processing according to claim 1, characterized in that the operation of a preset homomorphic ciphertext is divided into a Numeric Theoretic Transform (NTT) transformation task, a Point-wise multiplication task, and an Inverse Numeric Theoretic Transform (iNTT) transformation task. Claim 5 A mapping method for performing homomorphic ciphertext operations in memory processing according to claim 1, wherein the fourth step is characterized by assigning an operation to an execution device having a minimum execution time when the current resource usage is below a preset threshold when each execution device is allocated. Claim 6 A mapping method for performing homomorphic ciphertext operations in memory processing according to claim 5, wherein the fourth step is characterized by assigning / reassigning the operation to the execution device showing the minimum memory usage in consideration of the current resource usage when the current resource usage exceeds a preset threshold when each execution device is allocated. Claim 7 A mapping method for performing homomorphic ciphertext operations in processing in memory, characterized by further including a fifth step of, when each execution device is allocated, performing an operation on each allocated execution device to produce an operation result. Claim 8 A mapping method for performing homomorphic ciphertext operations in processing in memory according to claim 7, wherein the fifth step is characterized by transmitting the calculated operation result to a client when the operation result is calculated to terminate the entire homomorphic ciphertext operation. Claim 9 A mapping method for performing homomorphic ciphertext operations in processing in memory according to claim 1, wherein the execution device selects one of a CPU Core provided within a System on Chip (SoC) and a homomorphic encryption acceleration IP and a PIM operator provided within a PIM memory to which processing in memory is applied, depending on the mission characteristics. Claim 10 A mapping system for performing homomorphic ciphertext operations in memory processing, comprising: a storage unit in which mapping information is stored; and a processor that, if there is no profiling information for a homomorphic ciphertext requested by a client, performs profiling on a mission unit basis, and when profiling is completed, selects an execution device on a mission unit basis based on the profiling results and stores the selection results in the mapping information of the storage unit, and when a homomorphic ciphertext requested by a client is received, divides the operation of the homomorphic ciphertext into mission units based on the profiling results and assigns each execution device to each operation divided into mission units based on the mapping information. Claim 11 A mapping method for performing homomorphic ciphertext operations in memory processing, comprising: a step in which a mapping system selects an execution device for each mission unit based on profiling results performed for each mission unit and stores the selection results in mapping information; a step in which, when a homomorphic ciphertext requested by a client is received, the mapping system divides the operation of the homomorphic ciphertext into mission units based on profiling results; a step in which the mapping system assigns an execution device to each operation divided into mission units based on mapping information; and a step in which, when each execution device is assigned, the operation is performed on each assigned execution device to produce an operation result. Claim 12 A mapping system for performing homomorphic ciphertext operations in memory, comprising: a processor that selects an execution device per mission unit based on profiling results performed per mission unit, stores the selection results in mapping information, and when a homomorphic ciphertext requested by a client is received, divides the operation of the homomorphic ciphertext into mission units based on the profiling results, and assigns each execution device to each operation divided per mission unit based on mapping information; and each execution device that performs each assigned operation to produce an operation result.