Method, device, system, medium and electronic device for secure multi-party computing

By splitting the real number matrix into two plaintext matrices and applying the approximate computing homomorphic encryption algorithm, the problem of low data transmission efficiency in secure multi-party computation is solved and more efficient data transmission and computing capabilities are achieved.

CN114844620BActive Publication Date: 2024-09-27ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210196130.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-01
Publication Date
2024-09-27
Estimated Expiration
2042-03-01

AI Technical Summary

Technical Problem

Existing encryption methods lead to low data transmission efficiency during secure multi-party computation.

Method used

By splitting a 2n×2n real-number matrix into two n×n plaintext matrices and using an approximate computing homomorphic encryption algorithm for calculation, ciphertext operations on complex vectors are realized, thereby improving data transmission efficiency.

Benefits of technology

It effectively improves the data transmission efficiency between multi-party computing devices, makes full use of the algebraic integer space, and supports higher-dimensional matrix multiplication calculations than traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114844620B
    Figure CN114844620B
Patent Text Reader

Abstract

The embodiments of the present specification provide a method, apparatus, system, computer-readable storage medium and electronic device for secure multi-party computing. The method includes: a second computing device encodes a 2n-dimensional real vector x into an n-dimensional complex vector x' and further obtains a ciphertext c corresponding to x'; a first computing device converts a 2n×2n real matrix A into two plaintext matrices Z and W, and then calculates Z multiplied by c to obtain T(Z, c), and calculates the complex conjugate Cj(c) of W multiplied by c to obtain T(W, Cj(c)); then, according to T(Z, c), T(W, Cj(c)) and a randomly generated u0, a ciphertext v=P(q, ‑u0) is obtained, and further, the real part and the imaginary part of u0 are interlaced to obtain a 2n-dimensional real vector r0; and the second computing device decrypts v to obtain a real vector r1. Among them, r0 of the first computing device and r1 of the second computing device are in the form of a slice of the sum of the product of A and x.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a method, device, system, computer-readable storage medium, and electronic device for secure multi-party computing. Background Art

[0002] In order to solve the privacy issues that arise in the process of data sharing, data encryption is generally used in the relevant technology for secure multi-party computing. However, based on the existing encryption method, there is a problem of low data transmission efficiency in the secure multi-party computing process.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this specification, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention

[0004] The purpose of this specification is to provide a method, device, system, computer-readable storage medium and electronic device for secure multi-party computing, which improves data transmission efficiency at least to a certain extent.

[0005] Other features and advantages of the present specification will become apparent from the following detailed description, or may be learned in part from the practice of the present specification.

[0006] According to one aspect of the present specification, a method for secure multi-party computing is provided, which is applied to a first computing device, and the method includes: determining a first n×n plaintext matrix Z and a second n×n plaintext matrix W based on a 2n×2n real number matrix A, where n is a positive integer; receiving a ciphertext c sent by a second computing device, wherein the ciphertext c is determined by the second computing device based on a 2n-dimensional real number vector x; based on an approximate computing homomorphic encryption algorithm, calculating the first plaintext matrix Z multiplied by the ciphertext c to obtain a first product ciphertext T(Z, c), and calculating the complex conjugate of the second plaintext matrix W multiplied by the ciphertext c. Cj(c) obtains the second product ciphertext T(W, Cj(c)); according to the above-mentioned first product ciphertext T(Z, c), the above-mentioned second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, calculates the ciphertext v=P(q,-u0), and sends the ciphertext v=P(q,-u0) to the above-mentioned second computing device, wherein the target product ciphertext q is determined according to the above-mentioned first product ciphertext T(Z, c) and the above-mentioned second product ciphertext T(W, Cj(c)); and, alternately arranges the real part and the imaginary part of each dimension of the above-mentioned complex vector u0 to obtain a 2n-dimensional real vector r0;

[0007] Among them, the above-mentioned real number vector r0 and real number vector r1 are the sliced ​​forms of the product of the above-mentioned real number matrix A and the real number vector x, and the above-mentioned real number vector r1 is obtained by decrypting v=P(q, -u0) by the above-mentioned second computing device.

[0008] According to another aspect of the present specification, a method for secure multi-party computing is provided, which is applied to a second computing device, and the method includes: encoding a 2n-dimensional real vector x into an n-dimensional complex vector x'; obtaining a ciphertext c corresponding to the complex vector x' based on an approximate computing homomorphic encryption algorithm; sending the ciphertext c to a first computing device, so that the first computing device calculates a first plaintext matrix Z multiplied by the ciphertext c to obtain a first product ciphertext T(Z, c) based on an approximate computing homomorphic encryption algorithm, and calculates a second plaintext matrix W multiplied by the complex product of the ciphertext c. Conjugate Cj(c) to obtain a second product ciphertext T(W, Cj(c)), and calculate a ciphertext v=P(q, -u0) based on the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, wherein the first plaintext matrix Z and the second plaintext matrix W are determined by the first computing device according to the 2n×2n real number matrix A; and receive v=P(q, -u0) sent by the first computing device, and decrypt v to obtain a real number vector r1;

[0009] Among them, the above-mentioned real vector r1 and real vector r0 are sliced ​​forms of the sum of the products of the above-mentioned real matrix A and the above-mentioned real vector x, and the above-mentioned real vector r0 is obtained by the above-mentioned first computing device by interlacing the real part and the imaginary part of each dimension of the above-mentioned complex vector u0.

[0010] According to another aspect of the present specification, there is provided an apparatus for secure multi-party computing, which is configured in a first computing device, and includes: a matrix processing module, a receiving module, a first computing module, a first sending module, and a first and sharding processing module.

[0011] The matrix processing module is used to determine a first plaintext matrix Z of n×n and a second plaintext matrix W of n×n according to a real number matrix A of 2n×2n, where n is a positive integer; the receiving module is used to receive a ciphertext c sent by a second computing device, where the ciphertext c is determined by the second computing device according to a 2n-dimensional real number vector x; the first computing module is used to calculate the first plaintext matrix Z multiplied by the ciphertext c to obtain a first product ciphertext T(Z, c) based on an approximate computing homomorphic encryption algorithm, and calculate the second plaintext matrix W multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain a second product ciphertext T(W, Cj(c)); the first sending module is used to calculate the ciphertext v=P(q,-u0) according to the first product ciphertext T(Z,c), the second product ciphertext T(W,Cj(c)) and the n-dimensional complex vector u0, and send the ciphertext v=P(q,-u0) to the second computing device, wherein the target product ciphertext q is determined according to the first product ciphertext T(Z,c) and the second product ciphertext T(W,Cj(c)); and the first and slicing processing module is used to interleave the real part and the imaginary part of each dimension of the complex vector u0 to obtain a 2n-dimensional real vector r0;

[0012] Among them, the above-mentioned real number vector r0 and real number vector r1 are the sliced ​​forms of the product of the above-mentioned real number matrix A and the real number vector x, and the above-mentioned real number vector r1 is obtained by decrypting v=P(q, -u0) by the above-mentioned second computing device.

[0013] According to another aspect of the present specification, there is provided an apparatus for secure multi-party computing, which is configured in a second computing device, and includes: a vector processing module, a second computing module, a second sending module, and a second shard processing module.

[0014] The vector processing module is used to encode the 2n-dimensional real vector x into an n-dimensional complex vector x'; the second computing module is used to obtain the ciphertext c corresponding to the complex vector x' based on the approximate computing homomorphic encryption algorithm; the second sending module is used to send the ciphertext c to the first computing device, so that the first computing device calculates the first plaintext matrix Z multiplied by the ciphertext c to obtain the first product ciphertext T(Z, c) based on the approximate computing homomorphic encryption algorithm, and calculates the second plaintext matrix W multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain the second The product ciphertext T(W, Cj(c)), and according to the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, the ciphertext v=P(q, -u0) is calculated, wherein the first plaintext matrix Z and the second plaintext matrix W are determined by the first computing device according to the 2n×2n real number matrix A; and the second and sharding processing module is used to receive v=P(q, -u0) sent by the first computing device, and decrypt v to obtain the real number vector r1;

[0015] Among them, the above-mentioned real vector r1 and real vector r0 are sliced ​​forms of the sum of the products of the above-mentioned real matrix A and the above-mentioned real vector x, and the above-mentioned real vector r0 is obtained by the above-mentioned first computing device by interlacing the real part and the imaginary part of each dimension of the above-mentioned complex vector u0.

[0016] According to one aspect of the present specification, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method for secure multi-party computing as in the above-mentioned embodiment when executing the computer program.

[0017] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for secure multi-party computing in the above embodiment is implemented.

[0018] The secure multi-party computing method, device, system, and electronic device provided in the embodiments of this specification have the following technical effects:

[0019] In the scheme provided by the exemplary embodiment of this specification, the first computing device determines two n×n plaintext matrices Z and W based on the 2n×2n real number matrix A; then based on the approximate computing homomorphic encryption algorithm, the two plaintext matrices are used to multiply the ciphertext c of the 2n-dimensional real number vector x of the second computing device and the complex conjugate Cj(c) of the ciphertext c, respectively, to obtain T(Z, c) and T(W, Cj(c)). Further, the first computing device calculates v=P(q, -u0) based on T(Z, c), T(W, Cj(c)) and the n-dimensional complex vector u0, and the second computing device decrypts v=P(q, -u0) to obtain the real number vector r1; the first computing device interleaves the real part and the imaginary part of u0 to obtain the 2n-dimensional real number vector r0. Among them, r0 of the first computing device and r1 of the second computing device are in the form of slices of the sum of the products of A and x.

[0020] In the secure multi-party computing scheme provided in the embodiments of this specification, a real number matrix is ​​split into two n×n plaintext matrices, and the two n×n plaintext matrices are respectively multiplied with the ciphertext a of the other party's vector and the complex conjugate of the ciphertext, so that an n-dimensional number domain can support the calculation of a 2n×2n real number matrix A multiplied by a 2n-dimensional real number vector x. Compared with the related art in which an n-dimensional number domain can only support the calculation of an n×n real number matrix multiplied by an n-dimensional real number vector, the secure multi-party computing scheme provided in the embodiments of this specification can effectively improve the data transmission efficiency between multi-party computing devices.

[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the specification, and together with the specification are used to explain the principles of the specification. Obviously, the accompanying drawings described below are only some embodiments of the specification, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0023] Figure 1 A schematic diagram of the architecture of the secure multi-party computing solution provided in the embodiments of this specification.

[0024] Figure 2 An interactive schematic diagram of a secure multi-party computing method provided in one embodiment of this specification.

[0025] Figure 3 A flowchart of a matrix partitioning method provided in accordance with an embodiment of the present disclosure.

[0026] Figure 4A schematic diagram of the structure of a secure multi-party computing device provided in one embodiment of the present specification.

[0027] Figure 5 A schematic diagram of the structure of a secure multi-party computing device provided in another embodiment of the present specification.

[0028] Figure 6 A schematic diagram of the structure of a secure multi-party computing system provided in one embodiment of the present specification.

[0029] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solutions and advantages of this specification more clear, the embodiments of this specification will be further described in detail below with reference to the accompanying drawings.

[0031] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Instead, they are only examples of devices and methods consistent with some aspects of this specification as detailed in the attached claims.

[0032] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that this specification will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of this specification. However, those skilled in the art will appreciate that the technical solutions of this specification may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of this specification.

[0033] In addition, the drawings are only schematic illustrations of the present specification and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0034] The secure multi-party computing solution provided in the embodiments of this specification adopts the CKKS encryption mechanism. Among them, the CKKS encryption mechanism is an approximate computing homomorphic encryption mechanism proposed in the paper "Homomorphic Encryption for Arithmetic of Approximate Numbers", and the authors of the paper are four Korean researchers including Cheon. In the early days, the algorithm was called the HEAAN algorithm because of the abbreviation of the paper, and its first C++ implementation library also had the same name. Later, in order to distinguish it, the first letter of the author's surname was used, and it was called the CKKS encryption mechanism. The homomorphic encryption mechanism refers to an encryption mechanism that satisfies the property that the sum of the ciphertext is equal to the sum of the plaintext after decryption, and the ciphertext product is equal to the plaintext product after decryption.

[0035] The encryption of the CKKS encryption system is divided into two parts: a. Encoding the complex vector into an integer coefficient polynomial; b. Encrypting the integer coefficient polynomial. However, in the process of secure multi-party computing (such as training of machine learning models), operations are generally performed between real numbers. Therefore, the secure multi-party computing based on the CKKS encryption system provided in the related art mostly utilizes the real part of the number field, resulting in the idleness of the complex part, causing space waste. The solutions provided by the related art are as follows:

[0036] Step 1. Party P1 regards the n-dimensional real vector g as an n-dimensional complex vector, and encodes and encrypts it using the CKKS encryption system to obtain the ciphertext c' corresponding to the n-dimensional real vector g, and then sends the ciphertext c' to party P0; wherein party P1 and party P0 are the two parties participating in the secure multi-party computation. Specifically, party P1 and party P0 can be different computing devices.

[0037] Step 2. Party P0 regards the real matrix B as a complex matrix, uses the plaintext complex matrix multiplication ciphertext scheme in the CKKS encryption mechanism to calculate q'=T(B,c'), and randomly generates a plaintext real vector u0', and then uses the plaintext ciphertext scheme in the CKKS encryption mechanism to calculate v'=P(q',-u0'), and further sends v' to party P1;

[0038] Step 3. Party P1 decrypts v' and obtains u1'. (u0',u1') is the sum-sliced ​​form of B×g.

[0039] However, the related art encodes the n-dimensional real vector as an algebraic integer in a 4n-th order cyclotomic field (which is a 2n-th order algebraic expansion of the rational number field), and further encrypts it into a CKKS ciphertext. But in fact, the algebraic integer in the 4n-th order cyclotomic field can accommodate the n-dimensional complex vector encoding, so the related art actually wastes half of the space of the 4n-th order cyclotomic field.

[0040] The embodiments of this specification can solve the above technical problems. Specifically, the embodiments of this specification provide exemplary embodiments. Figure 1 A schematic diagram of the system architecture of the secure multi-party computing solution provided in the embodiments of this specification.

[0041] like Figure 1 As shown, the system architecture may include a first computing device 110, a second computing device 120, and a network 130. The first computing device 110 and the second computing device 120 may transmit data via the network 130.

[0042] Exemplarily, the first computing device 110 and the second computing device 120 as the two parties participating in the secure computing can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, as well as big data and artificial intelligence platforms, or they can be notebooks with computing capabilities, etc.

[0043] Exemplarily, the network 130 may be a communication medium of various connection types capable of providing a communication link, such as a wired communication link, a wireless communication link, or a fiber optic cable, etc., and this specification does not limit this.

[0044] Exemplarily, a typical application of secure multi-party computing is joint statistical analysis and machine learning of multi-party data with privacy protection. Therefore, in one embodiment, the first computing device 110 and the second computing device 120 are two training parties of the same machine learning model. In one embodiment, the first computing device 110 and the second computing device 120 are two participants of the same joint analysis algorithm. Specifically, secure multi-party computing enables the participating parties to calculate statistical results based on the joint data of all parties or a jointly trained machine learning model without exposing their respective original data.

[0045] In the solution provided by the embodiments of this specification, since the embodiments of this specification adopt the CKKS encryption mechanism, the second computing device 120 encodes the 2n-dimensional real vector x into an n-dimensional complex vector x', and then obtains the ciphertext c corresponding to the complex vector x' based on the CKKS encryption mechanism; and sends the ciphertext c to the first computing device 110 through the network 130.

[0046] Further, the first computing device 110 determines the ciphertext v=P(q, -u0) based on the CKKS encryption mechanism according to the 2n×2n real number matrix A and the received ciphertext c, and then sends the ciphertext v=P(q, -u0) to the second computing device 120 via the network 130.

[0047] The second computing device 120 decrypts v to obtain a real vector r1, and the first computing device 110 interleaves the real and imaginary parts of each dimension of the complex vector u0 to obtain a real vector r0. (r0, r1) is the product of the real matrix A and the real vector x in slice form.

[0048] The above-mentioned sum-slicing form is a sum-sharing form. In the secure two-party calculation, an integer s (s is any one of 0 to N-1) needs to be represented by s = (s_L + s_R) mod N, where s_L is stored on one side and s_R is stored on the other side, that is, s is distributed and stored in the form of sum-slicing (s_L, s_R) on both sides of the calculation. For the party storing s_L, s_R cannot be calculated based on its known data, and for the party storing s_R, s_L cannot be calculated based on its known data.

[0049] The following is a detailed description of the secure multi-party computing method provided in this specification:

[0050] For example, Figure 2 A flowchart of a method for secure multi-party computing provided by an embodiment of this specification. In which, a 2n×2n real number matrix A is stored in the first computing device 110, and a 2n-dimensional real number vector x is stored in the second computing device 120. The secure multi-party computing solution provided by this embodiment is used to calculate the product A×x of the above real number matrix A and the real number vector x, and further, the product A×x is distributed and stored in the first computing device 110 and the second computing device 120 in the form of shards. Reference Figure 2 , the method shown in this embodiment includes S210-S270.

[0051] In S210 , the first computing device 110 determines an n×n first plaintext matrix Z and an n×n second plaintext matrix W according to a 2n×2n real number matrix A.

[0052] In this embodiment, the 2n×2n real number matrix A is split into two n×n matrices, and the two split matrices are subjected to the CKKS encryption algorithm, which is conducive to fully utilizing the algebraic integer space in the 4n-th order cyclotomic field.

[0053] In an exemplary embodiment, as a specific implementation of S210, Figure 3 This is a flowchart of a matrix partitioning method provided in an embodiment of this specification. Figure 3 , the embodiment shown in the figure includes:

[0054] S310, block processing is performed on the 2n×2n real number matrix A to obtain a matrix A' containing n×n blocks, block A'ij is the block corresponding to the i-th row and j-th column in the matrix A'.

[0055] Exemplarily, since the algebraic integers in the 4n-th order cyclotomic field can accommodate n-dimensional complex vector encoding, the 2n×2n real number matrix A is processed into blocks containing n×n blocks, which are recorded as A'. Exemplarily, the matrix A' is represented as:

[0056]

[0057] In this embodiment, the real number matrix A' satisfies:

[0058]

[0059] Among them, block A' ij is the block corresponding to the i-th row and j-th column in the matrix A', and the block A' ij It is a 2×2 matrix, and the values ​​of i and j are both positive integers not greater than n.

[0060] S320, according to block A' ij Determine Z in the first plaintext matrix Z ij , and according to block A' ij Determine W in the second plaintext matrix W ij .

[0061] Among them, Z ij is the element in the i-th and j-th columns of the first plaintext matrix Z, W ij is the element in the i-th j-th column of the second plaintext matrix W, and the values ​​of i and j are both positive integers not greater than n.

[0062] In this embodiment, according to block A' 11 The elements in determine the elements Z in the first plaintext matrix Z 11 , and according to block A' 11 The elements in determine the elements in the first plaintext matrix W 11 . For example, block A' ij Expressed as Where a, b, m and f are all real numbers, then:

[0063] The first plaintext matrix Z ij , can be expressed by formula (1):

[0064]

[0065] W in the second plaintext matrix W ij , can be expressed by formula (2):

[0066]

[0067] At the same time, the generated first plaintext matrix Z and the second plaintext matrix W satisfy:

[0068]

[0069] Continue to refer Figure 2 , in S220, the 2n-dimensional real vector x is encoded into an n-dimensional complex vector x'.

[0070] The solution provided in the embodiment of this specification is to fully utilize the algebraic integer space in the 4n-th order circle domain, in addition to S210 / Figure 3 In the illustrated embodiment, in addition to splitting the 2n×2n real number matrix A into two n×n matrices, the second computing device 120 is required to encode the 2n-dimensional real number vector x into an n-dimensional complex number vector.

[0071] Furthermore, in S220 , the second computing device 120 also obtains the ciphertext c corresponding to the complex vector x′ based on the approximate computational homomorphic encryption algorithm. And, in S230 , the second computing device 120 sends the ciphertext c to the first computing device 110 .

[0072] In this embodiment, the ciphertext c corresponding to the complex vector x' is determined based on the CKKS encryption mechanism. Specifically, the encryption process using the CKKS encryption system is divided into two parts: first, the complex vector x' is encoded into an integer coefficient polynomial, and then the integer coefficient polynomial is encrypted to obtain the ciphertext c corresponding to the complex vector x'.

[0073] It should be noted that there is no particular order in which S210 and S220 are executed.

[0074] In an exemplary embodiment, after the first computing device 110 receives the ciphertext c, it first calculates the complex conjugate of the ciphertext c based on the approximate computing homomorphic encryption algorithm to obtain Cj(c). The encrypted complex conjugate of the plaintext A calculated based on the CKKS encryption system can satisfy: Do(Dr(Cj(Er(Eo(A))))))=A's conjugate.

[0075] Continue to refer Figure 2 In S240, the first computing device 110 calculates the first plaintext matrix Z multiplied by the ciphertext c based on the approximate computing homomorphic encryption algorithm to obtain the first product ciphertext T(Z, c), and calculates the second plaintext matrix W multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain the second product ciphertext T(W, Cj(c)).

[0076] In an exemplary embodiment, the CKKS encryption system provides an approximate computational homomorphic encryption algorithm: plaintext matrix multiplied by ciphertext vector. In this embodiment, the algorithm is used to calculate the first plaintext matrix Z multiplied by the ciphertext c to obtain the first product ciphertext T(Z, c), and there exists Dr(Do(T(Z, c)))=Z×x. The algorithm is used to calculate the second plaintext matrix W multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain the second product ciphertext T(W, Cj(c)), and there exists

[0077] In S250, the first computing device 110 calculates the ciphertext v=P(q,-u0) according to the first product ciphertext T(Z,c), the second product ciphertext T(W,Cj(c)) and the n-dimensional complex vector u0, and the target product ciphertext q is the sum of the first product ciphertext T(Z,c) and the second product ciphertext T(W,Cj(c)).

[0078] In an exemplary embodiment, the n-dimensional complex vector u0 is randomly generated by the first computing device 110 and is used in another approximate computing homomorphic encryption algorithm provided by the CKKS encryption system, namely, the plaintext encryption algorithm. For the ciphertext c corresponding to the plaintext complex vector x and the plaintext complex vector y, the ciphertext T(c,y) can be obtained according to the plaintext encryption algorithm, and Dr(Do(T(c,y)))=x+y is satisfied. Specifically for this embodiment:

[0079] Based on the plaintext encryption algorithm provided by the CKKS encryption system, the complex vector u0 plus the target product ciphertext q is calculated to obtain the ciphertext v=P(q,-u0).

[0080] Continue to refer Figure 2 In S260 , the first computing device 110 sends the ciphertext v=P(q, −u0) to the second computing device 120 .

[0081] In an exemplary embodiment, after receiving the ciphertext v, the second computing device 120 executes S270: decrypt v to obtain a real vector r1. The first computing device 110 in S280: alternately arranges the real part and the imaginary part of each dimension of the complex vector u0 to obtain a 2n-dimensional real vector r0.

[0082] The real vector r0 and the real vector r1 are in the form of a sum slice of the product of the real matrix A and the real vector x. That is, A×x=r0+r1 mod N, and r0 is stored in the first computing device, and r1 is stored in the second computing device, that is, A×x is distributedly stored in the form of a sum slice (r0, r1) on both computing sides. The first computing device storing r0 can calculate r1, and the second computing device storing r1 can calculate r0.

[0083] It should be noted that there is no particular order in which S260 and S280 are executed. S260 may be executed first and then S280, or S280 may be executed first and then S260, or S260 and S280 may be executed together.

[0084] pass Figure 2 The secure multi-party computing solution provided by the illustrated embodiment is based on the CKKS encryption mechanism and uses the algebraic integer space in the 4n-th order field to realize the calculation of a 2n×2n real number matrix multiplied by a 2n-dimensional real number vector x. Compared with the related art, based on the CKKS encryption mechanism, the algebraic integer space in the 4n-th order field can realize the calculation of an n×n real number matrix multiplied by an n-dimensional real number vector x. The solution provided by the embodiment of this specification can make full use of the algebraic integer space in the 4n-th order field, which is conducive to improving the data transmission efficiency in the secure multi-party computing process.

[0085] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present specification, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0086] The following are device embodiments of this specification, which can be used to implement the method embodiments of this specification. For details not disclosed in the device embodiments of this specification, please refer to the method embodiments of this specification.

[0087] in, Figure 4 The schematic diagram of the structure of the apparatus for secure multi-party computing provided in one embodiment of the present specification is specifically configured in the first computing device 110. The apparatus for secure multi-party computing 400 in the embodiment of the present specification includes: a matrix processing module 410, a receiving module 420, a first computing module 430, a first sending module 440, and a first and sharding processing module 450.

[0088] The matrix processing module 410 is used to determine a first plaintext matrix Z of n×n and a second plaintext matrix W of n×n according to a real number matrix A of 2n×2n, where n is a positive integer; the receiving module 420 is used to receive a ciphertext c sent by a second computing device, where the ciphertext c is determined by the second computing device according to a 2n-dimensional real number vector x; the first computing module 430 is used to calculate the first plaintext matrix Z multiplied by the ciphertext c to obtain a first product ciphertext T(Z, c) based on an approximate computing homomorphic encryption algorithm, and to calculate the second plaintext matrix W multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain a second product ciphertext T( W, Cj(c)); the first sending module 440 is used to calculate the ciphertext v=P(q,-u0) according to the first product ciphertext T(Z,c), the second product ciphertext T(W,Cj(c)) and the n-dimensional complex vector u0, and send the ciphertext v=P(q,-u0) to the second computing device, wherein the target product ciphertext q is determined according to the first product ciphertext T(Z,c) and the second product ciphertext T(W,Cj(c)); and the first and slicing processing module 450 is used to interleave the real part and the imaginary part of each dimension of the complex vector u0 to obtain a 2n-dimensional real vector r0;

[0089] Among them, the above-mentioned real number vector r0 and real number vector r1 are the sliced ​​forms of the product of the above-mentioned real number matrix A and the real number vector x, and the above-mentioned real number vector r1 is obtained by decrypting v=P(q, -u0) by the above-mentioned second computing device.

[0090] In an exemplary embodiment, based on the above-mentioned solution, the matrix processing module 410 includes: a blocking unit and a determining unit.

[0091] The above-mentioned block unit is used to: block the above-mentioned 2n×2n real number matrix A to obtain a matrix A' containing n×n blocks, and the block A' ij is the block corresponding to the i-th row and j-th column in the matrix A'; and the determination unit is used to: according to the block A' ij Determine Z in the first plaintext matrix Z above ij , and according to block A' ij Determine W in the second plaintext matrix W above ij ;

[0092] Among them, Z ij is the element in the i-th and j-th columns of the first plaintext matrix Z, W ij is the element in the i-th j-th column of the second plaintext matrix W, and the values ​​of i and j are both positive integers not greater than n.

[0093] In an exemplary embodiment, based on the above scheme, the above block A' ijExpressed as

[0094] The determination unit is specifically used to determine Z in the first plaintext matrix Z according to the following formula: ij ,

[0095]

[0096] The determination unit is further specifically configured to determine W in the second plaintext matrix W according to the following formula: ij ,

[0097]

[0098] Wherein, a, b, m and f are all real numbers.

[0099] In an exemplary embodiment, based on the aforementioned scheme, the receiving module 420 is further used to: after receiving the ciphertext c sent by the second computing device, calculate the complex conjugate of the ciphertext c based on the approximate computing homomorphic encryption algorithm to obtain Cj(c).

[0100] In an exemplary embodiment, based on the aforementioned scheme, the above-mentioned first computing module 430 is specifically used to: based on an approximate computational homomorphic encryption algorithm, calculate the above-mentioned complex vector u0 plus the target product ciphertext q to obtain v=P(q,-u0), wherein the above-mentioned target product ciphertext q=T(Z,c)+T(W,Cj(c)).

[0101] In an exemplary embodiment, based on the aforementioned scheme, Dr(Do(T(Z, c)))=Z×x;

[0102]

[0103] Among them, Do() means decryption, Dr() means decoding, represents the conjugate of x.

[0104] In an exemplary embodiment, based on the aforementioned scheme, the first computing device and the second computing device are two training parties of the same machine learning model, or the first computing device and the second computing device are two participating parties of the same joint analysis algorithm.

[0105] In addition, the apparatus for secure multi-party computing provided in the above-mentioned embodiment and the method embodiment for secure multi-party computing applied to the first computing device belong to the same concept. Therefore, for details not disclosed in the apparatus embodiment of this specification, please refer to the embodiment of the method for secure multi-party computing mentioned above in this specification, which will not be repeated here.

[0106] in, Figure 5The structural diagram of the apparatus for secure multi-party computing provided in another embodiment of the present specification is specifically configured in the second computing device 120. The apparatus for secure multi-party computing 500 in the embodiment of the present specification includes: a vector processing module 510, a second computing module 520, a second sending module 530, and a second shard processing module 540.

[0107] The vector processing module 510 is used to encode the 2n-dimensional real vector x into an n-dimensional complex vector x'; the second computing module 520 is used to obtain the ciphertext c corresponding to the complex vector x' based on the approximate computing homomorphic encryption algorithm; the second sending module 530 is used to send the ciphertext c to the first computing device, so that the first computing device calculates the first plaintext matrix Z multiplied by the ciphertext c based on the approximate computing homomorphic encryption algorithm to obtain the first product ciphertext T(Z, c), and calculates the second plaintext matrix W multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain to the second product ciphertext T(W, Cj(c)), and according to the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, the ciphertext v=P(q, -u0) is calculated, wherein the first plaintext matrix Z and the second plaintext matrix W are determined by the first computing device according to the 2n×2n real number matrix A; and the second and sharding processing module 540 is used to receive v=P(q, -u0) sent by the first computing device, and decrypt v to obtain the real number vector r1;

[0108] Among them, the above-mentioned real vector r1 and real vector r0 are sliced ​​forms of the sum of the products of the above-mentioned real matrix A and the above-mentioned real vector x, and the above-mentioned real vector r0 is obtained by the above-mentioned first computing device by interlacing the real part and the imaginary part of each dimension of the above-mentioned complex vector u0.

[0109] The apparatus for secure multi-party computing provided in the above-mentioned embodiment and the method embodiment for secure multi-party computing applied to the second computing device belong to the same concept. Therefore, for details not disclosed in the apparatus embodiment of this specification, please refer to the embodiment of the method for secure multi-party computing mentioned above in this specification, which will not be repeated here.

[0110] It should be noted that the secure multi-party computing device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0111] The embodiments of this specification also provide a system for secure multi-party computing. Figure 6The structure diagram of a secure multi-party computing system according to an exemplary embodiment of the present specification is schematically shown.

[0112] refer to Figure 6 The secure multi-party computing system 600 provided in this illustrative embodiment includes a first computing device 110 and a second computing device 120 .

[0113] The constituent modules of the first computing device 110 and the second computing device 120 and the functions of each module have been described in the above embodiments and will not be repeated here.

[0114] The serial numbers of the embodiments of this specification are for description only and do not represent the advantages or disadvantages of the embodiments.

[0115] The embodiments of this specification also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned embodiments when executing the program.

[0116] Figure 7 This is a schematic diagram of the structure of an electronic device provided in the embodiments of this specification. Figure 7 As shown, the electronic device 700 includes: a processor 701 and a memory 702 .

[0117] In the embodiments of this specification, the processor 701 is the control center of the computer system, which can be the processor of a physical machine or the processor of a virtual machine. The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 701 may also include a main processor and a coprocessor, the main processor being a processor for processing data in the wake-up state; the coprocessor is a low-power processor for processing data in the standby state.

[0118] In the embodiment of this specification, the processor 701, when configured in the first computing device 110, can be specifically used for:

[0119] According to the 2n×2n real number matrix A, determine an n×n first plaintext matrix Z and an n×n second plaintext matrix W, where n is a positive integer;

[0120] Receiving a ciphertext c sent by a second computing device, wherein the ciphertext c is determined by the second computing device according to a 2n-dimensional real number vector x;

[0121] Based on the approximate computing homomorphic encryption algorithm, the first plaintext matrix Z is multiplied by the ciphertext c to obtain a first product ciphertext T(Z, c), and the second plaintext matrix W is multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain a second product ciphertext T(W, Cj(c));

[0122] According to the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, a ciphertext v=P(q, -u0) is calculated, and the ciphertext v=P(q, -u0) is sent to the second computing device, wherein the target product ciphertext q is determined according to the first product ciphertext T(Z, c) and the second product ciphertext T(W, Cj(c)); and the real part and the imaginary part of each dimension of the complex vector u0 are alternately arranged to obtain a 2n-dimensional real vector r0;

[0123] Among them, the above-mentioned real number vector r0 and real number vector r1 are the sliced ​​forms of the product of the above-mentioned real number matrix A and the real number vector x, and the above-mentioned real number vector r1 is obtained by decrypting v=P(q, -u0) by the above-mentioned second computing device.

[0124] Furthermore, the above-mentioned determining the n×n first plaintext matrix Z and the n×n second plaintext matrix W according to the 2n×2n real number matrix A includes:

[0125] The above 2n×2n real number matrix A is divided into blocks to obtain a matrix A' containing n×n blocks. Block A' ij is the block corresponding to the i-th row and j-th column in the above matrix A'; and, according to the above block A' ij Determine Z in the first plaintext matrix Z above ij , and according to block A' ij Determine W in the second plaintext matrix W above ij ;

[0126] Among them, Z ij is the element in the i-th and j-th columns of the first plaintext matrix Z, W ij is the element in the i-th j-th column of the second plaintext matrix W, and the values ​​of i and j are both positive integers not greater than n.

[0127] Furthermore, the above block A' ij Expressed as

[0128] According to block A' ij Determine Z in the first plaintext matrix Z above ij,include:

[0129]

[0130] According to block A' ij Determine W in the second plaintext matrix W above ij ,include:

[0131]

[0132] Wherein, a, b, m and f are all real numbers.

[0133] Furthermore, after receiving the ciphertext c sent by the second computing device, the method further includes:

[0134] Based on the approximate computing homomorphic encryption algorithm, the complex conjugate of the above ciphertext c is calculated to obtain Cj(c).

[0135] Furthermore, the ciphertext v=P(q, -u0) is calculated based on the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, including:

[0136] Based on the approximate computing homomorphic encryption algorithm, the above complex vector u0 plus the target product ciphertext q is calculated to obtain v=P(q,-u0), where the above target product ciphertext q=T(Z,c)+T(W,Cj(c)).

[0137] Further, Dr(Do(T(Z,c)))=Z×x;

[0138]

[0139] Among them, Do() means decryption, Dr() means decoding, represents the conjugate of x.

[0140] Furthermore, the first computing device and the second computing device are two training parties of the same machine learning model, or the first computing device and the second computing device are two participating parties of the same joint analysis algorithm.

[0141] In the embodiment of this specification, the processor 701, when configured in the second computing device 120, can be specifically used for:

[0142] Encode the 2n-dimensional real vector x into an n-dimensional complex vector x';

[0143] Based on the approximate computing homomorphic encryption algorithm, obtain the ciphertext c corresponding to the above complex vector x';

[0144] The ciphertext c is sent to a first computing device, so that the first computing device calculates the first plaintext matrix Z multiplied by the ciphertext c to obtain a first product ciphertext T(Z, c), calculates the second plaintext matrix W multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain a second product ciphertext T(W, Cj(c)), and calculates the ciphertext v=P(q, -u0) according to the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, wherein the first plaintext matrix Z and the second plaintext matrix W are determined by the first computing device according to the 2n×2n real number matrix A; and,

[0145] Receive v=P(q, -u0) sent by the first computing device, and decrypt v to obtain a real number vector r1;

[0146] Among them, the above-mentioned real vector r1 and real vector r0 are sliced ​​forms of the sum of the products of the above-mentioned real matrix A and the above-mentioned real vector x, and the above-mentioned real vector r0 is obtained by the above-mentioned first computing device by interlacing the real part and the imaginary part of each dimension of the above-mentioned complex vector u0.

[0147] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments of the present specification, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 701 to implement the method in the embodiment of the present specification.

[0148] In some embodiments, the electronic device 700 further includes: a peripheral device interface 703 and at least one peripheral device. The processor 701, the memory 702 and the peripheral device interface 703 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 703 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a display screen 704, a camera 705 and an audio circuit 706.

[0149] The peripheral device interface 703 may be used to connect at least one peripheral device related to input / output (I / O) to the processor 701 and the memory 702. In some embodiments of the present specification, the processor 701, the memory 702, and the peripheral device interface 703 are integrated on the same chip or circuit board; in some other embodiments of the present specification, any one or two of the processor 701, the memory 702, and the peripheral device interface 703 may be implemented on a separate chip or circuit board. This embodiment of the present specification does not specifically limit this.

[0150] The display screen 704 is used to display a user interface (UI). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 704 is a touch display screen, the display screen 704 also has the ability to collect touch signals on the surface or above the surface of the display screen 704. The touch signal can be input to the processor 701 as a control signal for processing. At this time, the display screen 704 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments of the present specification, the display screen 704 can be one, and the front panel of the electronic device 700 is set; in other embodiments of the present specification, the display screen 704 can be at least two, which are respectively set on different surfaces of the electronic device 700 or are folded; in some other embodiments of the present specification, the display screen 704 can be a flexible display screen, which is set on the curved surface or folded surface of the electronic device 700. Even, the display screen 704 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 704 can be made of materials such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0151] The camera 705 is used to capture images or videos. Optionally, the camera 705 includes a front camera and a rear camera. Usually, the front camera is arranged on the front panel of the electronic device, and the rear camera is arranged on the back of the electronic device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and the virtual reality (VR) shooting function or other fusion shooting functions. In some embodiments of the present specification, the camera 705 may also include a flash. The flash can be a monochrome temperature flash or a dual color temperature flash. The dual color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0152] The audio circuit 706 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 701 for processing. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the electronic device 700. The microphone may also be an array microphone or an omnidirectional collection microphone.

[0153] The power supply 707 is used to power various components in the electronic device 700. The power supply 707 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 707 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0154] The electronic device structure block diagram shown in the embodiment of this specification does not constitute a limitation on the electronic device 700. The electronic device 700 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0155] In the description of this specification, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this specification can be understood according to specific circumstances. In addition, in the description of this specification, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.

[0156] It should be noted that the above description is of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0157] The above is only a specific implementation of this specification, but the protection scope of this specification is not limited to this. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.

Claims

1. A method for secure multi-party computing, wherein: Applied to a first computing device, the method includes: According to 2n 2n real matrix A, determine n n's first plaintext matrix Z and n The second plaintext matrix W of n, where n is a positive integer; Receiving a ciphertext c sent by a second computing device, wherein the ciphertext c is determined by the second computing device according to a 2n-dimensional real number vector x; Based on the approximate computing homomorphic encryption algorithm, the first plaintext matrix Z is multiplied by the ciphertext c to obtain a first product ciphertext T(Z, c), and the second plaintext matrix W is multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain a second product ciphertext T(W, Cj(c)); Calculate a ciphertext v=P(q, -u0) according to the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, and send the ciphertext v=P(q, -u0) to the second computing device, wherein the target product ciphertext q is determined according to the first product ciphertext T(Z, c) and the second product ciphertext T(W, Cj(c)); The real part and the imaginary part of each dimension of the complex vector u0 are arranged alternately to obtain a 2n-dimensional real vector r0; The real number vector r0 and the real number vector r1 are in sliced ​​form of the product of the real number matrix A and the real number vector x, and the real number vector r1 is obtained by decrypting v=P(q, -u0) by the second computing device.

2. The method according to claim 1, wherein: According to 2n 2n real matrix A, determine n n's first plaintext matrix Z and n The second plaintext matrix W of n includes: The 2n 2n real number matrix A is processed in blocks to obtain n The matrix of n blocks , block For the matrix The block corresponding to the i-th row and j-th column in ; According to the block Determine the first plaintext matrix Z , and according to the block Determine the second plaintext matrix W ; in, is the element in the i-th j-th column of the first plaintext matrix Z, is the element in the i-th j-th column of the second plaintext matrix W, and the values ​​of i and j are both positive integers not greater than n.

3. The method according to claim 2, wherein: The block Expressed as ; The block Determine the first plaintext matrix Z ,include: ; The block Determine the second plaintext matrix W ,include: ; Wherein, a, b, m and f are all real numbers.

4. The method according to claim 1, wherein: After receiving the ciphertext c sent by the second computing device, the method further includes: Based on the approximate computing homomorphic encryption algorithm, the complex conjugate of the ciphertext c is calculated to obtain Cj(c).

5. The method according to claim 1, wherein: The step of calculating the ciphertext v=P(q, -u0) according to the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0 includes: Based on the approximate computing homomorphic encryption algorithm, the complex vector u0 plus the target product ciphertext q is calculated to obtain the ciphertext v=P(q,-u0), wherein the target product ciphertext q = T(Z,c)+T(W,Cj(c)).

6. The method according to any one of claims 1 to 5, wherein: Dr(Do(T(Z,c)))= Z x; Dr(Do(T(W,Cj(c))))= W ; Among them, Do( ) means decryption, Dr( ) means decoding, represents the conjugate of x.

7. The method according to any one of claims 1 to 5, wherein: The first computing device and the second computing device are two training parties of the same machine learning model, or, The first computing device and the second computing device are two participants in the same joint analysis algorithm.

8. A method for secure multi-party computing, wherein: Applied to a second computing device, the method includes: Encode the 2n-dimensional real vector x into an n-dimensional complex vector x'; Based on the approximate computing homomorphic encryption algorithm, obtain the ciphertext c corresponding to the complex vector x'; The ciphertext c is sent to a first computing device, so that the first computing device calculates the first plaintext matrix Z multiplied by the ciphertext c to obtain a first product ciphertext T (Z, c) based on an approximate computing homomorphic encryption algorithm, calculates the second plaintext matrix W multiplied by the complex conjugate Cj (c) of the ciphertext c to obtain a second product ciphertext T (W, Cj (c)), and calculates the ciphertext v = P (q, -u0) according to the first product ciphertext T (Z, c), the second product ciphertext T (W, Cj (c)) and the n-dimensional complex vector u0, wherein the first plaintext matrix Z and the second plaintext matrix W are obtained by the first computing device according to 2n The 2n real matrix A is determined; Receive v=P(q, -u0) sent by the first computing device, and decrypt v to obtain a real number vector r1; Among them, the real vector r1 and the real vector r0 are sliced ​​forms of the product of the real matrix A and the real vector x, and the real vector r0 is obtained by the first computing device by interlacing the real part and the imaginary part of each dimension of the complex vector u0.

9. A secure multi-party computing device, wherein: Configured in a first computing device, the apparatus comprises: Matrix processing module for 2n 2n real matrix A, determine n n's first plaintext matrix Z and n The second plaintext matrix W of n, where n is a positive integer; A receiving module, configured to receive a ciphertext c sent by a second computing device, wherein the ciphertext c is determined by the second computing device according to a 2n-dimensional real number vector x; A first computing module is configured to calculate, based on an approximate computing homomorphic encryption algorithm, the first plaintext matrix Z multiplied by the ciphertext c to obtain a first product ciphertext T(Z, c), and calculate the second plaintext matrix W multiplied by the complex conjugate Cj(c) of the ciphertext c to obtain a second product ciphertext T(W, Cj(c)); A first sending module, configured to calculate a ciphertext v=P(q, -u0) according to the first product ciphertext T(Z, c), the second product ciphertext T(W, Cj(c)) and the n-dimensional complex vector u0, and send v=P(q, -u0) to the second computing device; A first and a slicing processing module, used for interlacing the real part and the imaginary part of each dimension of the complex vector u0 to obtain a 2n-dimensional real vector r0; The real number vector r0 and the real number vector r1 are in sliced ​​form of the product of the real number matrix A and the real number vector x, and the real number vector r1 is obtained by decrypting v=P(q, -u0) by the second computing device.

10. A secure multi-party computing device, wherein: Configured in a second computing device, the apparatus comprises: A vector processing module, used for encoding a 2n-dimensional real vector x into an n-dimensional complex vector x'; A second computing module is used to obtain the ciphertext c corresponding to the complex vector x' based on an approximate computing homomorphic encryption algorithm; The second sending module is used to send the ciphertext c to the first computing device, so that the first computing device calculates the first plaintext matrix Z multiplied by the ciphertext c to obtain a first product ciphertext T (Z, c) based on the approximate computing homomorphic encryption algorithm, calculates the second plaintext matrix W multiplied by the complex conjugate Cj (c) of the ciphertext c to obtain a second product ciphertext T (W, Cj (c)), and calculates the ciphertext v = P (q, -u0) according to the first product ciphertext T (Z, c), the second product ciphertext T (W, Cj (c)) and the n-dimensional complex vector u0, wherein the first plaintext matrix Z and the second plaintext matrix W are obtained by the first computing device according to 2n The 2n real matrix A is determined; A second slicing processing module, configured to receive v=P(q, -u0) sent by the first computing device, and decrypt v to obtain a real number vector r1; Among them, the real vector r1 and the real vector r0 are sliced ​​forms of the product of the real matrix A and the real vector x, and the real vector r0 is obtained by the first computing device by interlacing the real part and the imaginary part of each dimension of the complex vector u0.

11. A secure multi-party computing system, wherein: The system includes: a first computing device and a second computing device; The first computing device is used to execute the method described in any one of claims 1 to 7, and the second computing device is used to execute the method described in claim 8.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the processor implements the secure multi-party computing method according to any one of claims 1 to 7; or, is used to execute the secure multi-party computing method according to claim 8.

13. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the computer program implements the secure multi-party computing method according to any one of claims 1 to 7; or, is used to execute the secure multi-party computing method according to claim 8.