Fusion processing method and device for truncation and ring raising in secure multi-party computation

By adopting the fusion processing method of truncation and rising ring in secure multi-party computing, using the technology of overflow indicator bits and Boolean shards to arithmetic shards, the problem of high traffic in the existing technology is solved, and efficient privacy data processing is achieved .

CN118643537BActive Publication Date: 2024-12-27ANT GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411092249.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-12-27
Estimated Expiration
2044-08-09

AI Technical Summary

Technical Problem

When the prior art realizes the truncation and up-ring of privacy data, it requires more communication rounds and traffic, resulting in inefficiency.

Method used

The truncation and rising-loop fusion processing method in secure multi-party computing is adopted to calculate the conversion of overflow indicator bits and secretly shared Boolean shards to arithmetic shards at one time, reducing communication overhead and saving communication rounds and traffic.

Benefits of technology

It significantly reduces the communication rounds and traffic volume, improves the computing efficiency, is suitable for different subcomputing accuracy and ring size, and reduces the overall computing overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643537B_ABST
    Figure CN118643537B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a method and device for fusion processing of truncation and ring-raising in secure multi-party computing. The method includes: the first party uses the first ring arithmetic slice of its own party to perform a first multi-party joint calculation with the second party to obtain the Boolean slice of its own party with an overflow indication bit; the overflow indication bit is used to indicate whether the sum of the two first ring arithmetic slices of the target private data overflows the first ring; the Boolean slice of its own party with the overflow indication bit is used to perform a second multi-party joint calculation with the second party to obtain the overflow bit arithmetic slice of the overflow indication bit secretly shared on the second ring; the number of bits of the second ring is determined according to the number of bits of the first ring, the number of bits of the target ring of the ring-raising, and the number of bits of the truncation; based on the first ring arithmetic slice of its own party and the overflow bit arithmetic slice, a local operation is performed to obtain the target ring arithmetic slice of the target private data that is secretly shared on the target ring after truncation. It can significantly reduce the number of communication rounds and communication volume.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the computer field, and more particularly, to a method and device for merging truncation and ring raising in secure multi-party computing. Background Art

[0002] Currently, data held by different data holders may contain user privacy information, and data sharing between data holders may infringe on user privacy. In order to facilitate data flow between multiple parties, secure multi-party computing is used to support joint computing between multiple parties, tap the value of data, and ensure that the plaintext information of each party's private data will not be leaked during multi-party interaction.

[0003] Secure multi-party computation enables multiple non-trusting parties to securely compute a given function without leaking inputs or intermediate computation results other than the result. Secret sharing is a method of distributing a secret to different parties, with each party receiving a portion of the secret, called a shard. The secret can only be restored when enough shards are held; a single shard cannot restore the secret.

[0004] Secret sharing is widely used in security computing in various scenarios due to its high efficiency in arithmetic calculations and linear algebra operations. Calculations based on secret sharing often involve truncation and ring-up of private data. Truncation requires truncating the lowest bit of the fragment of private data and completing the high bit to change the precision of the private data; ring-up requires converting the fragment of private data from a small ring to a large ring. In the prior art, in order to protect the private data, more communication rounds and communication volume are required when implementing truncation and ring-up of private data. Summary of the invention

[0005] One or more embodiments of this specification describe a method and device for integrating truncation and ring-raising in secure multi-party computing, which can significantly reduce communication rounds and communication volume.

[0006] In a first aspect, a method for integrating truncation and ring-raising in secure multi-party computing is provided, wherein a first party and a second party respectively hold a first ring arithmetic slice of target private data that is secretly shared on the first ring, and the method is performed by the first party, comprising:

[0007] Using the first ring arithmetic slice of the party, perform the first multi-party joint calculation with the second party to obtain the Boolean slice of the party with an overflow indication bit; the overflow indication bit is used to indicate whether the sum of the two first ring arithmetic slices of the target private data overflows the first ring;

[0008] Using the Boolean slice of the overflow indicator bit of the party, perform a second multi-party joint calculation with the second party to obtain an overflow bit arithmetic slice of the overflow indicator bit that is secretly shared on a second ring; the number of bits of the second ring is determined according to the number of bits of the first ring, the number of bits of the target ring to be raised, and the number of bits to be truncated;

[0009] Based on the first ring arithmetic slice of the party and the overflow bit arithmetic slice, a local operation is performed to obtain the target ring arithmetic slice that is secretly shared on the target ring after the target privacy data is truncated.

[0010] In a possible implementation, the number of bits of the second ring is equal to the number of bits of the target ring minus the number of bits of the first ring plus the number of bits of the truncated ring.

[0011] In one possible implementation, the first ring arithmetic slice is the output of a first network layer of a neural network model, and the target ring arithmetic slice is the input of a second network layer of the neural network model, and the second network layer is the next network layer of the first network layer.

[0012] Furthermore, the number of truncated bits is the length of the decimal part in the fixed-point arithmetic performed by the first network layer.

[0013] In a possible implementation, the performing of local operations includes:

[0014] Multiplying the overflow bit arithmetic slice by a preset constant to obtain an intermediate result; the preset constant is determined according to the number of bits of the first ring and the number of bits of the truncation;

[0015] Subtract the intermediate result from the arithmetic slice of the first ring of the party, and then take the modulus of the maximum value of the target ring to obtain the arithmetic slice of the target ring.

[0016] In a possible implementation, the first multi-party joint computation includes calling a Boolean overflow bit computation protocol.

[0017] In a possible implementation, the second multi-party joint computation includes calling a conversion protocol from Boolean sharding to arithmetic sharding.

[0018] In a second aspect, a fusion processing device for truncation and ring-raising in secure multi-party computing is provided, wherein a first party and a second party respectively hold a first ring arithmetic slice of target private data secretly shared on the first ring, and the device is arranged on the first party, comprising:

[0019] A first joint computing unit, configured to use the first ring arithmetic sharding of the party to perform a first multi-party joint computing with the second party to obtain the Boolean sharding of the party with an overflow indication bit; the overflow indication bit is used to indicate whether the sum of the two first ring arithmetic shardings of the target private data overflows the first ring;

[0020] a second joint calculation unit, configured to use the local Boolean slice of the overflow indication bit obtained by the first joint calculation unit to perform a second multi-party joint calculation with the second party to obtain an overflow bit arithmetic slice of the overflow indication bit secretly shared on a second ring; the number of bits of the second ring is determined according to the number of bits of the first ring, the number of bits of the target ring of the raised ring, and the number of bits truncated;

[0021] The local computing unit is used to perform local operations based on the first ring arithmetic slice of the local party and the overflow bit arithmetic slice obtained by the second joint computing unit to obtain the target ring arithmetic slice that is secretly shared on the target ring after the target privacy data is truncated.

[0022] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method of the first aspect.

[0023] According to a fourth aspect, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method of the first aspect is implemented.

[0024] The method and device provided by the embodiments of this specification are different from the usual processing method. When truncation and ring-up processing need to be performed successively, instead of performing a separate truncation process first and then a separate fusion process, truncation and ring-up processing are fused. Among them, in the separate truncation process, it is necessary to truncate the lowest bit of the fragment of the private data and fill the high bit to change the accuracy of the private data. In order to avoid errors when filling the high bit, the participants need to communicate to calculate whether the sum of the fragments of the private data overflows the ring where the fragments are located; in the separate ring-up processing, it is necessary to convert the fragments of the private data from a small ring to a large ring. During the conversion process, the participants also need to communicate to calculate whether the sum of the fragments of the private data overflows the ring where the fragments are located. In the fusion processing of truncation and ring-up, it is only necessary to calculate once whether the overflow and the conversion of the Boolean fragment to the arithmetic fragment of the secret sharing, and the communication overhead is consistent with the separate truncation process, which saves the communication overhead required for the ring-up, and can significantly reduce the communication rounds and communication volume. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0026] Figure 1 A schematic diagram of an implementation scenario of an embodiment disclosed in this specification;

[0027] Figure 2 A schematic diagram of an implementation scenario of another embodiment disclosed in this specification;

[0028] Figure 3 A flow chart of a method for fusing truncation and ring raising in secure multi-party computation according to an embodiment is shown;

[0029] Figure 4 A schematic block diagram of a device for merging truncation and ring raising in secure multi-party computation according to an embodiment is shown. DETAILED DESCRIPTION

[0030] The solution provided in this specification is described below in conjunction with the accompanying drawings.

[0031] Figure 1 The following is a schematic diagram of an implementation scenario of an embodiment disclosed in this specification. The implementation scenario involves the fusion processing of truncation and ring-up in secure multi-party computing. Among them, secure multi-party computing can safely calculate an agreed function without leaking the data of the participants, and the data of the participants is private data. In the embodiment of this specification, the private data is distributed between the two parties in a secret sharing manner. It can be understood that the above fusion processing is used to achieve the processing effect of truncation first and then ring-up for private data. Figure 1 As shown in the figure, the scenario of the fusion processing of truncation and ring-up in secure multi-party computing involves participants A and B, or the first party and the second party, or party A and party B, or P0 and P1. Each participant can be implemented as any device, platform, server or device cluster with computing and processing capabilities. All parties should jointly implement the fusion processing of truncation and ring-up while protecting data privacy, and hope to reduce the number of communication rounds and communication volume compared with the usual processing method.

[0032] The embodiments of this specification involve the following basic concepts, which are briefly introduced below.

[0033] Ring: We use Indicates that all elements are Ring.

[0034] Secret sharing: For a value , two random shards are obtained by uniform sampling and , so that , Held by the first party, Held by a second party, for example, the first party is a client and the second party is a server.

[0035] Truncation: All elements on the ring are fixed-point numbers. After multiplication, the precision of the fixed-point numbers will be doubled. Therefore, the lowest bit needs to be truncated to restore the original fixed-point precision. Since the truncation of the lowest bit requires the completion of the high bit, if the secret sharing overflows the ring, the completion of the high bit will cause the error of the highest bit, resulting in serious errors. Therefore, the participants need to communicate to calculate whether the secret sharing overflows the ring.

[0036] Ring lifting: Ring lifting refers to the process of converting the secret-shared shards on one ring into the secret-shared shards on the other ring through ring lifting or ring lowering for two rings of different sizes. In the usual processing method, ring lowering can be completed locally by the participants, which is relatively considered an operation that does not require communication. Ring lifting, on the other hand, requires calculating whether the secret-shared shards overflow the original ring, which leads to communication between the participants.

[0037] Actual computing scenarios, such as machine learning, are usually based on floating-point operations. However, using secret sharing to implement secure floating-point operations will result in high overhead, and the efficiency is difficult to meet actual computing needs. Therefore, the usual practice is to use fixed-point numbers to approximate floating-point numbers, achieving greater efficiency optimization under the premise of a certain loss of precision. Secret sharing protocols are usually defined on rings or domains, each with its own advantages and disadvantages. Calculations on rings are more efficient because their modulus operations can be implicitly handled by hardware, compared to domain calculations that require manual modulus.

[0038] In the embodiment of this specification, in the process of converting floating-point numbers of neural networks to fixed-point numbers, since MPC usually operates on a loop, the floating-point numbers used in deep neural networks need to be converted into fixed-point numbers in the loop. (i.e. the length of the decimal part) and a ring , floating point number It can be calculated by Convert to an approximate fixed-point number, and Can be Convert back to the approximate x. Where, This can be achieved through truncation.

[0039] In the embodiment of this specification, there are two computing parties, Party A and Party B. The secret input x is split into two shards, and each party holds one shard. , the ring where the shard is located is Through the fusion of truncation and ring-raising in secure multi-party computation, each party obtains a fragment of the output result. , the ring where the shard is located is ; where s is the number of truncated digits, .

[0040] The embodiments of this specification propose corresponding solutions for reducing the number of communication rounds and the amount of communication in the fusion processing of truncation and ring-raising in secure multi-party computing.

[0041] The embodiments of this specification can be used for secure computing in various scenarios, such as secure training and secure prediction of machine learning models. Through the fusion processing of truncation and ring raising in secure multi-party computing, the communication rounds and communication volume can be reduced, so that different precisions and rings of different sizes can be used flexibly for different sub-computations, thereby reducing communication overhead and improving overall computing efficiency.

[0042] Figure 2 This is a schematic diagram of an implementation scenario of another embodiment disclosed in this specification. This implementation scenario involves the fusion processing of truncation and ring raising in secure multi-party computing, which is specifically applied to the dense state reasoning of neural networks, between two adjacent different network layers. Figure 2 ,exist Figure 2 (a) shows the usual processing method. In the dense reasoning of neural networks, calculations at different layers have different sensitivities to fixed-point precision, resulting in different sizes of rings to be used. Using smaller rings can reduce the amount of data communicated. Typically, a small ring is used in the k layer of the neural network, and a large ring is used in the k+1 layer. Because in the neural network, each layer needs to be truncated to restore the original fixed-point precision after calculation, it is necessary to truncate after the k layer, and then perform a ring-raising operation before continuing the calculation of the next layer. Truncation and ring-raising are performed separately, and both require calculation of whether the secret sharing overflows, which requires more communication rounds and communication volume. Figure 2 (b) shows the fusion processing method. The truncation process will calculate whether the secret sharing overflows. This information can be reused in the ring-raising operation, so that the ring-raising operation no longer requires communication overhead. By integrating truncation and ring-raising, the ring-raising effect without communication is achieved, which can significantly reduce the number of communication rounds and communication volume.

[0043] It should be noted that dense-state reasoning of neural networks is only a typical application scenario, and the embodiments of this specification are not limited to this. As long as it is a scenario that requires sequential truncation and ring-up processing in secure multi-party computing, the fusion processing solution provided in the embodiments of this specification can be adopted.

[0044] Figure 3 A flowchart of a method for merging truncation and ring raising in secure multi-party computing according to an embodiment is shown. The method can be based on Figure 1 or Figure 2 In the implementation scenario shown, the first party and the second party respectively hold a first ring arithmetic slice of the target private data that is secretly shared on the first ring, and the method is executed by the first party. Figure 3 As shown, the fusion processing method of truncation and ring-raising in secure multi-party computing in this embodiment includes the following steps: Step 31, using the first ring arithmetic slice of the party, perform the first multi-party joint calculation with the second party to obtain the Boolean slice of the party with the overflow indication bit; the overflow indication bit is used to indicate whether the sum of the two first ring arithmetic slices of the target private data overflows the first ring; Step 32, using the Boolean slice of the party with the overflow indication bit, perform the second multi-party joint calculation with the second party to obtain the overflow bit arithmetic slice of the overflow indication bit secretly shared on the second ring; the number of bits of the second ring is determined according to the number of bits of the first ring, the number of bits of the target ring of the ring-raising, and the number of bits of the truncation; Step 33, based on the first ring arithmetic slice of the party and the overflow bit arithmetic slice, perform local operations to obtain the target ring arithmetic slice of the target private data that is secretly shared on the target ring after truncation. The specific execution method of each of the above steps is described below.

[0045] First, in step 31, the first ring arithmetic slice of the party is used to perform the first multi-party joint calculation with the second party to obtain the party's Boolean slice with an overflow indicator bit; the overflow indicator bit is used to indicate whether the sum of the two first ring arithmetic slices of the target private data overflows the first ring. It can be understood that the first ring has a certain numerical upper limit. If the sum of the two first ring arithmetic slices is greater than the numerical upper limit, the secret sharing overflows, that is, the sum of the two first ring arithmetic slices overflows the first ring.

[0046] In one example, the first ring arithmetic slice is the output of a first network layer of a neural network model.

[0047] In this example, it can correspond to the dense state reasoning application scenario of the neural network. The next network layer of the first network layer is the second network layer, and truncation and loop-up processing are required between the two network layers.

[0048] In one example, the first multi-party joint computation includes calling a Boolean overflow bit computation protocol.

[0049] Among them, the Boolean overflow bit calculation protocol is an existing protocol, and we use Representation ring Arithmetic slicing on Represents a binary domain Boolean sharding on . The functionality of the protocol can be expressed as: By jointly executing the protocol, the two parties can obtain a Boolean slice of the overflow indicator bit, which is used to indicate whether the secret sharing overflows the loop. .

[0050] For example, the first party is denoted by S, the second party is denoted by C, S and C call ,get ,in, For x held by S in the ring Arithmetic slicing on , The x held by C is in the ring Arithmetic slicing on , , w is 0 or 1, which is used to indicate Is it true?

[0051] Then, in step 32, the Boolean slice of the overflow indicator bit is used to perform a second multi-party joint calculation with the second party to obtain an overflow bit arithmetic slice of the overflow indicator bit that is secretly shared on the second ring; the number of bits of the second ring is determined according to the number of bits of the first ring, the number of bits of the target ring to be raised, and the number of bits to be truncated. It can be understood that the second multi-party joint calculation is used to convert the Boolean slice into the arithmetic slice.

[0052] In one example, the number of bits of the second ring is equal to the number of bits of the target ring minus the number of bits of the first ring plus the truncated number of bits.

[0053] For example, the number of bits of the target ring is , the number of digits in the first ring is , the number of truncated digits is s, and the number of digits in the second ring is .

[0054] In one example, the first ring arithmetic slice is the output of the first network layer of the neural network model, and the number of truncated bits is the length of the decimal part in the fixed-point arithmetic performed by the first network layer.

[0055] In one example, the second multi-party joint computation includes calling a conversion protocol from Boolean sharding to arithmetic sharding.

[0056] Among them, the conversion protocol from Boolean sharding to arithmetic sharding is an existing protocol. We use Representation ring Arithmetic slicing on Represents a binary domain Boolean sharding on . The functionality of the protocol can be expressed as: , by jointly executing the protocol, both parties can obtain an arithmetic slice of the overflow indication bit.

[0057] For example, the first party is denoted by S, the second party is denoted by C, S and C call ,get ,in, is the Boolean slice of the overflow indicator w held by S and C respectively, The arithmetic slice of the overflow indication bit w held by S and C respectively. superior.

[0058] Finally, in step 33, based on the first ring arithmetic slice of the party and the overflow bit arithmetic slice, a local operation is performed to obtain the target ring arithmetic slice that is secretly shared on the target ring after the target privacy data is truncated. It can be understood that the first party and the second party each hold a target ring arithmetic slice, which is the output result of the fusion processing.

[0059] In one example, the first ring arithmetic slice is the output of a first network layer of a neural network model, and the target ring arithmetic slice is the input of a second network layer of the neural network model, where the second network layer is the next network layer of the first network layer.

[0060] In this example, it can correspond to the dense state reasoning application scenario of the neural network. The next network layer of the first network layer is the second network layer, and truncation and loop-up processing are required between the two network layers.

[0061] In one example, performing local operations includes:

[0062] Multiplying the overflow bit arithmetic slice by a preset constant to obtain an intermediate result; the preset constant is determined according to the number of bits of the first ring and the number of bits of the truncation;

[0063] Subtract the intermediate result from the arithmetic slice of the first ring of the party, and then take the modulus of the maximum value of the target ring to obtain the arithmetic slice of the target ring.

[0064] In the embodiment of this specification, the second party can perform the same local operation. For example, b∈{S,C}, P b implement , where y=x / 2 s , Represents the first ring arithmetic shard held by party b, Represents the arithmetic slice of the overflow bits held by party b.

[0065] It is understandable that the above-mentioned fusion processing needs to be performed jointly by the first party and the second party. Since the processing processes performed by the first party and the second party are similar, only the first party is used as an example for explanation.

[0066] The correctness proof of the solution provided by the embodiment of this specification is given below:

[0067]

[0068] Referring to the above equation, let (i∈0,1) indicates that the client and the server are in the loop The second line is in the ring The secret shard after truncating. w is a Boolean value indicating In the ring Is there an overflow? Is the carry from the lower s bits. is either 0 or 1 and can be safely ignored in reasoning, while is a serious error that needs to be handled with care. The third line implements The fourth line is the modular expansion of the overflow indicator w on the k-bit ring, and v is a Boolean value used to indicate whether the overflow indicator w overflows on the k-bit ring. By appropriately choosing , to facilitate Boolean sharding , so that its overflow can pass through the module The last line shows that the cost of truncation and ring-raising is the same as the cost of truncation alone, and only needs to be calculated .

[0069] The method provided by the embodiment of this specification is different from the usual processing method. When truncation and ring-up processing need to be performed successively, instead of performing a separate truncation process first and then a separate fusion process, truncation and ring-up are fused. Among them, in the separate truncation process, it is necessary to truncate the lowest bit of the fragment of the private data and fill the high bit to change the accuracy of the private data. In order to avoid errors when filling the high bit, the participants need to communicate to calculate whether the sum of the fragments of the private data overflows the ring where the fragments are located; in the separate ring-up processing, it is necessary to convert the fragments of the private data from a small ring to a large ring. During the conversion process, the participants also need to communicate to calculate whether the sum of the fragments of the private data overflows the ring where the fragments are located. In the fusion processing of truncation and ring-up, it is only necessary to calculate once whether the overflow and the conversion of the Boolean fragments of secret sharing to the arithmetic fragments. The communication overhead is consistent with the separate truncation process, which saves the communication overhead required for the ring-up, and can significantly reduce the communication rounds and communication volume.

[0070] In addition, due to the above fusion process, completing truncation and ring raising only requires calculating the overflow (wrap) and the conversion of the secret shared Boolean slice to arithmetic slice (B2A) once, and the overhead is consistent with the separate truncation process. In this way, we eliminate the overhead required for ring raising, allowing the neural network to freely select the appropriate ring according to the accuracy sensitivity of different layers.

[0071] According to another embodiment, a fusion processing device for truncation and ring raising in secure multi-party computing is also provided, and the device is used to execute the present specification. Figure 3 In the method provided by the illustrated embodiment, the first party and the second party respectively hold a first ring arithmetic slice of the target private data which is secretly shared on the first ring, and the device is arranged on the first party. Figure 4 FIG. 1 is a schematic block diagram showing a fusion processing device for truncation and ring raising in secure multi-party computing according to an embodiment. Figure 4 As shown, the device 400 includes:

[0072] A first joint computing unit 41 is configured to perform a first multi-party joint computing with the second party using the first ring arithmetic sharding of the party to obtain the Boolean sharding of the party with an overflow indication bit; the overflow indication bit is used to indicate whether the sum of the two first ring arithmetic shardings of the target private data overflows the first ring;

[0073] A second joint calculation unit 42 is used to perform a second multi-party joint calculation with the second party using the local Boolean slice of the overflow indication bit obtained by the first joint calculation unit 41 to obtain the overflow bit arithmetic slice of the overflow indication bit secretly shared on the second ring; the number of bits of the second ring is determined according to the number of bits of the first ring, the number of bits of the target ring of the ring, and the number of bits truncated;

[0074] The local computing unit 43 is used to perform local operations based on the first ring arithmetic slices of the local party and the overflow bit arithmetic slices obtained by the second joint computing unit 42 to obtain the target ring arithmetic slices that are secretly shared on the target ring after the target privacy data is truncated.

[0075] Optionally, as an embodiment, the number of bits of the second ring is equal to the number of bits of the target ring minus the number of bits of the first ring plus the number of bits of the truncated ring.

[0076] Optionally, as an embodiment, the first ring arithmetic slice is the output of a first network layer of a neural network model, and the target ring arithmetic slice is the input of a second network layer of the neural network model, and the second network layer is the next network layer of the first network layer.

[0077] Furthermore, the number of truncated bits is the length of the decimal part in the fixed-point arithmetic performed by the first network layer.

[0078] Optionally, as an embodiment, the local computing unit 43 includes:

[0079] A first calculation subunit, configured to multiply the overflow bit arithmetic slice by a preset constant to obtain an intermediate result; the preset constant is determined according to the number of bits of the first ring and the number of bits of the truncation;

[0080] The second calculation subunit is used to subtract the intermediate result obtained by the first calculation subunit from the first ring arithmetic slice of the party, and then take the modulus of the maximum value of the target ring to obtain the target ring arithmetic slice.

[0081] Optionally, as an embodiment, the first multi-party joint computation includes calling a Boolean overflow bit computation protocol.

[0082] Optionally, as an embodiment, the second multi-party joint computation includes calling a conversion protocol from Boolean sharding to arithmetic sharding.

[0083] The device provided by the embodiment of this specification is different from the usual processing method. When truncation and ring-up processing need to be performed successively, instead of performing a separate truncation process first and then a separate fusion process, truncation and ring-up processing are fused. In the separate truncation process, it is necessary to truncate the lowest bit of the fragment of the private data and fill the high bit to change the precision of the private data. In order to avoid errors when filling the high bit, the participants need to communicate to calculate whether the sum of the fragments of the private data overflows the ring where the fragments are located; in the separate ring-up processing, it is necessary to convert the fragments of the private data from a small ring to a large ring. During the conversion process, the participants also need to communicate to calculate whether the sum of the fragments of the private data overflows the ring where the fragments are located. In the fusion processing of truncation and ring-up, only the first joint calculation unit 41 needs to calculate once whether it overflows and the second joint calculation unit 42 needs to calculate once the conversion of the Boolean fragment of the secret sharing to the arithmetic fragment. The communication overhead is consistent with the separate truncation process, which saves the communication overhead required for the ring-up, and can significantly reduce the communication rounds and communication volume.

[0084] According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute a combination of Figure 3 The method described.

[0085] According to another embodiment of the present invention, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the Figure 3 The method described.

[0086] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0087] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A fusion processing method for truncation and ring-raising in secure multi-party computation, wherein a first party and a second party respectively hold a first ring arithmetic slice of target private data secretly shared on a first ring, and the method is performed by the first party, comprising: Using the first ring arithmetic slice of the party, perform the first multi-party joint calculation with the second party to obtain the Boolean slice of the party with the overflow indication bit; The overflow indication bit is used to indicate whether the sum of the two first-ring arithmetic slices of the target private data overflows the first ring; Using the Boolean slice of the overflow indicator bit of the party, perform a second multi-party joint calculation with the second party to obtain an overflow bit arithmetic slice of the overflow indicator bit that is secretly shared on a second ring; the number of bits of the second ring is determined according to the number of bits of the first ring, the number of bits of the target ring to be raised, and the number of bits to be truncated; Based on the first ring arithmetic slice of the party and the overflow bit arithmetic slice, a local operation is performed to obtain the target ring arithmetic slice that is secretly shared on the target ring after the target privacy data is truncated; The first ring arithmetic slice is the output of the first network layer of the neural network model, the target ring arithmetic slice is the input of the second network layer of the neural network model, and the second network layer is the next network layer of the first network layer.

2. The method of claim 1, wherein: The number of bits of the second ring is equal to the number of bits of the target ring minus the number of bits of the first ring plus the number of bits of the truncated ring.

3. The method of claim 1, wherein: The number of truncated bits is the length of the decimal part in the fixed-point arithmetic performed by the first network layer.

4. The method of claim 1, wherein: The performing of local operations includes: Multiplying the overflow bit arithmetic slice by a preset constant to obtain an intermediate result; the preset constant is determined according to the number of bits of the first ring and the number of bits of the truncation; Subtract the intermediate result from the arithmetic slice of the first ring of the party, and then take the modulus of the maximum value of the target ring to obtain the arithmetic slice of the target ring.

5. The method of claim 1, wherein: The first multi-party joint computation includes calling a Boolean overflow bit computation protocol.

6. The method of claim 1, wherein: The second multi-party joint computation includes calling a conversion protocol from Boolean sharding to arithmetic sharding.

7. A fusion processing device for truncation and ring-raising in secure multi-party computing, wherein a first party and a second party respectively hold a first ring arithmetic slice of target private data secretly shared on the first ring, and the device is arranged on the first party, comprising: A first joint calculation unit, configured to use the first ring arithmetic slice of the party to perform a first multi-party joint calculation with the second party to obtain the Boolean slice of the party with an overflow indication bit; The overflow indication bit is used to indicate whether the sum of the two first-ring arithmetic slices of the target private data overflows the first ring; a second joint calculation unit, configured to use the local Boolean slice of the overflow indication bit obtained by the first joint calculation unit to perform a second multi-party joint calculation with the second party to obtain an overflow bit arithmetic slice of the overflow indication bit secretly shared on a second ring; the number of bits of the second ring is determined according to the number of bits of the first ring, the number of bits of the target ring of the raised ring, and the number of bits truncated; A local computing unit, configured to perform local computing based on the first ring arithmetic slicing of the local party and the overflow bit arithmetic slicing obtained by the second joint computing unit, to obtain a target ring arithmetic slicing for secret sharing on the target ring after truncation of the target privacy data; The first ring arithmetic slice is the output of the first network layer of the neural network model, the target ring arithmetic slice is the input of the second network layer of the neural network model, and the second network layer is the next network layer of the first network layer.

8. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 6.

9. A computing device, comprising a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 6 is implemented.