Secure multi-party computation for encryption
Patent Information
- Application Number
- PCT/CN2025/078964
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2026-09-03
Smart Images

Figure CN2025078964_03092026_PF_FP_ABST
Abstract
Description
SECURE MULTI-PARTY COMPUTATION FOR ENCRYPTIONTECHNICAL FIELD
[0001] The present disclosure relates, in general, to secure multi-party computation for encryption.BACKGROUND
[0002] In distributed environments such as cloud computing for example, where trusted execution environments (TEEs) or secure hardware security modules (HSMs) are not available for symmetric key encryption, software-based cryptographic key protection with multi-party collaboration (MPC) can be used to achieve high levels of cryptographic module certification.
[0003] SM4, also known as also known as ShāngMì 4, is a symmetric encryption algorithm that uses a block cipher to secure data transmissions and storage. It is a member of the family of Advanced Encryption Standard (AES) ciphers and is widely used for secure data transmissions in distributed environments.SUMMARY
[0004] An objective of the present disclosure is to provide improved implementations of the SM4 encryption algorithm using secure multi-party computation techniques.
[0005] The foregoing and other objectives are achieved by the features of the independent claims.
[0006] Further implementation forms are apparent from the dependent claims, the description and the Figures.
[0007] A first aspect of the present disclosure provides a method for secure multi-party computation for SM4 encryption, comprising receiving, at a first party, a master key split into shares between the first party and a second party, performing, at the first party, pre-processing to generate at least one cryptographic primitive comprising at least one tuple, wherein each of the at least one tuples comprise three secret-shared values forming at least one Beaver triple, executing, at the first party, an online phase using the at least one cryptographic primitive, wherein the online phase comprises, expanding the shares of the master key with the second party, performing SM4 encryption operations using the expanded shares of the master key, wherein the online phase requires no more than three rounds of interaction between the first party and the second party.
[0008] Instead of directly invoking a multiplication-to-addition converter, separate online offline phases can be implemented, enabling a reduction in interactions and no computationally intensive public key operations. In an offline phase, public key operation overhead is reduced since no homomorphic encryption is required.
[0009] In an implementation of the first aspect, the pre-processing phase can comprise utilizing an Oblivious Transfer Extension, OTE, protocol to generate the at least one Beaver triple. The OTE protocol can comprise performing, at the first party, oblivious selection of message pairs provided by the second party. Collaboratively performing SM4 encryption operations can comprise collaboratively evaluating substitution boxes, S-boxes, using the at least one Beaver triple.
[0010] A second aspect of the present disclosure provides a system for secure multi-party computation of SM4 encryption, comprising a first computing device associated with a first party, a second computing device associated with a second party, wherein the first and second computing devices are configured to receive respective shares of a master key, wherein the master key has been split into the shares, execute a pre-processing phase to generate at least one cryptographic primitive comprising at least one tuple, wherein each of the at least one tuples comprise three secret-shared values forming at least one Beaver triple, perform an online phase using the generated at least one cryptographic primitive to collaboratively encrypt data using SM4 encryption, wherein the online phase requires no more than three rounds of interaction between the computing devices.
[0011] In an implementation of the second aspect, the pre-processing phase can utilize an Oblivious Transfer Extension, OTE, protocol to generate the at least one Beaver triple. The first and second computing devices collaboratively expand their respective key shares. The first and second computing devices can collaboratively evaluate S-boxes using the at least one Beaver triple during the online phase.
[0012] A third aspect of the present disclosure provides a non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising receiving respective shares of a master key, wherein the master key has been split into the shares, executing a pre-processing phase to generate at least one cryptographic primitive comprising at least one tuple, wherein each of the at least one tuples comprise three secret-shared values forming at least one Beaver triple, performing an online phase using the generated at least one cryptographic primitive to collaboratively encrypt data using SM4 encryption, wherein the online phase requires no more than three rounds of interaction between the computing devices.
[0013] In an implementation of the third aspect, the operations can further comprise collaboratively evaluating S-boxes using the Beaver triples during the online phase. Participating in the pre-processing phase can comprise providing message pairs for oblivious selection. Participating in the pre-processing phase can comprise performing oblivious selection of provided message pairs. The operations can further comprise utilizing an Oblivious Transfer Extension, OTE, protocol to generate the at least one Beaver triple. The operations can further comprise collaboratively expanding the respective key shares of the first and second parties.
[0014] These and other aspects of the invention will be apparent from the embodiment (s) described below.BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order that the present disclosure may be more readily understood, embodiments will now be described, by way of example, with reference to the accompanying drawings, in which:
[0016] Figure 1 is a schematic representation of a message flow for method according to an example;
[0017] Figure 2 is a schematic representation of multiplication-to-addition conversion, according to an example;
[0018] Figure 3 is a schematic representation of a method according to an example;
[0019] Figure 4 is a schematic representation of a method according to an example;
[0020] Figure 5 is a schematic representation of a machine according to an example; and
[0021] Figure 6 is as schematic representation of a method for secure multi-party computation for SM4 encryption, according to an example.DETAILED DESCRIPTION
[0022] Example embodiments are described below in sufficient detail to enable those of ordinary skill in the art to embody and implement the systems and processes herein described. It is important to understand that embodiments can be provided in many alternate forms and should not be construed as limited to the examples set forth herein.
[0023] Accordingly, while embodiments can be modified in various ways and take on various alternative forms, specific embodiments thereof are shown in the drawings and described in detail below as examples. There is no intent to limit to the particular forms disclosed. On the contrary, all modifications, equivalents, and alternatives falling within the scope of the appended claims should be included. Elements of the example embodiments are consistently denoted by the same reference numerals throughout the drawings and detailed description where appropriate.
[0024] The terminology used herein to describe embodiments is not intended to limit the scope. The articles “a, ” “an, ” and “the” are singular in that they have a single referent, however the use of the singular form in the present document should not preclude the presence of more than one referent. In other words, elements referred to in the singular can number one or more, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises, ” “comprising, ” “includes, ” and / or “including, ” when used herein, specify the presence of stated features, items, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, items, steps, operations, elements, components, and / or groups thereof. The term “and / or” is only an association relationship for describing associated objects and represents that three relationships may exist such that A and / or B may indicate that A exists alone, A and B exist at the same time, or B exists alone. The character “ / ” generally represents that the associated objects are in an “or” relationship.
[0025] Unless otherwise defined, all terms (including technical and scientific terms) used herein are to be interpreted as is customary in the art. It will be further understood that terms in common usage should also be interpreted as is customary in the relevant art and not in an idealized or overly formal sense unless expressly so defined herein.
[0026] The following contains specific information related to implementations of the present disclosure. The drawings and their accompanying detailed disclosure are merely directed to implementations. However, the present disclosure is not limited to these implementations. Other variations and implementations of the present disclosure will be obvious to those skilled in the art.
[0027] The phrases “in one implementation, ” or “in some implementations, ” may each refer to one or more of the same or different implementations. The term “coupled” is defined as connected whether directly or indirectly through intervening components and is not necessarily limited to physical connections. The expression “at least one of A, B and C” or “at least one of the following: A, B and C” means “only A, or only B, or only C, or any combination of A, B and C. ”
[0028] The terms “system” and “network” may be used interchangeably.
[0029] For the purposes of explanation and non-limitation, specific details such as functional entities, techniques, protocols, and standards are set forth for providing an understanding of the present disclosure. In other examples, detailed disclosure of well-known methods, technologies, systems, and architectures are omitted so as not to obscure the present disclosure with unnecessary details.
[0030] Persons skilled in the art will immediately recognize that any network function (s) or algorithm (s) disclosed may be implemented by hardware, software or a combination of software and hardware. Disclosed functions may correspond to modules which may be software, hardware, firmware, or any combination thereof.
[0031] A software implementation may include machine-and / or computer-readable and / or executable instructions stored on a machine-and / or computer-readable medium such as memory or other types of storage devices. One or more microprocessors or general-purpose computers with communication processing capability may be programmed with corresponding executable instructions and perform the disclosed network function (s) or algorithm (s) .
[0032] The microprocessors or general-purpose computers may include Applications Specific Integrated Circuitry (ASIC) , programmable logic arrays, and / or using one or more Digital Signal Processor (DSPs) . Although some of the disclosed implementations are oriented to software installed and executing on computer hardware, alternative implementations implemented as firmware or as hardware or as a combination of hardware and software are well within the scope of the present disclosure. The computer readable medium includes but is not limited to Random Access Memory (RAM) , Read Only Memory (ROM) , Erasable Programmable Read-Only Memory (EPROM) , Electrically Erasable Programmable Read-Only Memory (EEPROM) , flash memory, Compact Disc Read-Only Memory (CD-ROM) , magnetic cassettes, magnetic tape, magnetic disk storage, or any other equivalent medium capable of storing computer-readable instructions.
[0033] The SM4 (Simplified Message Block Cipher for 128-bit Data) encryption algorithm works by applying a series of substitution and permutation operations on a plaintext input to be encrypted in order to transform it into ciphertext. These operations are performed on 128-bit blocks of data at a time, with each block being transformed independently of others.
[0034] Typically, the SM4 algorithm consists of four rounds of operations, with each round applying a different set of substitutions and permutations. Each round includes four steps: 1. Substitution: The plaintext is substituted with a new value using a substitution box (S-Box) table. 2. Permutation: The output of the substitution step is permuted using a permutation box (P-Box) table. 3. XOR: The permuted output is exclusive OR’ ed (XORed) with a 128-bit subkey derived from a main key. 4. Key Update: The subkey used in the XOR step is updated for the next round, using a key schedule derived from the main key.
[0035] This process is repeated for each block of plaintext, resulting in a block of ciphertext at the end.
[0036] However, the SM4 process suffers from communication inefficiency. That is, the core of the process uses a multiplication-to-addition converter for collaborative S box evaluation. Since this needs to be realized through secure 2-party computation of at least two rounds, the total interactions in any S box collaborative computation is four. Furthermore, the instantiation of the multiplication-to-addition converter is based on a homomorphic encryption scheme (e.g., Paillier encryption) , which introduces a computationally intensive public key operation overhead to any system using the algorithm.
[0037] According to the present disclosure, methods and system for secure multi-party computation for SM4 encryption are provided, which reduce the number of interactions between parties, and reduce the number of complex public key operations.
[0038] In an example, instead of directly invoking a multiplication-to-addition converter, separate online and offline phases are used. Specifically, an online phase according to an example uses Beaver triples. Beaver triples are fundamental cryptographic primitives used in secure multi-party computation protocols, particularly for performing secure multiplications. A Beaver triple consists of a tuple comprising three secret-shared values (, , <c>) that satisfy the following property: ( 0 + 1) · ( 0 + 1) ≡ ( <c> 0 + <c> 1) mod 2l
[0039] Where: · and are random secret-shared values · <c> is the secret-shared product of a and b · The subscripts 0 and 1 represent shares held by different parties · l is the bit-length of the values
[0040] According to an example, the Beaver triples are randomly generated during an offline phase. As such, the number interactions of the online phase is three, and there is no computationally intensive heavy public key operation.
[0041] In the offline phase, existing oblivious transfer extension (OTE) functionality, rather than homomorphic encryption, can be used to greatly reduce the public key operation overhead, further improving the computation efficiency. OTE is a method that allows a small number of base Oblivious Transfers (OTs) to be expanded into a much larger number of OTs at a lower computational cost.
[0042] Figure 1 is a schematic representation of a message flow for method according to an example. In the example of figure 1, an offline phase of a method for secure multi-party computation for SM4 encryption is shown between a first party 101 (initiator of the process) and a second party 103 (collaborator in the process) .
[0043] According to an example, a multiplication-to-addition converter 105 is provided in the offline phase in a process configured to generate Beaver triples for use in the online phase. The first party 101 randomly chooses a pair of values x1, y1, which are input to the multiplication-to-addition converter 105. The second party 103 randomly chooses a pair of values x2, y2, which are input to the multiplication-to-addition converter 105. The multiplication-to-addition converter 105 outputs a value m1 to the first party 101, and a value m2 to the second party 103. The process used by the multiplication-to-addition converter 105 to generate the output values is described in more detail below.
[0044] The first party 101 uses the values x1, y1 and m1 to calculate (111) z1 according to: z1=x1×y1+m1
[0045] Similarly, at 113, the first party 103 uses the values x2, y2 and m2 to calculate z2 according to: z2=x2×y2+m2
[0046] Accordingly, in the example of figure 1, the first party 101 outputs a tuple comprising three secret-shared values forming a Beaver triple (x1, y1, z1) . Similarly, the second party 103 outputs a tuple comprising three secret-shared values forming a Beaver triple (x2, y2, z2) . The outputs 115, 117 are provided as inputs in an online phase of the process, as will be described in more detail below.
[0047] Accordingly, the first party 101 holds x1, y1, the second party 103 holds x2, y2. The first party 101 receives m1, the second party 103 receives m2, such that m1+m2=x1×y2 +y2×x1.
[0048] Figure 2 is a schematic representation of multiplication-to-addition conversion, according to an example. In the example of figure 2, oblivious transfer extension functionality is used to implement the multiplication-to-addition converter 105. In OTE functionality, the initiator takes m selections as input, the collaborator’s input consists of m pairs of information. Finally, the initiator obtains m pieces of information.
[0049] In an oblivious transfer, a sender with a pair of input strings (x0 x1) interacts with a receiver who inputs a choice bit r. The result is that the receiver learns xr without learning anything about x1-r, while the sender learns nothing about r. An OTE protocol reduces expensive asymmetric operations by running a small number of base oblivious transfer (OT) instances first and then (computationally) cheap symmetric operations to produce many OT instances.
[0050] In an example, the first party 101 performs the oblivious selection of m pairs of messages provided by the second party 103, rather than treating the m-bit message as a plaintext and performing homomorphic encryption. The first party 101 provides an m-bit number A= (Am-1, …, A0) . This is provided as input to an OTE module 201. The second party 103 provides an m-bit number B= (Bm-1, …, B0) .
[0051] According to an example, for arbitrary i∈ {0, …, m-1} the second party 103 randomly chooses and computes which is input to the OTE module 201. On the basis of the inputs, the OTE module 201 outputs for the first party 101, which calculates (205) :
[0052] The second party calculates (207) :
[0053] The goal of the multiplication-to-addition conversion of figure 2 is to calculate X+Y=AB. According to an example:
[0054] Figure 3 is a schematic representation of a method according to an example. In the example of figure 3, an online phase for secure multi-party computation for SM4 encryption is shown between a first party 101 (initiator of the process) and a second party 103 (collaborator in the process) .
[0055] First party 101 possesses 301 a Beaver triple (x1, y1, z1) calculated according to the process described with reference to figure 1, and an input a1. Similarly, second party 103 possesses 307 a Beaver triple (x2, y2, z2) calculated according to the process described with reference to figure 1, and an input a2.
[0056] First party 101, computes (303) n1=A×a1+C1. Second party 103, computes (309) n2=A×a2+C2. First party 101 randomly chooses (305) r1∈GF (28) where GF (28) represents the Galois Field of order 28 comprising a finite field with 256 elements. In an example, first party 101 and second party 103 can use GF (28) for S-box operations, which provide non-linearity and confusion in the encryption process.
[0057] In an example, the computation of the S-box can be represented as : l=S (a) =A (Aa+C) -1+C.
[0058] The matrix A and the vector C are public, and C can be split into C1 and C2.
[0059] First party 101 calculates u1=n1-x1, v1=r1-y1. First party 101 sends (311) a message to second party 103 comprising u1, v1.
[0060] Second party 103 randomly chooses r2∈GF (28) and calculates the following: u2=n2-x2, v2=r2-y2 u=u1+u2, v=v1+v2 d2=u×y2+v×x2+z2
[0061] Second party 103 sends a message 315 to the first party 101 comprising u, v, d2. First party 103 uses these to compute (317) d1=u×v+z1+u×y1+v×x1 and SUM=d1+d2.
[0062] First party calculates the inverse of SUM, : SUM-1 and send this (321) to the second party 103. Second party 103 uses the value of : SUM-1 to calculate (323) t2=SUM-1×r2 and ultimately calculate (329) l2=A×t2+C2.
[0063] First party 101 uses SUM-1 to calculate (325) t1= SUM-1×r1 and (327) l1=A×t1+C1.
[0064] l1 and l2 are the output of the collaborative S-Box Computing, satisfying that l1+ l2=l, where l= S (a) =A (Aa+C) -1+C.
[0065] In an example, before inputting into the S-Box: 1. A master key, MK, is shared into MK1 and MK2, such that each party obtain a share of the key. 2. Each party locally computes Where j=1, 2, i=0, 1, …, 31, FK1+FK2=FK, FK and CKi are parameters of original SM4. 3. a1, a2 are taken as the input to the collaborative S-BOX computing, in which a1 + a2=a.
[0066] According to an example, a trusted execution environment (TEE) can be used to generate Beaver Triples, instead of relying on secure multi-party computation techniques. That is, when a TEE is available and its security is deemed acceptable, TEE can further reduce communication complexity and provide better scalability for multiple collaborators.
[0067] Figure 4 is a schematic representation of a method according to an example. In the example of figure 4 TEE 401 is used to generate Beaver triples for a first party 101 and a second party 103. First party 101 sends a request (1) to TEE 401 for generation of Beaver triples for use in a MPC process with a second party 103. TEE 401 can (2) randomly choose: x, y and compute: z=x×y. TEE 401 also randomly chooses x1, and computes x2=x-x1, randomly chooses y1, and computes y2=y-y1, and randomly chooses z1, and computes z2=z-z1. TEE 401 can provide (3.1) the first party 101 with a Beaver triple (x1, y1, z1) , and (3.2) the second party 103 with a Beaver triple (x2, y2, z2) .
[0068] Accordingly, an efficient pre-processing process can be used in which the online phase requires no intensive public key operations and relies solely on the Beaver Triples generated during the offline phase. The offline phase leverages advanced OTE functionality and avoids reliance on homomorphic encryption schemes, ensuring higher efficiency.
[0069] According to an example, there is an improved efficiency of the online phase with three rounds communication (i.e., with reference to figure 3: 311, 315, 321) and no heavy public key computation. Moreover, when implementing an inversion operation in GF (28) at the first party (initiator) , a Composite Field Normal Basis Representation can be used to convert the inversion into small logical operations, instead of using a lookup table or a Euclidean algorithm.
[0070] Examples in the present disclosure can be provided as methods, systems or machine-readable instructions, such as any combination of software, hardware, firmware or the like. Such machine-readable instructions may be included on a computer readable storage medium (including but not limited to disc storage, CD-ROM, optical storage, etc. ) having computer readable program codes therein or thereon.
[0071] The present disclosure is described with reference to flow charts and / or block diagrams of the method, devices and systems according to examples of the present disclosure. Although the flow diagrams described above show a specific order of execution, the order of execution may differ from that which is depicted. Blocks described in relation to one flow chart may be combined with those of another flow chart. In some examples, some blocks of the flow diagrams may not be necessary and / or additional blocks may be added. It shall be understood that each flow and / or block in the flow charts and / or block diagrams, as well as combinations of the flows and / or diagrams in the flow charts and / or block diagrams can be realized by machine readable instructions.
[0072] The machine-readable instructions may, for example, be executed by a machine such as a general-purpose computer, a platform comprising user equipment such as a smart device, e.g., a smart phone, a special purpose computer, an embedded processor or processors of other programmable data processing devices to realize the functions described in the description and diagrams. In particular, a processor or processing apparatus may execute the machine-readable instructions. Thus, modules of apparatus (for example, a module implementing a multiplication-to-addition converter 105, and / or an OTE module 201) may be implemented by a processor executing machine readable instructions stored in a memory, or a processor operating in accordance with instructions embedded in logic circuitry. The term 'processor' is to be interpreted broadly to include a CPU, processing unit, ASIC, logic unit, or programmable gate set etc. The methods and modules may all be performed by a single processor or divided amongst several processors.
[0073] Such machine-readable instructions may also be stored in a computer readable storage that can guide the computer or other programmable data processing devices to operate in a specific mode. For example, the instructions may be provided on a non-transitory computer readable storage medium encoded with instructions, executable by a processor.
[0074] Figure 5 is a schematic representation of a machine according to an example. The machine 500 can be, e.g., a system or apparatus, user equipment, or part thereof, or processor. The machine 500 comprises a processor 503, and a memory 505 to store instructions 502, executable by the processor 503. The machine comprises a storage 509 that can be used to store data 501 representing calculated values, S-box values and so on as described above with reference to figures 1 to 4 for example.
[0075] The instructions 507, executable by the processor 503, can cause the machine 500 to receive respective shares of a master key, wherein the master key has been split into the shares, execute a pre-processing phase to generate at least one cryptographic primitive comprising at least one tuple, wherein each of the at least one tuples comprise three secret-shared values forming at least one Beaver triple, perform an online phase using the generated at least one cryptographic primitive to collaboratively encrypt data using SM4 encryption, wherein the online phase requires no more than three rounds of interaction between the computing devices.
[0076] Accordingly, the machine 500 can implement a method for secure multi-party computation for SM4 encryption.
[0077] Such machine-readable instructions may also be loaded onto a computer or other programmable data processing devices, so that the computer or other programmable data processing devices perform a series of operations to produce computer-implemented processing, thus the instructions executed on the computer or other programmable devices provide an operation for realizing functions specified by flow (s) in the flow charts and / or block (s) in the block diagrams.
[0078] Further, the teachings herein may be implemented in the form of a computer or software product, such as a non-transitory machine-readable storage medium, the computer software or product being stored in a storage medium and comprising a plurality of instructions, e.g., machine readable instructions, for making a computer device implement the methods recited in the examples of the present disclosure.
[0079] In some examples, some methods can be performed in a cloud-computing or network-based environment. Cloud-computing environments may provide various services and applications via the Internet. These cloud-based services (e.g., software as a service, platform as a service, infrastructure as a service, etc. ) may be accessible through a web browser or other remote interface of the user equipment for example. Various functions described herein may be provided through a remote desktop environment or any other cloud-based computing environment.
[0080] Figure 6 is as schematic representation of a method for secure multi-party computation for SM4 encryption, according to an example. In block 601 a master key split into shares between a first party and a second party is received at the first party.
[0081] In block 603, the method comprises performing, at the first party, pre-processing to generate at least one cryptographic primitive comprising at least one tuple, wherein each of the at least one tuples comprise three secret-shared values forming at least one Beaver triple.
[0082] In block 603, the method comprises executing, at the first party, an online phase using the at least one cryptographic primitive, wherein the online phase comprises:
[0083] In block 605, the method comprises executing, at the first party, an online phase using the at least one cryptographic primitive. In an example, the online phase comprises, in block 607, expanding the shares of the master key with the second party.
[0084] In block 609, the online phase comprises performing SM4 encryption operations using the expanded shares of the master key. The online phase requires no more than three rounds of interaction between the first party and the second party.
[0085] While various embodiments have been described and / or illustrated herein in the context of fully functional computing systems, one or more of these exemplary embodiments may be distributed as a program product in a variety of forms, regardless of the particular type of computer-readable-storage media used to actually carry out the distribution. The embodiments disclosed herein may also be implemented using software modules that perform certain tasks. These software modules may include script, batch, or other executable files that may be stored on a computer-readable storage medium or in a computing system. In some embodiments, these software modules may configure a computing system to perform one or more of the exemplary embodiments disclosed herein. In addition, one or more of the modules described herein may transform data, physical devices, and / or representations of physical devices from one form to another.
[0086] The preceding description has been provided to enable others skilled in the art to best utilize various aspects of the exemplary embodiments disclosed herein. This exemplary description is not intended to be exhaustive or to be limited to any precise form disclosed. Many modifications and variations are possible without departing from the spirit and scope of the instant disclosure. The embodiments disclosed herein should be considered in all respects illustrative and not restrictive. Reference should be made to the appended claims and their equivalents in determining the scope of the instant disclosure.
Claims
1.A method for secure multi-party computation for SM4 encryption, comprising:receiving, at a first party, a master key split into shares between the first party and a second party;performing, at the first party, pre-processing to generate at least one cryptographic primitive comprising at least one tuple, wherein each of the at least one tuples comprise three secret-shared values forming at least one Beaver triple;executing, at the first party, an online phase using the at least one cryptographic primitive, wherein the online phase comprises:expanding the shares of the master key with the second party;performing SM4 encryption operations using the expanded shares of the master key;wherein the online phase requires no more than three rounds of interaction between the first party and the second party.2.The method of claim 1, wherein the pre-processing phase comprises:utilizing an Oblivious Transfer Extension, OTE, protocol to generate the at least one Beaver triple.3.The method of claim 2, wherein the OTE protocol comprises:performing, by the first party, oblivious selection of message pairs provided by the second party.4.The method of any preceding claim, wherein collaboratively performing SM4 encryption operations comprises:collaboratively evaluating substitution boxes, S-boxes, using the at least one Beaver triple.5.A system for secure multi-party computation of SM4 encryption, comprising:a first computing device associated with a first party;a second computing device associated with a second party, wherein the first and second computing devices are configured to:receive respective shares of a master key, wherein the master key has been split into the shares;execute a pre-processing phase to generate at least one cryptographic primitive comprising at least one tuple, wherein each of the at least one tuples comprise three secret-shared values forming at least one Beaver triple;perform an online phase using the generated at least one cryptographic primitive to collaboratively encrypt data using SM4 encryption;wherein the online phase requires no more than three rounds of interaction between the computing devices.6.The system of claim 5, wherein the pre-processing phase utilizes an Oblivious Transfer Extension, OTE, protocol to generate the at least one Beaver triple.7.The system of claim 5 or 6, wherein the first and second computing devices are further configured to:collaboratively expand their respective key shares.8.The system of claim 7, wherein the first and second computing devices are further configured to:collaboratively evaluate S-boxes using the at least one Beaver triple during the online phase.9.A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:receiving respective shares of a master key, wherein the master key has been split into the shares;executing a pre-processing phase to generate at least one cryptographic primitive comprising at least one tuple, wherein each of the at least one tuples comprise three secret-shared values forming at least one Beaver triple;performing an online phase using the generated at least one cryptographic primitive to collaboratively encrypt data using SM4 encryption;wherein the online phase requires no more than three rounds of interaction between the computing devices.10.The non-transitory computer-readable medium of claim 9, wherein the operations further comprise:collaboratively evaluating S-boxes using the Beaver triples during the online phase.11.The non-transitory computer-readable medium of claim 9 or 10, wherein participating in the pre-processing phase comprises:providing message pairs for oblivious selection.12.The non-transitory computer-readable medium of any of claims 9 to 11, wherein participating in the pre-processing phase comprises:performing oblivious selection of provided message pairs.13.The non-transitory computer-readable medium of any of claims 9 to 12, wherein the operations further comprise:utilizing an Oblivious Transfer Extension, OTE, protocol to generate the at least one Beaver triple.14.The non-transitory computer-readable medium of any of claims 9 to 13, wherein the operations further comprise:collaboratively expanding the respective key shares of the first and second parties.