CN115145732A - Parallel homomorphic encryption method and device based on publish-subscribe - Google Patents

Parallel homomorphic encryption method and device based on publish-subscribe Download PDF

Info

Publication number
CN115145732A
CN115145732A CN202210877677.8A CN202210877677A CN115145732A CN 115145732 A CN115145732 A CN 115145732A CN 202210877677 A CN202210877677 A CN 202210877677A CN 115145732 A CN115145732 A CN 115145732A
Authority
CN
China
Prior art keywords
scheduler
homomorphic
homomorphic operation
terminal
coroutine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210877677.8A
Other languages
Chinese (zh)
Inventor
斯雪明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Fulian Technology Co ltd
Original Assignee
Fujian Fulian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Fulian Technology Co ltd filed Critical Fujian Fulian Technology Co ltd
Priority to CN202210877677.8A priority Critical patent/CN115145732A/en
Publication of CN115145732A publication Critical patent/CN115145732A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a parallel homomorphic encryption method and a device based on publish-subscribe, which can improve the performance of parallel homomorphic operation by combining publish-subscribe and channel technologies, wherein the input and output can be separated and decoupled by adopting a publish and subscribe mode, when a homomorphic operation task is delivered to a scheduler, the scheduler randomly distributes the task to an idle coroutine, the coroutine executes homomorphic operation with related requirements, and finally, a second terminal publishes an operation result to a first terminal. Therefore, multi-core resources can be fully utilized; and the frequent switching of the threads can be effectively avoided by using the multi-protocol threads, the effect of realizing high concurrency by using a small number of threads is achieved, and the homomorphic operation processing performance under the parallel scene is improved.

Description

Parallel homomorphic encryption method and device based on publish-subscribe
Technical Field
The invention relates to the technical field of homomorphic encryption, in particular to a parallel homomorphic encryption method and device based on publish-subscribe.
Background
Homomorphic encryption (Homomorphic encryption) is a form of encryption that allows one to perform a particular form of algebraic operation on the ciphertext to obtain a result that is still encrypted, and to decrypt the ciphertext to obtain the same result as performing the same operation on the plaintext. In other words, this technique allows one to perform operations such as retrieving, comparing, etc. in the encrypted data to yield the correct result without the need to decrypt the data throughout the process. The meaning of the method is that the confidentiality problem when data and operation thereof are entrusted to a third party is really and fundamentally solved, for example, the method is applied to various cloud computing.
Currently, a lock mechanism is used to perform parallel homomorphic operations using multithreading. When the thread receives a homomorphic operation request, locking is firstly carried out, then after the operation is completed and a result is issued, unlocking is carried out, and a new homomorphic operation request is waited to be received.
However, when performing serial homomorphic operations, multi-core resources cannot be fully utilized; when the parallel homomorphic operation based on the multithreading is carried out, although the consumption capacity can be improved by a certain number of threads, as the number of the threads is increased, excessive threads compete for CPU resources, the consumption capacity has an upper limit, and even the consumption capacity is reduced. Moreover, the overhead of context switching becomes large due to excessive threads, and the efficiency of homomorphic operation is affected.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the parallel homomorphic encryption method and device based on the publish-subscribe are provided, and homomorphic operation processing performance under a parallel scene can be improved.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a parallel homomorphic encryption method based on publish-subscribe includes the following steps:
the first terminal subscribes different homomorphic operation results in parallel through a subscription channel and sends different homomorphic operation tasks to the scheduler;
the scheduler randomly allocates each homomorphic operation task to an idle coroutine, and sends homomorphic operation results to a second terminal after the coroutine finishes the homomorphic operation task;
and the second terminal issues the homomorphic operation result to a scheduler, and the scheduler writes different homomorphic operation results into the subscription channel.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a parallel homomorphic publication subscription-based encryption apparatus, comprising:
the first terminal is used for subscribing different homomorphic operation results in parallel through a subscription channel and sending different homomorphic operation tasks to the scheduler;
the scheduler is used for randomly distributing each homomorphic operation task to an idle coroutine and sending a homomorphic operation result to the second terminal after the coroutine finishes the homomorphic operation task;
and the second terminal is used for issuing the homomorphic operation result to a scheduler, and the scheduler writes different homomorphic operation results into the subscription channel.
The invention has the beneficial effects that: the parallel homomorphic operation performance can be improved by combining the publishing and subscribing technology and the channel technology, wherein the input and the output can be separated and decoupled by adopting a publishing and subscribing mode, when homomorphic operation tasks are delivered to the scheduler, the scheduler randomly distributes the tasks to the idle coroutines, the coroutines execute homomorphic operation with related requirements, and finally the second terminal publishes an operation result to the first terminal. Therefore, multi-core resources can be fully utilized; and the frequent switching of the threads can be effectively avoided by using the multi-protocol threads, the effect of realizing high concurrency by using a small number of threads is achieved, and the homomorphic operation processing performance under the parallel scene is improved.
Drawings
Fig. 1 is a flowchart of a parallel homomorphic encryption method based on publish-subscribe according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a parallel homomorphic encryption apparatus based on publish-subscribe according to an embodiment of the present invention;
fig. 3 is a block diagram of a parallel homomorphic encryption method based on publish-subscribe according to an embodiment of the present invention.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, an embodiment of the present invention provides a parallel homomorphic encryption method based on publish-subscribe, including the steps of:
the first terminal subscribes different homomorphic operation results in parallel through a subscription channel and sends different homomorphic operation tasks to the scheduler;
the scheduler randomly allocates each homomorphic operation task to an idle coroutine, and sends homomorphic operation results to a second terminal after the coroutine finishes the homomorphic operation task;
and the second terminal issues the homomorphic operation result to a scheduler, and the scheduler writes different homomorphic operation results into the subscription channel.
From the above description, the beneficial effects of the present invention are: the parallel homomorphic operation performance can be improved by combining the publishing and subscribing technology and the channel technology, wherein the input and the output can be separated and decoupled by adopting a publishing and subscribing mode, when homomorphic operation tasks are delivered to the scheduler, the scheduler randomly distributes the tasks to the idle coroutines, the coroutines execute homomorphic operation with related requirements, and finally the second terminal publishes an operation result to the first terminal. Therefore, multi-core resources can be fully utilized; and the frequent switching of the threads can be effectively avoided by using the multi-protocol threads, the effect of realizing high concurrency by using a small number of threads is achieved, and the homomorphic operation processing performance under the parallel scene is improved.
Further, the said scheduler randomly allocates each said homomorphic operation task to an idle coroutine, and after the coroutine completes the said homomorphic operation task, the sending the homomorphic operation result to the second terminal includes:
the scheduler randomly allocates the homomorphic operation task to an idle coroutine, and judges whether a homomorphic operation result in the homomorphic operation task exists in a cache or not by the coroutine, if so, the homomorphic operation result in the cache is obtained and sent to a second terminal;
otherwise, the coroutine executes the homomorphic operation task, and the homomorphic operation result is obtained and then stored in a cache and sent to the second terminal.
As can be seen from the above description, storing the homomorphic operation result of the homomorphic operation in the cache can improve the efficiency of homomorphic operation processing.
Further, writing, by the scheduler, the different homomorphic operation results to the subscription channel comprises:
and according to the principle of first-in first-out of the subscription channel, the scheduler writes different homomorphic operation results into different levels of the subscription channel.
According to the description, the data transmission among the hierarchies is carried out by adopting the combination of the publish-subscribe technology, the channel technology and the cache mechanism, so that the lock conflict is prevented, the lock-free parallel operation is realized, and the performance of the parallel processing is greatly improved.
Further, still include:
the first terminal subscribes different encryption results in parallel through a subscription channel and sends different encryption tasks to the scheduler;
the scheduler randomly allocates each encryption task to an idle coroutine, and sends an encryption result to the second terminal after the coroutine finishes the encryption task;
and the second terminal issues the encryption result to a scheduler, and the scheduler writes different encryption results into the subscription channel.
As can be seen from the above description, the homomorphic encryption method is to perform a specific form of algebraic operation on a ciphertext, so that a plaintext needs to be encrypted before, and a parallel encryption method can be used for the plaintext, so as to further improve the efficiency of the homomorphic encryption.
Further, still include:
the first terminal subscribes different decryption results in parallel through a subscription channel and sends different decryption tasks to the scheduler;
the scheduler randomly allocates each decryption task to an idle coroutine, and after the coroutine finishes the decryption task, a decryption result is sent to a second terminal;
and the second terminal issues the decryption result to a scheduler, and the scheduler writes different decryption results into the subscription channel.
As can be seen from the above description, in the homomorphic encryption method, the ciphertext after homomorphic encryption needs to be decrypted, so that the ciphertext needs to be decrypted later, and a parallel decryption method may also be used for the ciphertext, so as to further improve the efficiency of the homomorphic encryption as a whole.
Referring to fig. 2, another embodiment of the present invention provides a parallel homomorphic encryption apparatus based on publish-subscribe, including:
the first terminal is used for parallelly subscribing different homomorphic operation results through a subscription channel and sending different homomorphic operation tasks to the scheduler;
the scheduler is used for randomly distributing each homomorphic operation task to an idle coroutine and sending a homomorphic operation result to the second terminal after the coroutine finishes the homomorphic operation task;
and the second terminal is used for issuing the homomorphic operation result to a scheduler, and the scheduler writes different homomorphic operation results into the subscription channel.
It can be known from the above description that the performance of parallel homomorphic operation can be improved by combining the publish-subscribe and channel technologies, wherein the input and output can be decoupled separately by adopting the publish and subscribe modes, when a homomorphic operation task is delivered to a scheduler, the scheduler randomly assigns the task to an idle coroutine, the coroutine executes the homomorphic operation of relevant requirements, and finally, the second terminal publishes an operation result to the first terminal. Therefore, multi-core resources can be fully utilized; and the frequent switching of the threads can be effectively avoided by using the multi-coordination program, the effect of realizing high concurrency by using a small number of threads is achieved, and the homomorphic operation processing performance under the parallel scene is improved.
Further, the said scheduler randomly allocates each said homomorphic operation task to an idle coroutine, and after the coroutine completes the said homomorphic operation task, the sending the homomorphic operation result to the second terminal includes:
the scheduler is used for randomly distributing the homomorphic operation task to an idle coroutine, judging whether a homomorphic operation result in the homomorphic operation task exists in a cache or not by the coroutine, and if so, acquiring the homomorphic operation result in the cache and sending the homomorphic operation result to a second terminal;
otherwise, the coroutine executes the homomorphic operation task, and after a homomorphic operation result is obtained, the homomorphic operation result is stored in a cache and is sent to the second terminal.
As can be seen from the above description, storing the homomorphic operation result of the homomorphic operation in the cache can improve the efficiency of homomorphic operation processing.
Further, writing, by the scheduler, the different homomorphic operation results to the subscription channel comprises:
and according to the principle of first-in first-out of the subscription channel, the scheduler is used for writing different homomorphic operation results into different levels of the subscription channel.
According to the description, the data transmission among the hierarchies is carried out by adopting the combination of the publish-subscribe technology, the channel technology and the cache mechanism, so that the lock conflict is prevented, the lock-free parallel operation is realized, and the performance of the parallel processing is greatly improved.
Further, still include:
the first terminal is used for subscribing different encryption results in parallel through a subscription channel and sending different encryption tasks to the scheduler;
the scheduler is used for randomly distributing each encryption task to an idle coroutine and sending an encryption result to the second terminal after the coroutine finishes the encryption task;
and the second terminal is used for issuing the encryption result to a scheduler, and the scheduler writes different encryption results into the subscription channel.
As can be seen from the above description, the homomorphic encryption method is to perform a specific form of algebraic operation on a ciphertext, so that a plaintext needs to be encrypted before, and a parallel encryption method can be used for the plaintext, so as to further improve the efficiency of the homomorphic encryption.
Further, still include:
the first terminal is used for subscribing different decryption results in parallel through a subscription channel and sending different decryption tasks to the scheduler;
the scheduler is used for randomly distributing each decryption task to an idle coroutine and sending a decryption result to the second terminal after the coroutine finishes the decryption task;
and the second terminal is used for issuing the decryption result to a scheduler, and the scheduler writes different decryption results into the subscription channel.
As can be seen from the above description, in the homomorphic encryption method, the ciphertext after homomorphic encryption needs to be decrypted, so that the ciphertext needs to be decrypted later, and a parallel decryption method may also be used for the ciphertext, so as to further improve the efficiency of the homomorphic encryption as a whole.
The parallel homomorphic encryption method and device based on publish-subscribe of the invention are suitable for meeting the performance requirement under the condition of requiring parallel encryption under the condition of requiring homomorphic encryption, and are explained by specific implementation modes as follows:
example one
Referring to fig. 1 and fig. 3, a parallel homomorphic encryption method based on publish-subscribe, in this embodiment, a first terminal is a subscriber, and a second terminal is a publisher, includes the steps of:
s1, a first terminal subscribes different homomorphic operation results in parallel through a subscription channel and sends different homomorphic operation tasks to a scheduler.
Specifically, firstly, an executive program determines data a and b which need homomorphic operation;
then, the subscriber (subscriber) subscribes the homomorphic operation results of a and b, notifies the task to be homomorphic to the scheduler (dispatcher), and returns a channel receiving the operation result c.
And S2, the dispatcher randomly distributes each homomorphic operation task to an idle coroutine, and sends homomorphic operation results to a second terminal after the coroutine finishes the homomorphic operation tasks.
The scheduler randomly allocates the homomorphic operation task to an idle coroutine, judges whether a homomorphic operation result in the homomorphic operation task exists in a cache or not by the coroutine, and if so, acquires the homomorphic operation result in the cache and sends the homomorphic operation result to a second terminal; otherwise, the coroutine executes the homomorphic operation task, and the homomorphic operation result is obtained and then stored in a cache and sent to the second terminal.
Specifically, the dispatcher (dispatcher) randomly dispatches to an idle worker coordinator (worker) to execute a task to be homomorphic;
firstly, checking whether a and b in the task are hit in a cache or not by a worker coroutine (worker), and if so, directly informing a publisher (publisher) of an operation result c; otherwise, executing homomorphic operation, recording the operation result c to the cache, and then notifying the issuer (publisher) of the operation result c.
And S3, the second terminal issues the homomorphic operation result to a scheduler, and the scheduler writes different homomorphic operation results into the subscription channel.
And according to the first-in first-out principle of the subscription channel, the scheduler writes different homomorphic operation results into different levels of the subscription channel.
Specifically, the issuer (publisher) issues the operation result c to the scheduler (dispatcher); a scheduler (dispatcher) writes a plaintext operation result c into a subscription channel; and the executive program acquires an operation result c from the subscription channel.
Example two
The difference between the present embodiment and the first embodiment is that an encryption method is further defined, specifically:
the first terminal subscribes different encryption results in parallel through a subscription channel and sends different encryption tasks to the scheduler;
the scheduler randomly allocates each encryption task to an idle coroutine, and sends an encryption result to the second terminal after the coroutine finishes the encryption task;
and the second terminal issues the encryption result to a scheduler, and the scheduler writes different encryption results into the subscription channel.
In this embodiment, the specific encryption method includes the following steps:
1.1, the executive determines the plaintext message m that needs to be encrypted.
1.2, a subscriber (subscriber) subscribes an encryption result of a plaintext message m, informs a dispatcher (dispatcher) of a task to be encrypted, and then returns a subscription channel for receiving a ciphertext.
1.3, the dispatcher randomly dispatches to an idle worker broker (worker) to execute the task to be encrypted.
1.4, checking whether a plaintext message m in a task is hit in a cache or not by a worker coroutine (worker), and if so, directly notifying a ciphertext c to a publisher (publisher); otherwise, an encryption operation is performed, the ciphertext c is recorded to the cache, and then the publisher (publisher) is notified of the ciphertext c.
1.5, the publisher (publisher) publishes the ciphertext c to the dispatcher (dispatcher).
1.6, the scheduler (dispatcher) writes the ciphertext c into the subscription channel.
And 1.7, acquiring a ciphertext c from the subscription channel by the executive program.
EXAMPLE III
The difference between this embodiment and the first and second embodiments is that the decryption method is further defined, specifically:
the first terminal subscribes different decryption results in parallel through a subscription channel and sends different decryption tasks to the scheduler;
the scheduler randomly allocates each decryption task to an idle coroutine, and after the coroutine finishes the decryption task, a decryption result is sent to a second terminal;
and the second terminal issues the decryption result to a scheduler, and the scheduler writes different decryption results into the subscription channel.
In this embodiment, the specific decryption method includes the following steps:
2.1 the executive determines the ciphertext c that needs to be decrypted.
2.2 the subscriber (subscriber) subscribes to the decryption result of the ciphertext c, informs the dispatcher (dispatcher) of the task to be decrypted, and then returns a channel for receiving the plaintext message m.
2.3 the dispatcher (dispatcher) randomly dispatches to an idle worker broker (worker) to execute the task to be decrypted.
2.4 the worker coroutine (worker) firstly checks whether the ciphertext c in the task hits in the cache, and if so, directly informs the publisher (publisher) of the plaintext message m; otherwise, a decryption operation is performed, the plaintext message m is recorded in the cache, and then the publisher (publisher) is notified of the plaintext message m.
2.5 publisher (publisher) publishes plaintext message m to dispatcher (dispatcher).
2.6 dispatcher writes plaintext message m to the subscription channel.
2.7 the executive retrieves the clear text message m from the subscription channel.
Example four
Referring to fig. 2, in this embodiment, a parallel homomorphic encryption device based on publish-subscribe, in which a first terminal is a subscriber and a second terminal is a publisher, includes:
the first terminal is used for parallelly subscribing different homomorphic operation results through a subscription channel and sending different homomorphic operation tasks to the scheduler;
the scheduler is used for randomly distributing each homomorphic operation task to an idle coroutine and sending a homomorphic operation result to the second terminal after the coroutine finishes the homomorphic operation task;
and the second terminal is used for issuing the homomorphic operation result to a scheduler, and the scheduler writes different homomorphic operation results into the subscription channel.
In some embodiments, the scheduler is configured to randomly allocate the homomorphic operation task to an idle coroutine, and determine whether a homomorphic operation result in the homomorphic operation task exists in a cache by the coroutine, and if so, obtain the homomorphic operation result in the cache and send the homomorphic operation result to a second terminal;
otherwise, the coroutine executes the homomorphic operation task, and after a homomorphic operation result is obtained, the homomorphic operation result is stored in a cache and is sent to the second terminal.
In some embodiments, a scheduler is configured to write different homomorphic operation results into different levels of the subscription channel according to a first-in-first-out principle of the subscription channel.
In some embodiments, the first terminal is configured to subscribe to different encryption results in parallel through a subscription channel, and send different encryption tasks to the scheduler;
the scheduler is used for randomly distributing each encryption task to an idle coroutine and sending an encryption result to the second terminal after the coroutine finishes the encryption task;
and the second terminal is used for issuing the encryption result to a scheduler, and the scheduler writes different encryption results into the subscription channel.
In some embodiments, the first terminal is configured to subscribe to different decryption results in parallel through a subscription channel, and send different decryption tasks to the scheduler;
the scheduler is used for randomly distributing each decryption task to an idle coroutine and sending a decryption result to the second terminal after the coroutine finishes the decryption task;
and the second terminal is used for publishing the decryption result to a scheduler, and the scheduler writes different decryption results into the subscription channel.
In summary, the parallel homomorphic encryption method and apparatus based on publish-subscribe provided by the present invention realize performance improvement of parallel homomorphic operation by adopting a combination of publish-subscribe, channel technology and cache mechanism. The input and the output can be decoupled by adopting a publishing and subscribing mode, when the homomorphic operation task is delivered to the scheduler, the scheduler dispatches the task to an idle worker coroutine, the worker coroutine executes homomorphic operation of relevant requirements, and finally, a publisher publishes an operation result to a subscriber. In the whole process, data transmission among the layers is carried out by adopting a channel technology, so that lock conflict is prevented, and lock-free parallel operation is realized. By adopting an improved LRU cache mechanism with timeout, the operating pressure can be effectively reduced, and the reasonable application of the memory is realized. The use of the multi-worker cooperation can effectively avoid the frequent switching of the threads, and achieve the effect of realizing high concurrency by using a small number of threads.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. A parallel homomorphic encryption method based on publish-subscribe is characterized by comprising the following steps:
the first terminal subscribes different homomorphic operation results in parallel through a subscription channel and sends different homomorphic operation tasks to the scheduler;
the scheduler randomly allocates each homomorphic operation task to an idle coroutine, and sends homomorphic operation results to a second terminal after the coroutine finishes the homomorphic operation task;
and the second terminal issues the homomorphic operation result to a scheduler, and the scheduler writes different homomorphic operation results into the subscription channel.
2. The parallel homomorphic encryption method based on publish-subscribe according to claim 1, wherein the scheduler randomly allocates each homomorphic operation task to an idle coroutine, and after the coroutine completes the homomorphic operation task, sending a homomorphic operation result to the second terminal comprises:
the scheduler randomly allocates the homomorphic operation task to an idle coroutine, and the coroutine judges whether a homomorphic operation result in the homomorphic operation task exists in a cache or not, if so, the homomorphic operation result in the cache is obtained and sent to a second terminal;
otherwise, the coroutine executes the homomorphic operation task, and the homomorphic operation result is obtained and then stored in a cache and sent to the second terminal.
3. The parallel homomorphic encryption method based on publish-subscribe as claimed in claim 1, wherein writing different results of said homomorphic operation into said subscription channel by said scheduler comprises:
and according to the first-in first-out principle of the subscription channel, the scheduler writes different homomorphic operation results into different levels of the subscription channel.
4. The parallel homomorphic encryption method based on publish-subscribe according to claim 1, further comprising:
the first terminal subscribes different encryption results in parallel through a subscription channel and sends different encryption tasks to the scheduler;
the scheduler randomly allocates each encryption task to an idle coroutine, and sends an encryption result to the second terminal after the coroutine finishes the encryption task;
and the second terminal issues the encryption result to a scheduler, and the scheduler writes different encryption results into the subscription channel.
5. The parallel homomorphic encryption method based on publish-subscribe according to claim 1, further comprising:
the first terminal subscribes different decryption results in parallel through a subscription channel and sends different decryption tasks to the scheduler;
the scheduler randomly allocates each decryption task to an idle coroutine, and sends a decryption result to the second terminal after the coroutine finishes the decryption task;
and the second terminal issues the decryption result to a scheduler, and the scheduler writes different decryption results into the subscription channel.
6. A parallel homomorphic encryption apparatus based on publish-subscribe, comprising:
the first terminal is used for subscribing different homomorphic operation results in parallel through a subscription channel and sending different homomorphic operation tasks to the scheduler;
the scheduler is used for randomly distributing each homomorphic operation task to an idle coroutine and sending a homomorphic operation result to the second terminal after the coroutine finishes the homomorphic operation task;
and the second terminal is used for issuing the homomorphic operation result to a scheduler, and the scheduler writes different homomorphic operation results into the subscription channel.
7. The parallel homomorphic encryption device based on publish-subscribe according to claim 6, wherein the scheduler randomly allocates each homomorphic operation task to an idle coroutine, and after the coroutine completes the homomorphic operation task, the sending the homomorphic operation result to the second terminal comprises:
the scheduler is used for randomly distributing the homomorphic operation task to an idle coroutine, judging whether a homomorphic operation result in the homomorphic operation task exists in a cache or not by the coroutine, and if so, acquiring the homomorphic operation result in the cache and sending the homomorphic operation result to a second terminal;
otherwise, the coroutine executes the homomorphic operation task, and the homomorphic operation result is obtained and then stored in a cache and sent to the second terminal.
8. The parallel homomorphic publication subscription based encryption device of claim 6, wherein the writing of the different homomorphic operation results to the subscription channel by the scheduler comprises:
and according to the first-in first-out principle of the subscription channel, a scheduler is used for writing different homomorphic operation results into different levels of the subscription channel.
9. The parallel homomorphic publish-subscribe encryption device according to claim 6, further comprising:
the first terminal is used for subscribing different encryption results in parallel through a subscription channel and sending different encryption tasks to the scheduler;
the scheduler is used for randomly distributing each encryption task to an idle coroutine and sending an encryption result to the second terminal after the coroutine finishes the encryption task;
and the second terminal is used for issuing the encryption result to a scheduler, and the scheduler writes different encryption results into the subscription channel.
10. The parallel homomorphic publication subscription-based encryption device according to claim 6, further comprising:
the first terminal is used for subscribing different decryption results in parallel through a subscription channel and sending different decryption tasks to the scheduler;
the scheduler is used for randomly distributing each decryption task to an idle coroutine and sending a decryption result to the second terminal after the coroutine finishes the decryption task;
and the second terminal is used for issuing the decryption result to a scheduler, and the scheduler writes different decryption results into the subscription channel.
CN202210877677.8A 2022-07-25 2022-07-25 Parallel homomorphic encryption method and device based on publish-subscribe Pending CN115145732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210877677.8A CN115145732A (en) 2022-07-25 2022-07-25 Parallel homomorphic encryption method and device based on publish-subscribe

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210877677.8A CN115145732A (en) 2022-07-25 2022-07-25 Parallel homomorphic encryption method and device based on publish-subscribe

Publications (1)

Publication Number Publication Date
CN115145732A true CN115145732A (en) 2022-10-04

Family

ID=83414383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210877677.8A Pending CN115145732A (en) 2022-07-25 2022-07-25 Parallel homomorphic encryption method and device based on publish-subscribe

Country Status (1)

Country Link
CN (1) CN115145732A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115426206A (en) * 2022-11-07 2022-12-02 中邮消费金融有限公司 Graph anti-fraud capability enabling method and system based on homomorphic encryption technology

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115426206A (en) * 2022-11-07 2022-12-02 中邮消费金融有限公司 Graph anti-fraud capability enabling method and system based on homomorphic encryption technology
CN115426206B (en) * 2022-11-07 2023-03-24 中邮消费金融有限公司 Graph anti-fraud capability enabling method and system based on homomorphic encryption technology

Similar Documents

Publication Publication Date Title
US8763012B2 (en) Scalable, parallel processing of messages while enforcing custom sequencing criteria
US5367681A (en) Method and apparatus for routing messages to processes in a computer system
EP3238421B1 (en) System for high-throughput handling of transactions in data-partitioned, distributed, relational database management system
CN111078436B (en) Data processing method, device, equipment and storage medium
WO2020224489A1 (en) Blockchain-based bank data sharing method and related apparatus
DE102019107503A1 (en) ONE-CHIP SYSTEM AND STORAGE SYSTEM INCLUDING A SECURITY PROCESSOR WITH IMPROVED STORAGE USE EFFICIENCY, AND METHOD FOR OPERATING THE ONE-CHIP SYSTEM
CN105630731A (en) Network card data processing method and device in multi-CPU (Central Processing Unit) environment
US7318160B2 (en) Cryptographic key setup in queued cryptographic systems
US11159309B2 (en) Obtaining quorum approval to perform an operation with a cryptographic item of a key management system
CN115145732A (en) Parallel homomorphic encryption method and device based on publish-subscribe
CA2758732A1 (en) Server architecture for multi-core systems
CN114675964A (en) Distributed scheduling method, system and medium based on Federal decision tree model training
CN112839013B (en) Key transmission method, device and computer readable storage medium
CN110598416A (en) Transaction scheduling method and device
US20100306553A1 (en) High-throughput cryptographic processing using parallel processing
CN107222310A (en) A kind of parallelization processing method of the Ciphertext policy cloud encryption based on encryption attribute
US8056090B2 (en) Reducing layering overhead in collective communication operations
KR20180115107A (en) Virtual private network and method for processing data thereof
CN115033904A (en) Data processing method, apparatus, system, medium, and product
CN110765474A (en) Method for realizing parallel encryption based on GPU
CN108255590A (en) A kind of method of data flow control and device
WO2020259326A1 (en) Signal transmission method and apparatus
CN111290830B (en) Virtual machine migration method, processor and electronic equipment
Jo et al. Offloading data encryption to GPU in database systems
US20100306266A1 (en) Method and apparatus for determining how to transform applications into transactional applications

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination