A method and system for calculating bitwise multiplication of multi-party security vectors

Through the encryption and decryption algorithm in the CKKS algorithm system, combined with the generation of sum vectors and difference vectors, the calculation of vector multiplication in multi-party security computing scenarios is realized, solving the problems of data privacy and isolation, and improving computing efficiency and privacy security.

CN115603910BActive Publication Date: 2025-04-18ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211278237.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-19
Publication Date
2025-04-18
Estimated Expiration
2042-10-19

AI Technical Summary

Technical Problem

In multi-party security computing scenarios, due to data privacy and data isolation, vector multiplication calculation cannot be performed directly. It is difficult for the prior art to realize the task of multiplying vector bitwise without exposing their respective data privacy.

Method used

The encryption algorithm and decryption algorithm in the CKKS algorithm system are used to obtain the first ciphertext by encrypting the first complex vector, and the sum vector and difference vector are generated on the second participant. The plaintext vector multiplication ciphertext vector algorithm is used to calculate the sum vector and the difference vector multiply the first ciphertext and its complex conjugated ciphertext, and the shard of the ciphertext product complex vector is obtained, and the shard is sent to each participant, and the bitwise multiplication result of the vector is finally obtained.

Benefits of technology

While protecting the privacy of each participant, it is realized that the bitwise multiplication result of the first vector and the second vector is calculated, and the results are saved in the form of shards on each participant, which improves data privacy security and computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115603910B_ABST
    Figure CN115603910B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a method and system for bitwise multiplication of multi-party security vectors. A first participant holds a first vector, and a second participant holds a second vector. Through collaborative calculation, the first participant and the second participant can respectively obtain the second slice and the first slice of the product vector, and the product vector is equal to the result of the bitwise multiplication of the first vector and the second vector.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to a method and system for calculating bitwise multiplication of multi-party security vectors. Background Art

[0002] Data plays an increasingly important role in today's world. In many application scenarios, data has become a resource that needs to be protected. In actual business scenarios, due to the need to protect data privacy and data isolation, some difficult problems are often encountered. For example, multiple partners involved in a business want to complete tasks such as modeling and statistical analysis together, but due to data privacy and data isolation, the data cannot be directly integrated for modeling or statistical analysis. Cryptography tools used to solve multi-party secure computing can be used to achieve such tasks.

[0003] Therefore, this specification provides a method and system for bitwise multiplication of multi-party security vectors, which can be used as the underlying implementation of some multi-party security calculations. Summary of the invention

[0004] One aspect of an embodiment of the present specification provides a method for bitwise multiplication of multi-party security vectors, the method being applied to a second participant, the second participant holding a second vector, and the first participant holding a first vector; the method comprising: obtaining from the first participant a first ciphertext obtained by encrypting a first complex vector using an encryption algorithm in a CKKS algorithm system; the first complex vector is obtained by the first participant arranging the first vector, and the real part and the imaginary part of the elements of the first complex vector come from the first vector; based on the second vector, generating a sum vector and a difference vector; wherein the elements of the sum vector reflect the sum of the corresponding two elements in the second vector, and the elements of the difference vector reflect the difference of the corresponding two elements in the second vector; the ciphertext complex conjugate algorithm in the CKKS algorithm system is used to encrypt the first complex vector; the first complex vector is obtained by the first participant arranging the first vector, and the real part and the imaginary part of the elements of the first complex vector come from the first vector; based on the second vector, generating a sum vector and a difference vector; wherein the elements of the sum vector reflect the sum of the corresponding two elements in the second vector, and the elements of the difference vector reflect the difference of the corresponding two elements in the second vector; The method processes the first ciphertext to obtain a first complex conjugate ciphertext; calculates the sum vector multiplied by the first ciphertext through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the first part of the ciphertext product complex vector; calculates the difference vector multiplied by the first complex conjugate ciphertext through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the second part of the ciphertext product complex vector; obtains a first slice of the product complex vector and a ciphertext of the second slice based on the ciphertext product complex vector, and sends the ciphertext of the second slice to the first participant; the ciphertext product complex vector is equal to the sum of the first part and the second part; obtains a first slice of the product vector based on the first slice of the product complex vector, and the product vector is equal to the result of bitwise multiplication of the first vector and the second vector.

[0005] Another aspect of the embodiments of this specification provides a multi-party secure vector bitwise multiplication calculation system. The system is set at the second participant, the second participant holds the second vector, and the first participant holds the first vector; the system includes: a first ciphertext acquisition module, used to obtain from the first participant the first ciphertext obtained by encrypting the first complex vector through the encryption algorithm in the CKKS algorithm system; the first complex vector is obtained by the first participant arranging the first vector, and the real part and imaginary part of the elements of the first complex vector come from the first vector; a sum and difference vector generation module, used to generate a sum vector and a difference vector based on the second vector; wherein the elements of the sum vector reflect the sum of the corresponding two elements in the second vector, and the elements of the difference vector reflect the difference of the corresponding two elements in the second vector; a first complex conjugate ciphertext acquisition module, used to process the first ciphertext through the ciphertext complex conjugate algorithm in the CKKS algorithm system to obtain the first complex conjugate ciphertext; A plaintext product complex vector acquisition module is used to calculate the sum vector multiplied by the first ciphertext through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the first part of the ciphertext product complex vector; calculate the difference vector multiplied by the first complex conjugate ciphertext through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the second part of the ciphertext product complex vector; a product complex vector slice acquisition module is used to obtain the first slice of the product complex vector and the ciphertext of the second slice based on the ciphertext product complex vector, and send the ciphertext of the second slice to the first participant; the ciphertext product complex vector is equal to the sum of the first part and the second part; a product vector first slice acquisition module is used to obtain the first slice of the product vector based on the first slice of the product complex vector, and the product vector is equal to the result of the bitwise multiplication of the first vector and the second vector.

[0006] Another aspect of an embodiment of the present specification provides a multi-party security vector bitwise multiplication calculation device, including at least one storage medium and at least one processor, the at least one storage medium is used to store computer instructions; the at least one processor is used to execute the computer instructions to implement a multi-party security vector bitwise multiplication calculation method provided in an embodiment of the present specification.

[0007] Another aspect of an embodiment of the present specification provides another method for bitwise multiplication of multi-party security vectors, which is applied to a first participant, wherein the first participant holds a first vector and a second participant holds a second vector; the method includes: arranging the first vector to obtain a first complex vector; the real and imaginary parts of the elements of the first complex vector both come from the first vector; encrypting the first complex vector by an encryption algorithm in a CKKS encryption system to obtain a first ciphertext, and sending the first ciphertext to the second participant so that the second participant obtains a first slice of the product complex vector and a ciphertext of a second slice; obtaining the ciphertext of the second slice of the product complex vector from the second participant; decrypting the ciphertext of the second slice of the product complex vector by a decryption algorithm in the CKKS algorithm system to obtain a second slice of the product complex vector; obtaining a second slice of the product vector based on the second slice of the product complex vector, and the product vector is equal to the result of the bitwise multiplication of the first vector and the second vector.

[0008] Another aspect of the embodiments of the present specification provides another multi-party secure vector bitwise multiplication calculation system, the system is set at a first participant, the first participant holds a first vector, and the second participant holds a second vector; the system includes: a first complex vector acquisition module, used to arrange the first vector to obtain a first complex vector; the real part and the imaginary part of the elements of the first complex vector are both from the first vector; a first ciphertext generation module, used to encrypt the first complex vector by an encryption algorithm in the CKKS encryption system to obtain a first ciphertext, and send the first ciphertext to the second participant so that The second participant obtains the first slice of the product complex vector and the ciphertext of the second slice; the product complex vector slice ciphertext acquisition module is used to obtain the ciphertext of the second slice of the product complex vector from the second participant; the product complex vector second slice acquisition module is used to decrypt the ciphertext of the second slice of the product complex vector through the decryption algorithm in the CKKS algorithm system to obtain the second slice of the product complex vector; the product vector second slice acquisition module is used to obtain the second slice of the product vector based on the second slice of the product complex vector, and the product vector is equal to the result of bitwise multiplication of the first vector and the second vector.

[0009] Another aspect of an embodiment of the present specification provides a multi-party security vector bitwise multiplication calculation device, including at least one storage medium and at least one processor, the at least one storage medium is used to store computer instructions; the at least one processor is used to execute the computer instructions to implement another multi-party security vector bitwise multiplication calculation method provided in an embodiment of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] This specification will be further described in the form of exemplary embodiments, which will be described in detail by the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0011] Figure 1 is an exemplary interactive flow chart of a method for calculating a bitwise multiplication of a multi-party security vector according to some embodiments of this specification;

[0012] Figure 2 is an exemplary interactive schematic diagram of a method for calculating a bitwise multiplication of a multi-party security vector according to other embodiments of this specification;

[0013] Figure 3 is an exemplary schematic diagram of sum and difference vector generation according to some embodiments of this specification;

[0014] Figure 4 is an exemplary schematic diagram of generating a first complex vector according to some embodiments of this specification;

[0015] Figure 5 is an exemplary module diagram of a bitwise multiplication calculation system of a multi-party security vector according to some embodiments of this specification;

[0016] Figure 6 is an exemplary module diagram of a bitwise multiplication calculation system of multiple security vectors according to other embodiments of the present specification. DETAILED DESCRIPTION

[0017] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of this specification. For ordinary technicians in this field, this specification can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0018] It should be understood that the "system", "device", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0019] As shown in this specification and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "comprise" and "include" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0020] Flowcharts are used in this specification to illustrate the operations performed by the system according to the embodiments of this specification. It should be understood that the preceding or following operations are not necessarily performed precisely in order. Instead, the steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.

[0021] In various data processing tasks, such as modeling, statistical analysis and other tasks, we often encounter scenarios where batch data is multiplied. This type of calculation can also be equivalent to the bitwise multiplication of vectors and vectors, where bitwise multiplication refers to the multiplication of numbers in corresponding positions. For example, in logistic regression prediction, it is necessary to perform bitwise multiplication of multiple features (multiple features can be arranged as a vector) and multiple coefficients (multiple coefficients can be arranged as a vector) to achieve logistic regression prediction. For another example, in the scenario of predicting a neural network model, it is necessary to perform bitwise multiplication of the output of the previous layer of neurons and the weights of the current layer of neurons. It should be noted that the vectors mentioned in this specification can be equivalent to data arranged in a certain order such as series, sequences, matrices, arrays, and arrays.

[0022] In some scenarios, due to reasons such as data privacy and data isolation, the data that needs to be calculated (for example, two vectors that need to be bitwise multiplied) are stored in different participants, and it is necessary to implement a joint computing task based on the data of each party without exposing the privacy of each party's data. Tools used in cryptography to solve multi-party secure computing can be used to implement such tasks. Therefore, some embodiments in this specification provide a multi-party secure vector bitwise multiplication calculation method for calculating the result of multiplying a first vector and a second vector while protecting the privacy of each participant, and saving the result in the form of a sum shard to each participant. Among them, the first vector and the second vector can be real vectors. And, the sum shard means that the sum of the shards is plaintext data that needs privacy protection.

[0023] In some embodiments, the secure calculation in the multi-party secure vector bitwise multiplication calculation method proposed in this specification is implemented based on the CKKS algorithm system. The CKKS algorithm is an approximate computing homomorphic encryption algorithm, which encodes the complex vector in the plaintext space into an integer coefficient polynomial, and encrypts the integer coefficient polynomial into a ciphertext. After the ciphertext is added and multiplied to obtain the ciphertext result, the ciphertext result can be decrypted into an integer coefficient polynomial, and the integer coefficient polynomial is decoded into a complex vector result in the plaintext space. The complex vector result obtained is approximately equal to the result of the corresponding addition and multiplication of the complex vector in the plaintext space (hereinafter collectively referred to as equal). The CKKS algorithm allows result errors, relaxes the accuracy restrictions, simplifies the details of the CKKS algorithm, and has a higher computational efficiency. It should be noted that when performing operations on numbers in actual engineering applications, only a part of the effective digits of the calculation result can be retained, so the approximate result of the operation obtained based on the CKKS algorithm can be ignored for actual engineering applications.

[0024] The CKKS algorithm system may include an encryption algorithm based on the CKKS algorithm, a decryption algorithm based on the CKKS algorithm, a plaintext encryption algorithm based on the CKKS algorithm, a plaintext multiplication ciphertext algorithm based on the CKKS algorithm (for example, a plaintext vector multiplication ciphertext vector algorithm based on the CKKS algorithm), a ciphertext complex conjugate algorithm based on the CKKS algorithm, and the like.

[0025] The encryption algorithm based on the CKKS algorithm may include encoding a complex vector in a plaintext space into an integer coefficient polynomial, and encrypting the integer coefficient polynomial into a ciphertext. In some embodiments, the encryption algorithm based on the CKKS algorithm may be used as a function whose input data includes a complex vector in a plaintext space and whose output data is the corresponding ciphertext.

[0026] The decryption algorithm based on the CKKS algorithm may include decrypting the ciphertext into an integer coefficient polynomial, and decoding the integer coefficient polynomial into a complex vector in a plaintext space. In some embodiments, the decryption algorithm based on the CKKS algorithm may be used as a function whose input data includes the ciphertext and whose output data is a corresponding complex vector in a plaintext space.

[0027] The plaintext encryption algorithm based on the CKKS algorithm can implement the addition operation on the plaintext d and the ciphertext e to obtain the ciphertext result P(e,d), and the result of the addition operation ciphertext result P(e,d) is decrypted by the decryption algorithm based on the CKKS algorithm and is equal to the result (f+d) obtained by adding the plaintext d and the plaintext f corresponding to the ciphertext e (where d, e and f can be single values ​​or vectors respectively, and when both the plaintext d and the plaintext f are vectors, f+d is the result of bitwise addition of d and f). In some embodiments, the plaintext encryption algorithm based on the CKKS algorithm can be used as a function, whose input data includes the plaintext d and the ciphertext e, and whose output data is the ciphertext result P(e,d) obtained by adding the plaintext d and the ciphertext e.

[0028] The plaintext multiplication ciphertext algorithm based on the CKKS algorithm can realize the multiplication operation of plaintext g and ciphertext e to obtain the ciphertext result T(g,e), and the result of the multiplication operation ciphertext result T(g,e) after decryption by the decryption algorithm based on the CKKS algorithm is equal to the result gf (wherein, g, e and f can be single values ​​or vectors respectively, and when both plaintext g and plaintext f are vectors, gf is the result of bitwise multiplication of g and f) obtained by multiplying the plaintext g and the ciphertext e. In some embodiments, the plaintext multiplication ciphertext algorithm based on the CKKS algorithm can be used as a function, whose input data includes plaintext g and ciphertext e, and whose output data is the ciphertext result T(g,e) obtained by multiplying the plaintext g and the ciphertext e.

[0029] The ciphertext complex conjugate algorithm based on the CKKS algorithm can operate on the ciphertext e to obtain the ciphertext result Cj(e), and the result of decryption of the ciphertext result Cj(e) by the decryption algorithm based on the CKKS algorithm is equal to the conjugate of the plaintext f corresponding to the ciphertext e. In some embodiments, the ciphertext complex conjugate algorithm based on the CKKS algorithm can be used as a function, whose input data includes the ciphertext e, and whose output data is the ciphertext result Cj(e) obtained by operating the ciphertext e.

[0030] It should be noted that the method provided in this specification is applicable to any scenario that requires multi-party secure calculation of vectors and vector bitwise multiplication. And the "first shard" and "second shard" mentioned in this specification are only used to distinguish shards stored in different participants, and do not restrict shard data. The technical solution disclosed in the embodiments of this specification is described in detail below through the explanation of the accompanying drawings.

[0031] Figure 1 It is an exemplary interactive flow chart of a method for calculating a bitwise multiplication of a multi-party security vector according to some embodiments of this specification.

[0032] In some embodiments, the illustrated interactive process 100 can be executed collaboratively by the processing devices of the two parties participating in the secure computation. For example, the part of the interactive process executed by the first party can be stored in the storage device of the first party (such as the built-in storage unit of the processing device or an external storage device) in the form of a program or instruction, and the part of the interactive process executed by the second party can be stored in the storage device of the second party in the form of a program or instruction. When the program or instruction is executed, the bitwise multiplication calculation process of the multi-party security vector can be implemented.

[0033] The first party may hold a first vector x, and the second party may hold a second vector m.

[0034] In some embodiments, the first participant may regard the first vector x as a complex vector of the same dimension (for example, an n-dimensional complex vector whose real part of the element comes from the n-dimensional first vector x and whose imaginary part is 0), thereby encrypting the vector x based on the encryption algorithm in the CKKS algorithm system to obtain a first ciphertext c. The first participant may send the first ciphertext to the second participant.

[0035] In some embodiments, the second party can calculate the second vector m multiplied by the first ciphertext c based on the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the ciphertext result T(m,c), which can be called the ciphertext product complex vector.

[0036] In some embodiments, the second party may obtain the ciphertext of the first slice of the product complex vector and the second slice of the product complex vector, and the second party may send the ciphertext of the second slice of the product complex vector to the first party. In some embodiments, the second party may generate a random complex vector such as -u0 (the imaginary part of each element of the complex vector -u0 is still 0, which is actually a real vector), and calculate the encrypted text of the random complex vector -u0 multiplied by the product complex vector T(m,c) through the plaintext encryption algorithm in the CKKS algorithm system, and obtain the ciphertext v=P(T(m,c)-u0) of the second slice of the product complex vector, and use the opposite number u0 of the random complex vector -u0 as the first slice of the product complex vector. The elements in the opposite number u0 of the random complex vector are the opposite numbers of the corresponding elements in the random complex vector -u0.

[0037] The first participant can decrypt the ciphertext v of the second slice of the product complex vector by using a decryption algorithm based on the CKKS algorithm system to obtain the second slice of the product complex vector.

[0038] The sum of the second slice of the product complex vector of the first participant and the first slice of the product complex vector of the second participant is equal to the result mx of the bitwise multiplication of the first vector x and the second vector m.

[0039] Figure 2It is another exemplary interactive flow chart of the bitwise multiplication calculation method of multi-party security vectors shown in some embodiments of this specification.

[0040] In some embodiments, the illustrated interactive process can be executed collaboratively by the processing devices of the two parties participating in the secure computation. For example, the part of the interactive process executed by the first party can be stored in the storage device of the first party (such as the built-in storage unit of the processing device or an external storage device) in the form of a program or instruction, and the part of the interactive process executed by the second party (such as the steps in process 200) can be stored in the storage device of the second party in the form of a program or instruction. When the program or instruction is executed, the bitwise multiplication calculation process of the multi-party security vector can be implemented.

[0041] In some embodiments, process 200 may be executed by any party participating in the multi-party secure computation. In the embodiments of this specification, the second party is mainly used as an example for description. The first party may hold a first vector x, and the second party may hold a second vector m.

[0042] Step 202: Obtain from the first participant a first ciphertext obtained by encrypting the first complex vector using an encryption algorithm in the CKKS algorithm system; the first complex vector is obtained by the first participant by arranging the first vector, and the real part and the imaginary part of the elements of the first complex vector come from the first vector.

[0043] In some embodiments, step 202 may be performed by the first ciphertext acquisition module 510 .

[0044] The first participant may arrange the 2n-dimensional first vector x to obtain an n-dimensional first complex vector, wherein the real part and the imaginary part of the first complex vector both come from the first vector. In some embodiments, the first vector x may be a 2n-dimensional real vector. Specifically, the 2n-dimensional first vector x may be arranged by grouping the elements in the first vector with two adjacent elements in the first vector as a group, each group corresponding to an element in the first complex vector, and using the two elements in each group as the real part and the imaginary part of the corresponding element in the first complex vector. Figure 3 As shown in , two adjacent elements x in the first vector x n and n For the nth group, x n As the nth element x in the first complex vector n +y n The real part of i, y n As the nth element x in the first complex vector n +y nThe imaginary part of i. Based on the teachings of the above examples, it can be understood that the embodiments of this specification do not limit the arrangement of real vectors, and any arrangement that can convert real vectors into complex vectors in a regular manner can achieve the technical purpose of this step. The rules here can be simple and intuitive, or complex and obscure, as long as the above arrangement can be restored (that is, the complex vector can be restored to a real vector). For example, the elements of the first complex vector can also be x n -y n i, the x in the first vector x n As the nth element x in the first complex vector n -y n The real part of i, y n As the nth element x in the first complex vector n -y n The imaginary part of i.

[0045] In some embodiments, the first party may encrypt the first complex vector using an encryption algorithm in the CKKS encryption system to obtain a first ciphertext c, and send the first ciphertext c to the second party.

[0046] Step 204: Generate a sum vector and a difference vector based on the second vector; wherein the elements of the sum vector reflect the sum of two elements in the second vector, and the elements of the difference vector reflect the difference between two elements in the second vector.

[0047] In some embodiments, step 204 may be performed by the sum and difference vector generation module 520 .

[0048] In some embodiments, the second vector may be a 2n-dimensional real vector. The second participant may generate an n-dimensional sum vector Z and an n-dimensional difference vector W based on the 2n-dimensional second vector m, wherein the elements of the sum vector Z may reflect the sum of the corresponding two elements in the second vector m, and the elements of the difference vector W may reflect the difference of the corresponding two elements in the second vector m.

[0049] In some embodiments, specifically, two adjacent elements in the second vector may be grouped together, and the elements in the second vector may be grouped, each group corresponding to an element in the sum vector and the difference vector, and half of the sum of the two elements in each group is used as the corresponding element in the sum vector, and half of the difference between the two elements in each group is used as the corresponding element in the difference vector. Figure 4 As shown in n and b n For the nth group, As the nth element in the sum vector Z, As the nth element in the difference vector W.

[0050] Step 206, processing the first ciphertext by using the ciphertext complex conjugate algorithm in the CKKS algorithm system to obtain a first complex conjugate ciphertext.

[0051] In some embodiments, step 206 may be performed by the first complex conjugate ciphertext acquisition module 530 .

[0052] In some embodiments, the second party may process the first ciphertext c by using the ciphertext complex conjugate algorithm in the CKKS algorithm system to obtain a first complex conjugate ciphertext Cj(c).

[0053] Step 208, using the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system, calculate the sum vector multiplied by the first ciphertext to obtain the first part of the ciphertext product complex vector.

[0054] In some embodiments, step 208 may be performed by the ciphertext product complex vector acquisition module 540 .

[0055] In some embodiments, when the element in the first complex vector is x n +y n When i, the second participant can calculate the sum vector Z multiplied by the first ciphertext c through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the first part T(Z,c) of the ciphertext product complex vector q.

[0056] Step 210, using the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system, calculate the difference vector multiplied by the first complex conjugate ciphertext to obtain the second part of the ciphertext product complex vector.

[0057] In some embodiments, step 210 may be performed by the ciphertext product complex vector acquisition module 540 .

[0058] In some embodiments, when the element in the first complex vector is x n +y n When i, the second participant can use the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to calculate the difference vector W multiplied by the first complex conjugate ciphertext Cj(c) to obtain the second part T(W,Cj(c)) of the ciphertext product complex vector q.

[0059] The sum of the first part of the ciphertext product complex vector and the second part of the ciphertext product complex vector is equal to the ciphertext product complex vector.

[0060] Step 212: Obtain a first slice of the product complex vector and a ciphertext of a second slice based on the ciphertext product complex vector, and send the ciphertext of the second slice to the first participant.

[0061] In some embodiments, step 212 may be performed by the product complex vector slice acquisition module 550 .

[0062] In some embodiments, the second party may obtain the ciphertext of the first slice of the product complex vector and the second slice of the product complex vector, and the second party may send the ciphertext of the second slice of the product complex vector to the first party.

[0063] In some embodiments, the second party may generate a random complex vector, such as -u0, and calculate the random complex vector -u0 encrypted text multiplied by the product complex vector q through the plaintext encrypted text algorithm in the CKKS algorithm system, obtain the ciphertext v=P(q-u0) of the second slice of the product complex vector, and use the opposite number u0 of the random complex vector -u0 as the first slice of the product complex vector. Wherein, the real part and the imaginary part of the random complex vector -u0 are not 0.

[0064] Step 214: Obtain a first slice of the product vector based on the first slice of the product complex vector.

[0065] In some embodiments, step 214 may be performed by the product vector first slice acquisition module 560 .

[0066] In some embodiments, the second party may obtain the first slice (which is a real vector) of the product vector by arranging the real and imaginary parts of the elements of the first slice of the product complex vector. In some embodiments, specifically, the second party may use the real and imaginary parts of each element of the first slice of the product complex vector as two elements of the first slice of the product vector. For example, the first slice of the product complex vector is Then we can get the first slice of the product vector as:

[0067] In some embodiments, the first party may decrypt the ciphertext of the second slice of the product complex vector by using a decryption algorithm in the CKKS algorithm system to obtain the second slice of the product complex vector.

[0068] In some embodiments, the first party may obtain the second slice (which is a real vector) of the product vector by arranging the real part and the imaginary part of the elements of the second slice of the product complex vector. In some embodiments, specifically, the first party may use the real part and the imaginary part of each element of the second slice of the product complex vector as two elements of the second slice of the product vector. For example, the second slice of the product complex vector is Then we can get the second slice of the product vector as:

[0069] The sum of the first slice and the second slice of the product vector is equal to the product vector. In addition, the product vector is equal to the result of the bitwise multiplication of the first vector x and the second vector m.

[0070] For ease of understanding, the product vector is derived below to verify that the product vector is equal to the result of bitwise multiplication of the first vector x and the second vector m.

[0071] Let: the first complex vector of the first vector x be x` and the element in the first complex vector be x n +y n i, the first ciphertext of the first complex vector x` is c, the sum vector corresponding to the second vector m is a`, the difference vector corresponding to the second vector m is b`, the ciphertext product complex vector q = T(Z,c) + T(W,Cj(c)), the random complex vector is -u0, the ciphertext of the second slice of the product complex vector v = P(q-u0) = P(T(Z,c) + T(W,Cj(c)-u0), the opposite number u0 of the random complex vector -u0 is the first slice of the product complex vector, and the decryption algorithm in the CKKS algorithm system is D(). Based on the CKKS algorithm system It is the property of each algorithm. By decrypting the ciphertext v of the second slice of the product complex vector through the decryption algorithm in the CKKS algorithm system, we have: u1=D(v)=D(P(T(Z,c)+T(W,Cj(c))-u0))=D(T(Z,c))+D(T(W,Cj(c)))-u0=Z·D(c)+W·D(Cj(c))-u0, and then we can get the second slice of the product vector u1=Z·x`+W·Cj(x`)-u0, then we can conclude that u1+u0=Z·x`+W·Cj(x`).

[0072] For two real vectors That is, the first vector x and That is, the second vector m, if Then the following relationship exists: Therefore, according to u1+u0=Z·x`+W·Cj(x`), it can be concluded that u1+u0=mx, that is, u1+u0 (that is, the product vector) is equal to the result of the bitwise multiplication of the first vector x and the second vector m.

[0073] In some embodiments of the present specification, through collaborative operations between the first party and the second party, when the first vector x and the second vector m are both private data that cannot be disclosed and exist between the two parties, the first party and the second party respectively obtain the second slice and the first slice of the result of the bitwise multiplication of the first vector x and the second vector m, thereby effectively protecting the data privacy security of each party in the process of calculating the bitwise multiplication of the vectors.

[0074] In addition, through this manual Figure 1 The multi-party security vector is calculated by bitwise multiplication by the method shown in this specification. Figure 2 The multi-party security vector implemented by the method shown is compared with the bitwise multiplication calculation: Figure 1In the method, both the n-dimensional first vector and the second vector are treated as n-dimensional complex vectors to realize bitwise multiplication calculation of the multi-party security vector, wherein only some element positions (i.e., real parts) in the n-dimensional complex vector are used to store n elements of the n-dimensional real vector, and other element positions are idle; Figure 2 In the method, the 2n-dimensional first vector is arranged into an n-dimensional first complex vector, and the 2n-dimensional second vector is generated into an n-dimensional sum vector and an n-dimensional difference vector, and then the n-dimensional first complex vector, the n-dimensional sum vector and the n-dimensional difference vector are processed to realize the multi-party security vector bitwise multiplication calculation, wherein all elements of each generated n-dimensional complex vector are utilized and can be used to store the 2n elements corresponding to the 2n-dimensional real vector. However Figure 1 and Figure 2 The amount of communication generated by the two algorithms is the same, since Figure 2 The algorithm shown can handle more real numbers (such as Figure 1 The algorithm handles twice as many real numbers), so Figure 2 The transmission efficiency of the multi-party security vector bitwise multiplication calculation method shown is better than Figure 1 The bitwise multiplication calculation method of the multi-party security vector shown has high transmission efficiency and can be at least twice as high.

[0075] It should be noted that the above descriptions of the various processes are only for illustration and explanation, and do not limit the scope of application of this specification. For those skilled in the art, various modifications and changes can be made to the processes under the guidance of this specification. However, these modifications and changes are still within the scope of this specification. For example, changes to the process steps of this specification, such as adding preprocessing steps and storage steps, etc. For example, when the elements in the first complex vector are arranged as x n -y n i, step 208 can be replaced by the second party calculating the sum vector Z multiplied by the first ciphertext c's first complex conjugate ciphertext Cj(c) through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system, and obtaining the first part T(Z,Cj(c)) of the ciphertext product complex vector q. Correspondingly, step 210 can be replaced by the second party calculating the difference vector Z multiplied by the first ciphertext c through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system, and obtaining the second part T(W,c) of the ciphertext product complex vector q. Such a change can be regarded as a duality in technical means due to the conjugate relationship, and should be regarded as the present specification. Figure 2 Equivalent means to the process shown.

[0076] Figure 5 It is an exemplary module diagram of a bitwise multiplication calculation system of multi-party security vectors according to some embodiments of this specification.

[0077] System 500 may be provided at a second party. Figure 5As shown, the system 500 may include a first ciphertext acquisition module 510, a sum and difference vector generation module 520, a first complex conjugate ciphertext acquisition module 530, a ciphertext product complex vector acquisition module 540, a product complex vector slice acquisition module 550, and a product vector first slice acquisition module 560.

[0078] In some embodiments, the first ciphertext acquisition module 510 can be used to obtain from the first participant a first ciphertext obtained by encrypting a first complex vector using an encryption algorithm in the CKKS algorithm system; the first complex vector is obtained by the first participant by arranging the first vector, and the real part and imaginary part of the elements of the first complex vector come from the first vector.

[0079] In some embodiments, the sum and difference vector generation module 520 can be used to generate a sum vector and a difference vector based on the second vector; wherein the elements of the sum vector reflect the sum of the corresponding two elements in the second vector, and the elements of the difference vector reflect the difference of the corresponding two elements in the second vector.

[0080] In some embodiments, the first complex conjugate ciphertext acquisition module 530 may be configured to process the first ciphertext using a ciphertext complex conjugate algorithm in a CKKS algorithm system to obtain a first complex conjugate ciphertext.

[0081] In some embodiments, the ciphertext product complex vector acquisition module 540 can be used to calculate the sum vector multiplied by the first ciphertext through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the first part of the ciphertext product complex vector. In some embodiments, the ciphertext product complex vector acquisition module 540 can also be used to calculate the difference vector multiplied by the first complex conjugate ciphertext through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the second part of the ciphertext product complex vector.

[0082] In some embodiments, the product complex vector slice acquisition module 550 can be used to obtain a first slice of the product complex vector and a ciphertext of a second slice based on the ciphertext product complex vector, and send the ciphertext of the second slice to the first participant; the ciphertext product complex vector is equal to the sum of the first part and the second part.

[0083] In some embodiments, the product vector first slice acquisition module 560 may be configured to obtain a first slice of a product vector based on a first slice of the product complex vector, wherein the product vector is equal to a result of bitwise multiplication of the first vector and the second vector.

[0084] For a detailed description of each module of the system shown above, please refer to the flowchart section of this specification, for example, Figures 2 to 4 Related instructions.

[0085] Figure 6It is an exemplary module diagram of a bitwise multiplication calculation system of multi-party security vectors according to other embodiments of this specification.

[0086] System 600 may be provided at a first party. Figure 6 As shown, the system 600 may include a first complex vector acquisition module 610, a first ciphertext generation module 620, a product complex vector slice ciphertext acquisition module 630, a product complex vector second slice acquisition module 640, and a product vector second slice acquisition module 650.

[0087] In some embodiments, the first complex vector acquisition module 610 may be used to arrange the first vector to obtain a first complex vector; the real part and the imaginary part of the elements of the first complex vector both come from the first vector.

[0088] In some embodiments, the first ciphertext generation module 620 can be used to encrypt the first complex vector through the encryption algorithm in the CKKS encryption system to obtain a first ciphertext, and send the first ciphertext to the second participant so that the second participant obtains the first fragment of the product complex vector and the ciphertext of the second fragment.

[0089] In some embodiments, the product complex vector slice ciphertext acquisition module 630 may be configured to acquire the ciphertext of the second slice of the product complex vector from the second participant.

[0090] In some embodiments, the product complex vector second slice acquisition module 640 can be used to decrypt the ciphertext of the second slice of the product complex vector by using a decryption algorithm in the CKKS algorithm system to obtain the second slice of the product complex vector.

[0091] In some embodiments, the product vector second slice acquisition module 650 may be configured to obtain a second slice of a product vector based on a second slice of the product complex vector, the product vector being equal to a result of bitwise multiplication of the first vector and the second vector.

[0092] For a detailed description of each module of the system shown above, please refer to the flowchart section of this specification, for example, Figures 2 to 4 Related instructions.

[0093] It should be understood that Figure 5 and Figure 6The system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or a dedicated design hardware. Those skilled in the art will understand that the above methods and systems can be implemented using computer executable instructions and / or included in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the system and its modules of this specification. Not only can the hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc. be implemented, it can also be implemented with software such as executed by various types of processors, and it can also be implemented by a combination of the above hardware circuits and software (for example, firmware).

[0094] It should be noted that the above description of the sorting system based on secret sharing and its modules is only for the convenience of description and does not limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the various modules, or form a subsystem to connect with other modules without deviating from this principle. For example, in some embodiments, it can be different modules in a system, or it can be a module that implements the functions of two or more modules mentioned above. For example, each module can share a storage module, or each module can have its own storage module. Such variations are all within the scope of protection of this specification.

[0095] The embodiment of this specification also provides a multi-party secure vector bitwise multiplication calculation device, including at least one storage medium and at least one processor, wherein the at least one storage medium is used to store computer instructions; the at least one processor is used to execute the computer instructions to implement a multi-party secure vector bitwise multiplication calculation method. The method can be applied to a second participant, wherein the second participant holds a second vector, and the first participant holds a first vector; the method includes: obtaining from the first participant a first ciphertext obtained by encrypting a first complex vector using an encryption algorithm in the CKKS algorithm system; the first complex vector is obtained by the first participant arranging the first vector, and the real part and imaginary part of the elements of the first complex vector come from the first vector; based on the second vector, a sum vector and a difference vector are generated; wherein the elements of the sum vector reflect the sum of the corresponding two elements in the second vector, and the elements of the difference vector reflect the difference of the corresponding two elements in the second vector; the first ciphertext is processed by the ciphertext complex conjugate algorithm in the CKKS algorithm system to obtain the first complex conjugate. conjugate ciphertext; by using the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system, calculate the sum vector multiplied by the first ciphertext to obtain the first part of the ciphertext product complex vector; by using the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system, calculate the difference vector multiplied by the first complex conjugate ciphertext to obtain the second part of the ciphertext product complex vector; based on the ciphertext product complex vector, obtain a first slice of the product complex vector and a ciphertext of the second slice, and send the ciphertext of the second slice to the first participant; the ciphertext product complex vector is equal to the sum of the first part and the second part; based on the first slice of the product complex vector, obtain a first slice of the product vector, and the product vector is equal to the result of bitwise multiplication of the first vector and the second vector.

[0096] The embodiment of the present specification also provides another multi-party secure vector bitwise multiplication calculation device, including at least one storage medium and at least one processor, wherein the at least one storage medium is used to store computer instructions; the at least one processor is used to execute the computer instructions to implement a multi-party secure vector bitwise multiplication calculation method. The method can be applied to a first participant, wherein the first participant holds a first vector and the second participant holds a second vector; the method comprises: arranging the first vector to obtain a first complex vector; the real part and the imaginary part of the elements of the first complex vector are both from the first vector; encrypting the first complex vector by an encryption algorithm in the CKKS encryption system to obtain a first ciphertext, and sending the first ciphertext to the second participant so that the second participant obtains a first slice of the product complex vector and a ciphertext of a second slice; obtaining the ciphertext of the second slice of the product complex vector from the second participant; decrypting the ciphertext of the second slice of the product complex vector by a decryption algorithm in the CKKS algorithm system to obtain a second slice of the product complex vector; obtaining a second slice of the product vector based on the second slice of the product complex vector, wherein the product vector is equal to the result of the bitwise multiplication of the first vector and the second vector.

[0097] The beneficial effects that may be brought about by the embodiments of this specification include but are not limited to: through the collaborative operation of the first participant and the second participant, when the first vector x and the second vector m are both private data that cannot be disclosed and exist in both parties, the first participant and the second participant respectively obtain the second slice and the first slice of the result of the bitwise multiplication of the first vector x and the second vector m, and effectively protect the data privacy security of each participant in the process of calculating the bitwise multiplication of the vectors. It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may be produced may be any one or a combination of the above, or any other possible beneficial effects.

[0098] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are suggested in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.

[0099] At the same time, this specification uses specific words to describe the embodiments of this specification. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of this specification. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of this specification can be appropriately combined.

[0100] In addition, it will be understood by those skilled in the art that various aspects of this specification may be illustrated and described by a number of patentable categories or situations, including any new and useful process, machine, product or combination of substances, or any new and useful improvements thereto. Accordingly, various aspects of this specification may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". In addition, various aspects of this specification may be represented as a computer product located in one or more computer-readable media, which includes computer-readable program code.

[0101] A computer storage medium may include a propagated data signal containing computer program code, for example, in baseband or as part of a carrier wave. The propagated signal may be in a variety of forms, including electromagnetic, optical, etc., or a suitable combination. A computer storage medium may be any computer-readable medium other than a computer-readable storage medium, which can be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit the program for use. The program code on the computer storage medium may be transmitted via any suitable medium, including radio, cable, fiber optic cable, RF, or similar media, or any combination of the above media.

[0102] The computer program code required for the operation of each part of this specification can be written in any one or more programming languages, including object-oriented programming languages ​​such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python, etc., conventional procedural programming languages ​​such as C language, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP, dynamic programming languages ​​such as Python, Ruby and Groovy, or other programming languages. The program code can be run entirely on the user's computer, or run on the user's computer as an independent software package, or run partially on the user's computer and partially on a remote computer, or run entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any network form, such as a local area network (LAN) or a wide area network (WAN), or connected to an external computer (e.g., via the Internet), or in a cloud computing environment, or used as a service such as software as a service (SaaS).

[0103] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences described in this specification, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this specification. Although the above disclosure discusses some invention embodiments that are currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this specification. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.

[0104] Similarly, it should be noted that in order to simplify the description disclosed in this specification and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this specification, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the subject matter of this specification are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.

[0105] In some embodiments, numbers describing the number of components and attributes are used. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximately" or "substantially" in some examples. Unless otherwise specified, "about", "approximately" or "substantially" indicate that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may change according to the required features of individual embodiments. In some embodiments, the numerical parameters should take into account the specified significant digits and adopt the general method of retaining digits. Although the numerical domains and parameters used to confirm the breadth of their range in some embodiments of this specification are approximate values, in specific embodiments, the setting of such numerical values ​​is as accurate as possible within the feasible range.

[0106] Each patent, patent application, patent application publication, and other materials, such as articles, books, specifications, publications, documents, etc., cited in this specification are hereby incorporated by reference in their entirety. Except for application history documents that are inconsistent with or conflicting with the contents of this specification, documents that limit the broadest scope of the claims of this specification (currently or later attached to this specification) are also excluded. It should be noted that if the descriptions, definitions, and / or use of terms in the materials attached to this specification are inconsistent or conflicting with the contents described in this specification, the descriptions, definitions, and / or use of terms in this specification shall prevail.

[0107] Finally, it should be understood that the embodiments described in this specification are only used to illustrate the principles of the embodiments of this specification. Other variations may also fall within the scope of this specification. Therefore, as an example and not a limitation, alternative configurations of the embodiments of this specification may be considered consistent with the teachings of this specification. Accordingly, the embodiments of this specification are not limited to the embodiments explicitly introduced and described in this specification.

Claims

1. A method for calculating a multi-party security vector by bitwise multiplication, applied to a second participant, wherein the second participant holds a second vector and the first participant holds a first vector; the method comprises: Obtaining from the first participant a first ciphertext obtained by encrypting the first complex vector using an encryption algorithm in the CKKS algorithm system; The first complex vector is obtained by the first participant arranging the first vector, and real parts and imaginary parts of elements of the first complex vector come from the first vector; Based on the second vector, generate a sum vector and a difference vector; wherein the elements of the sum vector reflect the sum of the corresponding two elements in the second vector, and the elements of the difference vector reflect the difference of the corresponding two elements in the second vector; Processing the first ciphertext by using the ciphertext complex conjugate algorithm in the CKKS algorithm system to obtain a first complex conjugate ciphertext; The sum vector multiplied by the first ciphertext is calculated by the plaintext vector multiplication algorithm in the CKKS algorithm system to obtain the first part of the ciphertext product complex vector; the difference vector multiplied by the first complex conjugate ciphertext is calculated by the plaintext vector multiplication algorithm in the CKKS algorithm system to obtain the second part of the ciphertext product complex vector; Based on the ciphertext product complex vector, a first slice of the product complex vector and a ciphertext of a second slice are obtained, and the ciphertext of the second slice is sent to the first participant; the ciphertext product complex vector is equal to the sum of the first part and the second part; Obtaining a first slice of a product vector based on the first slice of the product complex vector, comprising: using a real part and an imaginary part of each element of the first slice of the product complex vector as two elements of the first slice of the product vector, respectively; the product vector is equal to a result of bitwise multiplication of the first vector and the second vector; The step of obtaining the first slice of the product complex vector and the ciphertext of the second slice based on the ciphertext product complex vector includes: Generate random complex vectors; Calculate the random complex vector plus the ciphertext product complex vector by using the plaintext encryption algorithm in the CKKS algorithm system to obtain the ciphertext of the second slice of the product complex vector; The opposite number of the random complex vector is used as the first slice of the product complex vector; the elements in the opposite number of the random complex vector are the opposite numbers of the corresponding elements in the random complex vector.

2. The method according to claim 1, wherein the first participant arranges the first vector, comprising: Grouping the elements in the first vector into groups of two adjacent elements; Each element in the first complex vector is generated based on two elements in each group, respectively, wherein the two elements in one group serve as the real part and the imaginary part of the corresponding element in the first complex vector.

3. The method according to claim 2, wherein generating a sum vector and a difference vector based on the second vector comprises: Grouping the elements in the second vector into groups of two adjacent elements; Each element in the sum vector and each element in the difference vector are generated based on the two elements in each group, respectively, wherein the element in the sum vector reflects the sum value of the two elements in the corresponding group, and the element in the difference vector reflects the difference value of the two elements in the corresponding group.

4. According to the method of claim 3, the elements in the sum vector are equal to half of the sum of the two elements in the corresponding group, and the elements in the difference vector are equal to half of the difference between the two elements in the corresponding group.

5. The method according to claim 1, wherein obtaining a first slice of a product vector based on the first slice of the product complex vector comprises: The real parts and imaginary parts of the elements in the first slice of the product complex vector are used as the elements of the first slice of the product vector.

6. A multi-party security vector bitwise multiplication calculation system, arranged at a second participant, the second participant holds a second vector, and the first participant holds a first vector; the system comprises: A first ciphertext acquisition module, used to obtain, from the first participant, a first ciphertext obtained by encrypting the first complex vector using an encryption algorithm in the CKKS algorithm system; The first complex vector is obtained by the first participant arranging the first vector, and real parts and imaginary parts of elements of the first complex vector come from the first vector; A sum and difference vector generating module, used for generating a sum vector and a difference vector based on the second vector; wherein the elements of the sum vector reflect the sum of the corresponding two elements in the second vector, and the elements of the difference vector reflect the difference of the corresponding two elements in the second vector; A first complex conjugate ciphertext acquisition module, used for processing the first ciphertext by using the ciphertext complex conjugate algorithm in the CKKS algorithm system to obtain the first complex conjugate ciphertext; A ciphertext product complex vector acquisition module is used to calculate the sum vector multiplied by the first ciphertext through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the first part of the ciphertext product complex vector; calculate the difference vector multiplied by the first complex conjugate ciphertext through the plaintext vector multiplication ciphertext vector algorithm in the CKKS algorithm system to obtain the second part of the ciphertext product complex vector; A product complex vector slice acquisition module is used to obtain a first slice of the product complex vector and a ciphertext of a second slice based on the ciphertext product complex vector, and send the ciphertext of the second slice to the first participant; the ciphertext product complex vector is equal to the sum of the first part and the second part; wherein, the obtaining of the first slice of the product complex vector and the ciphertext of the second slice based on the ciphertext product complex vector includes: generating a random complex vector; calculating the addition of the random complex vector to the ciphertext product complex vector by the plaintext encryption algorithm in the CKKS algorithm system to obtain the ciphertext of the second slice of the product complex vector; using the opposite of the random complex vector as the first slice of the product complex vector; the elements in the opposite of the random complex vector are the opposites of the corresponding elements in the random complex vector; A product vector first slice acquisition module is used to obtain the first slice of the product vector based on the first slice of the product complex vector, which includes: taking the real part and the imaginary part of each element of the first slice of the product complex vector as the two elements of the first slice of the product vector respectively; the product vector is equal to the result of the bitwise multiplication of the first vector and the second vector.

7. A multi-party security vector bitwise multiplication calculation device, comprising at least one storage medium and at least one processor, wherein the at least one storage medium is used to store computer instructions; and the at least one processor is used to execute the computer instructions to implement the method as described in any one of claims 1 to 5.

8. A method for calculating bitwise multiplication of multi-party security vectors, applied to a first participant, the first participant holds a first vector, and a second participant holds a second vector; the method comprises: Arrange the first vector to obtain a first complex vector; The real parts and the imaginary parts of the elements of the first complex vector are both from the first vector; Encrypting the first complex vector by an encryption algorithm in the CKKS encryption system to obtain a first ciphertext, and sending the first ciphertext to the second participant so that the second participant obtains a first slice of the product complex vector and a ciphertext of the second slice; Obtaining a ciphertext of a second slice of the product complex vector from the second participant; Decrypting the ciphertext of the second slice of the product complex vector by using a decryption algorithm in the CKKS algorithm system to obtain the second slice of the product complex vector; Obtaining a second slice of the product vector based on the second slice of the product complex vector comprises: using the real part and the imaginary part of each element of the second slice of the product complex vector as two elements of the second slice of the product vector respectively; The product vector is equal to a result of a bitwise multiplication of the first vector and the second vector.

9. The method according to claim 8, wherein the first vector is arranged to obtain a first complex vector, comprising: Grouping the elements in the first vector into groups of two adjacent elements; Each element in the first complex vector is generated based on two elements in each group, respectively, wherein the two elements in one group serve as the real part and the imaginary part of the corresponding element in the first complex vector.

10. The method according to claim 8, wherein obtaining a second slice of the product vector based on the second slice of the product complex vector comprises: The real parts and imaginary parts of the elements in the second slice of the product complex vector are used as the elements of the second slice of the product vector.

11. A multi-party security vector bitwise multiplication calculation system, arranged at a first participant, wherein the first participant holds a first vector, and a second participant holds a second vector; the system comprises: A first complex vector acquisition module, used for arranging the first vector to obtain a first complex vector; The real parts and the imaginary parts of the elements of the first complex vector are both from the first vector; A first ciphertext generation module, configured to encrypt the first complex vector by using an encryption algorithm in the CKKS encryption system to obtain a first ciphertext, and send the first ciphertext to the second participant, so that the second participant obtains a first slice of the product complex vector and a ciphertext of a second slice; A product complex vector slice ciphertext acquisition module, used to obtain the ciphertext of the second slice of the product complex vector from the second participant; A product complex vector second slice acquisition module, used for decrypting the ciphertext of the second slice of the product complex vector by using a decryption algorithm in the CKKS algorithm system to obtain the second slice of the product complex vector; A product vector second slice acquisition module, used for obtaining a second slice of the product vector based on the second slice of the product complex vector, comprising: taking the real part and the imaginary part of each element of the second slice of the product complex vector as two elements of the second slice of the product vector respectively; The product vector is equal to a result of a bitwise multiplication of the first vector and the second vector.

12. A multi-party security vector bitwise multiplication calculation device, comprising at least one storage medium and at least one processor, wherein the at least one storage medium is used to store computer instructions; and the at least one processor is used to execute the computer instructions to implement the method as described in any one of claims 8 to 10.

Citation Information

Patent Citations

  • Secure multi-party computing method, device and system and electronic equipment

    CN114844620A

  • Data processing method and device

    CN115174035A