Two-party-oriented safe universal hybrid multiplication and tensor hybrid multiplication integrated calculation method and device
By constructing a secure two-party universal hybrid multiplication and tensor hybrid multiplication protocol, the high latency and high bandwidth problems of hybrid multiplication computation in the existing technology are solved, realizing low-interaction, high-throughput matrix-tensor unified parallel computation, which is suitable for large-scale and high-dimensional scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies cannot provide structured first-order multiplication primitives in the arithmetic domain, making it difficult to generate hybrid product sharing with low interaction in the online stage. Furthermore, they lack support for matrix-tensor unification and batch parallelism, resulting in excessive computational latency and communication bandwidth overhead in high-dimensional and large-batch scenarios.
We construct a secure two-party general hybrid multiplication protocol and a secure two-party tensor hybrid multiplication protocol. By generating random matrix triples and performing parallel batch processing, we achieve unified computation of scalars, vectors, matrices and tensors. We use a semi-honest model for security analysis to ensure that the computation process does not leak the input and intermediate information of each party.
It achieves reduced intermediate states and communication amplification without leaking input and intermediate information, supports online high-throughput hybrid multiplication calculations, is suitable for batch processing of large-scale matrices and high-dimensional tensors, reduces input redistribution, and controls bandwidth and latency.
Smart Images

Figure CN121644208A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of privacy computing technology, and in particular to a secure, universal hybrid multiplication and tensor hybrid multiplication integrated computing method and apparatus for two parties. Background Technology
[0002] With the increasing prevalence of cross-organizational collaborative computing and joint modeling, scenarios such as financial risk control, medical image analysis, recommendation and advertising, and industrial quality inspection require efficient machine learning (ML) under compliance constraints of "data not leaving the domain and minimal leakage." In these tasks, the need for hybrid multiplication in models is universal and fundamental: participating parties each possess two sets of private inputs from different sources but with matched dimensions. and Secure computation must be performed without disclosing the original data and intermediate information. This is to support key operators such as feature interaction and second-order term modeling (vertical federated cross-domain feature crossing, bilinear terms of factorization), representation fusion and bilinear pooling, attention and relevance measurement, and hierarchical gating / weighted routing. From an engineering perspective, modern training / inference is based on high-dimensional tensors of "batch × sequence length / channel × head number × dimension". Hybrid multiplication requires a unified modeling of scalar / vector / matrix to tensor, maintaining low latency and high throughput under large-batch and multi-dimensional parallelism. From a secure computing perspective, the protocol must run within the arithmetic domain, balancing the correctness and confidentiality of semi-honest models, minimizing online synchronization and round trips, and avoiding bandwidth and memory amplification. Simultaneously, it needs seamless integration with offline generation of random masking / related random materials, fixed-point truncation and quantization strategies, automatic differentiation, and mainstream deep learning tensor interfaces. Based on the above modular requirements for ML and privacy compliance, a unified secure primitive for hybrid multiplication is urgently needed: directly applying [the following to] the [mathematical domain]... and It provides a structured, one-time computation method, natively supports batch processing and tensor parallelism, and features online low-interaction, low-bandwidth, and low-memory usage. It is also easy to embed into machine learning pipelines such as feature interaction models, attention networks, multimodal fusion, statistical estimation, and federated / segmentation learning, providing a feasible, auditable, and scalable foundation for cross-institutional collaborative intelligence.
[0003] In known solutions, homomorphic encryption schemes (such as Halevi and Shoop's HElib homomorphic encryption scheme) perform arithmetic operations such as addition and multiplication in the ciphertext domain. In the implementation of "hybrid multiplication," this path is usually achieved by first performing linear superposition in the ciphertext domain and then homomorphically multiplying, or by encoding the hybrid terms into the ciphertext evaluation process. Based on this, although homomorphic encryption schemes can complete "first linear superposition and then homomorphic multiplication" or encode the hybrid terms into the evaluation process in the ciphertext domain to ensure encrypted data processing, ciphertext operations involve noise budgeting, parameter selection, and relinearization / rescaling operations, resulting in high computational / storage / bandwidth overhead, high online latency, high computational cost, and complex parameter configuration. Furthermore, in large-scale / batch tensor scenarios, complex packing and rotation strategies are required, making engineering implementation complex and difficult to achieve low interaction and high throughput in the online phase.
[0004] In known solutions, oblivious transfer (OT) enables general two-party secure computation (e.g., Obliv-C and ABY frameworks), circuitizing operators such as addition and multiplication into Boolean / arithmetic operations, or switching between arithmetic sharing, Boolean sharing, and Yao representations to complete the operation. Hybrid multiplication is typically implemented through a workflow of "4 secure matrix multiplications + combinatorial summation." While the oblivious transfer approach has good versatility, circuitizing hybrid multiplication usually evolves into a workflow of "4 secure matrix multiplications + combinatorial summation," where gate size and communication volume rapidly increase with dimension and batch size. Simultaneously, representation switching (arithmetic / Boolean / Yao) introduces additional interaction and implementation complexity. Circuitizing matrix and tensor multiplication causes gate size and communication volume to increase dramatically with dimension, making it difficult to directly produce hybrid product sharing in a single round or low round in the online phase to support high-throughput batch computation.
[0005] In known solutions, existing frameworks for batch computation of tensors (e.g., Damgård et al.'s SPDZ uses a "preprocessing-online" paradigm) employing homomorphic encryption to generate Beaver triples offline, followed by Beaver multiplication and verification with information authentication codes in the online phase. Hybrid multiplication follows the triple paradigm, merging shares or performing multiple multiplications in the arithmetic sharing domain. Based on this, generating Beaver triples with (partial) homomorphic encryption and ensuring correctness with MAC verification, while scalable to malicious security, still requires merging shares or performing multiple multiplications in the sharing domain for hybrid multiplication. This necessitates application-layer assembly and multiple primitive calls, easily leading to dimensionality and bandwidth overhead, and lacks dedicated structured primitives for "linear superposition followed by product." Furthermore, triple generation and consistency verification incur significant offline and storage costs in high-dimensional / large-batch scenarios.
[0006] Among the known solutions of the inventor, most existing solutions will... Algebraically, this can be expanded into "four secure multiplications + summation" or by merging shares before performing a single multiplication. For example, the MP-SPDZ framework by Keller et al. and the CrypTen framework perform addition / arithmetic sharing based on secret sharing of values and complete multiplication through multi-party interaction. MP-SPDZ adopts a "preprocessing-online" paradigm, integrating mechanisms such as Beaver triples and MAC to support different security levels and post-arithmetic endpoints. CrypTen provides tensor interfaces and basic operators such as matrix multiplication. Based on this, although the MP-SPDZ and CrypTen frameworks can provide a mature engineering ecosystem and matrix / tensor operators, hybrid multiplication often follows algebraic expansion or merges shares before calling a secure matrix multiplication, which is a general primitive combination. It lacks structured one-time reduction for cross-terms, resulting in many intermediate states and communication amplification. Furthermore, under large-scale batch processing, multiple primitive calls and multi-party message exchanges lead to high bandwidth and end-to-end latency.
[0007] Based on the above description, existing solutions cannot simultaneously satisfy the requirements for secure computation in the arithmetic domain. It provides a comprehensive goal of offering structured one-time multiplication primitives, low-interaction (up to single rounds) output of hybrid product sharing in online stages, native friendliness to matrix-tensor unification and batch parallelism, and reducing input redistribution without changing the data domain boundaries. Summary of the Invention
[0008] To address the aforementioned problems in the existing technology, this application provides a secure and universal hybrid multiplication and tensor hybrid multiplication integrated calculation method and apparatus for both parties.
[0009] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a secure and universal hybrid multiplication and tensor hybrid multiplication integrated computation method for both parties, including: Construct a secure two-party general hybrid multiplication protocol and a secure two-party tensor hybrid multiplication protocol; Obtain a computation request; Based on the computation request, a secure two-party general hybrid multiplication protocol or a secure two-party tensor hybrid multiplication protocol is matched to complete the computation. During the computation process, a semi-honest model is used to perform security analysis on the secure two-party general hybrid multiplication protocol or the secure two-party tensor hybrid multiplication protocol.
[0010] Secondly, this application provides a secure and universal hybrid multiplication and tensor hybrid multiplication integrated computing device for two parties, including: a client and multiple participating node nodes; the multiple participating node nodes all interact with the client; The client is used to generate computation requests and to collect the computation results from each participating node; Multiple participating nodes are used to construct a secure two-party general hybrid multiplication protocol and a secure two-party tensor hybrid multiplication protocol, respectively, and to match the secure two-party general hybrid multiplication protocol or the secure two-party tensor hybrid multiplication protocol based on the computation request, complete the computation, and use a semi-honest model to perform security analysis on the secure two-party general hybrid multiplication protocol or the secure two-party tensor hybrid multiplication protocol during the computation process.
[0011] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described integrated computation method for two-way secure general hybrid multiplication and tensor hybrid multiplication.
[0012] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a secure, universal hybrid multiplication and tensor hybrid multiplication integrated computation method and apparatus for two parties. By constructing a secure two-party universal hybrid multiplication protocol, it provides structured first-order multiplication primitives, achieving secure addition secret sharing without disclosing input and intermediate information from each party, thus realizing the goal of hybrid product sharing. This reduces intermediate states and communication amplification, achieving low interaction and high throughput in the online stage, thereby solving the problems of online interaction and matrix / tensor multiplication circuits in large-scale matrix and high-dimensional tensor batch processing. By constructing a secure two-party tensor hybrid multiplication protocol, this application achieves user-friendly matrix-tensor unification and batch parallel processing goals in high-dimensional and large-scale scenarios. Furthermore, it reduces input redistribution without changing data domain boundaries, maintains numerical consistency, and controls bandwidth and latency, thereby solving the problems of matrix-tensor unification, batch processing nativeness, and the structuring of hybrid multiplication. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A flowchart of a two-party secure universal hybrid multiplication and tensor hybrid multiplication integrated computation method provided in an embodiment of this application; Figure 2 A schematic diagram illustrating a secure two-party general mixed multiplication calculation problem provided in an embodiment of this application; Figure 3A flowchart of a secure two-party general hybrid multiplication protocol calculation is provided for one embodiment of this application; Figure 4 A schematic diagram illustrating a secure two-way tensor hybrid multiplication computation problem provided in an embodiment of this application; Figure 5 A flowchart of a secure two-party tensor hybrid multiplication protocol calculation is provided for one embodiment of this application; Figure 6 A flowchart illustrating the implementation of a two-party secure general-purpose hybrid multiplication and tensor hybrid multiplication integrated computing device for distributed participants, provided in one embodiment of this application; Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0017] In one exemplary embodiment, this application provides a secure, universal hybrid multiplication and tensor hybrid multiplication integrated computation method for two parties. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is described using a server as an example. Figure 1 As shown, the method includes: Step 100: Construct the Secure Two-Party General Hybrid Multiplication Protocol (2PCGHM) and the Secure Two-Party Tensor Hybrid Multiplication Protocol (2PCTHM).
[0018] Step 101: Obtain the computation request.
[0019] Step 102: Based on the computation request, match the secure two-party general hybrid multiplication protocol or the secure two-party tensor hybrid multiplication protocol, complete the computation, and use a semi-honest model to perform security analysis on the secure two-party general hybrid multiplication protocol or the secure two-party tensor hybrid multiplication protocol during the computation process.
[0020] By implementing steps 100-102 above, this application constructs a family of hybrid multiplication-specific protocols (2PCGHM, 2PCTHM) to achieve consistent processing of scalars / vectors / matrices / tensors under a unified representation of finite fields, and provides formal guarantees of correctness and semi-honest safety.
[0021] In an exemplary embodiment of this application, a secure two-party general hybrid multiplication protocol can be described as: a securely shared form of a hybrid product result obtained by multiple participating parties without disclosing their respective private inputs from different sources. The types of private inputs include scalars, vectors, or matrices. Based on this, the computational problem of the secure two-party general hybrid multiplication protocol is defined as: Assume there are two independent and mutually distrustful computational participants, namely the first participant. Second Participant First Participant It holds a set of private inputs stored only on the local computing node. and (Can be a matrix, vector, or scalar, where vectors and scalars are considered matrices of a special dimension), its dimension is and Second Participant It holds a set of private inputs stored only on the local computing node. and (Can be a matrix, vector, or scalar), its dimension is and The two parties hope to jointly compute by implementing a secure, two-party, universal hybrid multiplication protocol. Ultimately, each participant receives a dimension of... Local output share and ,satisfy The results are then sent to the requesting party, which aggregates them to obtain the desired two-party multiplication result. During the computation, none of the participating parties can obtain any information about the input and output data of the other party, nor can they know the intermediate computation results. The formal description of the computation problem of the secure two-party general hybrid multiplication protocol is as follows: Figure 2 As shown.
[0022] Based on the computational problem defined above, the process of a secure two-party general hybrid multiplication protocol can be described as follows: Secure two-party general hybrid multiplication computation typically occurs in collaborative modeling scenarios involving linear combinations and products, and is particularly common in typical applications such as regression modeling, collaborative recommendation, and feature interaction. In such tasks, each participant holds two sets of private inputs from different sources, and the input types can be scalars, vectors, or matrices (uniformly regarded as linear operators satisfying the corresponding dimensional constraints). Under the condition of dimensional matching, the protocol aims to directly obtain the product after linear superposition without explicitly generating linear superposition terms. The addition secret sharing representation. By executing a secure two-party general hybrid multiplication protocol, both parties can generate a securely shared form of the hybrid product result without revealing their original inputs. The protocol provides a unified dimensional representation for multiplication calculations of mainstream linear algebra objects such as scalars, vectors, and matrices, thus possessing good versatility and scalability. To avoid loss of generality and facilitate protocol description, this application uniformly treats scalars and column / row vectors as special forms of two-dimensional matrices. The term "matrix" as used below refers to this type of generalized two-dimensional arithmetic object. Let the first participant in the secure two-party general hybrid multiplication protocol... The initial input is (Can be a unified representation of scalars, vectors, or matrices) and Second Participant The initial input is and The above dimensions satisfy multiplicative property (inner dimension) Consistent, output is Based on this, and based on such Figure 3 The calculation process shown in this application for the secure two-party general hybrid multiplication protocol includes: Step 1: Generate random matrix triples, and randomly sample to generate the first invertible matrix. Second invertible matrix A random matrix triplet consists of a first random matrix set, a second random matrix set, and a third random matrix set. The dimension of the first random matrix set is... , including: the first random matrix Second random matrix and the third random matrix The dimension of the second random matrix group is... , including the fourth random matrix The fifth random matrix and the sixth random matrix The dimension of the third random matrix group is... Including: the seventh random matrix The eighth random matrix and the ninth random matrix Random triples satisfy the constraints. , , The first invertible matrix Second invertible matrix The dimension is , The first invertible matrix Second invertible matrix The inverse matrix is and .
[0023] In this process, step 1 is mainly completed by auxiliary nodes. In subsequent processing, the auxiliary nodes will... , , , , Send to the first participant , matrix , Send to the second participant .
[0024] Step 2: Based on the first random matrix The fourth random matrix The seventh random matrix The first private result is obtained by taking the inverse of the first and second invertible matrices. Second private result The first calculation result is obtained based on the first private result and the second private result. Second calculation result .
[0025] Step 2 above is mainly undertaken by the first participating party. Completed. First participant Local computation And on its right side, the dimension is The zero matrix yields the first private result. Calculated locally And splice the dimension above it. The pure zero matrix yields the second private result. Using the first private result Second private result Perform local calculations to obtain the first calculation result. Second calculation result and the first calculation result Second calculation result Send to the second participant .
[0026] Step 3: Based on the second random matrix The fifth random matrix The eighth random matrix The inverse of the first invertible matrix and the second invertible matrix yield the third private result. and the fourth private result The third calculation result is obtained based on the third and fourth private results. and the fourth calculation result .
[0027] Step 3 above is mainly undertaken by the second participating party. Completed. Second participant Local computation And on its left side, the splicing dimension is The zero matrix yields the third private result. Calculated locally And below it, the dimension is The zero matrix yields the fourth private result. Using third-party private results and the fourth private result Perform local calculations to obtain a third calculation result. and the fourth calculation result and the third calculation result Fourth calculation result Send to the first participant .
[0028] Step 4: Based on the first calculation result Second calculation result Third calculation result and the fourth calculation result Determine the fifth calculation result And the sixth calculation result .
[0029] Step 5: Determine the first intermediate result based on the private input of the first participant. And based on the first random matrix The fourth random matrix The seventh random matrix Fifth calculation result And the sixth calculation result Obtain the second intermediate result .
[0030] Steps 4 and 5 above are performed by the first participating party. Completed. First participant The fifth calculation result is calculated locally using the information obtained from the exchange. And the sixth calculation result And further calculate the first intermediate result locally. With the second intermediate result .
[0031] Step 6: Determine the third intermediate result based on the private input of the second participant. And based on the second random matrix The fifth random matrix The eighth random matrix Fifth calculation result And the sixth calculation result The fourth intermediate result was obtained. .
[0032] Steps 4 and 6 above can be performed by a second participating party. Completed. Second participant The fifth calculation result is calculated locally using the information obtained from the exchange. And the sixth calculation result And further calculate the third intermediate result locally. With the fourth intermediate result .
[0033] Step 7: Based on the first intermediate result Second intermediate result Obtain the first local output result Based on the third intermediate result and the fourth intermediate result Obtain the second local output result .
[0034] Step 8: Based on the first local output result Second local output results The calculation results are obtained.
[0035] Steps 7 and 8 above are passed through the first participating party Second Participant To achieve interaction. First participant. Second Participant The first local output results calculated by each of them Second local output results The result is sent to the requester of the multiplication calculation, who then aggregates the results to obtain the final product. .
[0036] Furthermore, the above relationship can be used to verify that: .
[0037] In one exemplary embodiment of this application, the secure two-party tensor hybrid multiplication protocol transforms tensor hybrid multiplication into parallel batch processing of multiple low-dimensional hybrid multiplications. Low-dimensional refers to a dimension below a set limit. Based on this, the computational problem of the secure two-party tensor hybrid multiplication protocol is defined as: First Participant It holds a set of private input tensors stored only on the local computing node. and Second Participant It holds a set of private input tensors stored only on the local computing node. and The two parties hope to jointly compute tensor products by implementing a secure two-party tensor hybrid multiplication protocol. Ultimately, each participant will receive a dimension of... Local output share and ,satisfy This result is then sent to the computation requester, who aggregates it to obtain the desired result of the two-way tensor mixed multiplication. During the computation, all calculations are performed over a finite field. In this process, tensor elements must first be mapped to domain elements through fixed-point encoding, and then decoded back to their original values after computation. None of the participating parties can obtain any information about the input or output data of the other party, nor can they know the intermediate computation results. The problem of a secure two-party tensor hybrid multiplication protocol is formally described as follows: Figure 4 As shown.
[0038] Based on the computational problem defined above, the process of the secure two-party tensor hybrid multiplication protocol can be described as follows: Secure two-party tensor hybrid multiplication is designed for confidential collaborative computation scenarios involving high-dimensional data. Its applications cover tasks such as intermediate representation fusion in distributed training processes, confidential combination of cross-domain feature interactions, and encrypted statistical summarization. It can complete hybrid product computation without explicitly constructing linear superposition terms, balancing versatility, scalability, and privacy. Secure two-party tensor hybrid multiplication can be viewed as performing multiplication on each batch index within a higher-dimensional structure. The corresponding matrix , sum matrix , Performing a regular matrix mixed multiplication is essentially transforming tensor mixed multiplication into a batch parallel execution of several low-dimensional mixed multiplications. For computation scenarios involving first-order (scalar) and second-order (matrix) tensors, the aforementioned 2PCGHM can be directly invoked. However, for the need to compute higher-dimensional tensors, this application further designs a tensor mixed multiplication (tensor shrinking) protocol with arbitrary-dimensional support to achieve efficient expansion. Without loss of generality, let the initial input tensor of Alice, the first participant in this protocol, be... and Second Participant The initial input tensor is and ,in Represents any number of batch processing dimensions. These represent the main computational dimensions of multiplication, and the last two dimensions of the tensor for mixed multiplication operations. and This will be carried out in batches. Based on this, and according to... Figure 5 The computation flow shown in this application, the computation process of the secure two-party tensor hybrid multiplication protocol includes: Step 1: Transfer the private input of the first participant , Private input of the second participant , The former Each dimension is treated as a batch processing dimension, and this... After flattening each dimension into a single batch dimension, the private inputs of the first participant and the private inputs of the second participant are reshaped.
[0039] Step 1 above is mainly undertaken by the first participating party. Second Participant The dimension transformation module in [the system / platform] is implemented. First participant. tensor and The former Dimensions This is considered a batch processing dimension, used to indicate the number of matrix multiplications that need to be performed in parallel. Each dimension is flattened into a single batch dimension (in ascending order of dimension index), and the input tensors are reshaped as follows: and The shape, in which This operation is equivalent to treating the original tensor as containing... An independent and Matrix, denoted as and Similarly, the second participant tensor and The former Dimensions This is considered a batch processing dimension, used to indicate the number of matrix multiplications that need to be performed in parallel. Each dimension is flattened into a single batch dimension (in ascending order of dimension index), and the input tensors are reshaped as follows: and The shape, in which This operation is equivalent to treating the original tensor as containing... An independent and Matrix, denoted as and .
[0040] Step 2: Employing a secure two-party universal hybrid multiplication protocol, the product operation is performed in parallel based on the reshaped private inputs of the first participant and the reshaped private inputs of the second participant, resulting in the first private matrix and the second private matrix. .
[0041] This step is mainly undertaken by the first participating party. Second Participant The core multiplication calculation module is implemented in [the system / process]. First participant. Second Participant Each index in the flattened batch dimension Corresponding matrix pairs and As input, based on The product operation is performed in parallel. After the protocol calculation is completed, both parties receive their respective shares of the intermediate results (i.e., the first private matrix and the second private matrix). ), and satisfy the relation .
[0042] Step 3: Reshape the first private matrix and the second private matrix Obtain the first structure tensor and the second structure tensor .
[0043] Step 4: Obtain the calculation results based on the first structure tensor and the second structure tensor.
[0044] Steps 3 and 4 above are mainly handled by the first participating party. Second Participant The tensor reshaping module is implemented in [the framework / platform]. First participant. Second Participant Each of their private matrix groups and (i.e., the first private matrix and the second private matrix) are reshaped to obtain a multidimensional structure identical to the original tensor, namely the first structure tensor and the second structure tensor. These two multidimensional structures are stored in the private storage space within their respective local nodes.
[0045] First Participant Second Participant The private tensors after summing the final result shares (i.e., the first structure tensor and the second structure tensor) and The result is sent to the party requesting the secure two-party tensor multiplication calculation, which then aggregates the results to obtain the final calculation result. .
[0046] Furthermore, the above relationship can be used to verify that: .
[0047] In one exemplary embodiment of this application, the security analysis of the secure hybrid multiplication protocol architecture (2PCGHM and 2PCTHM) involved in this application is based on a semi-honest model. The semi-honest model assumes that all participants (the first participant Alice and the second participant Bob) and the auxiliary node CS strictly adhere to the execution process stipulated in the protocol and do not actively deviate from the preset steps. However, they may record all information they obtain during the protocol execution process (including local private inputs, parameters received from the auxiliary node, messages exchanged with the other party, intermediate results of local calculations, and the final output share), and attempt to deduce the private data of other participants through this information.
[0048] The auxiliary node CS is only responsible for generating random parameters (random matrix triples, invertible matrices, and inverse matrices) independent of the participants' inputs. It does not participate in subsequent calculations and does not receive any interactive messages during protocol execution. Even if the auxiliary node CS is untrusted, the random parameters it possesses are independent of both parties' inputs and cannot be used to deduce the participants' privacy on its own. Under this model, protocol security must satisfy information-theoretic security, which is proven based on the "simulation paradigm": for any participant, there exists a simulator that can generate a simulated view that is indistinguishable from the "view" obtained by that participant in the real protocol, using only that participant's own inputs and outputs. This indistinguishability does not depend on the computational complexity assumption; even if an attacker has unlimited computing power, they cannot deduce the privacy information of other participants from the view.
[0049] It should be clarified that the protocol system provided in this application has a clear security dependency: 2PCGHM is the foundational protocol of the entire system, and its security is a prerequisite for the security analysis of 2PCTHM. 2PCTHM achieves high-dimensional scenario expansion through a process of "dimensional transformation - parallel invocation of 2PCGHM - tensor reshaping," and its security is built upon the security of 2PCGHM. Only the privacy protection capabilities of the high-dimensional expansion steps (tensor flattening, parallel batch processing, and tensor reshaping) need to be verified. Based on this, subsequent security analysis will follow the approach of "complete proof of the foundational protocol and focus on the newly added steps of the extended protocol": first, a detailed proof of the information-theoretical security of 2PCGHM under the semi-honest model, including the privacy protection capabilities of procedural interactions and result outputs. For 2PCTHM, based on reusing the security conclusions of 2PCGHM, the focus will be on analyzing the security of its newly added steps in high-dimensional tensor scenarios, verifying the security self-consistency and transitivity of the entire protocol system. Based on the above description, the security analysis of the secure two-party general hybrid multiplication protocol using the semi-honest model includes: view definition, simulator construction, and security verification. The security analysis of the secure two-party tensor hybrid multiplication protocol using a semi-honest model includes: process-level privacy protection and result verification.
[0050] I. Security analysis of a universal hybrid multiplication protocol for two secure parties.
[0051] 1. View definition.
[0052] In the semi-honest model, a participant's "view" refers to the set of all information it acquires during the protocol execution process, which must fully cover the information throughout the entire process of "input-parameter-interaction-computation-output".
[0053] First Participant The view is: In this formula, , The first participant Private input. , , It is the splitting share of random triples received from the auxiliary node CS. It is the invertible matrix and its inverse matrix received from the auxiliary node CS. (Mask matrix after concatenating zero matrices) (Mask matrix after concatenating zero matrices) (Mask difference) (The difference between the two masks is added together) (Independent product of its own input) (The share calculation result after interaction) is the first participant. Intermediate results from local computation. , From The difference in the received mask. yes The output share.
[0054] Second Participant The view is: In this formula , It is the second participant Private input. , , It is the splitting share of random triples received from the auxiliary node CS. It is the invertible matrix and its inverse matrix received from the auxiliary node CS. (Mask matrix after concatenating zero matrices) (Mask matrix after concatenating zero matrices) (Mask difference) (The difference between the two masks is added together) (Independent product of its own input) (The result of the share calculation after interaction) is Intermediate results from local computation. , From The difference in the received mask. yes The output share.
[0055] 2. Simulator construction.
[0056] To prove the security of the protocol, one must be the first party involved. Second Participant Construct simulators separately and Furthermore, the simulator only needs to utilize the participants' own private inputs and final output shares to generate a simulated view that is indistinguishable from the real view.
[0057] 1) For the first participating party simulator Its input is private input. and output share Generate a simulation view .
[0058] (1) Simulated auxiliary node parameters: sampling and reality Identically distributed random invertible matrices and reality Identical distribution .
[0059] (2) Simulate local intermediate results: Calculate , Simulate the first participant The mask matrix is calculated. , (Simulated mask difference).
[0060] (3) Simulated interactive messages: due to real interactive messages The distribution of the random matrix is equivalent to that of the random matrix (to be verified later), therefore, the random matrix is directly sampled. , Simulate a second participant The message sent.
[0061] (4) Simulated share calculation: Simulated mask difference superposition , .calculate .according to and By reverse reasoning .
[0062] (5) Generate simulation view: With the first participant The actual view distribution is consistent.
[0063] 2) For the second participating party simulator Its input is private input. and output share To generate a simulated view .
[0064] (1) Simulated auxiliary node parameters: sampling and reality Identically distributed random invertible matrices and reality Identical distribution .
[0065] (2) Simulate local intermediate results: Calculate , Simulate a second participant The mask matrix is calculated. , (Simulated mask difference).
[0066] (3) Simulated interactive messages: due to real interactive messages The distribution is equivalent to a random matrix, therefore, direct sampling of the random matrix is possible. , Simulate the first participant The message sent.
[0067] (4) Simulated share calculation: Simulated mask difference superposition , .calculate .according to and By reverse reasoning .
[0068] (5) Generate simulation view: With the second participant The actual view distribution is consistent.
[0069] 3. Security verification.
[0070] Proof required: The first participant Simulated view With real view Indistinguishable, second party Simulated view With real view Indistinguishable, meaning that their distributions are completely identical in the information theory sense.
[0071] In generative security analysis, procedural security refers to the protection of privacy in intermediate interactions and parameters. Specifically, procedural security means that during protocol execution, parameters provided by the auxiliary node (CS) and messages exchanged between participants do not reveal each other's private inputs.
[0072] The random triples and invertible matrices generated by the auxiliary node CS are both randomly generated, and are consistent with the first participant. of Second Participant of Completely independent. The parameters received by each participant from the auxiliary node CS are determined solely by a random source, and it is impossible to deduce the input from the other party using these parameters.
[0073] For intermediate messages, the first participant of For example, due to It is a uniformly random matrix, and its randomness completely masks the fact that... The information makes The distribution is equivalent to a randomly generated matrix. Similarly, the second participant... of middle, The randomness masked Information, It is also equivalent to a random matrix. Similarly, All because The randomness is equivalent to a random matrix. Therefore, the first participant With the second participant exchange All messages are random and equivalent, and their respective private data cannot be leaked.
[0074] Regarding the privacy of local computing, the first participant calculate Second Participant calculate All operations are performed locally and independently, without data interaction. (To be continued...) computational dependency (The superposition of random messages from both sides still results in a random matrix), so the local computation process will not expose its own inputs or intermediate results.
[0075] In generative security analysis, outcome security means that output shares do not reveal the inputs of other participants. Outcome security means that a participant's final output share is only related to its own input and the global product result, and it is impossible to deduce the inputs of other participants from the share.
[0076] First Participant Output share :in, Relying solely on its own input , Dependence on random triplet share and random messages ,and Included Input information Already The randomness is completely masked. Therefore, The distribution is only with Global product Related to the second participant of Irrelevant.
[0077] Second Participant Output share :in, Relying solely on its own input , Dependence on random triplet share and random messages , The first participant included The input information has been... The randomness is masked. Therefore, The distribution is only with Related to global product, and of Irrelevant.
[0078] In conclusion, neither party can deduce the other's private inputs from their own output share.
[0079] The simulated view is indistinguishable from the real view.
[0080] For the first participant , In Compared to the actual view , , , All are identically distributed random parameters. With reality All are random matrices with consistent distribution. The computational logic is completely consistent with the actual process. Depend on Reverse generation, while reality It is itself The randomness of the two is equivalent. Therefore, and Indistinguishable.
[0081] Similarly, for the second participating party , In It is distributed in the same way as the true parameters. With reality All are random matrices. The computational logic is consistent with the actual process. Depend on Reverse generation, compared with reality The randomness is equivalent to that. Therefore, and Indistinguishable.
[0082] In summary, the first participant Second Participant The simulated view generated by the simulator is indistinguishable from the real view in an information theory sense, indicating that under the semi-honest model, any participant can only obtain information related to its own inputs and outputs through its own view, and cannot deduce the private data of other participants. Therefore, 2PCGHM satisfies both procedural and outcome security, and is secure in an information theory sense, which can serve as the basis for 2PCTHM security analysis.
[0083] I. Security Analysis of the Secure Two-Party Tensor Hybrid Multiplication Protocol.
[0084] 2PCTHM addresses confidential collaborative computing scenarios with high-dimensional data, achieving privacy-preserving hybrid multiplication operations through a process of "dimensional transformation—parallel 2PCGHM invocation—tensor reshaping." In the semi-honest model, the protocol critically relies on the verified secure two-party general hybrid multiplication protocol (2PCGHM). This protocol has been proven through simulation paradigms that the participating parties' views possess information-theoretic indistinguishability, and intermediate interaction messages (such as mask differences and output shares) do not reveal the other party's private inputs (see Section 4.6.1 for a detailed proof of 2PCGHM's security analysis). 2PCTHM's security is built upon "batch processing parallelism" and "inheritance of 2PCGHM security attributes," with core analysis focusing on process-level privacy protection and result-level verifiability.
[0085] 1. Procedural Security: Privacy Protection in Dimensional Operations and Parallel Computation. The core processes of 2PCTHM—"Dimensional Transformation—Parallel Computation—Tensor Reshaping"—do not involve the leakage of privacy information. Each step ensures privacy through "purely formal operations" or "reusing 2PCTHM security attributes," as detailed below: 1) Dimension transformation stage (corresponding to step 1 in the above calculation process of the secure two-party tensor hybrid multiplication protocol), which is a purely formal dimension transformation and does not leak data privacy.
[0086] First Participant Second Participant Private tensors and The former Wei Zhanping as a batch dimension ( ), reshape the tensor into and The structure is such that this operation only changes the storage format of the tensor and performs a dimensional transformation, without modifying the data content. Furthermore, the flattened tensor is indistinguishable from a randomly generated tensor distribution of the same dimension, and since it does not involve data interaction, attackers cannot reverse-engineer the original tensor privacy.
[0087] 2) Parallel 2PCGHM computation stage (corresponding to step 2 in the above-mentioned secure two-party tensor hybrid multiplication protocol computation process), inherits the security of the basic protocol, and batch computation has no information overlap.
[0088] For each index batch, the participants use their respective matrix pairs as input and call 2PCGHM in parallel to perform mixed multiplication. Since 2PCGHM has been verified to not leak input information during interaction, and each batch computation is independent with no cross-batch dependencies or information exchanges, it ensures that parallel computation does not leak the privacy of the original tensors.
[0089] 3) Tensor reshaping phase (corresponding to step 3 in the above secure two-party tensor hybrid multiplication protocol calculation process): Local structure is restored without changing data privacy attributes. First participant Second Participant Parallel results are restructured and stored locally. The reshaping only restores the multidimensional form, without changing the data content, and the restructured tensor shares are indistinguishable from random high-dimensional tensor distributions, making it impossible for attackers to reverse engineer the original tensor privacy.
[0090] 2. Outcome Security: Indistinguishability of output shares. The final output of the agreement belongs to the first participant. Second Participant Tensor shares held by each and ,satisfy Result-level security is manifested in the fact that participants cannot deduce the private tensor input of the other party through their own share, which is mainly due to the "random inheritance" and "input independence" of the share.
[0091] The randomness of the tensor shares is inherited from the random parameters of 2PCGHM. Depend on Each batch of 2PCGHM output shares is reshaped and generated, while each batch share The randomness is inherited from the random parameters of 2PCGHM (such as random triples generated by auxiliary nodes, invertible matrices, etc.). These random parameters are completely independent of the inputs from both sides, ensuring that each batch share... Equivalent to a random matrix, which in turn leads to the reshaped tensor share. It is indistinguishable from a "randomly generated high-dimensional tensor" in terms of distribution.
[0092] The share input is independent of the other party. First participant. tensor share Determined by its own batch input and the random parameters of 2PCGHM, among which, the second participant The input information has been completely masked by the 2PCGHM masking mechanism. The distribution is only with Global product Related to the second participant The private tensor is irrelevant. Similarly, the second participant... share Only with Related to global product, and related to the first participant. The private tensors are irrelevant. Therefore, participants cannot deduce the private input tensor information of the other party based on their own tensor share.
[0093] In summary, the Secure Two-Party Tensor Hybrid Multiplication Protocol (2PCTHM) systematically guarantees privacy and security at both the procedural and result levels by leveraging its features of "purely formalized operations for dimension transformation, complete inheritance of 2PCTHM security attributes, and indistinguishability of tensor reshaping." Under the semi-honest model, the protocol can perform secure computation of high-dimensional hybrid products without explicitly constructing linear superposition terms, without revealing the private tensor inputs of the participating parties.
[0094] Based on the same inventive concept, this application also provides a two-way secure universal hybrid multiplication and tensor hybrid multiplication integrated computing device for implementing the aforementioned two-way secure universal hybrid multiplication and tensor hybrid multiplication integrated computing method. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more two-way secure universal hybrid multiplication and tensor hybrid multiplication integrated computing device embodiments provided below can be found in the limitations of the two-way secure universal hybrid multiplication and tensor hybrid multiplication integrated computing method described above, and will not be repeated here.
[0095] In one exemplary embodiment, such as Figure 6 As shown, a secure, universal hybrid multiplication and tensor hybrid multiplication integrated computing device for two parties is provided, comprising a client and multiple participating node nodes. All participating node nodes interact with the client via data.
[0096] The client is used to generate computation requests and to collect the computation results from each participating node.
[0097] Multiple participating nodes are used to construct a secure two-party general hybrid multiplication protocol and a secure two-party tensor hybrid multiplication protocol, respectively. They are also used to match the secure two-party general hybrid multiplication protocol or the secure two-party tensor hybrid multiplication protocol based on the computation request, complete the computation, and use a semi-honest model to perform security analysis on the secure two-party general hybrid multiplication protocol or the secure two-party tensor hybrid multiplication protocol during the computation process.
[0098] As an optional implementation method, such as Figure 6 As shown, each participating node includes: The task acquisition module connects to the client and is used to acquire computation requests.
[0099] The secure computation module, connected to the task acquisition module, is used to match a secure two-party general hybrid multiplication protocol or a secure two-party tensor hybrid multiplication protocol based on the computation request.
[0100] The rule generation module, connected to the secure computing module, is used to split computing tasks according to the asynchronous instruction set of the secure computing protocol, and different computing nodes perform collaborative computing according to their respective self-rules.
[0101] The consensus computation module, connected to the rule generation module, is used to ensure the synchronization and consistency of computation results through the consensus protocol after receiving the assigned sub-rules, thus completing the computation.
[0102] The data sending module is connected to both the consensus calculation module and the client, and is used to send the calculation results.
[0103] Based on the device structure described above, in practical applications, a corresponding distributed computing framework needs to be deployed on the participating nodes in the secure two-party tensor and general multiplication computation tasks. In this framework, the task acquisition module is responsible for receiving and decoding privacy-preserving computation requests from clients; the secure computation module automatically matches the corresponding secure multiplication computation protocol based on the parsed computation request; the rule generation module decomposes the computation task according to the asynchronous instruction set of the secure computation protocol, and different computation nodes perform collaborative computation according to their respective self-rules; the consensus computation module, after receiving the assigned sub-rules, ensures the synchronization and consistency of the computation results through a consensus protocol; and the data sending module, after completing the computation, collects the computation results from each participating node and transmits them to the computation requester.
[0104] Based on the above description, the implementation process of the device provided in this application is as follows: An external client sends a secure multiplication calculation request to a network terminal (including participating nodes and auxiliary nodes) with a distributed computing service deployed via HTTP or GRPC (General Remote Procedure Call Protocol). When the task acquisition module of the participating node on the network receives the request for multiplication calculation, it parses it and starts the secure computing service process of the corresponding computing participating node. After the task acquisition module finishes parsing the corresponding computing requirements, it passes them to the secure computing module, which performs a joint query through its internal interface. After matching the corresponding secure computing protocol, it synchronizes it to the rule generation module of the corresponding computing participating node. The rule generation module formulates different asynchronous parallel execution processes according to the different sub-tasks undertaken by different participating parties, and maintains communication with the consensus computing module at each step of the execution. While the corresponding participating party executes each step of the calculation instruction, the consensus computing module broadcasts and maintains the consistency of the results of the distributed computing nodes (i.e., participating nodes) on the chain and controls the stability of the execution process. After the final calculation protocol is executed, the corresponding participating nodes obtain the sub-results of each other's calculations and send their respective shares of the product result to the calculation requester through the data sending module to obtain the correct calculation result.
[0105] In summary, compared to two-way solutions represented by obfuscated circuits / OT (such as ABY / Obliv-C) or homomorphic encryption, this application uses 2PCGHM as its core, directly handling "hybrid multiplication" under finite field arithmetic. Through the design of bilateral invertible linear transformations and related random materials, it converges cross-terms into a single-round online share generation process, avoiding the gate / OT-level expansion caused by bit-by-bit circuitization and the ciphertext parameter burden of homomorphic encryption routes. As a result, the communication and computing scale grows linearly / quasi-linearly with the data dimension, and the online round trip is fixed at one round. This maintains the same level of privacy guarantee (semi-honest security) as the mainstream two-way frameworks, while significantly reducing bandwidth and latency in large-scale matrix and high-dimensional data scenarios—directly addressing and improving the two core pain points of "low online interaction" and "circuitization expansion."
[0106] Furthermore, compared to engineering frameworks that require assembling batch processing or modifying operators at the application layer (such as shared systems based on triple preprocessing or 2PC primitives that are only matrix-oriented), this application presents 2PCTHM, which natively supports arbitrary batch dimensions and tensor forms through a unified path of "batch flattening - parallel execution - result reshaping," maintaining an interface and security boundaries consistent with matrix protocols. Simultaneously, it only exchanges masking differences, without redistributing original inputs or materializing intermediate cross terms, facilitating seamless integration with fixed-point encoding, quantization / truncation, and mainstream deep learning tensor APIs. Thus, without introducing circuitry, it achieves a balance between "matrix-tensor unification," "batch processing friendliness," and "low interaction and low bandwidth," enabling its practical application in federated / collaborative modeling pipelines.
[0107] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 7 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores integrated computational data for two-way secure general-purpose hybrid multiplication and tensor hybrid multiplication. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a two-way secure general-purpose hybrid multiplication and tensor hybrid multiplication integrated computational method.
[0108] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0109] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0110] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0111] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0112] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0113] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (RRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0114] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0115] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0116] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated calculation method, characterized in that, The application relates to a secure two-party general-purpose mixed multiplication protocol and a secure two-party tensor mixed multiplication protocol. An acquisition request is obtained. Based on the acquisition request, a secure two-party general-purpose mixed multiplication protocol or a secure two-party tensor mixed multiplication protocol is matched, calculation is completed, and in the calculation process, security analysis of the secure two-party general-purpose mixed multiplication protocol or the secure two-party tensor mixed multiplication protocol is carried out in a semi-honest model. The secure two-party general-purpose mixed multiplication protocol is that a plurality of participants obtain a secure shared form of a mixed product result without leaking different source private inputs held by the participants; the types of the private inputs include scalars, vectors or matrices.
2. The two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated calculation method according to claim 1, characterized in that, When the secure two-party general-purpose mixed multiplication protocol is matched, the calculation process comprises the following steps:
3. The two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated calculation method according to claim 2, characterized in that, A random matrix triple is generated, and a first reversible matrix and a second reversible matrix are randomly sampled; the random matrix triple comprises a first random matrix group, a second random matrix group and a third random matrix group; the first random matrix group comprises a first random matrix, a second random matrix and a third random matrix; the second random matrix group comprises a fourth random matrix, a fifth random matrix and a sixth random matrix; the third random matrix group comprises a seventh random matrix, an eighth random matrix and a ninth random matrix; First and second private results are obtained based on the first random matrix, the fourth random matrix, the seventh random matrix, the first reversible matrix and the inverse matrix of the second reversible matrix, and first and second calculation results are obtained based on the first and second private results; Third and fourth private results are obtained based on the second random matrix, the fifth random matrix, the eighth random matrix, the inverse matrix of the first reversible matrix and the second reversible matrix, and third and fourth calculation results are obtained based on the third and fourth private results; Fifth and sixth calculation results are determined based on the first, second, third and fourth calculation results; A first intermediate result is determined based on the private input of the first participant, and a second intermediate result is obtained based on the first random matrix, the fourth random matrix, the seventh random matrix, the fifth calculation result and the sixth calculation result; A third intermediate result is determined based on the private input of the second participant, and a fourth intermediate result is obtained based on the second random matrix, the fifth random matrix, the eighth random matrix, the fifth calculation result and the sixth calculation result; A first local output result is obtained based on the first and second intermediate results, and a second local output result is obtained based on the third and fourth intermediate results; A calculation result is obtained based on the first and second local output results. The secure two-party tensor mixed multiplication protocol is parallel batch processing of a plurality of low-dimensional mixed multiplications by converting tensor mixed multiplication into the low-dimensional mixed multiplications.
4. The two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated calculation method according to claim 1, characterized in that, When the secure two-party tensor mixed multiplication protocol is matched, the calculation process comprises the following steps:
5. The two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated calculation method according to claim 4, characterized in that, The secure two-party general-purpose mixed multiplication protocol is used to perform product operation in parallel based on the reshaped private input of the first participant and the reshaped private input of the second participant, and first and second private matrices are obtained. The private inputs of the first participant and the private inputs of the second participant are combined. Each dimension is treated as a batch processing dimension, and this... After flattening each dimension into a single batch dimension, the private inputs of the first participant and the private inputs of the second participant are reshaped. The first private matrix and the second private matrix are reshaped to obtain a first structure tensor and a second structure tensor; A calculation result is obtained based on the first structure tensor and the second structure tensor.
6. The two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated calculation method according to claim 1, characterized in that, The security analysis of the secure two-party general mixed multiplication protocol in the semi-honest model includes view definition, simulator construction and security verification.
7. The two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated calculation method according to claim 1, characterized in that, The security analysis of the secure two-party tensor mixed multiplication protocol in the semi-honest model includes process-level privacy protection and result verification.
8. A two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated computing device, characterized by, The device is used for implementing the two-party-oriented secure general mixed multiplication and tensor mixed multiplication integrated calculation method according to any one of claims 1-7; the device comprises a client and a plurality of participant nodes; the plurality of participant nodes are in data interaction with the client; The client is used for generating a calculation request and collecting calculation results of the participant nodes; The plurality of participant nodes are respectively used for constructing a secure two-party general mixed multiplication protocol and a secure two-party tensor mixed multiplication protocol, matching the secure two-party general mixed multiplication protocol or the secure two-party tensor mixed multiplication protocol based on the calculation request, completing calculation, and performing security analysis of the secure two-party general mixed multiplication protocol or the secure two-party tensor mixed multiplication protocol in a semi-honest model in a calculation process. 9.The two-party oriented secure general hybrid multiplication and tensor hybrid multiplication integrated computing device according to claim 8, wherein, Each participant node comprises: A task acquisition module connected with the client and used for acquiring the calculation request; A secure calculation module connected with the task acquisition module and used for matching the secure two-party general mixed multiplication protocol or the secure two-party tensor mixed multiplication protocol based on the calculation request; A rule generation module connected with the secure calculation module and used for implementing calculation task splitting according to an asynchronous instruction set of the secure calculation protocol, and different calculation nodes performing cooperative calculation according to respective corresponding self-rules; A consensus calculation module connected with the rule generation module and used for guaranteeing calculation synchronization and result consistency through a consensus protocol after accepting allocation to each item of sub-rule, completing calculation; A data sending module respectively connected with the consensus calculation module and the client and used for sending the calculation result.
10. A computer device comprising: A memory, a processor and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the two-party-oriented secure general mixed multiplication and tensor mixed multiplication integrated calculation method according to any one of claims 1-7.