SECURE MULTI-PARTY EQUALITY TESTING

20260106742 ยท 2026-04-16

    Inventors

    Cpc classification

    International classification

    Abstract

    The present disclosure involves methods, apparatus, and systems for processing equality testing in secure multi-party computation (MPC). In one aspect, a method includes, generating, by a first party of the secure MPC, a difference between a secret share of a first value and a secret share of a second value. During a first iteration, the difference is partitioned into N sections each including M bits. For each section, a random bit is generated, a group of 2.sup.M bits are generated based on the random bit, and a selected bit from the group of 2.sup.M bits is sent to a second party of the secure MPC based on oblivious transfer (OT) protocol. The random bits of the N sections are concatenated as an input of a second iteration. The method further includes determining whether the first value equals the second value based on performing a plurality of iterations.

    Claims

    1. A computer-implemented method, comprising: generating, by a first party of a secure multi-party computation (MPC), a first difference between a first secret share of a first value and a first secret share of a second value; during a first iteration of the secure MPC: partitioning the first difference into N sections each comprising M bits, where N and M are positive integers; for each section of the N sections: generating a first random bit; generating, based on the first random bit, a first group of 2.sup.M bits; and sending, to a second party of the secure MPC based on oblivious transfer (OT) protocol, a first selected bit from the first group of 2.sup.M bits; and concatenating first random bits of the N sections as a first input of a second iteration of the secure MPC; and determining whether the first value equals the second value based on performing a plurality of iterations of the secure MPC comprising at least the first iteration and the second iteration.

    2. The computer-implemented method of claim 1, comprising: concatenating, by the second party, first selected bits of the N sections as a second input of the second iteration.

    3. The computer-implemented method of claim 1, comprising: during the second iteration: partitioning the first input into R sections each comprising M bits, where R is a positive integer; for each section of the R sections: generating a second random bit; generating, based on the second random bit, a second group of 2.sup.M bits; and sending, to the second party based on the OT protocol, a second selected bit from the second group of 2.sup.M bits.

    4. The computer-implemented method of claim 1, wherein generating the first group of 2.sup.M bits comprises: generating a k.sup.th bit, (k=0, 1, 2, . . . , 2.sup.M1), of the first group of 2.sup.M bits by performing an exclusive OR (XOR) operation on the first random bit and an indicator bit, wherein the indicator bit is 0 when the a value of the corresponding section equals k, and the indicator bit is 1 when the value of the corresponding section is not equal to k.

    5. The computer-implemented method of claim 4, wherein the first selected bit is the Q.sup.th bit of the first group of 2.sup.M bits, wherein Q equals a value of a section of a second difference corresponding to the section of the first difference, wherein the second difference is between a second secret share of the second value and a second secret share of the first value.

    6. The computer-implemented method of claim 5, wherein: a result of an XOR operation on the first random bit and the first selected bit is 0 when the value of the section of the first difference and the value of the corresponding section of the second difference are equal; and the result of the XOR operation on the first random bit and the first selected bit is 1 when the value of the section of the first difference and the value of the corresponding section of the second difference are not equal.

    7. The computer-implemented method of claim 1, comprising: during a last iteration of the plurality of iterations: generating a last random bit for a first input of the last iteration; generating, based on the last random bit, a last group of 2.sup.M bits; and sending, to the second party based on the OT protocol, a last selected bit from the last group of 2.sup.M bits, wherein determining whether the first value and the second value are equal comprises: performing an XOR operation on the last random bit and the last selected bit.

    8. The computer-implemented method of claim 1, wherein determining whether the first value and the second value are equal comprises: performing one or more AND operations on a first input and a second input of a last iteration of the plurality of iterations.

    9. The computer-implemented method of claim 5, wherein the first secret share of the first value and the second secret share of the first value are arithmetic shares of the first value, and wherein the first secret share of the second value and the second secret share of the second value are arithmetic shares of the second value.

    10. The computer-implemented method of claim 1, wherein the secure MPC is a secure two-party computation.

    11. One or more computer-readable storage media storing one or more instructions that, when executable by one or more computers, cause the one or more computers to perform operations comprising: generating, by a first party of a secure multi-party computation (MPC), a first difference between a first secret share of a first value and a first secret share of a second value; during a first iteration of the secure MPC: partitioning the first difference into N sections each comprising M bits, where N and M are positive integers; for each section of the N sections: generating a first random bit; generating, based on the first random bit, a first group of 2.sup.M bits; and sending, to a second party of the secure MPC based on oblivious transfer (OT) protocol, a first selected bit from the first group of 2.sup.M bits; and concatenating first random bits of the N sections as a first input of a second iteration of the secure MPC; and determining whether the first value equals the second value based on performing a plurality of iterations of the secure MPC comprising at least the first iteration and the second iteration.

    12. The one or more computer-readable storage media of claim 11, wherein the operations further comprise: concatenating, by the second party, first selected bits of the N sections as a second input of the second iteration.

    13. The one or more computer-readable storage media of claim 11, wherein the operations further comprise: during the second iteration: partitioning the first input into R sections each comprising M bits, where R is a positive integer; for each section of the R sections: generating a second random bit; generating, based on the second random bit, a second group of 2.sup.M bits; and sending, to the second party based on the OT protocol, a second selected bit from the second group of 2.sup.M bits.

    14. The one or more computer-readable storage media of claim 11, wherein generating the first group of 2.sup.M bits comprises: generating a k.sup.th bit, (k=, 1, 2, . . . , 2.sup.M1), of the first group of 2.sup.M bits by performing an exclusive OR (XOR) operation on the first random bit and an indicator bit, wherein the indicator bit is 0 when a value of the corresponding section equals k, and the indicator bit is 1 when the value of the corresponding section is not equal to k.

    15. The one or more computer-readable storage media of claim 14, wherein the first selected bit is the Q.sup.th bit of the first group of 2.sup.M bits, wherein Q equals a value of a section of a second difference corresponding to the section of the first difference, wherein the second difference is between a second secret share of the second value and a second secret share of the first value.

    16. The one or more computer-readable storage media of claim 15, wherein: a result of an XOR operation on the first random bit and the first selected bit is 0 when the value of the section of the first difference and the value of the corresponding section of the second difference are equal; and the result of the XOR operation on the first random bit and the first selected bit is 1 when the value of the section of the first difference and the value of the corresponding section of the second difference are not equal.

    17. The one or more computer-readable storage media of claim 11, wherein the operations further comprise: during a last iteration of the plurality of iterations: generating a last random bit for a first input of the last iteration; generating, based on the last random bit, a last group of 2.sup.M bits; and sending, to the second party based on the OT protocol, a last selected bit from the last group of 2.sup.M bits, wherein determining whether the first value and the second value are equal comprises: performing an XOR operation on the last random bit and the last selected bit.

    18. The one or more computer-readable storage media of claim 11, wherein determining whether the first value and the second value are equal comprises: performing one or more AND operations on a first input and a second input of a last iteration of the plurality of iterations.

    19. The one or more computer-readable storage media of claim 15, wherein the first secret share of the first value and the second secret share of the first value are arithmetic shares of the first value, and wherein the first secret share of the second value and the second secret share of the second value are arithmetic shares of the second value.

    20. A computer-implemented system comprising: one or more computers; and one or more computer memory devices interoperably coupled with the one or more computers and having computer-readable storage media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising: generating, by a first party of a secure multi-party computation (MPC), a first difference between a first secret share of a first value and a first secret share of a second value; during a first iteration of the secure MPC: partitioning the first difference into N sections each comprising M bits, where N and M are positive integers; for each section of the N sections: generating a first random bit; generating, based on the first random bit, a first group of 2.sup.M bits; and sending, to a second party of the secure MPC based on oblivious transfer (OT) protocol, a first selected bit from the first group of 2.sup.M bits; and concatenating first random bits of the N sections as a first input of a second iteration of the secure MPC; and determining whether the first value equals the second value based on performing a plurality of iterations of the secure MPC comprising at least the first iteration and the second iteration.

    Description

    BRIEF DESCRIPTION OF DRAWINGS

    [0017] FIG. 1 illustrates an example process of performing equality testing in a secure multi-party computation (MPC) system.

    [0018] FIG. 2 illustrates a flow chart of the example method of performing equality testing in the secure MPC system as shown in FIG. 1.

    [0019] FIG. 3 illustrates another example process of performing equality testing in a secure MPC system.

    [0020] FIG. 4 illustrates a flow chart of the example method of performing equality testing in the secure MPC system as shown in FIG. 3.

    [0021] FIG. 5 illustrates an example of a Vector Oblivious Shift Evaluation (VOSE) protocol using Boolean operation.

    [0022] FIG. 6 illustrates an example of a Vector Oblivious Shift Evaluation (VOSE) protocol using arithmetic operation.

    [0023] FIG. 7 illustrates another example process of performing equality testing in a secure MPC system.

    [0024] FIG. 8 illustrates a flow chart of the example method of performing equality testing in the secure MPC system as shown in FIG. 7.

    [0025] FIG. 9 illustrates a schematic diagram of an example computing system.

    [0026] Like reference numbers and designations in the various drawings indicate like elements.

    DETAILED DESCRIPTION

    [0027] This specification relates to methods, apparatuses, and systems for performing equality testing in secure multi-party computation (MPC). Secure equality testing is widely used in many secure computation scenarios, such as privacy-preserving machine learning, private set intersection, secure data mining, etc. Secure equality testing can calculate whether a first private input equals the second private input, without disclosing the private inputs to any party. In secure MPC, especially in secure two-party computation (2PC), secure equality testing remains the bottleneck that affects the performance of the secure MPC.

    [0028] The present disclosure provides techniques to improve the speed and efficiency of secure equality testing in secure MPC. In some implementations, the secure MPC can perform equality testing in an iterative approach by invoking oblivious transfer (OT) protocol. In each iteration, a first party (P0) and a second party (P1) can each partition its input into a number of sections. By invoking the OT protocol for each section, the secure MPC can generate secret shares of an indicator indicating whether the corresponding sections of the P0's input and P1's input are equal. The secret shares of the indicator can be inputs of a subsequent iteration. As such, the number of communication rounds between the first party and the second party can be reduced, for example, compared to equality testing based on AND operations.

    [0029] In some implementations, in one or more iterations, the secure MPC can invoke an equality testing protocol. The equality testing protocol includes local computation based on Vector Oblivious Shift Evaluation (VOSE) protocol, which can further reduce the number of rounds of online communication between the first party and the second party.

    [0030] The described techniques can achieve one or more technical effects. For example, through multiple invocations of the OT protocol, the secure equality testing can be performed with higher speed and efficiency. For another example, the described techniques can reduce the number of communication rounds between the parties of the secure MPC, while balancing the volume of data transmission between parties of the secure MPC. Further, the described techniques can protect data security against two semi-honest parties. In some implementations, additional or different technical effects can be achieved.

    [0031] Techniques of the present disclosure can be applied in a variety of practical scenarios. For example, in cryptographic key management, secure MPC can help build an environment for generating, storing, and managing cryptographic keys without the need for a hardware security appliance. For another example, in the healthcare domain, secure MPC can provide a safe solution for encrypting, storing, and transmitting sensitive medical data. For yet another example, in the financial sector, secure MPC can help financial organizations to jointly analyze financial trends without exposing individual customer data.

    [0032] The above aspects and some other aspects of the present disclosure are discussed in greater detail below.

    [0033] The table below shows some example notations and their corresponding meaning.

    TABLE-US-00001 Example Notations Notation Meaning custom-character For arithmetic sharing, a value x having l bits in length is shared additively in the ring custom-character custom-character For Boolean sharing, each bit of a value x having l bits in length is shared independently in the ring custom-character custom-character xcustom-character .sup.A Arithmetic share of x custom-character xcustom-character .sup.B Boolean share of x custom-character xcustom-character .sub.i Secret share of x that belongs to party i. 1{b} Indicator function, which equals to 1 when b is true and equals to 0 when b is false. s S Sampling an element s, uniformly at random from S. concatenation operation [x] The smallest integer greater than or equal to x: [x] = min{n Z | n x}

    [0034] FIG. 1 illustrates an example process 100 of equality testing in a secure two-party computation (MPC) system. A first party participating in the secure MPC is denoted as Party 0 (P0), and a second party participating in the secure MPC is denoted as Party 1 (P1). The equality testing aims to determine whether two private inputs are equal (e.g., whether a=b), without disclosing the private inputs to any party.

    [0035] As starter, the first party P0 has an arithmetic share of the private input a denoted as (a).sub.0.sup.A and an arithmetic share of the private input b denoted as (b).sub.0.sup.A. The second party P1 has an arithmetic share of the private input a denoted as (a).sub.1.sup.A, and an arithmetic share of the private input b denoted as

    [00001] .Math. b .Math. 1 A .

    The sum of arithmetic shares is the private input, such that

    [00002] .Math. a .Math. 0 A + .Math. a .Math. 1 A = a , and .Math. b .Math. 0 A + .Math. b .Math. 1 A = b .

    For example, the secure MPC can generate a random number as

    [00003] .Math. a .Math. 0 A

    and send it to P0, and generate

    [00004] a - .Math. a .Math. 0 A as .Math. a .Math. 1 A

    and send it to P1. As such, the secure MPC system can determine whether a=b by determining whether

    [00005] .Math. a .Math. 0 A + .Math. b .Math. 0 A = .Math. b .Math. 1 A + .Math. a .Math. 1 A .

    [0036] The process 100 can determine whether

    [00006] .Math. a .Math. 0 A - .Math. b .Math. 0 A = .Math. b .Math. 1 A - .Math. a .Math. 1 A

    in an iterative approach by invoking oblivious transfer (OT) protocol. PG generates

    [00007] .Math. a .Math. 0 A - .Math. b .Math. 0 A

    as its initial input x.sub.0, and P1 generates

    [00008] .Math. b .Math. 1 A - .Math. a .Math. 1 A

    as its initial input y.sub.0, where x.sub.0 and y.sub.0 are values in binary form.

    [0037] At 102, in a first iteration of the process 100, P0 and P1 set i=0. P0 partitions its input x.sub.i (which is x.sub.0 for the first iteration) into a number of sections x.sub.i,j, such that x.sub.i=x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 . . . x.sub.i,1x.sub.i,0. The length of the input x.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00009] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 1, P0 inputs x.sub.i=x.sub.0=1101110100110110, which is 16 bits in length. P0 can partition x.sub.0 into four sections, each section being 4 bits in length: x.sub.0,3=1101, x.sub.0,2=1101, x.sub.0,1=0011, and x.sub.0,0=0110. That is, l.sub.i=16, m.sub.i=4, and q.sub.i=4.

    [0038] Similarly, P1 partitions its input y.sub.i (which is y.sub.0 for the first iteration) into a number of sections y.sub.i,j, such that y.sub.i=y.sub.i,q.sub.i.sub.1y.sub.i,q.sub.i.sub.2 . . . y.sub.i,0. The length of the input y.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00010] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 1, P1 inputs y.sub.i=y.sub.0=1101110000110110, which is 16 bits in length. P1 can partition y.sub.0 into four sections, each section being 4 bits in length: y.sub.0,3=1101, y.sub.0,2=1100, y.sub.0,1=0011, and y.sub.0,0=0110.

    [0039] At 104, for each section x.sub.i,j (j={0,1, . . . , q.sub.i1}), P0 can generate a random bit

    [00011] .Math. eq i , j .Math. 0 B { 0 , 1 } .

    The random bit is either 0 or 1. The random bit can be regarded as a Boolean share that belongs to P0. Based on the random bit

    [00012] .Math. eq i , j .Math. 0 B ,

    P0 can generate a group of M.sub.i bits, each denoted as t.sub.i,j,k, where M.sub.i=2.sup.m.sup.i, and k={0,1, . . . , M.sub.i=1}. Each bit t.sub.i,j,k can be generated as

    [00013] t i , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j k } .

    [0040] As an example, for the section x.sub.0,0=0110, P0 generates a random bit 1 as

    [00014] .Math. eq 0 , 0 .Math. 0 B .

    P0 then generates a group of 16 bits, t.sub.0,0,0 to t.sub.0,0,15, where:

    [00015] t 0 , 0 , 0 = .Math. eq 0 , 0 .Math. 0 B 1 { x 0 , 0 0 } = 1 1 = 0 , t 0 , 0 , 1 = .Math. eq 0 , 0 .Math. 0 B 1 { x 0 , 0 1 } = 1 1 = 0 , .Math. , t 0 , 0 , 6 = .Math. eq 0 , 0 .Math. 0 B 1 { x 0 , 0 6 } = 1 0 = 1 , .Math. , and t 0 , 0 , 15 = .Math. eq 0 , 0 .Math. 0 B 1 { x 0 , 0 15 } = 1 1 = 0

    [0041] By invoking the OT protocol, P1 can select and obtain one bit

    [00016] t i , j , y i , j = .Math. eq i , j .Math. 0 B 1 { x i , j y i , j }

    from the group of M.sub.i bits. The selected bit t.sub.i,j,y.sub.i,j can be denoted as a Boolean share

    [00017] .Math. eq i , j .Math. 1 B

    that belongs to P1, since

    [00018] .Math. eq i , j .Math. 0 B .Math. eq i , j .Math. 1 B = 0

    when x.sub.i,j=y.sub.i,j, and

    [00019] .Math. eq i , j .Math. 0 B .Math. eq i , j .Math. 1 B = 1

    when x.sub.i,jy.sub.i,j. As such, the MPC can determine whether x.sub.i,j=y.sub.i,j by computing

    [00020] .Math. eq i , j .Math. 0 B .Math. eq i , j .Math. 1 B .

    [0042] As an example, the section of y.sub.0 that corresponds to x.sub.0,0=0110 is y.sub.0,0=0110 (6 in decimal). Based on y.sub.0,0, P1 selects and obtains the bit t.sub.0,0,6 from the 16 bits t.sub.0,0,0 to t.sub.0,0,15. Therefore,

    [00021] .Math. eq 0 , 0 .Math. 1 B = t 0 , 0 , 6 = 1.

    Since

    [00022] .Math. eq 0 , 0 .Math. 0 B .Math. eq 0 , 0 .Math. 1 B = 1 1 = 0 ,

    it indicates that x.sub.0,0=y.sub.0,0.

    [0043] At 106, P0 can output q.sub.i bits, each bit

    [00023] .Math. eq i , j .Math. 0 B

    is a first secret share of an indicator that indicates whether the section x.sub.i,j equals the section y.sub.i,j. Pn1 can output q.sub.i bits, each bit

    [00024] .Math. eq i , j .Math. 1 B

    is a second secret share of the indicator. In this way, the input x.sub.i, which is l.sub.i bits in length, can be compressed to a value in binary form having a shorter length (q.sub.i bits in length). As one example, as shown in FIG. 1, in the first iteration of the process 100, P0's input x.sub.0, which is 16 bits in length, is compressed into 4 bits

    [00025] .Math. eq 0 , 3 .Math. 0 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. eq 0 , 2 .Math. 0 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. eq 0 , 1 .Math. 0 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. eq 0 , 0 .Math. 0 B ( e . g . , 0011 ) .

    P1's input y.sub.0, which is 16 bits in length, is compressed into 4 bits

    [00026] .Math. eq 0 , 3 .Math. 1 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. eq 0 , 2 .Math. 1 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. eq 0 , 1 .Math. 1 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. eq 0 , 0 .Math. 1 B = t 0 , 3 , 1 3 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" t 0 , 2 , 12 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" t 0 , 1 , 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" t 0 , 0 , 6 ( e . g . , 0011 ) .

    [0044] At 108, the process 100 proceeds to a second iteration, where P0 and P1 set i=1. The output of the first iteration can be the input of the second iteration. The input of P0 is

    [00027] x i = .Math. eq i - 1 , q i - 1 - 1 .Math. 0 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. eq i - 1 , 0 .Math. 0 B .

    The input of P1 is

    [00028] y i = .Math. eq i - 1 , q i - 1 - 1 .Math. 1 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. eq i - 1 , 0 .Math. 1 B .

    The secure MPC system can determine whether x.sub.0=y.sub.0 by determining whether x.sub.1=y.sub.1.

    [0045] Similar to the first iteration, P0 partitions its input x.sub.i (which is x.sub.1 for the second iteration) into a number of sections x.sub.i,j, such that x.sub.i=x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 . . . x.sub.i,0. The length of the input x.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00029] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 1, P0 inputs x.sub.i=x.sub.1=0011, which is 4 bits in length and can be viewed as one section having 4 bits in length. P1 inputs y.sub.i=y.sub.1=0111, which is 4 bits in length and can be viewed as one section having 4 bits in length. In this example, the second iteration can be the last iteration.

    [0046] At 110, similar to 104, for each section x.sub.i,j (j={0,1, . . . , q.sub.i1}), P0 can generate a random bit

    [00030] .Math. eq i , j .Math. 0 B { 0 , 1 }

    as a Boolean share. Based on the random bit

    [00031] .Math. eq i , j .Math. 0 B ,

    P0 can generate a group of M.sub.i bits, each denoted as t.sub.i,j,k, where M.sub.i=2.sup.m.sup.i, and k={0,1, . . . , M.sub.i1}. Each bit t.sub.i,j,k can be generated as

    [00032] t l , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j k } .

    [0047] As an example, for the section x.sub.1,0=0011, P0 generates a random bit 0 as

    [00033] .Math. eq 1 , 0 .Math. 0 B .

    P0 then generates a group of 16 bit, t.sub.1,0,0 to t.sub.1,0,15, where:

    [00034] t 1 , 0 , 0 = .Math. eq 1 , 0 .Math. 0 B 1 { x 1 , 0 0 } = 0 1 = 1 , t 1 , 0 , 1 = .Math. eq 1 , 0 .Math. 0 B 1 { x 1 , 0 1 } = 0 1 = 1 , .Math. , t 1 , 0 , 3 = .Math. eq 1 , 0 .Math. 0 B 1 { x 1 , 0 3 } = 0 0 = 0 , .Math. , and t 1 , 0 , 1 5 = .Math. eq 1 , 0 .Math. 0 B 1 { x 1 , 0 1 5 } = 0 1 = 1

    [0048] By invoking the oblivious transfer protocol, P1 can select and obtain one bit

    [00035] t i , j , y i , j = .Math. eq i , j .Math. 0 B 1 { x i , j y i , j }

    from the group of M.sub.i bits. The selected bit t.sub.i,j,y.sub.i,j can be denoted as a Boolean share

    [00036] .Math. eq i , j .Math. 1 B

    that belongs to P1.

    [0049] As an example, based on y.sub.1,0=0111, P1 selects and obtains the bit t.sub.1,0,7 from the 16 bits t.sub.1,0,0 to t.sub.1,0,15. Therefore,

    [00037] .Math. eq 1 , 0 .Math. 1 B = t 1 , 0 , 7 = 1.

    [0050] At 112, for the second iteration where i=1, P0 outputs q.sub.i bits, each bit

    [00038] .Math. eq i , j .Math. 0 B

    representing a section x.sub.i,j. P1 can output q.sub.i bits, each bit t.sub.i,j,y.sub.i,j representing a section y.sub.i,j. In this way, the input x.sub.i and y.sub.i are each further compressed to a value in binary form having a shorter length.

    [0051] The process 100 can include multiple rounds of iteration, until the initial input x.sub.0 and y.sub.0 are each compressed to a single bit. In the last iteration, P0 and P1 each output a single bit.

    [0052] At 114, by performing an XOR operation on the single-bit output of the last iteration, the secure MPC can determine whether a=b. In this way, through the iterative approach by invoking oblivious transfer (OT) protocol, the secure MPC system can obtain the result of equality testing.

    [0053] As an example shown in FIG. 1, the process includes two rounds of iteration. In the second (last) iteration, P0 outputs

    [00039] .Math. eq 1 , 0 .Math. 0 B = 0 ,

    and P1 outputs

    [00040] .Math. eq 1 , 0 .Math. 1 B = 1.

    By computing

    [00041] .Math. eq 1 , 0 .Math. 0 B .Math. .Math. eq 1 , 0 .Math. 1 B = 1 ,

    the secure MPC system can determine that x.sub.1y.sub.1, which is equivalent to x.sub.0y.sub.0, which is equivalent to ab.

    [0054] In some implementations, for the last iteration where i=n and the input x.sub.n and y.sub.n each include only one section, P0 can generate a group of M.sub.n bits each denoted as t.sub.n,0,k, where M.sub.n=2.sup.m.sup.n, and k={0,1, . . . , M.sub.n1}. Each bit t.sub.n,0,k can be generated as

    [00042] t n , 0 , k = .Math. eq n , j .Math. 0 B .Math. 1 { x n , 0 = k } .

    As such, when performing XOR operation on the single-bit output of

    [00043] .Math. eq n , 0 .Math. 0 B

    from P0 and the single-bit output

    [00044] .Math. eq n , 0 .Math. 1 B

    from P1,

    [00045] .Math. eq n , 0 .Math. 0 B .Math. .Math. eq n , 0 .Math. 1 B = 1

    indicates that

    [00046] a = b , and .Math. eq n , 0 .Math. 0 B .Math. .Math. eq 1 , 0 .Math. 1 B = 0

    indicates that ab.

    [0055] It should be noted that the example process 100 is for illustration purposes. The initial input x.sub.0 and y.sub.0 can have any suitable length in bits, the input of each iteration can be partitioned into sections of any suitable length in bits, and the process can include any suitable number of rounds of iteration. For example, the initial input x.sub.0 and y.sub.0 can each include 64 bits, and each be partitioned into 16 sections (each section has a length of 4 bits). The first iteration can compress x.sub.0 and y.sub.0 into x.sub.1 and y.sub.1, x.sub.1 and y.sub.1 each having a length of 16 bits. The second iteration can compress x.sub.1 and y.sub.1 into x.sub.2 and y.sub.2, x.sub.2 and y.sub.2 each having a length of 4 bits. The third (last) iteration can compress x.sub.2 and y.sub.2 into a single bit. By performing an XOR operation on the two single bits, the secure MPC system can determine whether a=b.

    [0056] Below is an example algorithm for process 100.

    TABLE-US-00002 [00047] P 0 locally computes .Math. d .Math. 0 A = .Math. a .Math. 0 A - .Math. b .Math. 0 A , P 1 locally computes .Math. d .Math. 1 A = .Math. a .Math. 1 A - .Math. b .Math. 1 A . [00048] P 0 sets x 0 = .Math. d .Math. 0 A , P 1 sets y 0 = - .Math. d .Math. 1 A . P.sub.0 and P.sub.1 set i = 0. do P.sub.0 parses its input as x.sub.i = x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 ... x.sub.i,0, and P.sub.1 parses its input as [00049] y i = y i , q i - 1 .Math. y i , q i - 2 .Math. .Math. .Math. y i , 0 , where x i , j , y i , j { 0 , 1 ) m i , q i = .Math. l i m i .Math. , the bit lengths of x.sub.i and y.sub.i are equal, denoted as l.sub.i. Let M.sub.i = 2.sup.m.sup.i for j = {0, 1, ... , q.sub.i 1} do [00050] P 0 samples .Math. eq i , j .Math. 0 B { 0 , 1 } for k = {0, 1, ... , M.sub.i 1} do if q.sub.i > 1 [00051] P 0 sets t i , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j k } else [00052] P 0 sets t i , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j = k } end if end for P.sub.0 and P.sub.1 invoke an instance of 1 out of M.sub.i OT, where P.sub.0 is the sender with inputs {t.sub.i,j,k}.sub.k and P.sub.1 is the receiver with input y.sub.i,j. P.sub.1 sets its output as [00053] .Math. eq i , j .Math. 1 B . end for P.sub.0 and P.sub.1 compute i = i + 1. [00054] P 0 sets x i = .Math. eq i - 1 , q i - 1 - 1 .Math. 0 B .Math. .Math. .Math. .Math. eq i - 1 , 0 .Math. 0 B [00055] P 1 sets y i = .Math. eq i - 1 , q i - 1 - 1 .Math. 1 B .Math. .Math. .Math. .Math. eq i - 1 , 0 .Math. 1 B while q.sub.i1 > 1 [00056] P 0 and P 1 set their output as .Math. eq i - 1 , 0 .Math. 0 B and .Math. eq i - 1 , 0 .Math. 1 B , respectively .

    [0057] In some implementations, the last round iteration of process 100 can be performed based on AND operation, instead of based on OT protocol. In the last iteration where P0's input is

    [00057] x n = .Math. eq n - 1 , q n - 1 - 1 .Math. 0 B .Math. .Math. .Math. .Math. eq n - 1 , 0 .Math. 0 B

    and P0's input is

    [00058] y n = .Math. eq n - 1 , q n - 1 - 1 .Math. 1 B .Math. .Math. .Math. .Math. eq n - 1 , 0 .Math. 1 B ,

    the secure MPC can determine whether x.sub.n=y.sub.n by computing

    [00059] 1 { .Math. eq n - 1 , q n - 1 - 1 .Math. 0 B = .Math. eq n - 1 , q n - 1 - 1 .Math. 1 B } AND .Math. AND { .Math. eq n - 1 , q 0 - 1 .Math. 0 B = .Math. eq n - 1 , q 0 - 1 .Math. 1 B } .

    If the result of the AND operations is 1, x.sub.n=y.sub.n. If the result of the AND operations is 0, x.sub.ny.sub.n.

    [0058] As an example shown in FIG. 1, P0's input of the last iteration is x.sub.1=0011, P1's input of the last iteration is y.sub.1=0111. P1 can locally compute

    [00060] y 1 = y 1 0 1 1 1 = 1000.

    In the first round of AND operation, the secure MPC can perform an XOR operation on the first bit of x.sub.1 and the first bit of

    [00061] y 1 ,

    an XOR operation on the second bit of x.sub.1 and the second bit of

    [00062] y 1 ,

    and an AND operation on the results of the two XOR operations, such that (01) AND (00)=1 AND 0=0. The result can be a first input of the second round of AND operation. Then, the secure MPC can perform an XOR operation on the third bit of x.sub.1 and the third bit of

    [00063] y 1 ,

    an XOR operation on the fourth bit of x.sub.1 and the fourth bit of

    [00064] y 1 ,

    and an AND operation on the results of the two XOR operations, such that (10) AND (10)=1 AND 1=1. The result can be a second input of the second round of AND operation. In the second round of AND operation, the secure MPC can perform an AND operation on the first input and the second input, such that 0 AND 1=0. If the result of the last AND operation is 0, it means x.sub.1y.sub.1, which is equivalent to ab. If the result of the last AND operation is 1, it means x.sub.1=y.sub.1, which is equivalent to a=b.

    [0059] Below is an example algorithm for process 100 where the last iteration performs equality testing based on AND operations.

    TABLE-US-00003 [00065] P 0 locally computes .Math. d .Math. 0 A = .Math. a .Math. 0 A - .Math. b .Math. 0 A , P 1 locally computes .Math. d .Math. 1 A = .Math. a .Math. 1 A - .Math. b .Math. 1 A . [00066] P 0 sets x 0 = .Math. d .Math. 0 A , P 1 sets y 0 = - .Math. d .Math. 1 A . P.sub.0 and P.sub.1 set i = 0. do P.sub.0 parses its input as x.sub.i = x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 ... x.sub.i,0, and P.sub.1 parses its input as [00067] y i = y i , q i - 1 .Math. y i , q i - 2 .Math. .Math. .Math. y i , 0 , where x i , j , y i , j { 0 , 1 ) m i , q i = .Math. l i m i .Math. , the bit lengths of x.sub.i and y.sub.i are equal, denoted as l.sub.i. Let M.sub.i = 2.sup.m.sup.i for j = {0, 1, ... , q.sub.i 1} do [00068] P 0 samples .Math. eq i , j .Math. 0 B { 0 , 1 } for k = {0, 1, ... , M.sub.i 1} do if q.sub.i > T [00069] P 0 sets t i , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j k } else [00070] P 0 sets t i , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j = k } end if end for P.sub.0 and P.sub.1 invoke an instance of 1 out of M.sub.i OT, where P.sub.0 is the sender with inputs {t.sub.i,j,k}.sub.k and P.sub.1 is the receiver with input y.sub.i,j. P.sub.1 sets its output as [00071] .Math. eq i , j .Math. 1 B . end for P.sub.0 and P.sub.1 compute i = i + 1. [00072] P 0 sets x i = .Math. eq i - 1 , q i - 1 - 1 .Math. 0 B .Math. .Math. .Math. .Math. eq i - 1 , 0 .Math. 0 B [00073] P 1 sets y i = .Math. eq i - 1 , q i - 1 - 1 .Math. 1 B .Math. .Math. .Math. .Math. eq i - 1 , 0 .Math. 1 B while q.sub.i1 > T for k = {1, ... , log(q.sub.i)} do for j = {0, 1, ... , q.sub.i/2.sup.k 1)} do [00074] for b { 0 , 1 } , P b invokes AND with inputs .Math. eq k - 1 , 2 j .Math. b B and .Math. eq k - 1 , 2 j + 1 .Math. b B to [00075] learn output .Math. eq k , j .Math. b B . end for end for [00076] P 0 and P 1 set their output as .Math. eq .Math. log ( q i - 1 ) .Math. , 0 .Math. 0 B and .Math. eq .Math. log ( q i - 1 ) .Math. , 0 .Math. 1 B , respectively .

    [0060] FIG. 2 illustrates a flow chart of the example method 200 of performing equality testing as shown in FIG. 1. The operations shown in method 200 may not be exhaustive and that other operations can be performed as well before, after, or in between any of the illustrated operations. Further, some of the operations may be performed simultaneously, or in a different order than shown in FIG. 2. In some implementations, some of the operations may be performed by a computer, or multiple computers based on secure MPC.

    [0061] At 202, a first party (e.g., P0 of FIG. 1) of a secure multi-party computation (MPC) generates a first difference (e.g., x.sub.0 of FIG. 1) between a first secret share (e.g., arithmetic share

    [00077] .Math. a .Math. 0 A )

    of a first value (e.g., private input a) and a first secret share (e.g., arithmetic share

    [00078] .Math. b .Math. 0 A )

    of a second value (e.g., private input b). The second party (e.g., P1 of FIG. 1) of the secure MPC generates a second difference (e.g., y.sub.0 of FIG. 1) between a second secret share (e.g., arithmetic share

    [00079] .Math. b .Math. 1 A )

    of the second value and a second secret share (e.g., arithmetic share

    [00080] .Math. a .Math. 1 A )

    of the first value.

    [0062] At 204, during a first iteration of the secure MPC, the first party partitions the first difference into N sections (e.g., x.sub.0=x.sub.0,3x.sub.0,2x.sub.0,1x.sub.0,0) each including M bits, where N and M are positive integers. The second party partitions the second difference into N sections (e.g., y.sub.0=y.sub.0,3y.sub.0,2y.sub.0,1y.sub.0,0) each including M bits.

    [0063] At 206, for each section of the N sections, the first party generates a first random bit (e.g.,

    [00081] .Math. eq 0 , j .Math. 0 B

    of FIG. 1), generates a first group of 2.sup.M bits (e.g., t.sub.0,j,0 to t.sub.0,j,15 of FIG. 1) based on the first random bit, and sends, to the second party and based on oblivious transfer (OT) protocol, a first selected bit (e.g., t.sub.0,j,y.sub.0,j, also denoted as

    [00082] .Math. eq 0 , j .Math. 1 B

    in FIG. 1) from the first group of 2.sup.M bits.

    [0064] In some implementations, the first group of 2.sup.M bits are generated by generating a k.sup.th bit, (k=0, 1, 2, . . . , 2.sup.M1), of the first group of 2.sup.M bits by performing an exclusive OR (XOR) operation on the first random bit and an indicator bit (e.g., 1{x.sub.0,jk} of FIG. 1). The indicator bit is 0 when a value of the corresponding section equals k, and the indicator bit is 1 when the value of the section is not equal to k.

    [0065] Further, the first selected bit is the Ql bit of the first group of 2.sup.M bits, where Q equals the value of a corresponding section (e.g., y.sub.0,j of FIG. 1) of the second difference. As such, a result of an XOR operation on the first random bit and the first selected bit is 0 when the value of the section of the first difference and the value of the corresponding section of the second difference are equal. The result of the XOR operation on the first random bit and the first selected bit is 1 when the value of the section of the first difference and the value of the corresponding section of the second difference are not equal.

    [0066] At 208, the first party concatenates first random bits of the N sections as a first input (e.g., x.sub.1 of FIG. 1) of a second iteration of the secure MPC. The second party concatenates first selected bits of the N sections as a second input (e.g., y.sub.1 of FIG. 1) of the second iteration.

    [0067] In some implementations, during the second iteration, the first party partitions the first input into R sections each including M bits, and the second party partitions the second input into R sections each including M bits, where R is a positive integer. For each section of the R sections, the first party generates a second random bit (e.g.,

    [00083] .Math. eq 1 , 0 .Math. 0 B

    of FIG. 1), generates a second group of 2.sup.M bits (e.g., t.sub.1,0,0 to t.sub.1,0,15 of FIG. 1) based on the second random bit, and sends, to the second party based on the OT protocol, a second selected bit (e.g., t.sub.1,0,y.sub.1,0, also denoted as

    [00084] .Math. eq 1 , 0 .Math. 1 B

    of FIG. 1) from the second group of 2.sup.M bits.

    [0068] At 210, the secure MPC determines whether the first value equals the second value based on results of a plurality of iterations of the secure MPC. The plurality of iterations includes at least the first iteration and the second iteration.

    [0069] In some implementations, the last iteration of the plurality of iterations is also performed based on OT protocol. During the last iteration, the first party generates a last random bit, generates a last group of 2.sup.M bits based on the last random bit, and sends, to the second party based on the OT protocol, a last selected bit from the last group of 2.sup.M bits. The secure MPC determines whether the first value and the second value are equal by performing an XOR operation on the last random bit and the last selected bit.

    [0070] In some implementations, the last iteration of the plurality of iterations is performed based on AND operations. The secure MPC determines whether the first value and the second value are equal by performing one or more AND operations on a first input and a second input of the last iteration.

    [0071] FIG. 3 illustrates an example process 300 of equality testing in a secure two-party computation (MPC) system. A first party participating in the secure MPC is denoted as Party 0 (P0), and a second party participating in the secure MPC is denoted as Party 1 (P1). The equality testing aims to determine whether two private inputs are equal (e.g., whether a=b), without disclosing the private inputs to any party.

    [0072] As starter, the first party P0 has an arithmetic share of the private input a denoted as

    [00085] .Math. a .Math. 0 A

    and an arithmetic share of the private input b denoted as

    [00086] .Math. b .Math. 0 A .

    The second party P1 has an arithmetic share of the private input a denoted as

    [00087] .Math. a .Math. 1 A ,

    and an arithmetic share of the private input b denoted as

    [00088] .Math. a .Math. 0 A + .Math. a .Math. 1 A = a , and .Math. b .Math. 0 A + .Math. b .Math. 1 A = b .

    The sum of arithmetic shares is the private input, such that

    [00089] .Math. b .Math. 1 A .

    For example, the secure MPC can generate a random integer as

    [00090] .Math. a .Math. 0 A

    and send it to P0, and generate

    [00091] a - .Math. a .Math. 0 A as .Math. a .Math. 1 A

    and send it to P1. As such, the secure MPC system can determine whether a=b by determining whether

    [00092] .Math. a .Math. 0 A - .Math. b .Math. 0 A = .Math. b .Math. 1 A - .Math. a .Math. 1 A .

    [0073] The process 300 can determine whether

    [00093] .Math. a .Math. 0 A - .Math. b .Math. 0 A = .Math. b .Math. 1 A - .Math. a .Math. 1 A

    in an iterative approach by invoking oblivious transfer (OT) protocol. P0 generates

    [00094] .Math. a .Math. 0 A - .Math. b .Math. 0 A

    as its initial input x.sub.0, and P1 generates

    [00095] .Math. b .Math. 1 A - .Math. a .Math. 1 A

    as its initial input y.sub.0, where x.sub.0 and y.sub.0 are values in binary form.

    [0074] At 302, in a first iteration of the process 300, P0 and P1 set i=0. P0 partitions its input x.sub.i (which is x.sub.0 for the first iteration) into a number of sections x.sub.i,j, such that x.sub.i=x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 . . . x.sub.i,1x.sub.i,0. The length of the input x.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00096] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 3, P0 inputs x.sub.i=x.sub.0=1101110100110110, which is 16 bits in length. P0 can partition x.sub.0 into four sections, each section being 4 bits in length: x.sub.0,3=1101, x.sub.0,2=1101, x.sub.0,1=0011, and x.sub.0,0=0110.

    [0075] Similarly, P1 partitions its input y.sub.i (which is y.sub.0 for the first iteration) into a number of sections y.sub.i,j, such that y.sub.i=y.sub.i,q.sub.i.sub.1y.sub.i,q.sub.i.sub.2 . . . y.sub.i,0. The length of the input y.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00097] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 3, P1 inputs y.sub.i=y.sub.0=1101110000110110, which is 16 bits in length. P1 can partition y.sub.0 into four sections, each section being 4 bits in length: y.sub.0,3=1101, y.sub.0,2=1300, y.sub.0,1=0011, and y.sub.0,0=0110. That is, l.sub.i=16, m.sub.i=4, and q.sub.i=4.

    [0076] At 304, for each section x.sub.i,j (j={0,1, . . . , q.sub.i1}), P0 can generate a random integer

    [00098] .Math. eq i , j .Math. 0 A { 0 , 1 , ... , q i } .

    The random integer is sampled from 0 to q.sub.i. The random integer can be regarded as an arithmetic share that belongs to P0. Based on the random integer

    [00099] .Math. eq i , j .Math. 0 A ,

    P0 can generate a group of M.sub.i integers, each denoted as t.sub.i,j,k, where M.sub.i=2.sup.m.sup.i, and k={0,1, . . . , M.sub.i1}. Each bit t.sub.i,j,k can be generated as

    [00100] t i , j , k = ( 1 { x i , j k } - .Math. eq i , j .Math. 0 A ) mod ( q i + 1 ) .

    [0077] As an example, for the section x.sub.0,0=0110, P0 generates a random integer 4 as

    [00101] .Math. eq 0 , 0 .Math. 0 A .

    P0 then generates a group of 16 integers, t.sub.0,0,0 to t.sub.0,0,15, where:

    [00102] t 0 , 0 , 0 = ( 1 { x 0 , 0 0 } - .Math. eq 0 , 0 .Math. 0 A ) mod ( q 0 + 1 ) = ( 1 - 4 ) mod 5 = 2 , t 0 , 0 , 1 = ( 1 { x 0 , 0 1 } - .Math. eq 0 , 0 .Math. 0 A ) mod ( q 0 + 1 ) = ( 1 - 4 ) mod 5 = 2 , ... , t 0 , 0 , 6 = ( 1 { x 0 , 0 6 } - .Math. eq 0 , 0 .Math. 0 A ) mod ( q 0 + 1 ) = ( 0 - 4 ) mod 5 = 1 , ... , and t 0 , 0 , 15 = ( 1 { x 0 , 0 15 } - .Math. eq 0 , 0 .Math. 0 A ) mod ( q 0 + 1 ) = ( 1 - 4 ) mod 5 = 2.

    [0078] By invoking the OT protocol, P1 can select and obtain one integer

    [00103] t i , j , y i , j = ( 1 { x i , j y i , j } - .Math. eq i , j .Math. 0 A ) mod ( q i + 1 )

    from the group of M.sub.i integers. The selected integer t.sub.i,j,y.sub.i,j can be denoted as ab arithmetic share

    [00104] .Math. eq i , j .Math. 1 A

    that belongs to P1 since

    [00105] ( .Math. eq i , j .Math. 0 A + .Math. eq i , j .Math. 1 A ) mod ( q i + 1 ) = 0

    when x.sub.i,j=y.sub.i,j, and

    [00106] ( .Math. eq i , j .Math. 0 A + .Math. eq i , j .Math. 1 A ) mod ( q i + 1 ) 0

    when x.sub.i,jy.sub.i,j. As such, the secure MPC can determine whether x.sub.i,j=y.sub.i,j by computing

    [00107] ( .Math. eq i , j .Math. 0 A + .Math. eq i , j .Math. 1 A ) mod ( q i + 1 ) .

    [0079] As an example, the section of y.sub.0 that corresponds to x.sub.0,0=0110 is y.sub.0,0=0110. Based on y.sub.0,0, P1 selects and obtains the integer t.sub.0,0,6 from the 16 integers t.sub.0,0,1 to t.sub.0,0,15. Therefore,

    [00108] .Math. eq 0 , 0 .Math. 1 A = t 0 , 0 , 6 = 1.

    Since

    [00109] ( .Math. eq 0 , 0 .Math. 0 A + .Math. eq i , j .Math. 1 B ) mod 5 = ( 4 + 1 ) mod 5 = 0 ,

    it indicates that x.sub.0,0=y.sub.0,0.

    [0080] At 306, P0 can output

    [00110] ( .Math. eq i , 0 .Math. 0 A + ... + .Math. eq i , q i - 1 .Math. 0 A ) mod ( q i + 1 ) .

    P1 can output

    [00111] ( .Math. eq i , 0 .Math. 1 A + ... + .Math. eq i , q i - 1 .Math. 1 A ) mod ( q i + 1 ) .

    When x.sub.0=y.sub.0, the sum of the two outputs is a multiple of (q.sub.i+1). When x.sub.0y.sub.0, the sum of the two outputs is not a multiple of (q.sub.i+1). As one example, as shown in FIG. 3, in the first iteration of the process 300, P0's input x.sub.0, which is 16 bits in length, is compressed into the output of one integer

    [00112] ( .Math. eq i , 0 .Math. 0 A + ... + .Math. eq i , q i - 1 .Math. 0 A ) mod ( q i + 1 ) ,

    which can be represented by 3 bits (e.g., 2=010). P1's input y.sub.0, which is 16 bits in length, is compressed into the output of one integer

    [00113] ( .Math. eq i , 0 .Math. 1 A + ... + .Math. eq i , q i - 1 .Math. 1 A ) mod ( q i + 1 ) ,

    which can also be represented by 3 bits (e.g., 4=100).

    [0081] The process 300 proceeds to a second iteration, where P0 and P1 set i=1. The output of the first iteration can be the input of the second iteration. The input from P0 is

    [00114] x i = ( .Math. eq i - 1 , 0 .Math. 0 A + ... + .Math. eq i - 1 , q i - 1 .Math. 0 A ) mod ( q i + 1 ) .

    The input from P1 is

    [00115] y i = [ - ( .Math. eq i , 0 .Math. 1 A + ... + .Math. eq i , q i - 1 .Math. 1 A ) ] mod ( q i + 1 ) .

    The secure MPC system can determine whether x.sub.0=y.sub.0 by determining whether x.sub.1=y.sub.1.

    [0082] In some implementations, the following iterations (including the second iteration) can be performed in the same approach as the first iteration, where P0 generate a random integer, generates a group of integers based on the random integer, and sends a selected integer from the group of integers based on OT protocol. In some implementations, some of the following iterations can be performed in the approach as shown in process 100.

    [0083] At 308, P0 can partition its input x.sub.i into a number of sections x.sub.i,j, such that x.sub.i=x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 . . . x.sub.i,1x.sub.i,0. The length of the input x.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00116] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 3, P0 inputs x.sub.i=x.sub.1=010, which is 3 bits in length. x.sub.1 can be viewed as a single section x.sub.1=x.sub.1,0. That is, l.sub.i=3, m.sub.i=3, and q.sub.i=1.

    [0084] Similarly, P1 partitions its input y.sub.i into a number of sections y.sub.i,j, such that y.sub.i=y.sub.i,q.sub.i.sub.1y.sub.i,q.sub.i.sub.2 . . . y.sub.i,0. The length of the input y.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00117] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 3, P1 inputs y.sub.i=y.sub.1=001, which is 3 bits in length. y.sub.1 can be viewed as a single section y.sub.1=y.sub.1,0. That is, l.sub.i=3, m.sub.i=3, and q.sub.i=1.

    [0085] At 310, for each section x.sub.i,j(j={0,1, . . . , q.sub.i1}), P0 can generate a random bit

    [00118] .Math. eq i , j .Math. 0 B { 0 , 1 } .

    The random bit includes one bit of either 0 or 1. The random bit can be regarded as a Boolean share that belongs to P0. Based on the random integer

    [00119] .Math. eq i , j .Math. 0 B ,

    P0 can generate a group of M.sub.i bits, each denoted as t.sub.i,j,k, where M.sub.i=2.sup.m.sup.i, and k={0,1, . . . , M.sub.i1}. Each bit t.sub.i,j,k can be generated as

    [00120] t i , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j = k } .

    [0086] As an example, for the section x.sub.1,0=010, P0 generates a random bit 0 as

    [00121] .Math. eq 1 , 0 .Math. 0 B .

    P0 then generates a group of 8 bit, t.sub.1,0,0 to t.sub.1,0,7, where:

    [00122] t 1 , 0 , 0 = .Math. eq 1 , 0 .Math. 0 B 1 { x 1 , 0 = 0 } = 0 0 = 0 , t 1 , 0 , 1 = .Math. eq 1 , 0 .Math. 0 B 1 { x 1 , 0 = 1 } = 0 0 = 0 , t 1 , 0 , 2 = .Math. eq 1 , 0 .Math. 0 B 1 { x 1 , 0 = 2 } = 0 1 = 1 , .Math. , and t 1 , 0 , 7 = .Math. eq 1 , 0 .Math. 0 B 1 { x 0 , 0 = 7 } = 0 0 = 0

    [0087] By invoking the OT protocol, P1 can select and obtain one bit

    [00123] t i , j , y i , j = .Math. eq i , j .Math. 0 B 1 { x i , j = y i , j }

    from the group of M.sub.i bits. The selected bit t.sub.i,j,y.sub.i,j can be denoted as a Boolean share

    [00124] .Math. eq i , j .Math. 1 B

    that belongs to P1, since

    [00125] .Math. eq i , j .Math. 0 B .Math. eq i , j .Math. 1 B = 1

    when x.sub.i,j=y.sub.i,j, and

    [00126] .Math. eq i , j .Math. 0 B .Math. eq i , j .Math. 1 B = 0

    when x.sub.i,jy.sub.i,j. As such, the MPC can determine whether x.sub.i,j=y.sub.i,j by computing

    [00127] .Math. eq i , j .Math. 0 B .Math. eq i , j .Math. 1 B .

    [0088] At 312, for the second iteration where i=1, P0 outputs q.sub.i bits, each bit

    [00128] .Math. eq i , j .Math. 0 B

    is a first secret share of an indicator that indicates whether the section x.sub.i,j equals the section y.sub.i,j. P1 can output q.sub.i bits, each bit

    [00129] .Math. eq i , j .Math. 1 B

    is a second secret share of the indicator. In this way, the input x.sub.i and y.sub.i are each further compressed to a value in binary form having a shorter length.

    [0089] The process 300 can include multiple rounds of iteration, until the initial input x.sub.0 and y.sub.0 are each compressed to a single bit. In the last iteration, P0 and P1 each output a single bit.

    [0090] At 314, by performing an XOR operation on the single-bit output of the last iteration, the secure MPC can determine whether a=b. In this way, through the iterative approach by invoking OT protocol, the secure MPC system can obtain the result of equality testing.

    [0091] As an example, the section of y.sub.0 that corresponds to x.sub.1,0=010 is y.sub.1,0=001. Based on y.sub.1,0, P1 selects and obtains the bit t.sub.1,0,1 from the 8 bits t.sub.1,0,0 to t.sub.1,0,7. Therefore,

    [00130] .Math. eq 1 , 0 .Math. 1 B = t 1 , 0 , 1 = 0.

    Since

    [00131] .Math. eq 1 , 0 .Math. 0 B .Math. eq 1 , 0 .Math. 1 B = 0 0 = 0 ,

    it indicates that x.sub.1,0y.sub.1,0, which is equivalent to x.sub.0y.sub.0, which is equivalent to ab.

    [0092] It should be noted that the example process 300 is for illustration purposes. The initial input x.sub.0 and y.sub.0 can have any suitable length in bits, the input of each iteration can be partitioned into sections of any suitable length in bits, and the process can include any suitable number of rounds of iteration. For example, the initial input x.sub.0 and y.sub.0 can each include 64 bits, and are each partitioned into 16 sections (each section has a length of 4 bits). By implementing the process 300, the first iteration can compress x.sub.0 and y.sub.0 into x.sub.1 and y.sub.1, x.sub.1 and y.sub.1 each having a length of 5 bits. The second iteration can implement the process 100, and compress x.sub.1 and y.sub.1 into x.sub.2 and y.sub.2, x.sub.2 and y.sub.2 each having a length of 3 bits. The third (last) iteration can implement the process 100, and compress x.sub.2 and y.sub.2 into a single bit. By performing an XOR operation on the two single bits, the secure MPC system can determine whether a=b.

    [0093] Below is an example algorithm for process 300.

    TABLE-US-00004 [00132] P 0 locally computes .Math. d .Math. 0 A = .Math. a .Math. 0 A - .Math. b .Math. 0 A , P 1 locally computes .Math. d .Math. 1 A = .Math. a .Math. 1 A - .Math. b .Math. 1 A . [00133] P 0 sets x 0 = .Math. d .Math. 0 A , P 1 sets y 0 = - .Math. d .Math. 1 A . P.sub.0 and P.sub.1 set i = 0. do P.sub.0 parses its input as x.sub.i = x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 ... x.sub.i,0, and P.sub.1 parses its input as [00134] y i = y i , q i - 1 .Math. y i , q i - 2 .Math. .Math. .Math. y i , 0 , where x i , j , y i , j { 0 , 1 ) m i , q i = .Math. l i m i .Math. , the bit lengths of x.sub.i and y.sub.i are equal, denoted as l.sub.i. Let M.sub.i = 2.sup.m.sup.i for j = {0, 1, ... , q.sub.i 1} do [00135] P 0 samples .Math. eq i , j .Math. 0 A { 0 , 1 , .Math. , q i } for k = {0, 1, ... , M.sub.i 1} do [00136] P 0 sets t i , j , k = ( 1 { x i . j k } - .Math. eq i , j .Math. 0 A ) mod ( q i + 1 ) end for P.sub.0 and P.sub.1 invoke an instance of 1 out of M.sub.i OT, where P.sub.0 is the sender with inputs {t.sub.i,j,k}x and P.sub.1 is the receiver with input y.sub.i,j. P.sub.1 sets its output as [00137] .Math. eq i , j .Math. 1 A . end for [00138] P 0 sets x i + 1 = ( .Math. eq i , 0 .Math. 0 A + .Math. + .Math. eq i , q i - 1 .Math. 0 A ) mod ( q i + 1 ) [00139] P 1 sets y i + 1 = [ - ( .Math. eq i , 0 .Math. 1 A + .Math. + .Math. eq i , q i - 1 .Math. 1 A ) mod ( q i + 1 ) P.sub.0 and P.sub.1 compute i = i + 1. while q.sub.i1 > T, T is threshold value do P.sub.0 parses its input as x.sub.i = x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 ... x.sub.i,0, and P.sub.1 parses its input as [00140] y i = y i , q i - 1 .Math. y i , q i - 2 .Math. .Math. .Math. y i , 0 , where x i , j , y i , j { 0 , 1 ) m i , q i = .Math. l i m i .Math. , the bit lengths of x.sub.i and y.sub.i are equal, denoted as l.sub.i. Let M.sub.i = 2.sup.m.sup.i for j = {0, 1, ... , q.sub.i 1} do [00141] P 0 samples .Math. eq i , j .Math. 0 B { 0 , 1 } for k = {0, 1, ... , M.sub.i 1} do if q.sub.i > 1 [00142] P 0 sets t i , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j k } else [00143] P 0 sets t i , j , k = .Math. eq i , j .Math. 0 B 1 { x i , j = k } end if end for P.sub.0 and P.sub.1 invoke an instance of 1 out of M.sub.i OT, where P.sub.0 is the sender with inputs {t.sub.i,j,k}x and P.sub.1 is the receiver with input y.sub.i,j. P.sub.1 sets its output as [00144] .Math. eq i , j .Math. 1 B . end for [00145] P 0 sets x i + 1 = .Math. eq i , 0 .Math. 0 B .Math. .Math. .Math. .Math. eq i , q i - 1 .Math. 0 B [00146] P 1 sets y i + 1 = .Math. eq i , 0 .Math. 1 B .Math. .Math. .Math. .Math. eq i , q i - 1 .Math. 1 B P.sub.0 and P.sub.1 compute i = i + 1. while q.sub.i1 > 1 [00147] P 0 and P 1 set their output as .Math. eq i - 1 , 0 .Math. 0 B and .Math. eq i - 1 , 0 .Math. 1 B , respectively .

    [0094] In some implementations, the last round iteration of process 300 can be performed based on AND operation, instead of based on oblivious transfer (OT) protocol. In the last iteration where P0's input is

    [00148] x n = .Math. eq n - 1 , q n - 1 - 1 .Math. 0 B .Math. .Math. .Math. .Math. eq n - 1 , 0 .Math. 0 B

    and P0's input is

    [00149] y n = .Math. eq n - 1 , q n - 1 - 1 .Math. 1 B .Math. .Math. .Math. .Math. eq n - 1 , 0 .Math. 1 B ,

    secure MPC can determine whether x.sub.n=y.sub.n by computing

    [00150] 1 { .Math. eq n - 1 , q n - 1 - 1 .Math. 0 B = .Math. eq n - 1 , q n - 1 - 1 .Math. 1 B } AND .Math. AND 1 { .Math. eq n - 1 , q 0 - 1 .Math. 0 B = .Math. eq n - 1 , q 0 - 1 .Math. 1 B } .

    If the result of the AND operations is 1, x.sub.n=y.sub.n. If the result of the AND operations is 0, x.sub.ny.sub.n.

    [0095] As an example shown in FIG. 3, P0's input of the last iteration is x.sub.1=010, P1's input of the last iteration is y.sub.1=001. P1 can locally compute y.sub.1=y.sub.1111=110. In the first round of AND operation, the secure MPC can perform an XOR operation on the first bit of x.sub.1 and the first bit of

    [00151] y 1 ,

    an XOR operation on the second bit of x.sub.1 and the second bit of

    [00152] y 1 ,

    and an AND operation on the results of the two XOR operations, such that (01) AND (11)=0 AND 1=0. The result can be an input of the second round of AND operation. Then the secure MPC can perform an XOR operation on the third bit of x.sub.1 and the third bit of

    [00153] y 1 ,

    and an AND operation on the results of the AND operation of the last round, such that (00) AND 0=0. If the result of the last AND operation is 0, it means x.sub.1y.sub.1, which is equivalent to ab. If the result of the last AND operation is 1, it means x.sub.1=y.sub.1, which is equivalent to a=b.

    [0096] Below is an example algorithm for process 300 where the last iteration performs equality testing based on AND operations.

    TABLE-US-00005 [00154] P 0 locally computes .Math. d .Math. 0 A = .Math. a .Math. 0 A - .Math. b .Math. 0 A , P 1 locally computes .Math. d .Math. 1 A = .Math. a .Math. 1 A - .Math. b .Math. 1 A . [00155] P 0 sets x 0 = .Math. d .Math. 0 A , P 1 sets y 0 = - .Math. d .Math. 1 A . P.sub.0 and P.sub.1 set i = 0. do P.sub.0 parses its input as x.sub.i = x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 ... x.sub.i,0, and P.sub.1 parses its input as [00156] y i = y i , q i - 1 .Math. y i , q i - 2 .Math. .Math. .Math. y i , 0 , where x i , j , y i , j { 0 , 1 ) m i , q i = .Math. l i m i .Math. , the bit lengths of x.sub.i and y.sub.i are equal, denoted as l.sub.i. Let M.sub.i = 2.sup.m.sup.i for j = {0, 1, ... , q.sub.i 1} do [00157] P 0 samples .Math. eq i , j .Math. 0 A { 0 , 1 , .Math. , q i + 1 } for k = {0, 1, ... , M.sub.i 1} do if q.sub.i > 1 [00158] P 0 sets t i , j , k = ( 1 { x i , j k } - .Math. eq i , j .Math. 0 A ) mod ( q i + 1 ) else [00159] P 0 sets t i , j , k = ( 1 { x i , j = k } - .Math. eq i , j .Math. 0 A ) mod ( q i + 1 ) end if end for P.sub.0 and P.sub.1 invoke an instance of 1 out of M.sub.i OT, where P.sub.0 is the sender with inputs {t.sub.i,j,k}.sub.k and P.sub.1 is the receiver with input y.sub.i,j. P.sub.1 sets its output as [00160] .Math. eq i , j .Math. 1 A . end for [00161] P 0 sets x i + 1 = ( .Math. eq i , 0 .Math. 0 A + .Math. + .Math. eq i , q i - 1 .Math. 0 A ) mod ( q i + 1 ) [00162] P 1 sets y i + 1 = [ - ( .Math. eq i , 0 .Math. 1 A + .Math. + .Math. eq i , q i - 1 .Math. 1 A ) mod ( q i + 1 ) P.sub.0 and P.sub.1 compute i = i + 1. while q.sub.i1 > T, T is threshold value [00163] P 0 parses its input as x i = .Math. eq i , 0 .Math. 0 B .Math. .Math. .Math. .Math. eq i , q i - 1 .Math. 0 B , and P 1 parses its input as y i = [00164] .Math. eq i , 0 .Math. 1 B .Math. .Math. .Math. .Math. eq i , q i - 1 .Math. 1 B .Math. q i is the bit length of x i and y i . for k = {1, ... , log(q.sub.i)} do for j = {0, ... , q.sub.i/2.sup.k 1)} do [00165] for b { 0 , 1 } , P b invokes AND with inputs .Math. eq k - 1 , 2 j .Math. b B and .Math. eq k - 1 , 2 j + 1 .Math. b B to [00166] learn output .Math. eq k , j .Math. b B . end for end for [00167] P 0 and P 1 set their output as .Math. eq .Math. log ( q i ) .Math. , 0 .Math. 0 B and .Math. eq .Math. log ( q i ) .Math. , 0 .Math. 1 B , respectively .

    [0097] FIG. 4 illustrates a flow chart of the example method 400 of performing equality testing as shown in FIG. 3. The operations shown in method 400 may not be exhaustive and that other operations can be performed as well before, after, or in between any of the illustrated operations. Further, some of the operations may be performed simultaneously, or in a different order than shown in FIG. 4. In some implementations, some of the operations may be performed by a computer, or multiple computers based on secure MPC.

    [0098] At 402, a first party (e.g., P0 of FIG. 3) of a secure multi-party computation (MPC) generates a first difference (e.g., x.sub.0 of FIG. 3) between a first secret share (e.g., arithmetic share

    [00168] .Math. a .Math. 0 A )

    of a first value (e.g., private input a) and a first secret share (e.g., arithmetic share

    [00169] .Math. b .Math. 0 A )

    of a second value (e.g., private input b). The second party (e.g., P1 of FIG. 3) of the secure MPC generates a second difference (e.g., y.sub.0 of FIG. 3) between a second secret share (e.g., arithmetic share (a).sub.1.sup.A) of the first value and a second secret share (e.g., arithmetic share (b).sub.1.sup.A) of the second value.

    [0099] At 404, during a first iteration of the secure MPC, the first party partitions the first difference into N sections (e.g., x.sub.0=x.sub.0,3x.sub.0,2x.sub.0,1x.sub.0,0) each including M bits, where N and M are positive integers. The second party partitions the second difference into N sections (e.g., y.sub.0=y.sub.0,3y.sub.0,2y.sub.0,1y.sub.0,0) each including M bits.

    [0100] At 406, for each section of the N sections, the first party generates a random integer (e.g.,

    [00170] .Math. eq 0 , j .Math. 0 A

    of FIG. 3), generates a group of 2.sup.M integers (e.g., t.sub.0,j,0 to t.sub.0,j,15 of FIG. 3) based on the random integer, and sends, to the second party and based on oblivious transfer (OT) protocol, a selected integer (e.g., t.sub.0,j,y.sub.0,j, also denoted as

    [00171] .Math. eq 0 , j .Math. 1 A

    in FIG. 3) from the group of 2.sup.M integers.

    [0101] In some implementations, the group of 2.sup.M integers are generated by generating an m.sup.th integer, (m=0, 1, 2, . . . , 2.sup.M1), of the group of 2.sup.M integers as (1{x.sub.i,jm}r) mod (N+1), where x.sub.i,j is a target section of the first difference, and r is the random integer (e.g.,

    [00172] .Math. eq 0 , j .Math. 0 A

    of FIG. 3).

    [0102] Further, the selected integer is the Q.sup.th integer of the group of 2.sup.M integers, where Q equals the value of a target section (e.g., y.sub.0,j of FIG. 3) of the second difference that corresponds to the target section of the first difference. As such, a sum of the random integer and the selected integer is a multiple of (N+1) when the target section of the first difference and the target section of the second difference are equal; and the sum of the random integer and the selected integer is not a multiple of (N+1) when the value of the section of the first difference and the value of the corresponding section of the second difference are not equal.

    [0103] At 408, the first party adds random integers of the N sections as a first input (e.g., x.sub.1 of FIG. 3) of a second iteration of the secure MPC. The second party adds selected bits of the N sections as a second input (e.g., y.sub.1 of FIG. 3) of the second iteration.

    [0104] In some implementations, during the second iteration, the first party partitions the first input into R sections each including M bits, and the second party partitions the second input into R sections each including M bits, where R is a positive integer. For each section of the R sections, the first party generates a second random bit (e.g.,

    [00173] .Math. eq 1 , 0 .Math. 0 B

    of FIG. 3), generates a second group of 2.sup.M bits (e.g., t.sub.1,0,0 to t.sub.1,0,15 of FIG. 3) based on the second random bit, and sends, to the second party based on the OT protocol, a second selected bit (e.g., t.sub.1,0,y.sub.1,0, also denoted as

    [00174] .Math. eq 1 , 0 .Math. 1 B

    of FIG. 3) from the second group of 2.sup.M bits.

    [0105] At 410, the secure MPC determines whether the first value equals the second value based on results of a plurality of iterations of the secure MPC. The plurality of iterations includes at least the first iteration and the second iteration.

    [0106] In some implementations, the last iteration of the plurality of iterations is also performed based on OT protocol. During the last iteration, the first party generates a last random bit (e.g.,

    [00175] .Math. eq 1 , 0 .Math. 0 B

    of FIG. 3), generates a last group of 2.sup.K bits (e.g., e.g., t.sub.1,0,0 to t.sub.1,0,7 of FIG. 3) based on the last random bit, and sends, to the second party based on the OT protocol, a last selected bit (e.g., t.sub.1,0,y.sub.1,0, also denoted as

    [00176] .Math. eq 1 , 0 .Math. 1 B

    of FIG. 3) from the last group of 2.sup.K bits. The secure MPC determines whether the first value and the second value are equal by performing an XOR operation on the last random bit and the last selected bit.

    [0107] In some implementations, the last iteration of the plurality of iterations is performed based on AND operations. The secure MPC determines whether the first value and the second value are equal by performing one or more AND operations on a first input and a second input of the last iteration.

    [0108] In some implementations, the MPC can perform equality testing by invoking equality testing protocols

    [00177] ( e . g . , .Math. e q N , B ( a , b ) and .Math. e q N , A ( a , b ) .

    [0109] The equality testing protocols can include offline computation (also referred to as local computation) by the parties, so that the number of communication rounds between the parties can be further reduced.

    [0110] The algorithm below provides a Vector Oblivious Shift Evaluation (VOSE) protocol

    [00178] .Math. v o s e N , B ( T .fwdarw. )

    using Boolean operation.

    TABLE-US-00006 [00179] Input : P 0 inputs a vector T .fwdarw. 2 . Output: P.sub.0 receives a share vector {right arrow over (T.sub.0)}; P1 receives an offset .sub.1 [N] and a share vector T1, where T0 T1 = shift({right arrow over (T)}, .sub.1) 1. P.sub.0 and P.sub.1 invoke N 1 out of N random oblivious transfer. a. [00180] P 0 receives { m i .Math. "\[LeftBracketingBar]" i [ N ] , m i 2 } b. [00181] P 1 receives 1 [ N ] and { m i .Math. "\[LeftBracketingBar]" i [ N ] except 1 , m i 2 } 2. P.sub.0 and P.sub.1 generate the matrix M {0, 1}.sup.NN by using m.sub.i as the column vectors for i [N]. 3. P.sub.0 and P.sub.1 right cycle shift the i.sup.th row of M by i positions locally for i [N]. 4. [00182] P 0 computes v i = j = 0 N - 1 m i , j and u i = j = 0 N - 1 m j , i for i [ N ] , and denotes {right arrow over (V)} = {V, ... , U.sub.N1} and {right arrow over (U)} = {u.sub.0, ... , U.sub.N1}. 5. P.sub.1 computes w.sub.i = v.sub.i u.sub..sub.1.sub.+i, and denotes {right arrow over (W)} = {w.sub.0, ... , w.sub.N1}. 6. P.sub.0 sends {right arrow over (S)} = {right arrow over (T)} {right arrow over (U)} to P.sub.1 and sets T0 = {right arrow over (V)} . 7. P.sub.1 computes T1 = shift( S', .sub.1) {right arrow over (W)}.

    [0111] With reference to FIG. 5. by invoking the VOSE protocol

    [00183] ( .Math. v o s e N , B ( T .fwdarw. )

    using Boolean operation, at step 1-2 of the algorithm, the first party (P0) can generate a matrix

    [00184] M = { m i | i [ N ] , m i 2 ,

    which has N vectors (m.sub.i), each vector has N elements, and each element is a bit (either o or 1). A second party (P1) can generate an integer .sub.1[N] as an offset. Based on a N1 out of N oblivious transfer, P1 can receive N1 vectors of the N vectors, except the vector mE.sub.1. Therefore, P0 obtains the complete matrix M, while P1 can obtain the matrix M except for the vector m.sub..sub.1.

    [0112] At step 3 of the algorithm, P0 and P1 right circular shift the i.sup.th row of matrix M by i times for i[N], and denote the new matrix as M. As shown in FIG. 5, P0 and P1 each right shifts row 0 by 0 time, right shifts row 1 by 1 time, right shifts row 2 by 2 times, and right shifts row 3 by 3 times.

    [0113] At step 4 of the algorithm, P.sub.0 computes

    [00185] v i = .Math. j = 0 N - 1 m ( i , j ) mod 2 and u i = .Math. j = 0 N - 1 m ( i , j ) mod 2 for i [ N ] ,

    and generates the vector {right arrow over (V)}={.sub.0, . . . , .sub.N-1} and the vector {right arrow over (U)}={u.sub.0, . . . , u.sub.N-1}. As shown in FIG. 5, the i.sup.th element in vector {right arrow over (V)} is the XOR value of the N bits in the i.sup.th row of the matrix M, and the i.sup.th element in vector {right arrow over (U)} is the XOR value of the N bits in the i.sup.th column of the matrix M.

    [0114] At step 5 of the algorithm, P.sub.1 computes w.sub.i=.sub.iu.sub..sub.1.sub.+i, to generate the vector {right arrow over (W)}={w.sub.0, . . . ,w.sub.N-1}. As shown in FIG. 5, w.sub.0=.sub.0u.sub.2, w.sub.1=.sub.1u.sub.3, w.sub.2=.sub.2u.sub.0, and w.sub.3=.sub.3u.sub.1.

    [0115] As such, P1 obtains the vector {right arrow over (W)}={w.sub.0, . . . , w.sub.N-1}, while Po obtains the vector {right arrow over (V)}={.sub.0, . . . , .sub.N-1} and the vector {right arrow over (U)}={u.sub.0, . . . , u.sub.N-1}. The vectors {right arrow over (W)}, {right arrow over (V)} and {right arrow over (U)} satisfy {right arrow over (W)}=shift({right arrow over (U)}, .sub.1){right arrow over (V)}.

    [0116] At step 6 of the algorithm, P.sub.0 sends {right arrow over (S)}={right arrow over (T)}{right arrow over (U)} to P.sub.1 and sets {right arrow over (T.sub.0)}={right arrow over (V)}.

    [0117] At step 7 of the algorithm, P.sub.1 computes {right arrow over (T.sub.1)}=shift(({right arrow over (S)}, .sub.1){right arrow over (W)}.

    [0118] As a result, {right arrow over (T.sub.0)}{right arrow over (T.sub.1)}=shift({right arrow over (T)}, .sub.1). In other words, by invoking the VOSE protocol based on Boolean operation, based on a vector

    [00186] T .fwdarw. 2

    from P0, P0 can receive a share vector {right arrow over (T.sub.0)}, P.sub.1 can receive an offset .sub.1[N] and a share vector {right arrow over (T.sub.1)}, where{right arrow over (T.sub.0)}{right arrow over (T.sub.1)}=shift({right arrow over (T)}, .sub.1).

    [0119] An equality testing protocol

    [00187] .Math. eq N , B ( a , b )

    can be built based on the VOSE protocol based on Boolean operation. The first party can input a first value (a) having n bits in length, and a second value (b) having n bits in length. By invoking the equality testing protocol

    [00188] .Math. eq N , B ( a , b ) ,

    the first party can receive a Boolean share of an indication bit

    [00189] ( .Math. 1 { a = b } .Math. 0 B )

    indicating whether a=b, and the first party can receive a Boolean share the indication bit

    [00190] ( .Math. 1 { a = b } .Math. 1 B ) . .Math. 1 { a = b } .Math. 0 B .Math. 1 { a = b } .Math. 1 B = 1

    indicates that a=b, and

    [00191] .Math. 1 { a = b } .Math. 0 B .Math. 1 { a = b } .Math. 1 B = 0

    indicates that ab.

    [0120] The algorithm below provides the equality testing protocol

    [00192] .Math. eq N , B ( a , b ) ,

    which invokes the VOSE protocol

    [00193] .Math. vose N , B ( T .fwdarw. )

    using Boolean operation.

    TABLE-US-00007 The parameter N is defined as N = 2.sup.n Input: P.sub.0 inputs a {0, 1}.sup.n and P.sub.1 inputs b {0, 1}.sup.n [00194] Output : P 0 , P 1 learn .Math. 1 { a = b } .Math. 0 B and .Math. 1 { a = b } .Math. 1 B , respectively . Offline 1. P.sub.0 and P.sub.1 pick .sub.0 [N] and .sub.1 [N], respectively. 2. [00195] P 0 generates a vector T .fwdarw. , where t 0 = 1 and t 0 i = 0 for i [ N ] except { 0 } 3. [00196] P 0 and P 1 invoke { T 0 .fwdarw. , T 1 .fwdarw. } = .Math. v o s e N , B ( T .fwdarw. ) Online 1. P.sub.0 computes w.sub.0 = a + .sub.0 and send it to P.sub.1, while P.sub.1 computes w.sub.1 = .sub.1 b and send it to P.sub.0 2. P.sub.0 and P.sub.1 compute w = w.sub.0 + w.sub.1 = a b + .sub.0 + .sub.1, locally. 3. [00197] P 0 sets .Math. 1 { a = b } .Math. 0 B = .Math. t w .Math. 0 B and P 1 sets .Math. 1 { a = b } .Math. 1 B = .Math. t w .Math. 1 B .

    [0121] The equality testing protocol

    [00198] .Math. eq N , B ( a , b )

    includes offline computation and online computation. At step 1 of the offline computation, P0 generates a random number .sub.0 from 0 to N as an offset, P1 generates a random number .sub.1 from 0 to N as an offset, where N=2.sup.n.

    [0122] At step 2 of the offline computation, P0 generates a vector {right arrow over (T)} having N bits. Only the .sub.0.sup.th bits of the N bits is 1, while all other bits are 0.

    [0123] At step 3 of the offline computation, P0 and P1 invoke the VOSE protocol

    [00199] .Math. vose N , B ( T .fwdarw. ) .

    P0 inputs the vector {right arrow over (T)}, and P1 inputs the offset .sub.1. As a result, P0 receives a share vector {right arrow over (T.sub.0)}, P.sub.1 can receive a share vector {right arrow over (T.sub.1)}, where {right arrow over (T.sub.0)}{right arrow over (T.sub.1)}=shift({right arrow over (T)}.sub.1).

    [0124] At step 1 of the online computation, P.sub.0 computes w.sub.0=+.sub.0 and sends it to P.sub.1. P.sub.1 computes w.sub.1=.sub.1b and sends it to P.sub.0.

    [0125] At step 2 of the online computation, P.sub.0 and P.sub.1 compute w=w.sub.0+w.sub.1=ab+.sub.0+.sub.1 locally.

    [0126] At step 3 of the online computation, P.sub.0 sets

    [00200] .Math. 1 { a = b } .Math. 0 B = .Math. t w .Math. 0 B ,

    which is the w.sup.th bit in the share vector {right arrow over (T.sub.0)}. P.sub.1

    [00201] .Math. 1 { a = b } .Math. 1 B = .Math. t w .Math. 1 B ,

    which is the w.sup.th bit in the share vector {right arrow over (T.sub.1)}.

    [0127] As such, by invoking the equality testing protocol

    [00202] .Math. eq N , B ( a , b ) ,

    P0 receives a Boolean share of the indication bit

    [00203] ( .Math. 1 { a = b } .Math. 0 B ) ,

    and P1 receives a Boolean share of the indication bit

    [00204] ( .Math. 1 { a = b } .Math. 1 B ) .

    [0128] The algorithm below provides a VOSE protocol

    [00205] .Math. vose N , A ( T .fwdarw. )

    using Arithmetic operation.

    TABLE-US-00008 [00206] Input : P 0 inputs a vector T .fwdarw. . Output: P.sub.0 receives a share vector {right arrow over (T.sub.0)}; P1 receives an offset .sub.1 [N] and {right arrow over (T.sub.0)}, where {right arrow over (T.sub.0)} + {right arrow over (T0)} = shift({right arrow over (T)}, 1) 1. P.sub.0 and P.sub.1 invoke N 1out of N random oblivious transfer. a. [00207] P 0 receives { m i .Math. "\[LeftBracketingBar]" i [ N ] , m i } b. [00208] P 1 receives 1 [ N ] and { m i .Math. "\[LeftBracketingBar]" i [ N ] except 1 , m i } 2. [00209] P 0 and P 1 generate the matrix M { } N N by using m i as the column vectors for i [N]. 3. P.sub.0 and P.sub.1 right cycle shift the ith row of M by i positions locally for i [N]. 4. [00210] P 0 computes v i = .Math. j = 0 N - 1 m ( i , j ) mod p and u i = .Math. j = 0 N - 1 m ( j , i ) mod p for i [N], and denotes V = {v.sub.0, ... , v.sub.N1} and U = {u.sub.0, ... , u.sub.N1}. 5. P.sub.1 computes w.sub.i = v.sub.i u.sub..sub.1.sub.+1 mod p, and denotes W = {w.sub.0, ... , w.sub.N1}. 6. P.sub.0 sends {right arrow over (T)} = {right arrow over (T)} + {right arrow over (T)} to P.sub.1 and sets {right arrow over (T.sub.0)} = {right arrow over (-V)} 7. P.sub.1 computes {right arrow over (T.sub.0)} = shift({right arrow over (T)}), 1) + {right arrow over (W)}.

    [0129] With reference to FIG. 6. by invoking the VOSE protocol

    [00211] ( .Math. vose N , A ( T .fwdarw. )

    using Arithmetic operation, at step 1-2 of the algorithm, the first party (P0) can generate a matrix

    [00212] M = { m i | i [ N ] , m i } ,

    which has N vectors (m.sub.i), each vector has N elements, and each element is an integer between 0 and P1. A second party (P1) can generate an integer .sub.1[N] as an offset. Based on a N1 out of N oblivious transfer, P1 can receive N1 vectors of the N vectors, except the vector m.sub..sub.1. Therefore, P0 obtains the complete matrix M, while P1 can obtain the matrix M except for the vector m.sub..sub.1.

    [0130] At step 3 of the algorithm, P0 and P1 right circular shift the it row of matrix M by i times for i[N], and denote the new matrix as M. As shown in FIG. 6, P0 and P1 each right shifts row 0 by 0 time, right shifts row 1 by 1 time, right shifts row 2 by 2 times, and right shifts row 3 by 3 times.

    [0131] At step 4 of the algorithm, P.sub.0 computes

    [00213] v i = .Math. j = 0 N - 1 m ( i , j ) mod p mod u i = .Math. j = 0 N - 1 m ( i , j ) mod p for i [ N ] ,

    and generates the vector {right arrow over (V)}={.sub.0, . . . , .sub.N-1} and the vector {right arrow over (U)}={u.sub.0, . . . , u.sub.N-1}. As shown in FIG. 5, the i.sup.th element in vector {right arrow over (V)} is the sum of the N integers in the i.sup.th row of the matrix M then mod by p, and the i.sup.th element in vector {right arrow over (U)} is the sum of the N integers in the i.sup.th column of the matrix M then mod by p.

    [0132] At step 5 of the algorithm, P.sub.1 computes w.sub.i=.sub.1u.sub..sub.1.sub.+i mod p, to generate the vector {right arrow over (W)}={w.sub.0, . . . , w.sub.N-1}. As shown in FIG. 5, w.sub.0=(.sub.0u.sub.2) mod 5, w.sub.1=(.sub.1u.sub.3) mod 5, w.sub.2=(.sub.2u.sub.0) mod 5, and w.sub.3=(.sub.3u.sub.1) mod 5.

    [0133] As such, P1 obtains the vector {right arrow over (W)}={w.sub.0, . . . , w.sub.N-1}, while P0 obtains the vector {right arrow over (V)}={.sub.0, . . . , .sub.N-1} and the vector {right arrow over (U)}={u.sub.0, . . . , u.sub.N-1}. The vectors {right arrow over (W)}, {right arrow over (V)} and {right arrow over (U)} satisfy {right arrow over (W)}=shift({right arrow over (U)}, .sub.1){right arrow over (V)}.

    [0134] At step 6 of the algorithm, P.sub.0 sends {right arrow over (S)}={right arrow over (T)}+{right arrow over (U)} to P.sub.1 and sets {right arrow over (T.sub.0)}={right arrow over (V)}.

    [0135] At step 7 of the algorithm, P.sub.1 computes {right arrow over (T.sub.1)}=shift(({right arrow over (S)}, .sub.1)+{right arrow over (W)}.

    [0136] As a result, {right arrow over (T.sub.0)}+{right arrow over (T.sub.1)}=shift({right arrow over (T)}, .sub.1). In other words by invoking the VOSE protocol based on Arithmetic operation, based on a vector

    [00214] T .fwdarw. P

    from P0, P0 can receive a share vector {right arrow over (T.sub.0)}, P.sub.1 can receive an offset .sub.1[N] and a share vector {right arrow over (T.sub.1)}, where {right arrow over (T.sub.0)}+{right arrow over (T.sub.1)}=shift({right arrow over (T)}, .sub.1).

    [0137] An equality testing protocol

    [00215] .Math. eq N , A ( a , b )

    can be built based on the VOSE protocol based on Arithmetic operations. The first party can input a first value (a) having n bits in length, and a second value (b) having n bits in length. By invoking the equality testing protocol

    [00216] .Math. e q N , A ( a , b ) ,

    the first party can receive an arithmetic share of an indication bit

    [00217] ( .Math. 1 { a = b } .Math. 0 A )

    indicating whether a=b, and the second party can receive an arithmetic share of the indication bit

    [00218] ( .Math. 1 { a = b } .Math. 1 A ) . .Math. 1 { a = b } .Math. 0 A + .Math. 1 { a = b } .Math. 1 A = 1

    indicates that a=b, and

    [00219] .Math. 1 { a = b } .Math. 0 B .Math. 1 { a = b } .Math. 1 B 0

    indicates that ab.

    [0138] The algorithm below provides the equality testing protocol

    [00220] .Math. e q N , A ( a , b ) ,

    which invokes the VOSE protocol

    [00221] .Math. vose N , A ( T .fwdarw. )

    using Arithmetic operations.

    TABLE-US-00009 The parameter N is defined as N = 2.sup.n Input: P.sub.0 inputs a {0, 1}.sup.n and P.sub.1 inputs b {0, 1}.sup.n [00222] Output : P 0 , P 1 learn .Math. 1 { a = b } .Math. 0 A and .Math. 1 { a = b } .Math. 1 A , respectively . Offline 1. P.sub.0 and P.sub.1 pick .sub.0 [N] and .sub.1 [N], respectively. 2. [00223] P 0 generates a vector T .fwdarw. , where t 0 = 1 and t 0 i = 0 for i [ N ] \ { 0 } 3. [00224] P 0 and P 1 invoke { T 0 .fwdarw. , T 1 .fwdarw. } = .Math. v o s e N , A ( T .fwdarw. ) Online 1. P.sub.0 computes w.sub.0 = a + .sub.0 and send it to P.sub.1, while P.sub.1 computes w.sub.1 = .sub.1 b and send it to P.sub.0 2. P.sub.0 and P.sub.1 compute w = w.sub.0 + w.sub.1, locally. 3. [00225] P 0 sets .Math. 1 { a = b } .Math. 0 A = .Math. t w .Math. 0 A and P 1 sets .Math. 1 { a = b } .Math. 1 A = .Math. t w .Math. 1 A .

    [0139] The equality testing protocol

    [00226] .Math. e q N , A ( a , b )

    includes offline computation and online computation. At step 1 of the offline computation, P0 generates a random number .sub.0 from 0 to N as an offset, P1 generates a random number .sub.1 from 0 to N as an offset, where N=2.sup.n.

    [0140] At step 2 of the offline computation, P0 generates a vector {right arrow over (T)} having N bits. Only the .sub.0.sup.th bits of the N bits is 1, while all other bits are 0.

    [0141] At step 3 of the offline computation, P0 and P1 invoke the VOSE protocol

    [00227] .Math. vose N , A ( T .fwdarw. ) .

    P0 inputs the vector {right arrow over (T)}, and P1 inputs the offset .sub.1. As a result, P0 receives a share vector {right arrow over (T.sub.0)}, P.sub.1 can receive a share vector {right arrow over (T.sub.1)}, where {right arrow over (T.sub.0)}+{right arrow over (T.sub.1)}=shift({right arrow over (T)}, .sub.1)

    [0142] At step 1 of the online computation, P.sub.0 computes w.sub.0=a+.sub.0 and send it to P.sub.1, and P.sub.1 computes w.sub.1=.sub.1b and send it to P.sub.0.

    [0143] At step 2 of the online computation, P.sub.0 and P.sub.1 compute w=w.sub.0+w.sub.1=ab+.sub.0+.sub.1 locally.

    [0144] At step 3 of the online computation, P.sub.0 sets

    [00228] .Math. 1 { a = b } .Math. 0 A = .Math. t w .Math. 0 A ,

    which is the w.sup.th integer in the share vector {right arrow over (T.sub.0)}. P.sub.1 sets

    [00229] .Math. 1 { a = b } .Math. 1 A = .Math. t W .Math. 1 A ,

    which is the w.sup.th integer in the share vector {right arrow over (T.sub.1)}.

    [0145] As such, by invoking the equality testing protocol

    [00230] .Math. eq N , A ( a , b ) ,

    P0 receives an arithmetic share of the indication bit

    [00231] ( .Math. 1 { a = b } .Math. 0 A ) ,

    and P1 receives an arithmetic share of the indication bit

    [00232] ( .Math. 1 { a = b } .Math. 1 A ) .

    [0146] FIG. 7 illustrates an example process 700 of equality testing in a secure two-party computation (MPC) system. A first party participating in the secure MPC is denoted as Party 0 (P0), and a second party participating in the secure MPC is denoted as Party 1 (P1). The equality testing aims to determine whether two private inputs are equal (e.g., whether a=b), without disclosing the private inputs to any party.

    [0147] As starter, the first party P0 has an arithmetic share of the private input a denoted as

    [00233] .Math. a .Math. 0 A

    and an arithmetic share of the private input b denoted as

    [00234] .Math. b .Math. 0 A .

    The second party P1 has an arithmetic share of the private input a denoted as

    [00235] .Math. a .Math. 1 A ,

    and an arithmetic share of the private input b denoted as

    [00236] .Math. b .Math. 1 A .

    The sum of arithmetic shares is the private input, such that

    [00237] .Math. a .Math. 0 A + .Math. a .Math. 1 A = a , and .Math. b .Math. 0 A + .Math. b .Math. 1 A = b .

    For example, the secure MPC can generate a random integer as

    [00238] .Math. a .Math. 0 A

    and send it to P0, and generate

    [00239] a - .Math. a .Math. 0 A

    as

    [00240] .Math. a .Math. 1 A

    and send it to P1. As such, the secure MPC system can determine whether a=b by determining whether

    [00241] .Math. a .Math. 0 A - .Math. b .Math. 0 A = .Math. b .Math. 1 A - .Math. a .Math. 1 A .

    [0148] The process 700 can determine whether

    [00242] .Math. a .Math. 0 A - .Math. b .Math. 0 A = .Math. b .Math. 1 A - .Math. a .Math. 1 A

    in an iterative approach by invoking equality testing protocol

    [00243] .Math. eq N , A ( a , b ) and / or .Math. eq N , B ( a , b ) .

    P0 generates

    [00244] .Math. a .Math. 0 A - .Math. b .Math. 0 A

    as its initial input x.sub.0, and P1 generates

    [00245] .Math. b .Math. 1 A - .Math. a .Math. 1 A

    as its initial input y.sub.0, where x.sub.0 and y.sub.0 are values in binary form.

    [0149] At 702, in a first iteration of the process 700, P0 and P1 set i=0. P0 partitions its input x.sub.i (which is x.sub.0 for the first iteration) into a number of sections x.sub.i,j, such that x.sub.i=x.sub.i,q.sub.i.sub.-1x.sub.i,q.sub.i.sub.-2 . . . x.sub.i,1x.sub.i,0. The length of the input x.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00246] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 7, P0 inputs x.sub.i=x.sub.0=1101110100110110, which is 16 bits in length. P0 can partition x.sub.0 into four sections, each section being 4 bits in length: x.sub.0,3=1101, x.sub.0,2=1101, x.sub.0,1=0011, and x.sub.0,0=0110.

    [0150] Similarly, P1 partitions its input y.sub.i (which is y.sub.0 for the first iteration) into a number of sections y.sub.i,j, such that y.sub.i=y.sub.i,q.sub.i.sub.-1y.sub.i,q.sub.i.sub.-2 . . . y.sub.i,0. The length of the input y.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00247] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 7, P1 inputs y.sub.i=y.sub.0=1101110000110110, which is 16 bits in length. P1 can partition y.sub.0 into four sections, each section being 4 bits in length: y.sub.0,3=1101, y.sub.0,2=1300, y.sub.0,1=0011, and y.sub.0,0=0110. That is, l.sub.i=16, m.sub.i=4, and q.sub.i=4.

    [0151] At 704, for each section x.sub.i,j and the corresponding section y.sub.i,j (j {0,1, . . . , q.sub.i1}), P0 and P1 can invoke the equality testing protocol

    [00248] .Math. e q N , A ( a , b ) .

    P0 can receive an arithmetic share

    [00249] .Math. eq i , j .Math. 0 A

    of an indicator 1{x.sub.i,j=y.sub.i,j}, and P1 can receive an arithmetic share

    [00250] .Math. eq i , j .Math. 1 A

    of the indicator 1{x.sub.i,j=y.sub.i,j}.

    [0152] As an example, for the section x.sub.0,0=0110 and y.sub.0,0=0110, by invoking the equality testing protocol

    [00251] .Math. e q N , A ( a , b )

    P0 receive

    [00252] .Math. eq 0 , 0 .Math. 0 A ( e . g . , 2 ) ,

    and P1 receives

    [00253] .Math. eq 0 , 0 .Math. 1 A ( e . g . , 4 ) .

    [0153] Further, P1 can set

    [00254] .Math. eq i , j .Math. 0 A as ( 1 - .Math. eq i , j .Math. 0 A ) mod ( q + 1 ) ,

    and P1 can set

    [00255] .Math. eq i , j .Math. 1 A

    as

    [00256] ( - .Math. eq i , j .Math. 1 A ) mod ( q + 1 ) .

    As such,

    [00257] ( .Math. eq i , j .Math. 0 A + .Math. eq i , j .Math. 1 A ) mod ( q + 1 ) = 0

    indicates that x.sub.i,j=y.sub.i,j.

    [0154] At 706, P0 can output

    [00258] ( .Math. eq i , 0 .Math. 0 A + .Math. + .Math. eq i , q i - 1 .Math. 0 A ) mod ( q i + 1 ) .

    P1 can output

    [00259] ( .Math. eq i , 0 .Math. 1 A + .Math. + .Math. eq i , q i - 1 .Math. 1 A ) mod ( q i + 1 ) .

    When x.sub.i=y.sub.i, the sum of the two outputs is 0 when mod by (q.sub.i+1). When x.sub.0y.sub.0, the sum of the two outputs is not 0 when mod by (q.sub.i+1). As one example, as shown in FIG. 7, in the first iteration of the process 700, P0's input x.sub.0, which is 16 bits in length, is compressed into the output of one integer

    [00260] ( .Math. eq i , 0 .Math. 0 A + .Math. + .Math. eq i , q i - 1 .Math. 0 A ) mod ( q i + 1 ) ,

    which can be represented by 3 bits (e.g., 2=010). P1's input y.sub.0, which is 16 bits in length, is compressed into the output of one integer

    [00261] ( .Math. eq i , 0 .Math. 1 A + .Math. + .Math. eq i , q i - 1 .Math. 1 A ) mod ( q i + 1 ) ,

    which can also be represented by 3 bits (e.g., 4=100).

    [0155] At 708, the process 700 proceeds to a second iteration, where P0 and P1 set i=1. The output of the first iteration can be the input of the second iteration. The input of P0 is

    [00262] x i = ( .Math. eq i - 1 , 0 .Math. 0 A + .Math. + .Math. eq i - 1 , q i - 1 .Math. 0 A ) mod ( q i + 1 ) .

    The input of P1 is

    [00263] y i = [ - ( .Math. eq i , 0 .Math. 1 A + .Math. + .Math. eq i , q i - 1 .Math. 1 A ) ] mod ( q i + 1 ) .

    The secure MPC system can determine whether x.sub.0=y.sub.0 by determining whether x.sub.1=y.sub.1.

    [0156] In some implementations, the following iterations (including the second iteration) can be performed by invoking the equality testing protocol

    [00264] .Math. eq N , A ( a , b ) .

    In some implementations, some of the following iterations (e.g., the last iteration) can be performed by invoking another equality testing protocol

    [00265] .Math. eq N , B ( a , b ) .

    [0157] At 708, P0 can partition its input x.sub.i into a number of sections x.sub.i,j, such that x.sub.i=x.sub.i,q.sub.i.sub.-1x.sub.i,q.sub.i.sub.-2 . . . x.sub.i,1x.sub.i,0. The length of the input x.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00266] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 7, P0 inputs x.sub.i=x.sub.1=010, which is 3 bits in length. x.sub.1 can be viewed as a single section x.sub.1=x.sub.1,0. That is, l.sub.i=3, m.sub.i=3, and q.sub.i=1.

    [0158] Similarly, P1 partitions its input y.sub.i into a number of sections y.sub.i,j, such that y.sub.i=y.sub.i,q.sub.i.sub.-1y.sub.i,q.sub.i.sub.-2 . . . y.sub.i,0. The length of the input y.sub.i is l.sub.i bits. The length of each section is m.sub.i bits, so that the input is partitioned into

    [00267] q i = .Math. l i m i .Math.

    sections. As an example, as shown in FIG. 7, P1 inputs y.sub.i=y.sub.1=001, which is 3 bits in length. y.sub.1 can be viewed as a single section y.sub.1=y.sub.1,0.

    [0159] At 710, for each section x.sub.i,j and the corresponding section y.sub.i,j (j={0,1, . . . , q.sub.i1}), P0 and P1 can invoke the equality testing protocol

    [00268] .Math. eq N , B ( a , b ) .

    [0160] At 712, P0 can receive a Boolean share

    [00269] .Math. eq i , j .Math. 0 B

    an indicator 1{x.sub.i,j=y.sub.i,j}, and P1 can receive a Boolean share

    [00270] .Math. eq i , j .Math. 1 AB

    of the indicator 1{x.sub.i,j=y.sub.i,j}.

    [0161] As an example, for the section x.sub.1,0=0110 and y.sub.1,0=0110, by invoking the equality testing protocol

    [00271] .Math. eq N , B ( a , b ) ,

    P0 receives

    [00272] .Math. eq 1 , 0 .Math. 0 B ( e . g . , 1 ) ,

    and P1 receives

    [00273] .Math. eq 1 , 0 .Math. 1 B ( e . g . , 1 ) .

    [0162] The process 700 can include multiple rounds of iteration, until the initial input x.sub.0 and y.sub.0 are each compressed to a single bit. In the last iteration, P0 and P1 each output a single bit.

    [0163] At 714, by performing an XOR operation on the single-bit output of the last iteration, the secure MPC can determine whether a=b. In this way, through the iterative approach by invoking equality testing protocol, the secure MPC system can obtain the result of equality testing.

    [0164] Below is an example algorithm for process 700.

    TABLE-US-00010 [00274] P 0 locally computes .Math. d .Math. 0 A = .Math. a .Math. 0 A - .Math. b .Math. 0 A , P 1 locally computes .Math. d .Math. 1 A = .Math. a .Math. 1 A - .Math. b .Math. 1 A . [00275] P 0 sets x 0 = .Math. d .Math. 0 A , P 1 sets y 0 = - .Math. d .Math. 1 A . P.sub.0 and P.sub.1 set i = 0. do P.sub.0 parses its input as x.sub.i = x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 ... x.sub.i,0, and P.sub.1 parses its input as [00276] y i = y i , q i - 1 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" y i , q i - 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" y i , 0 , where x i , j , y i , j { 0 , 1 } m i , q i = .Math. l i m i .Math. , the bit lengths of x.sub.i and y.sub.i are equal, denoted as l.sub.i. Let M.sub.i = 2.sup.m.sup.i for j = {0, 1, ... , q.sub.i 1} do [00277] ( .Math. eq i , j .Math. 0 A , ( .Math. eq i , j .Math. 1 A ) .Math. eq 1 M i , A ( x i , j , y i , j ) [00278] ( .Math. eq i , j .Math. 0 A , .Math. eq i , j .Math. 1 A ) ( 1 - .Math. eq i , j .Math. 0 A , - .Math. eq i , j .Math. 1 A ) end for [00279] P 0 sets x i + 1 = ( .Math. eq i , 0 .Math. 0 A + .Math. + .Math. eq i , q i - 1 .Math. 0 A ) mod ( q i + 1 ) [00280] P 1 sets y i + 1 = [ - ( .Math. eq i , 0 .Math. 1 A + .Math. + ( e q i , q i - 1 .Math. 1 A ) ] mod ( q i + 1 ) P.sub.0 and P.sub.1 compute i = i + 1. while q.sub.i1 > T, T is threshold value do P.sub.0 parses its input as x.sub.i = x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 ... x.sub.i,0, and P.sub.1 parses its input as [00281] y i = y i , q i - 1 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" y i , q i - 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" y i , 0 , where x i , j , y i , j { 0 , 1 } m i , q i = .Math. l i m i .Math. , the bit lengths of x.sub.i and y.sub.i are equal, denoted as l.sub.i. Let M.sub.i = 2.sup.m.sup.i for j = {0, 1, ... , q.sub.i 1} do if q.sub.i > 1 [00282] ( .Math. eq i , j .Math. 0 B , ( .Math. eq i , j .Math. 1 B ) .Math. eq M i , B ( x i , j , y i , j ) [00283] ( .Math. e q i , j .Math. 0 B , .Math. e q i , j .Math. 1 B ) ( .Math. e q i , j .Math. 0 B , .Math. e q i , j .Math. 1 B 1 ) else [00284] ( .Math. eq i , j .Math. 0 B , ( .Math. eq i , j .Math. 1 B ) .Math. eq M i , B ( x i , j , y i , j ) end if end for [00285] P 0 sets x i + 1 = ( eq i , 0 .Math. 0 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( eq i , q i - 1 .Math. 0 B [00286] P 1 sets y i + 1 = ( eq i , 0 .Math. 1 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( eq i , q i - 1 .Math. 1 B P.sub.0 and P.sub.1 compute i = i + 1. while q.sub.i1 > 1 [00287] P 0 and P 1 set their output as .Math. eq i - 1 , 0 .Math. 0 B and .Math. eq i - 1 , 0 .Math. 1 B , respectively .

    [0165] In some implementations, the last round iteration of process 700 can be performed based on AND operation, instead of based on equality testing protocol. In the last iteration P0's input is

    [00288] x n = .Math. eq n - 1 , q n - 1 - 1 .Math. 0 B .Math. .Math. .Math. .Math. eq n - 1 , 0 .Math. 0 B

    and P0's input is

    [00289] y n = .Math. eq n - 1 , q n - 1 - 1 .Math. 1 B .Math. .Math. .Math. .Math. eq n - 1 , 0 .Math. 1 B ,

    the secure MPC can determine whether x.sub.n=y.sub.n by computing

    [00290] 1 { .Math. eq n - 1 , q n - 1 - 1 .Math. 0 B = .Math. eq n - 1 , q n - 1 - 1 .Math. 0 B } AND .Math. AND 1 { .Math. eq n - 1 , q 0 - 1 .Math. 0 B = .Math. eq n - 1 , q 0 - 1 .Math. 0 B } .

    If the result of the AND operations is 1, x.sub.n=y.sub.n. If the result of the AND operations is 0, x.sub.ny.sub.n.

    [0166] Below is an example algorithm for process 700 where the last iteration performs equality testing based on AND operations.

    TABLE-US-00011 [00291] P 0 locally computes .Math. d .Math. 0 A = .Math. a .Math. 0 A - .Math. b .Math. 0 A , P 1 locally computes .Math. d .Math. 1 A = .Math. a .Math. 1 A - .Math. b .Math. 1 A . [00292] P 0 sets x 0 = .Math. d .Math. 0 A , P 1 sets y 0 = - .Math. d .Math. 1 A . P.sub.0 and P.sub.1 set i = 0. do P.sub.0 parses its input as x.sub.i = x.sub.i,q.sub.i.sub.1x.sub.i,q.sub.i.sub.2 ... x.sub.i,0, and P.sub.1 parses its input as [00293] y i = y i , q i - 1 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" y i , q i - 2 .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" y i , 0 , where x i , j , y i , j { 0 , 1 } m i , q i = .Math. l i m i .Math. , the bit lengths of x.sub.i and y.sub.i are equal, denoted as l.sub.i. Let M.sub.i = 2.sup.m.sup.i for j = {0, 1, ... , q.sub.i 1} do if q.sub.i > T [00294] ( .Math. eq i , j .Math. 0 A , ( .Math. eq i , j .Math. 1 A ) .Math. eq M i , A ( x i , j , y i , j ) [00295] ( .Math. eq i , j .Math. 0 A , .Math. eq i , j .Math. 1 A ) ( 1 - .Math. eq i , j .Math. 0 A , 1 - .Math. eq i , j .Math. 1 A ) else [00296] ( .Math. eq i , j .Math. 0 A , ( .Math. eq i , j .Math. 1 A ) .Math. eq M i , A ( x i , j , y i , j ) end if end for [00297] P 0 sets x i + 1 = ( .Math. eq i , 0 .Math. 0 A + .Math. + .Math. eq i , q i - 1 .Math. 0 A ) mod ( q i + 1 ) [00298] P 1 sets y i + 1 = [ - ( .Math. eq i , 0 .Math. 1 A + .Math. + ( e q i , q i - 1 .Math. 1 A ) ] mod ( q i + 1 ) P.sub.0 and P.sub.1 compute i = i + 1. while q.sub.i1 > T, T is threshold value [00299] P 0 parses its input as x i = .Math. eq i , 0 .Math. 0 B .Math. .Math. .Math. .Math. eq i , q i - 1 .Math. 0 B , and P 1 parses its input as y i = [00300] .Math. eq i , 0 .Math. 1 B .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" .Math. .Math. "\[LeftBracketingBar]" .Math. "\[RightBracketingBar]" ( eq i , q i - 1 .Math. 1 B . q i is the bit length of x i and y i . for k = {1, ... , log(q.sub.i)} do for j = {0, ... , q.sub.i/2.sup.k 1)} do [00301] for b { 0 , 1 } , P b invokes AND with inputs .Math. eq k - 1 , 2 j .Math. b B and [00302] .Math. eq k - 1 , 2 j + 1 .Math. b B to learn output .Math. eq k , j .Math. b B . end for end for [00303] P 0 and P 1 set their output as .Math. eq .Math. log ( q i ) .Math. , 0 .Math. 0 B and .Math. eq .Math. log ( q i ) .Math. , 0 .Math. 1 B , respectively .

    [0167] FIG. 8 illustrates a flow chart of the example method 800 of performing equality testing as shown in FIG. 7. The operations shown in method 800 may not be exhaustive and that other operations can be performed as well before, after, or in between any of the illustrated operations. Further, some of the operations may be performed simultaneously, or in a different order than shown in FIG. 8. In some implementations, some of the operations may be performed by a computer, or multiple computers based on secure MPC.

    [0168] At 802, a first party (e.g., P0 of FIG. 7) of a secure multi-party computation (MPC) generates a first difference (e.g., x.sub.0 of FIG. 7) between a first secret share (e.g., arithmetic share

    [00304] .Math. a .Math. 0 A )

    of a first value (e.g., private a) and a first secret share (e.g., arithmetic share

    [00305] .Math. b .Math. 0 A )

    of a second value (e.g., private input b). The second party (e.g., P1 of FIG. 7) of the secure MPC generates a second difference (e.g., y.sub.0 of FIG. 7) between a second secret share (e.g., arithmetic share

    [00306] .Math. b .Math. 1 A )

    of the second value and a second secret share (e.g., arithmetic share

    [00307] .Math. a .Math. 1 A )

    of the first value.

    [0169] At 804, during a first iteration of the secure MPC, the first party partitions the first difference into N sections (e.g., x.sub.0=x.sub.0,3x.sub.0,2x.sub.0,1x.sub.0,0) each including M bits, where N and M are positive integers. The second party partitions the second difference into N sections (e.g., y.sub.0=y.sub.0,3y.sub.0,2y.sub.0,1y.sub.0,0) each including M bits.

    [0170] At 806, for a j.sup.th section (x.sub.j) of the first difference, the first party generates, based on Vector Oblivious Shift Evaluation (VOSE) protocol

    [00308] ( e . g . , .Math. vose N , A ( T .fwdarw. )

    using Arithmetic operation), a first vector (e.g., {right arrow over (T.sub.0)}) including 2.sup.M bits, and generates, based on the first vector, a first secret share (e.g.,

    [00309] .Math. eq 0 , j .Math. 0 A

    of FIG. 7) of a first indicator that indicates whether x.sub.j=y.sub.j, where y.sub.j is a j.sup.th section of N sections of the second difference. The second party generates, based on the VOSE protocol, a second vector (e.g., {right arrow over (T.sub.1)}) including 2.sup.M bits, and generates, based on the second vector, a second secret share (e.g.,

    [00310] .Math. eq 0 , j .Math. 1 A

    of FIG. 7) of the first indicator. The first and second secret shares of the first indicator are arithmetic shares.

    [0171] In some implementations, the first vector and the second vector and generated through local computation of the first party and the second party.

    [0172] At 808, the first party adds first secret shares of the first indicators of the N sections as a first input (e.g., x.sub.1 of FIG. 7) of a second iteration of the secure MPC. The second party adds second secret shares of the first indicators of the N sections as a second input (e.g., y.sub.1 of FIG. 7) of the second iteration.

    [0173] In some implementations, during the second iteration, the first party partitions the first input into R sections each including K bits, where R and K are positive integers. For a j.sup.th section (t.sub.j) of the first input, where j=0, 1, . . . , R1, the first party generates, based on VOSE protocol, a third vector including 2.sup.K bits, and generating, based on the third vector, a first secret share (e.g.,

    [00311] .Math. eq 1 , 0 .Math. 1 B

    of FIG. 7) of a second indicator that indicates whether t.sub.j=g.sub.j, where g.sub.j is a j.sup.th section of R sections of the second input. The second party generates, based on VOSE protocol, a fourth vector including 2.sup.K bits, and generating, based on the fourth vector, a second secret share (e.g.,

    [00312] .Math. eq 1 , 0 .Math. 1 B

    of FIG. 7) of the second indicator that indicates whether t.sub.j=g.sub.j.

    [0174] In some implementations, the VOSE protocol invoked during the second iteration is based on Boolean operation

    [00313] ( e . g . , .Math. vose N , B ( T .fwdarw. ) ) ,

    and the secret shares of the second indicator are Boolean shares. In some implementations, the VOSE protocol invoked during the second iteration is based on Arithmetic operation

    [00314] ( e . g . , .Math. vose N , A ( T .fwdarw. ) ) ,

    and secret shares of the second indicator are arithmetic shares.

    [0175] At 810, the secure MPC determines whether the first value equals the second value based on results of a plurality of iterations of the secure MPC. The plurality of iterations includes at least the first iteration and the second iteration.

    [0176] In some implementations, the last iteration of the plurality of iterations is performed based on AND operations. The secure MPC determines whether the first value and the second value are equal by performing one or more AND operations on a first input and a second input of the last iteration.

    [0177] In some implementations, the secure MPC is secure two-party computation.

    [0178] FIG. 9 illustrates a schematic diagram of an example computing system 900. The system 900 can be used for the operations described in association with the implementations described herein. For example, the system 900 may be included in computing devices of the one or more online components and/or the one or more offline components. The system 900 includes a processor 910, a memory 920, a storage device 930, and an input/output device 940, which are interconnected using a system bus 950. The processor 910 is capable of processing instructions for execution within the system 900. In some implementations, the processor 910 is a single-threaded processor. The processor 910 is a multi-threaded processor. The processor 910 is capable of processing instructions stored in the memory 920 or on the storage device 930 to display graphical information for a user interface on the input/output device 940.

    [0179] The memory 920 stores information within the system 900. In some implementations, the memory 920 is a computer-readable medium. The memory 920 can be a volatile memory unit or a non-volatile memory unit. The storage device 930 is capable of providing mass storage for the system 900. The storage device 930 is a computer-readable medium. The storage device 930 may be a floppy disk device, a hard disk device, an optical disk device, or a tape device. The input/output device 940 provides input/output operations for the system 900. The input/output device 940 includes a keyboard and/or pointing device. The input/output device 940 includes a display unit for displaying graphical user interfaces.

    [0180] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non-transitory storage medium for execution by, or to control the operation of, data processing apparatus. The computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. Alternatively or in addition, the program instructions can be encoded on an artificially-generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by a data processing apparatus.

    [0181] The term data processing apparatus refers to data processing hardware and encompasses all kinds of apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can also be, or further include, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). The apparatus can optionally include, in addition to hardware, code that creates an execution environment for computer programs, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

    [0182] A computer program, which may also be referred to or described as a program, software, a software application, an app, a module, a software module, a script, or code, can be written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages; and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A program may, but need not, correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data, e.g., one or more scripts stored in a markup language document, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, sub-programs, or portions of code. A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a data communication network.

    [0183] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA or an ASIC, or by a combination of special purpose logic circuitry and one or more programmed computers.

    [0184] Computers suitable for the execution of a computer program can be based on general or special purpose microprocessors or both, or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory or a random-access memory or both. The essential elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory can be supplemented by, or incorporated in, special purpose logic circuitry. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer need not have such devices. Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device, e.g., a universal serial bus (USB) flash drive, to name just a few.

    [0185] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks.

    [0186] To provide for interaction with a user, embodiments of the subject matter described in this specification can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input. In addition, a computer can interact with a user by sending documents to and receiving documents from a device that is used by the user; for example, by sending web pages to a web browser on a user's device in response to requests received from the web browser.

    [0187] Embodiments of the subject matter described in this specification can be implemented in a computing system that includes a back-end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front-end component, e.g., a client computer having a graphical user interface, a web browser, or an app through which a user can interact with an implementation of the subject matter described in this specification, or any combination of one or more such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN) and a wide area network (WAN), e.g., the Internet.

    [0188] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship with each other. In some embodiments, a server transmits data, e.g., an HTML page, to a user device, e.g., for purposes of displaying data to and receiving user input from a user interacting with the device, which acts as a client. Data generated at the user device, e.g., a result of the user interaction, can be received at the server from the device.

    [0189] While this specification contains many specific implementation details, these should not be construed as limitations on the scope of what may be claimed, but rather as descriptions of features that may be specific to particular implementations. Certain features that are described in this specification in the context of separate implementations can also be implemented, in combination, in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations, separately, or in any sub-combination. Moreover, although previously described features may be described as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can, in some cases, be excised from the combination, and the claimed combination may be directed to a sub-combination or variation of a sub-combination.

    [0190] As used in this disclosure, the terms a, an, or the are used to include one or more than one unless the context clearly dictates otherwise. The term or is used to refer to a nonexclusive or unless otherwise indicated. The statement at least one of A and B has the same meaning as A, B, or A and B. In addition, the phraseology or terminology employed in this disclosure, and not otherwise defined, is for the purpose of description only and not of limitation. Any use of section headings is intended to aid reading of the document and is not to be interpreted as limiting; information that is relevant to a section heading may occur within or outside of that particular section.

    [0191] As used in this disclosure, the term about or approximately can allow for a degree of variability in a value or range, for example, within 10%, within 5%, or within 1% of a stated value or of a stated limit of a range.

    [0192] As used in this disclosure, the term substantially refers to a majority of, or mostly, as in at least about 50%, 60%, 70%, 80%, 90%, 95%, 96%, 97%, 98%, 99%, 99.5%, 99.9%, 99.99%, or at least about 99.999% or more.

    [0193] Values expressed in a range format should be interpreted in a flexible manner to include not only the numerical values explicitly recited as the limits of the range, but also the individual numerical values or sub-ranges encompassed within that range as if each numerical value and sub-range is explicitly recited. For example, a range of 0.1% to about 5% or 0.1% to 5% should be interpreted to include about 0.1% to about 5%, as well as the individual values (for example, 1%, 2%, 3%, and 4%) and the sub-ranges (for example, 0.1% to 0.5%, 1.1% to 2.2%, 3.3% to 4.4%) within the indicated range. The statement X to Y has the same meaning as about X to about Y, unless indicated otherwise. Likewise, the statement X, Y, or Z has the same meaning as about X, about Y, or about Z, unless indicated otherwise.

    [0194] Particular implementations of the subject matter have been described. Other implementations, alterations, and permutations of the described implementations are within the scope of the following claims as will be apparent to those skilled in the art. While operations are depicted in the drawings or claims in a particular order, such operations are not required to be performed in the particular order shown or in sequential order, or that all illustrated operations be performed (some operations may be considered optional), to achieve desirable results. In certain circumstances, multitasking or parallel processing (or a combination of multitasking and parallel processing) may be advantageous and performed as deemed appropriate.

    [0195] Moreover, the separation or integration of various system modules and components in the previously described implementations are not required in all implementations, and the described components and systems can generally be integrated together or packaged into multiple products.

    [0196] Accordingly, the previously described example implementations do not define or constrain the present disclosure. Other changes, substitutions, and alterations are also possible without departing from the spirit and scope of the present disclosure.

    [0197] The foregoing description of the specific implementations can be readily modified and/or adapted for various applications. Therefore, such adaptations and modifications are intended to be within the meaning and range of equivalents of the disclosed implementations, based on the teaching and guidance presented herein.

    [0198] The breadth and scope of the present disclosure should not be limited by any of the above-described example implementations, but should be defined only in accordance with the following claims and their equivalents. Accordingly, other implementations also are within the scope of the claims.