Data processing method and apparatus
Patent Information
- Application Number
- CN202310162621.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-13
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-02-13
AI Technical Summary
[0004]然而,目前奇偶比特分离算子的实现方式难以满足实际中更高的应用需求
[0019]采用本说明书实施例提供的方法和装置,在实现准确奇偶比特分离的同时,可以将对k位长比特串的计算次数从O(k)降低到O(log(k)),从而有效提高处理效率。
Smart Images

Figure CN116301710B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of data processing technology, and in particular to a data processing method and apparatus, as well as a method and apparatus for multi-party computation of overflow bits to protect data privacy. Background Technology
[0002] Binary encoding is the process of encoding text, numbers, or other objects into binary digits using predefined methods, or converting information and data into specified binary electrical pulse signals. Computers only understand binary numbers; all information that needs to be processed by a computer must be represented using binary numbers.
[0003] The most basic unit of binary is the bit. A sequence of bits is usually called a bit string, such as 1010010. When processing bit strings, computers use many basic operators, such as addition operators, subtraction operators, and parity bit separation operators. Parity bit separation separates the odd and even bits in the original bit string, placing the odd bits in the higher-order bits and the even bits in the lower-order bits. For example, if the input of the parity bit separation operator is [aXbYcZdW], the output can be [abcdXYZW] or [XYZWabcd].
[0004] However, current implementations of the parity bit separation operator are insufficient to meet the higher demands of practical applications. Therefore, a more efficient implementation scheme is needed to separate parity bits. Summary of the Invention
[0005] This specification describes a data processing method and apparatus, as well as a method and apparatus for protecting data privacy through multi-party computation of overflow bits. Using these methods or apparatuses can significantly reduce the computational load while ensuring the accuracy of the calculation results.
[0006] According to the first aspect, a data processing method is provided, including: acquiring 2 n The bit string to be processed is determined based on the original bit string corresponding to the target data; the bit string to be processed is subjected to n-1 bit swaps, wherein any t-th bit swap includes: dividing the current bit string according to 2 t+1 Divide the data into groups of 100 bits; for each group, take the middle 2 bits... t Take 1 bit, swap the positions of the high-order bits and low-order bits, and keep the outer 2 bits. t Each bit remains unchanged; the target bit string is determined based on the bit string after the n-1 bit swaps, where the high and low bits of the target bit string correspond to the odd and even bits of the original bit string, respectively, and the target bit string is used for data processing related to the odd and even bits of the target data.
[0007] In one embodiment, obtaining 2 n The process involves converting the target data into binary form to obtain a 2-bit bit string. n A string of bits to be processed.
[0008] In one specific embodiment, determining the target bit string based on the bit string after the n-1 bit swaps includes: using the bit string after the n-1 bit swaps as the target bit string.
[0009] In one embodiment, obtaining 2 n The process involves: binary encoding the target data to obtain a k-bit original bit string, where k cannot be a power of 2; and padding the original bit string with a predetermined padding method to a depth of 2 bits. n The bits are then used to obtain the bit string to be processed.
[0010] In one specific embodiment, the method further includes: determining a value 2 that is greater than k and has the smallest difference between k and k. n .
[0011] In another specific embodiment, determining the target bit string based on the bit string after the n-1 bit swaps includes: using a predetermined removal method to reduce the bit string after the n-1 bit swaps to a target bit string of k bits, such that the first part of the target bit string... Position and after The bits correspond to the odd and even bits of the original bit string, respectively.
[0012] In a more specific embodiment, a predetermined padding method is used to pad the original bit string to 2. n Bits, including: bits that fill the high bits of the original bit string with the number of differences, where the difference is 2. n The difference between k and k. Specifically, the bit string after n-1 bit swaps is reduced to a target bit string of k bits using a predetermined removal method, including: removing the first and second high-order bits from the left and right halves of the bit string, respectively, where the first and second bits are obtained by rounding up and down respectively from half of the difference.
[0013] In another, more specific embodiment, a predetermined padding method is used to pad the original bit string to 2. n Bits, including: bits that fill the lower bits of the original bit string with the number of differences, where the difference is 2. nThe difference between k and k; wherein, by adopting a predetermined removal method, the bit string after the n-1 bit swaps is reduced to a target bit string of k bits, including: removing the first bit and the second bit of the lower number from the left half and the right half of the bit string, respectively, wherein the first number and the second number are obtained by rounding up and down respectively from half of the difference.
[0014] According to the second aspect, a method for protecting data privacy through multi-party computation overflow bits is provided, applicable to any one of the parties, comprising: taking the privacy data held by the party as target data, performing the data processing provided in the first aspect above to obtain a corresponding target bit string; and based on the target bit string, performing secure multi-party computation (MPC) with the other parties to obtain an overflow bit value corresponding to the sum of the privacy data of each party.
[0015] According to a third aspect, a data processing apparatus is provided, comprising: a bit string acquisition unit, configured to acquire 2 n The bit string to be processed is determined based on the original bit string corresponding to the target data; the switching processing unit is configured to perform n-1 bit switching processes on the bit string to be processed, wherein any t-th bit switching process includes: dividing the current bit string according to 2 t+1 Divide the data into groups of 100 bits; for each group, take the middle 2 bits... t Take 1 bit, swap the positions of the high-order bits and low-order bits, and keep the outer 2 bits. t Each bit remains unchanged; the target bit string determination unit is configured to determine the target bit string based on the bit string after the n-1 bit swapping processes, wherein the high-order bits and low-order bits in the target bit string correspond to the odd-numbered bits and even-numbered bits in the original bit string, respectively, and the target bit string is used for data processing related to the odd-even bits of the target data.
[0016] According to the fourth aspect, an apparatus for protecting data privacy through multi-party computation overflow bits is provided. The apparatus is integrated into any one of the parties and includes: a target bit string determination unit configured to use the privacy data held by the party as target data and perform data processing using the apparatus unit in the third aspect to obtain a corresponding target bit string; and an overflow bit calculation unit configured to perform secure multi-party computation (MPC) with the other parties based on the target bit string to obtain an overflow bit value corresponding to the sum of the privacy data of each party.
[0017] According to a fifth aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of the first or second aspect.
[0018] According to a sixth aspect, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of the first aspect or the second aspect.
[0019] By using the methods and apparatus provided in the embodiments of this specification, while achieving accurate parity-even bit separation, the number of calculations for a k-bit long bit string can be reduced from O(k) to O(log(k)), thereby effectively improving processing efficiency. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This diagram illustrates an example of data variation implementing parity bit separation according to one embodiment.
[0022] Figure 2 This diagram illustrates a data processing method flow according to one embodiment.
[0023] Figure 3 A flowchart illustrating a method for protecting data privacy through multi-party computation of overflow bits according to one embodiment is shown.
[0024] Figure 4 A schematic diagram of a data processing apparatus structure according to one embodiment is shown;
[0025] Figure 5 A schematic diagram of a device structure for protecting data privacy through multi-party computation of overflow bits is shown according to one embodiment. Detailed Implementation
[0026] The solution provided in this specification will now be described with reference to the accompanying drawings.
[0027] First, it needs to be clarified that in this paper, the number of bits (or bit positions) of any data 'a' converted to binary is denoted as 'k', and the k bits are respectively denoted as a[0], ..., a[k-1]. The numbers in the symbols [] are used to identify the position of the corresponding bit in the bit string. For example, for the bit string 1101, the 0th to 1st bits are 1, 0, 1, and 1 respectively. It can be understood that the 0th and 2nd bits are even bits, and the 1st and 3rd bits are odd bits.
[0028] In traditional methods of parity bit separation, it is necessary to determine the parity of each bit individually before constructing the separation result. The following is a related code example:
[0029] let b = 0
[0030] for i = 0 to k-1:
[0031] let a_i = (a >> i) & 1 # Get a[i]
[0032] if i%2==0:
[0033] b^=a_i<<(i / 2)#use a[i] as b[i / 2]
[0034] else:
[0035] b^=a_i<<((i+k) / 2)#regard a[i] as b[(i+k) / 2]
[0036] As can be seen from the code above, the complexity of the traditional method is O(k), which is especially slow when k is large.
[0037] Based on the above observations and analysis, the inventors proposed a new parity bit separation scheme that can reduce the number of calculations from O(k) to O(log(k)-1) while ensuring the accuracy of the calculation results. For example, when k is 128, the traditional method requires 128 calculations, while the new scheme only requires 6 calculations.
[0038] Figure 1 This diagram illustrates an example of data variation implementing parity bit separation according to one embodiment, such as... Figure 1 As shown, for a 16-bit bit string, only 3 segmentation and swapping calculations are needed to complete the separation of odd and even bits.
[0039] The specific implementation steps of the new solution are described below with reference to more accompanying drawings and embodiments. Figure 2 The diagram illustrates a data processing method flow according to one embodiment. The execution entity of the method can be any device, platform, server, or device cluster with computing and processing capabilities. Figure 2 As shown, the method includes the following steps:
[0040] Step S210, obtain 2 n The bit string to be processed is determined based on the original bit string corresponding to the target data; step S220, the bit string to be processed is subjected to n-1 bit swaps, wherein any t-th bit swap includes: dividing the current bit string according to 2 t+1 Divide the data into groups of 100 bits; for each group, take the middle 2 bits... t Take 1 bit, swap the positions of the high-order bits and low-order bits, and keep the outer 2 bits. tEach bit remains unchanged; in step S230, a target bit string is determined based on the bit string after the n-1 bit swaps, wherein the high and low bits in the target bit string correspond to the odd and even bits in the original bit string, respectively, and the target bit string is used for data processing related to the odd and even bits of the target data.
[0041] The steps above are explained in detail below:
[0042] First, in step S210, obtain 2 n The bit string to be processed is determined based on the original bit string corresponding to the target data. It should be understood that the target data can be any data 'a'.
[0043] In this step, the target data 'a' can be binary encoded first to obtain a raw bit string containing k bits.
[0044] Furthermore, if it is determined that the original bit string can be represented as an integer power of 2, the original bit string can be directly used as the bit string to be processed.
[0045] When it is determined that the original bit string cannot be represented as an integer power of 2, a predetermined padding method can be used to pad the original bit string to a power of 2. n The bits are then used to obtain the aforementioned bit string to be processed.
[0046] Specifically, we can first determine the value 2 that is greater than k. n Preferably, 2 n It is the integer power of 2 that is greater than k and has the smallest difference between it and k. This can be understood as 2... n-1 <k<2 n .
[0047] The original bit string is then padded. In a preferred padding method A, the high-order bits of the original bit string can be padded with bits equal to the difference, where the difference is 2. n -k. That is, padding is done on the left side of the original bit string. The values of the padding bits can be random, or all 0s or all 1s, since they will eventually be removed. In one example, assuming the original bit string is 010101, two 0 bits can be padded on the left, resulting in 2k. 3 The bit string to be processed is 00010101.
[0048] In another preferred padding method B, the number of bits corresponding to the difference can be filled into the lower bits of the original bit string; that is, padding can be performed on the right side of the original bit string. In one example, assuming the original bit string is 010101, two 0 bits can be filled into its right side to obtain 2. 3 The bit string to be processed, i.e., 01010100.
[0049] It's important to understand that the padding method is not limited to methods A and B mentioned above. For example, padding can be performed on both the high and low bits. In this way, the bit string to be processed can be obtained through padding.
[0050] From the above, we can obtain 2. n The bit string to be processed.
[0051] Next, in step S220, the bit string to be processed undergoes n-1 bit swaps. It can be understood that this step can only be executed if n is greater than 1. In fact, in most real-world business data processing scenarios, n is naturally greater than 1. Alternatively, n can be constrained to be greater than 1 in step S220. For example, for two atypical cases, i.e., the original bit string of the target data has only 1 or 2 bits, it can be directly padded to 2 bits. 2 One bit. Alternatively, the case of n=1 can be ignored, or it can be handled in the traditional way described above.
[0052] For any bit swap of the t-th order ∈ [1, n-1], the process includes: dividing the current bit string according to 2... t+1 Divide the data into groups of 100 bits; for each group, take the middle 2 bits... t Take 1 bit, swap the positions of the high-order bits and low-order bits, and keep the outer 2 bits. t Each bit remains unchanged.
[0053] It can be understood that the current bit string is initialized to the bit string to be processed mentioned above; the above grouping is to divide every consecutive 2 t+1 Each bit is grouped into a single group, and each bit will only be assigned to one group, not multiple groups simultaneously. Therefore, the current bit string can be divided into 2 groups each time. n-t-1 Group. Additionally, the two on the outer side mentioned above... t The bits include the two on the left outermost side. t-1 1 bit and the 2 on the right outer side t-1 2 bits. For the middle 2 t 2 bits, where the high-order bits refer to the 2 bits in the middle left half. t-1 The least significant bit refers to the 2 bits in the middle right half. t-1 1 bit.
[0054] As shown above, any bit swap of the tth order can be implemented. After each bit swap, the current bit string will be updated. The n-1th bit swap is actually an n-1th iteration update of the current bit string.
[0055] See, for example Figure 1 , where 2 is shown 4For a given bit string to be processed, three bit swaps are required. For example... Figure 1 As shown, in the first swap, the two outer bits of the four consecutive bits remain unchanged, and the two middle bits are swapped; in the second swap, the four outer bits of the eight consecutive bits remain unchanged, and the four middle bits are swapped, that is, the two high bits are shifted right and the two low bits are shifted left; in the third swap, the eight outer bits of the sixteen consecutive bits remain unchanged, and the eight middle bits are swapped, that is, the four high bits are shifted right and the four low bits are shifted left.
[0056] From the above, we can obtain the bit string after n-1 swaps.
[0057] Then, in step S230, the target bit string is determined based on the bit string after the above n-1 bit swapping processes.
[0058] In one embodiment, the bit string to be processed is the original bit string. In this case, the bit string S after the last bit swapping process can be directly processed. f As the target bit string. For example, suppose... Figure 1 The bit string before the first swap is the original bit string. At this point, the bit string obtained after the third swap can be directly used as the target bit string.
[0059] In another embodiment, the bit string to be processed is obtained by padding the original bit string. In this case, a predetermined removal method is required to remove the bit string S. f Reduce the target bit string to k bits, such that the first part of the target bit string... Position and after The bits correspond to the odd and even bits of the original bit string, respectively. It should be noted that the operators... Indicates rounding down, operator This represents rounding up. For example, suppose k = 21. For example, suppose k = 20, then,
[0060] Furthermore, in a specific embodiment, it is assumed that padding method A was used in the aforementioned step S210, that is, padding the high-order bits with the difference number of bits; correspondingly, removal method A can be used in this step, from the bit string S f The left half is divided by removing the first bit of the most significant digit, and the right half is divided by removing the second bit of the most significant digit. The first bit is the value obtained by rounding up half of the aforementioned difference. The second number is the value obtained by rounding down half of the aforementioned difference, that is, For example, suppose the original bit string is 10101 and the bit string to be processed is xxx10101 (for intuitive description, the bits used for padding are denoted as x). In this case, the bit string S f Given xx00x111, we can remove the higher-order bits from xx00. 1 bit, remove the high-order bits from x111 Each bit is used to obtain the target bit string 00111.
[0061] In another specific embodiment, it is assumed that padding method B was used in the aforementioned step S210, that is, padding the low-order bits with the difference number of bits; correspondingly, removal method B can be used in this step, from the bit string S f The left half is divided by removing the first least significant bit, and the right half is divided by removing the second least significant bit. The first significant bit is the value obtained by rounding up half of the aforementioned difference. The second number is the value obtained by rounding down half of the aforementioned difference, that is,
[0062] Furthermore, for the bit string after removing the padding bits, when the original number of bits k is even, the odd and even bits of each original bit remain unchanged after padding. Therefore, the bit string after removing the padding bits can be directly identified as the target bit string. For example, assuming the original bit string is 010101 and the bit string to be processed is 010101xx, then the bit string S... f The value is 000x111x. Therefore, the lower-order bits can be removed from 000x. One bit, removed from 111x Each bit is used to obtain the target bit string 00111.
[0063] When the original number of bits k is odd, the odd and even bits of each original bit are changed after padding. Therefore, the bits after removing the padding bits need to be inserted into the higher-order bits. One bit and low bit The bits are swapped to obtain the target bit string. For example, assuming the original bit string is 10101 and the bit string to be processed is 10101xxx, then the bit string S... f Given 111x00xx, we can remove from xx00 One bit, removed from x111 Each bit is used to obtain the bit string 11100, and then the higher bits are processed. One bit and low bit The bits are swapped to obtain the target bit string 00111.
[0064] From the above, we can obtain the target bit string, where the high-order bits and low-order bits correspond to the odd-order bits and even-order bits in the original bit string, respectively. In fact, it is the result of parity-even bit separation of the original bit string.
[0065] In summary, by adopting the data processing method disclosed in the embodiments of this specification, while achieving accurate separation of odd and even bits, the number of calculations can be reduced from O(k) to O(log(k)), thereby effectively improving processing efficiency.
[0066] The target bit string obtained using the above data processing method can be further used for data processing related to the odd and even bits of the target data. In one application scenario, it is necessary to encode the odd and even bits in the original bit string in different ways. In this case, the odd and even bits can be quickly segmented from the target bit string, and then these two parts can be encoded separately.
[0067] In another application scenario, the above data processing method can be used as a fundamental cryptographic operator in Secure Multi-Party Computation (MPC). It should be noted that MPC technology is designed for securely computing an agreed-upon function in the absence of a trusted third party.
[0068] The above parity bit separation results can serve as the basis for multiple parties to calculate the overflow bit using MPC technology. Regarding the overflow bit, it's important to understand that when two k-bit bit strings are added, if the sum overflows by k bits, the overflow bit is 1; otherwise, it's 0. Specifically, Figure 3 The diagram illustrates a method for protecting data privacy through multi-party computation of overflow bits according to one embodiment, wherein each party holds its own privacy data (or private data). The method can be applied to any one of the parties, and the parties can be implemented as any device, platform, server, or device cluster with computing and processing capabilities.
[0069] like Figure 3 As shown, the method includes the following steps:
[0070] Step S310: Using the privacy data held by this party as the target data, execute... Figure 2 The data processing shown in the figure yields the corresponding target bit string; in step S320, based on the target bit string, a secure multi-party MPC calculation is performed with the other parties in the multi-party calculation to obtain the overflow bit value corresponding to the sum of the privacy data of each party.
[0071] Regarding the above steps, it should be noted that the description of step S310 can be found in the aforementioned section. Figure 2Method description. For step S320 above, the MPC calculation can be implemented using methods such as Garbled Circuits (GC), Homomorphic Encryption (HE), and Secret Share (SS), which will not be elaborated upon here.
[0072] In summary, using the multi-party calculation method for overflow bits disclosed in the embodiments of this specification, each party executes its own method. Figure 2 The data processing in the process yields the target bit string corresponding to the privacy data of each party. Then, MPC technology is used to calculate the overflow bit value corresponding to the sum of the privacy data of each party. In this way, the overflow bit calculation can be completed efficiently and quickly while protecting the data privacy of each party.
[0073] According to another aspect, embodiments of this specification also disclose apparatus corresponding to the above-described data processing method and overflow bit calculation method. Figure 4 A schematic diagram of a data processing apparatus structure according to one embodiment is shown, such as Figure 4 As shown, the device 400 includes:
[0074] The bit string acquisition unit 410, in conjunction with the acquisition of 2 n The bit string to be processed is determined based on the original bit string corresponding to the target data. The switching processing unit 420 is configured to perform n-1 bit switching operations on the bit string to be processed, wherein any t-th bit switching operation includes: dividing the current bit string according to 2... t+1 Divide the data into groups of 100 bits; for each group, take the middle 2 bits... t Take 1 bit, swap the positions of the high-order bits and low-order bits, and keep the outer 2 bits. t Each bit remains unchanged. The target bit string determination unit 430 is configured to determine the target bit string based on the bit string after the n-1 bit swapping processes, wherein the high-order bits and low-order bits in the target bit string correspond to the odd-numbered bits and even-numbered bits in the original bit string, respectively, and the target bit string is used for data processing related to the odd-even bits of the target data.
[0075] In one embodiment, the bit string acquisition unit 410 is specifically configured to: convert the target data into binary form to obtain 2 n A string of bits to be processed.
[0076] In a specific embodiment, the target bit string determination unit 430 is specifically configured to: use the bit string after the n-1 bit swapping processes as the target bit string.
[0077] In one embodiment, the bit string acquisition unit 410 is specifically configured to: perform binary encoding on the target data to obtain a k-bit original bit string, where k cannot be an integer power of 2; and fill the original bit string with a predetermined padding method to a depth of 2 bits. n The bits are then used to obtain the bit string to be processed.
[0078] In one specific embodiment, the bit string acquisition unit 410 is further configured to: determine a value 2 that is greater than k and has the smallest difference between k and k. n .
[0079] In another specific embodiment, the target bit string determination unit 430 is specifically configured to: reduce the bit string after the n-1 bit swapping processes to a k-bit target bit string using a predetermined removal method, such that the first part of the target bit string... Position and after The bits correspond to the odd and even bits of the original bit string, respectively.
[0080] In a more specific embodiment, the bit string acquisition unit 410 is specifically configured to: fill the high-order bits of the original bit string with bits equal to the number of differences, where the difference is 2. n The difference between k and the target bit string determination unit 430 is specifically configured to remove the first and second high-order bits from the left and right halves of the bit string, respectively, where the first and second bits are obtained by rounding up and down respectively from half of the difference.
[0081] In another, more specific embodiment, the bit string acquisition unit 410 is specifically configured to: fill the low-order bits of the original bit string with bits equal to the number of differences, where the difference is 2. n The difference between k and the target bit string determination unit 430 is specifically configured to: remove the first and second bits of the lower-order number from the left and right halves of the bit string, respectively, where the first and second bits are obtained by rounding up and down respectively from half of the difference.
[0082] Figure 5 This diagram illustrates a device structure for protecting data privacy through multi-party computation of overflow bits according to one embodiment, the device being integrated into any one of the multiple parties. Figure 5 As shown, the device 500 includes:
[0083] The target bit string determination unit 510 is configured to use the privacy data held by the party as the target data, and utilize... Figure 4The device unit in the middle performs data processing to obtain the corresponding target bit string; the overflow bit calculation unit 520 is configured to perform secure multi-party MPC calculation with other parties in the multi-party based on the target bit string to obtain the overflow bit value corresponding to the sum of the privacy data of each party.
[0084] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figure 2 or Figure 3 The method described.
[0085] According to another embodiment, a computing device is also provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements a combination... Figure 2 or Figure 3 The methods described herein. Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.
[0086] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment 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 within the scope of protection of the present invention.
Claims
1. A method for processing overflow bits in multi-party computations to protect data privacy, applied to a computing device deployed by any one of the parties, and executed by a processor in the computing device, the method comprising: Get 2 n The bit string to be processed is determined based on the original bit string corresponding to the target data, which is private data held by this party; The bit string to be processed is subjected to n-1 bit swaps, wherein any t-th bit swap includes: dividing the current bit string according to 2 t+1 Divide the data into groups of 100 bits; for each group, take the middle 2 bits... t Take 1 bit, swap the positions of the high-order bits and low-order bits, and keep the outer 2 bits. t Each bit remains unchanged; The target bit string is determined based on the bit string after the n-1 bit swaps, where the high-order bits and low-order bits in the target bit string correspond to the odd-numbered bits and even-numbered bits in the original bit string, respectively. Based on the target bit string, a secure multi-party computation (MPC) is performed with the other parties in the multi-party computation to obtain the overflow bit value corresponding to the sum of the privacy data of each party.
2. The method according to claim 1, wherein, Get 2 n The bit string to be processed includes: Convert the target data into binary to obtain 2. n A string of bits to be processed.
3. The method according to claim 2, wherein, Determining the target bit string based on the bit string after the n-1 bit swaps includes: The bit string obtained after the n-1 bit swaps is taken as the target bit string.
4. The method according to claim 1, wherein, Get 2 n The bit string to be processed includes: The target data is binary encoded to obtain a k-bit original bit string, where k cannot be represented as an integer power of 2; The original bit string is padded to 2 using a predetermined padding method. n The bits are then used to obtain the bit string to be processed.
5. The method according to claim 4, further comprising: Determine the value 2 that is greater than k and has the smallest difference between it and k. n .
6. The method according to claim 4, wherein, Determining the target bit string based on the bit string after the n-1 bit swaps includes: Using a predetermined removal method, the bit string after the n-1 bit swaps is reduced to a target bit string of k bits, such that the first k / 2⌋ bits and the last k / 2⌉ bits of the target bit string correspond to the odd and even bits of the original bit string, respectively.
7. The method according to claim 6, wherein, The original bit string is padded to 2 using a predetermined padding method. n Bits, including: The high-order bits of the original bit string are padded with bits equal to the number of differences, where the difference is 2. n The difference between and k; The process of reducing the bit string after n-1 bit swaps to a target bit string of k bits using a predetermined removal method includes: The first and second most significant bits are removed from the left and right halves of the bit string, respectively, where the first and second bits are obtained by rounding up and down respectively from half of the difference.
8. The method according to claim 6, wherein, The original bit string is padded to 2 using a predetermined padding method. n Bits, including: The low-order bits of the original bit string are padded with bits equal to the number of differences, where the difference is 2. n The difference between and k; The process of reducing the bit string after n-1 bit swaps to a target bit string of k bits using a predetermined removal method includes: The first and second least significant bits are removed from the left and right halves of the bit string, respectively. The first and second least significant bits are obtained by rounding up and down respectively from half of the difference.
9. A data processing apparatus for protecting data privacy in multi-party computation overflow bits, the apparatus being integrated into a processor in a computing device deployed by any one of the parties, the apparatus comprising: The bit string acquisition unit, in conjunction with acquiring 2 n The bit string to be processed is determined based on the original bit string corresponding to the target data; the target data is private data held by this party. The switching processing unit is configured to perform n-1 bit swaps on the bit string to be processed, wherein any t-th bit swap includes: dividing the current bit string according to 2... t+1 Divide the data into groups of 100 bits; for each group, take the middle 2 bits... t Take 1 bit, swap the positions of the high-order bits and low-order bits, and keep the outer 2 bits. t Each bit remains unchanged; The target bit string determination unit is configured to determine the target bit string based on the bit string after the n-1 bit swapping processes, wherein the high-order bits and low-order bits in the target bit string correspond to the odd-numbered bits and even-numbered bits in the original bit string, respectively, and the target bit string is used for data processing related to the odd and even bits of the target data. The overflow bit calculation unit is configured to perform secure multi-party computation (MPC) with other parties in the multi-party computation based on the target bit string, and obtain the overflow bit value corresponding to the sum of the privacy data of each party.
10. A computer-readable storage medium having a computer program stored thereon, wherein, When the computer program is executed in the computer, it causes the computer to perform the method of any one of claims 1-8.
11. A computing device comprising a memory and a processor, wherein, The memory stores executable code, and when the processor executes the executable code, it implements the method of any one of claims 1-8.
Citation Information
Patent Citations
Quantum key agreement method
CN102045161A
Bit swapping for different interleaving depths
US20040257250A1