Three-Party Integer Comparison and Applications
Abstract
Secure integer comparison has been a popular research topic in cryptography, both for its simplicity to describe and for its applications. The aim is to enable two parties to compare their inputs without revealing the exact value of those inputs.
In this paper, we highlight three-party integer comparison (TPIC), where a judge, with no private input, wants to know the comparison result, while two competitors hold secret integers to do privacy-preserving comparison. The judge actively obtains the result rather than passively waiting for it sent by a competitor. We give two TPIC constructions considering Mixed adversaries, who have with different capabilities. One is secure against a semi-honest adversary with low computation and communication cost, while the other is secure against a malicious adversary.
Basing on TPIC, we present multi-party comparisons through concrete applications, including a joint bidding scheme and a practical auction. Brief security proofs and analysis for the applications are presented. In comparison, our auction scheme is more efficient with lower cost, making it feasible in practice rather than a theoretical design. All the comparisons and application schemes run on top of blockchain requiring a constant number of rounds.
keywords:
Multi-Party Integer Comparison, Joint Bidding, Auction, Commitment, Constant-round, BlockchainThree-Party Integer Comparison and Applications
1 Introduction
Integer comparisons play an important role in the real life, a classic topic is the Millionaires problem [1], bringing researches on two-party comparison. A large number of solutions have been proposed employing various methods like garbled circuits [2, 3], oblivious transfers [4], and homomorphic encryption [5, 6, 7]. One approach is to decompose integers into bitwise representation and evaluate them in a boolean circuit. The communications and computations are inefficient requiring many rounds of interaction. In contrast to bitwise comparisons, more efficient protocols were given in [7, 8, 9, 10] to compare multiple bits simultaneously with a single ciphertext by a somewhat homomorphic encryption.
The general case related to secure integer comparison includes multi-party ranking [11], of which a concrete example is auction, such as English auction and uniform-price auction [12]. The dramatic development of internet of things, 5G and electronic commerce, etc, facilitates the research on online auctions [13, 6, 14, 15, 16, 17], which heavily rely on integer comparisons to determine one or more bidders with higher bids. Recently, the emergence of blockchain brings new idea to design comparison protocols as well auction schemes [13, 18, 19]. In the literature, Fischlin [5] proposed two-party bitwise comparison by boolean circuit, based on which, auction schemes were given considering semi-honest and malicious case. An oblivious third party A is required to provide a public/private key pair. All homomorphic computations in Fischlin’s protocol are then performed under A’s public key. Simulating A on the blockchain requires distributing the private key over multiple parties. As a result, one would need a secure and distributed computation of a Goldwasser-Micali key pair [20]. Even for the case of RSA, this is complex and requires more rounds to do interactions [21], making it impractical on blockchain. Blass and Kerschbaum [22] proposed , a protocol to implement auctions on top of blockchains that protects the bid privacy against fully-malicious parties. They improved the two-party comparison mechanism of Fischlin to achieve higher efficiency. Moreover, the authors mentioned that the proposed protocol leaks the order of bids to the public. Damgård et al. [6] gave auction schemes by homomorphic encryption. They considered the very different scenario of comparing a secret value with a public integer for the fully malicious version while the semi-honest version addresses comparing secret inputs and . They described their special case consisting of a server, an assisting server and a client with harsh condition that the client must be able to send his value and go offline, whereafter the other two parties should be able to do the computations together. The offline requirement is not very suitable for blockchain architecture pursuing freedom in joining and leaving the network at any time. The auction scheme [23] used the two-party multi-bit comparison in [7] considering a semi-honest adversary. Later, it was improved in [24], which, however, required help of the auctioneer to forward messages in more rounds.
We observe that two-party comparisons are pivots of most existing auctions. However, there are cases, where two-party protocols might not work well. Consider such a scenario: a buyer (with balance ) wants to buy a toy (of price ) from a seller via blockchain. The buyer needs to convince the miners that , while guaranteeing privacy of both and . By a two-party comparison protocol, the buyer obtains the comparison result and sends it to the miners with a proof, resulting in additional complexity. Can we design a protocol to enable the miners to actively obtain the result rather than passively receiving it from the buyer?
Our contributions. In this paper, we highlight the above question and address it by three-party integer comparison (TPIC) protocols. In TPIC, two competitors hold their secret integers to perform comparisons, while a judge with no private input learns the comparison result. Two constant-round constructions are given against semi-honest and malicious adversary respectively. One is built on [7] for semi-honest competitors, and has low communication and computation cost (it can be improved by the method in [9, 10] to reduce one round), while the other is built on the technique of Fischlin [5] for malicious competitors. In both, the judge is assumed to be semi-honest and non-colluding with competitors to maintain the comparison result. As applications of TPIC, we give schemes for joint bidding and online auction, which run on top of blockchain in a constant number of rounds.
It is worth mentioning that the proposed joint bidding scheme runs in 4 blocks and is better than [23], where the number of rounds required is equal to the number of firms. Further, our auction has lower cost compared with related schemes [6, 5] and is feasible in practice. It runs in a constant number of rounds (4 blocks) and does not require an intermediary as in [24]. It also avoids the issue mentioned in [22]: the order of bids is revealed to all the participants. Indeed, the order of the private inputs is regarded as important information in some scenarios like joint bidding [25]. In our auction, the judge can obtain the results on its own initiative, and is the only party to get the order. Complexity analysis is given, while there is no analysis in [24].
Organization. This paper is organized as follows. In section 1, an introduction towards the research background as well as our contributions are presented. In section 2, we give a description for preliminaries including the ideal functionality, the adversary model, as well as the commitment scheme. In section 3, three-party integer comparison protocols are given. The applications to illustrate multi-party comparisons are given in section 4, consisting of joint bidding and auction schemes. The complexity analysis of the auction is shown in section 5. Finally, conclusions are given in section 6.
2 Preliminaries
In this section, we present the system model, ideal functionality and security definition, together with a commitment scheme used in the multi-party applications.
Convention. When we say someone “broadcasts” something, it means that he publishes his message on the blockchain via a transaction. We denote by as the security parameter involving in a cryptosystem.
2.1 System Model
We give a general model for comparisons in this paper. The participants are divided into two parts: one is called judge with no private input like the auctioneer in an auction, the other is called competitors which is a set of participants holding private inputs like bidders. The judge wants to obtain the sorted order of the secret inputs, which the owners does not wants to reveal. Assume there are () competitors and one judge in the following. In TPIC, .
Ideal Functionality. Our integer comparison scheme emulates a trusted third party (TTP) that first receives private inputs from all competitors by an authenticated channel. TTP then compares all the inputs and sends all the comparison results to the judge. If a competitor submits a complaint towards , TTP reveals bid information of to the judge and announces the re-comparison result between and to the public. The ideal functionality of a multi-party integer comparison protocol is presented in Algorithm 1.
Adversary Model. It is assumed that all participants run in probabilistic polynomial time (PPT). Mixed adversary is considered corresponding to the participant roles. and are non-colluding and have different capabilities. is semi-honest and can corrupts the judge to eavesdrop the input privacy of the competitors. is either semi-honest or malicious (discussed separately) and can adaptively corrupt a subset of competitors. If is semi-honest, a corrupted competitor can: 1) attempt to obtain the inputs of the honest competitors but perform protocol correctly, 2) use false input, which means that the committed input is inconsistent with the input in the ciphertexts during the comparison, 3) submit a complaint towards the comparison result at any time, 4) quit the comparison during execution of the scheme at arbitrary time. We note here , when is semi-honest, is different from the general semi-honest assumption as some malicious behaviors are allowed, like submitting false complaints, quitting the protocol at any time.
Network Model. A weakly synchronous blockchain is used as an broadcast channel to publish messages. Each participant can timely access and put messages on the blockchain at any time.
Let be a set of participants, who perform a protocol to compute an ideal function given inputs and outputs . For a corrupted subset of , the view of is denoted by , where contains messages and random numbers selected by and related information during running . Let be a simulator that takes the inputs of all and the outcome of received by to produce a transcript of the protocol.
Definition 2.1
A protocol is secure against , if there exist a PPT simulator such that the distributions, and , are computationally indistinguishable (simply denoted by symbol ‘’), that is,
2.2 Commitment Scheme with Deposits
In our schemes, the blockchain-based commitment scheme (CS) with deposits in [26] is used to bind the input with its owner, forcing the owner to follow the protocol.
Assume a committer wants to commit to a recipient via blockchain. Initially, a hash function is negotiated by the committer and recipient . At the commitment phase, computes with some randomness as a commitment to . Then he broadcasts a transaction on blockchain revealing the commitment with some deposits , which is contained in some transaction possessed by . The deposits will be redeemed by during the opening phase with a transaction if he opens the correct commitment. Otherwise, the deposits will be claimed by as punishment for . Afterwards, a transaction is created by and sent to with his signature on it enabling to claim the deposits.
At the opening phase, reveals and via a transaction to redeem his deposits. If the transaction is not recorded on the blockchain after a deadline, then broadcasts the transaction to gain the deposits of , or learns and if appears on the blockchain then redeems his deposits.
For an honest committer, the deposits will be redeemed after opening the commitment. If the committer can not correctly open the commitment, then the recipient will claim the deposits. CS satisfies the property of a commitment scheme since hash function is collision-resistant while is guaranteed by unpredictability of the hash function.
3 Three-Party Integer Comparison Protocol
In this section, two TPIC protocols are given against semi-honest and malicious , respectively.
3.1 Semi-honest Competitors
In this subsection, a secure TPIC against semi-honest adversary is given. We improve the two-party integer comparison protocol in [7] and give security proofs. Assume that two competitors, and , holding and , respectively, want to prove to a judge which one of and is larger without uncovering them.
The strategy involves three homomorphic public key encryption (PKE) schemes, by which to do computations under ciphertexts: 1) from [7] is semantically secure with threshold property that if , then , otherwise, . 2) with message space is multiplicatively homomorphic. 3) is semantically secure and additively homomorphic with message space satisfying . An efficient candidate for is [27] and proper candidates for can be RSA or ElGamal encryption.
Let and , where . If exactly one of the Boolean expressions below is True: , , , , , then ; otherwise .
Specifically, runs to generate the key pair while the judge runs to get the key pair . They publish their public keys to each other where . In the following, let and the notation denotes that a value is chosen uniformly at random from a set .
-
1.
selects and computes , then he publishes on blockchain, where , .
-
2.
selects , , and computes ; , , , . She puts , on blockchain, where and , .
-
3.
computes ; , , …, . Then he blinds by computing for . He gets by shuffling via a random permutation . He puts on blockchain.
-
4.
computes and blinds by computing for . Then, she shuffles to by a random permutation . She publishes on blockchain.
-
5.
computes . If for all , , then, ; otherwise, .
Note that the string is regarded as an integer to be encrypted, which can be achieved by choosing appropriate message spaces.
Correctness. computes . If holds, then . Since the encryptions, and , are homomorphic, we have and . If there exists only one , , , then holds, and the -th Boolean expressions is True, , . Otherwise, if for all , then holds.
Theorem 3.1
Assume that the three PKEs are secure. Then, the above TPIC protocol is secure against mixed adversary , where and are non-colluding and semi-honest, might corrupt the judge , might corrupt a competitor or . I.e., the privacy, and , of and respectively, is preserved.
Proof 3.2 (Sketch Proof)
By Definition 2.1, we construct simulators for the three PPT parties. Here is TPIC, and the ideal functionality computes the relationship between and , if , otherwise .
Given the public keys, and , encrypts by as which is identical to the real. Unknowing , just encrypts via to get . Since is semantically secure, is computationally indistinguishable from in the real. also encrypts numbers randomly chosen from to obtain which is indistinguishable from the real due to the (semantical) security of and . Then computes as the real execution, which is also computationally indistinguishable. To simulate , encrypts random numbers chosen from by semantically secure . Thus is also computationally indistinguishable. So we have . Note that has no output.
and can be constructed similarly to . Note that for given the comparison result , should be consistent with the result. If , there should exist only one . In this case, encrypts 0 and non-zero random numbers by , then shuffles them. Otherwise, encrypts non-zero random numbers then shuffles them. Similarly, we have for with no output, and for who outputs the comparison result.
3.2 Malicious Competitors
Considering malicious who may corrupt or , we improve the comparison protocol of Fischlin [5], where Goldwasser-Micali (GM) [20] encryption is used. The public key is while the private key is , where , , . One can encrypt a bit by computing with randomly chosen from and decrypt by computing . GM is homomorphic for encryptions of two bits and : (XOR), (NOT). For a GM ciphertext , re-encryption is .
AND-homomorphic. GM encryption can be modified to support Boolean AND homomorphic following [28], by which, a single bit is encrypted to -element sequence, where is the soundness parameter. and for randomly chosen bits. The AND-decryption outputs if each element in the sequence is decrypted to ; otherwise, it outputs . This decryption is correct with probability . For two ciphertexts and , (AND). Re-encryption for AND-encryption is defined as .
AND-embedding. An existing GM ciphertext of bit can be embedded to AND-ciphertext without decryption. For randomly chosen bits , if , then set ; otherwise, set . Such embedding is correct with probability .
Fischlin [5] proposed secure protocol to compare two integers against semi-honest adversaries, which is a bit-wise comparison. Given -bit integers and with bit representations and , one can compute by evaluating Boolean circuit if and only if . is XOR operation and exactly one term will be 1 if ; otherwise, all terms will be 0. Moreover, equals . Thus, can be homomorphically evaluated using GM encryption.
We improve the protocol of Fischlin [5] to be a secure three-party scheme against malicious and . gets the comparison result, while and protect their private inputs and . It is assumed that will not collude with or . Except for GM encryption, RSA is also used in our scheme. generates a GM key pair and publishes the public key before the comparison. For , generates RSA public/ private key pair . The private inputs are first encrypted by GM, then encrypted by RSA, such double encryption is called GM-RSA encryption in the following. Since, RSA is multiplicatively homomorphic, the homomorphic properties (NOT,XOR,AND) of GM will not be affected involving only multiplication. In the following, encrypting a sequence means encrypting each element separately.
-
1.
bit-wisely encrypts its private input by GM into , then, encrypts by RSA into . To prove the knowledge of the private input, a non-interactive zero-knowledge (NIZK) proof given below is added. Finally, publishes on blockchain.
-
2.
encrypts into using of with a NIZK proving is contained in and . homomorphically computes all and . embeds and into AND-homomorphic GM by manipulating ciphertexts . Specifically, selects random coins and perform GM-RSA encryption on them, which then multiplied by . also attaches knowledge proofs of the random coins following the construction of below. For each , then computes a ciphertext of . randomly shuffles sequence to by a random permutation with a NIZK proof of following [29, 30]. Let proof . encrypts into by the public key of such that the proof is visible only to . puts on blockchain. performs operations similarly to and publishes .
-
3.
verifies by checking the NIZK proofs. Then, published the verification results on blockchain.
-
4.
decrypts by into and puts on the blockchain. Similarly, publishes .
-
5.
can verify correctness of by re-encrypting (via ) before decrypting. If exactly one is contained, then . Otherwise, decrypts . If exactly one is obtained, then . Otherwise .
NIZK-. For a GM public key , a RSA public key , a GM-RSA ciphertext of a bit , a prover can prove the knowledge of in rounds as in [31]. The prover randomly chooses numbers , and computes . With the help of a publicly known random oracle , the prover computes challenges regarded as a bit string. The prover concludes the proof by sending responses . A verifier computes all and accepts if . The security relies on the security of RSA and the original proof of knowledge for GM ciphertext in [31].
NIZK-. For two RSA public keys , public ciphertexts , a prover can prove the knowledge of such that . The prover randomly chooses and computes . Then, the prover computes challenges regarded as an integer. The response is . A verifier computes , , and accepts if . For security of , one can refer to [32] for proving the knowledge of such that .
Theorem 3.3
The above TPIC protocol is secure against mixed adversary , where is semi-honest and can corrupt the judge , is malicious and can corrupt or . I.e., the privacy, and , of and respectively, is preserved.
Proof 3.4 (Sketch Proof)
Following Definition 2.1, we construct simulators for the three PPT parties with the help of the ideal functionality , which computes the relationship between and , if , otherwise . We denote by and the simulators of NIZK and .
Given and , computes as in the real. Then invokes to simulate behavior of . This simulation is computationally indistinguishable from the real. In step 2, computes ciphertexts with the help of TTP and . Since the final ciphertexts will reveal the relationship between and , can just encrypts random numbers according to . For , if , encrypts only one and 0 for other elements; otherwise, it always encrypts 0 for all elements. Afterwards, it invokes to guarantee NIZK is acceptable. encrypts random bits and gives NIZK following to embed to AND-homomorphic GM. Then it invokes the simulator for to shuffle the sequence. This simulation process is also computationally indistinguishable from the real computation. In step 4, does decryptions as in the real with the given private key , which is identical to the real. One can construct as same as the construction of .
The judge , who has no private input, only obtains RSA ciphertexts in step 1,2,3 and NIZK proofs. can revoke and . With the help of TTP, the simulation should be consistent with as discussed for in step 2, such that the resulting simulator is computationally indistinguishable from the real execution.
4 Applications
In this section, the applications based on three-party comparisons are given with the help of blockchain.
4.1 Joint bidding
The proposed comparison protocols can be used for joint bidding [25], which is a multi-party scenario. Joint bidding is a form of alliance and is used extensively in the construction and insurance industries, allowing a group of firms to collectively undertake a big project beyond any single. The logic is to take advantage of the collective size of the group. To choose proper partners, the project owner needs to check their financial assets which they do not like to uncover.
A solution is given and instantiated by the three-party comparison for malicious competitors. In our design, all the firms run parallelized TPIC with the project owner . At last, learns the order of all assets to select needed partners. If the owner wants to choose partners possessing assets more that a prefer value , it can play a role of firm to compare all assets with . then chooses firms whose assets is larger than whilst is not known to them.
At the beginning, broadcasts the GM public key, all firms perform the following scheme.
-
1.
Each firm publishes on blockchain committing to assets . If a prefer value is needed, publishes on chain committing to .
-
2.
Each computes for all and puts them on blockchain.
-
3.
verifies all NIZK proofs and publishes the verification results.
-
4.
decrypts all into and publishes them on blockchain.
-
5.
decrypts getting the order of all (and ). Then can select proper partners according to the ranking of assets (larger than ).
Here, the commitment with deposits can also be used to incentivize honest performance.
The security is guaranteed by theorem 3.3. One can refer to [22] for the time cost for GM encryption and related NIZK proofs. For primes , 32-bit integers, for soundness error , the total time is less than 1s. To guarantee RSA is compatible with GM, we test encryption and decryption time setting on PC (AMD PRO A10-8770 R7, 10 COMPUTE CORES 4C+6G) running at 3.5GHz. The total RSA encryption time for times is less than 200ms while 6s for decryption. The time cost is acceptable in the real.
The scheme runs in 4 blocks and the per-firm communication cost in each step is given in table 1, where is bit length for the asset value, is the soundness parameter in AND homomorphic of GM, is the soundness parameter in NIZK proofs, is the prime size for RSA, is the number of firms. The communication coat in step 2 does not contain the ciphertexts . can be encrypted by an alternative scheme instead of GM since GM is a bit-wise encryption, thus consumes much communication.
– | step 1 | step 2 | step 4 |
comm(bits) |
4.2 Auctions from TPIC
In this subsection, a general version of three-party comparison is presented by a privacy-preserving auction scheme running in a constant number of rounds. In an auction scenario, bidders submit bids hoping to win without revealing the bid information while the auctioneer expects to determine a winner with the highest bid. Traditional seal-bid scheme heavily relies on the auctioneer who is assumed to be trusted since learns all bid information. This dependence will however lead to unfairness as may collude with a bidder or leak the bids of the honest to a malicious bidder. On the other hand, a bidder may perform badly to influence the outcome of the auction. In our instantiation, the commitment scheme (CS) with deposits is used to bind bid as well as the ciphertexts with each bidder. The deposits are used to punish bidders with bad behavior like inconsistent commitment or wrong complaint. The three-party protocol for semi-honest competitors is used to compare all bids under ciphertexts to preserve privacy.
Roughly, each bidder is required to run CS to broadcast on blockchain with some deposits committing to his bid and its ciphertexts. He is also supposed to provide a transaction for the auctioneer with his signature on it. Then, runs TPIC to compare his bid with that of for all in parallel. At the last round of TPIC, gets all the comparison results and announces the highest bid holder to be the auction winner. The determined winner should open his commitment on blockchain and other bidders can verify its soundness. A bidder who loses the auction can redeem the deposits by which will disclose the bid information, thus an alternative is used to return the deposits. contains no bid information and is valid only signed by both and . If a complainer submits a complaint towards , is required to open his commitment to for consistency verification. Then they run TPIC again, after which gets the result and penalizes the loser by broadcasting the transaction on blockchain to confiscate his deposits before exclusion. The punishment is necessary to prevent bid information extraction from malicious comparisons by continuous complaint submission, because each comparison will reveal a lower or upper bound of the bid. Finally, signs the transaction from the honest bidders and broadcasts them on blockchain to return their deposits.
Specifically, all bidders and the auctioneer negotiate a hash function and the deposits value used in the commitment. Each runs both and to generate the key pairs and while runs to get the key pair . They all publish their public keys, and then run the following parallelized TPIC, where is the number of bidders, , and denotes that the message in TPIC is computed by and transferred to the target receiver .
-
1.
Each encrypts into via , and computes with a random string as his commitment. creates two transactions and encrypts them by of into . Finally, broadcasts
on blockchain by a transaction with some deposits;
-
2.
computes for all and puts them on blockchain;
-
3.
computes for all and publishes them on blockchain;
-
4.
computes for all and posts them on blockchain;
-
5.
For , computes . If for , , then determines to be the winner who is required to open his commitment for public verification.
-
6.
If a complainer submits a complaint towards on blockchain, then he is required to reveal to for consistency verification. If it is not consistent, penalizes by broadcasting his on blockchain confiscating his deposits. Otherwise, they run TPIC with the complained bidder, after which, gets the result and penalizes the loser who is excluded from now on. Finally, signs the transaction from the honest bidders and broadcasts them on blockchain to return their deposits.
In this scheme, we assume that there exists only one bidder holding the highest bid. If more than one bidders submit the same highest bid, then they can run TPIC to bid again.
Theorem 4.1
Our auction scheme is secure against mixed adversary , where may corrupt the auctioneer , may corrupt one or more bidders. I.e., the bid privacy of honest bidders is preserved.
Proof 4.2 (Sketch Proof)
By the ideal functionality , we construct a simulator for each party. For each bidder , we construct given the bid , related public and private keys, and the output of receiving from TTP. Since the commitments is based on hash function, each simulator can hash a random string as simulated commitment for others which is computationally indistinguishable from the real one. In step 1, given , directly computes , , and . These are identical to the real. In step 2, can read all on blockchain, computes by encrypting zeros which is computationally indistinguishable since is ciphertext encrypted by semantically secure . can compute for all with . This is the same as the real. In step 3, can read all for on blockchain. Since is encrypted by , computes by encrypting zeros which is indistinguishable. In the real, can decrypts by the private key of obtaining the messages encrypted by which is again semantically secure. computes by encrypting random numbers selected from via and , which is indistinguishable. decrypts all getting , and computes by the blind and shuffle operation. Just as , can compute that is computationally indistinguishable. Note that , as well as , will indicate whether is the winner or not, it should be simulated according to . If is a winner, computes by encrypting uniformly and randomly chosen non-zero numbers for every and , then obtains . Otherwise, for each , randomly chooses , gets by encrypting 0, and computes by encrypting uniformly and randomly chosen non-zero numbers. In step 4, decrypts and gets after blinding and shuffling.
As for , we construct given related public and private keys and the output of receiving from TTP. As discussed above, in the view of , all messages communicated are ciphertexts encrypted by (semantically) secure PKE, thus they are simulatable by encrypting mud numbers, which are computationally indistinguishable. Since will learn the comparison results from , it should be simulated according to . If , then for all , should not be decrypted to 0. In this case, encrypts non-zero random numbers by then shuffles them. Otherwise, there exists such that . encrypts 0 and non-zero random numbers then shuffles them. For the winner, can perform similarly to the case (step 3) where above simulates that is a winner.
For a complaint from about , in the real, runs TPIC with and . The proof of this case is the same as Theorem 1. So we have
where and denotes our scheme. Hence, our scheme is secure against adversary who may control the auctioneer.
For who may control more than one bidders denoted by set , we construct as follows. Since the bidders are insulated in the real, they computes ciphertexts independently. does what does for all , such that
Thus the scheme is also secure against adversary .
The complexity analysis and comparisons with related work are given in a followed section.
5 Complexity Analysis of the Auction
In this section, we analyse the performance of our auction scheme. It is assumed that the number of bidders is and the bids are bits, i.e., .
Our auction scheme runs in 4 rounds (blocks) which is constant in both the length of the bid and the number of bidders. In the first round, each bidder just encrypts his bid to ciphertexts. In other rounds, a bidder computes different ciphertexts comparing his bid with other bids in parallel, then he publishes them on blockchain. While is more efficient over a fast elliptic curve, and are much time consuming performed over finite field. Referring to the experimental data in [7], we roughly estimate the time cost as shown in Table 2. The time is computed according to the time to compute one ciphertext since each bidder computes different ciphertexts. To meet the cryptographic parameters in [7], we set , for an auction with 100 bidders, and the bid with bit-length 30(, a “billion” magnitude), thus . For 128-bit security level, set , and for 256-bit security. For , the exponential variant of ElGamal [27] is implemented over an elliptic curve. We refer the reader to the original paper [7] for more details about specific parameterizations.
128-bit | security | 256-bit | security | ||
Round | Com | Time(s) | Size(MB) | Time(s) | Size(MB) |
#1 | 0.39 | 0.37 | 8.52 | 1.83 | |
#2 | 1.14 | 0.73 | 15.66 | 3.66 | |
#3 | 0.81 | 0.37 | 9.21 | 1.83 | |
#4 | 0.14 | 0.12 | 2.13 | 0.25 |
The performance analysis of our auction scheme is given in Table 2. It shows the computation times of (Com), encryption and decryption time of and (Time), the size of transferred messages(Size). In the table, we just list the computation times of , to make it easier to be compared with the related comparison protocols, and fix to be RSA. First, our scheme is practical for real-world application. In step 2,3, each bidder needs to encrypt numbers by RSA(), but, in step 4, each is supposed to decrypt ciphertexts. For 128-bit security (), we test the RSA running time in Go language on PC (AMD PRO A10-8770 R7, 10 COMPUTE CORES 4C+6G) running at 3.5GHz, which shows that the RSA encryption time is about 230ms for while about 9s is consumed to perform decryptions. Thus, the total time in each round is about 10 seconds, which is acceptable in reality even in permissionless blockchain architectures like Bitcoin and Ethereum requiring 10 minutes and 15s (on average) to produce a new block.
To illustrate the efficiency, we compare our scheme with the two closely related works, DGK [6] and Fischlin [5] protocols, which are secure against semi-honest adversary. These three schemes all use an RSA modulus for the encryption. It is certainly reasonable to use the same bit length of the modulus. We say our scheme is a bit faster than (or, at least, comparable to) the other two comparison protocols as claimed in [7] that their scheme (based on which we present our TPIC protocol) is faster about 3.5 times than the DKG protocol, which is roughly 10 times [6] faster than Fischlin protocol. To compare -bit numbers, our scheme needs to compute ciphertexts while the other two protocols require ciphertexts since they are per-bit comparisons. Moreover, to achieve operation in Fischlin protocol, each ciphertext is expanded to a tuple with elements where is the soundness error, which adds the communication overhead. For round complexity, our scheme runs in 4 rounds, which is the same as DGK, while Fischlin protocol requires 6 rounds [22] to get the comparison results. We also note that [22] even with all the NIZK related messages removed still requires a larger communication size. The performance comparison is shown in Table 3 including round complexity (round), the number of ciphertexts needed to compare two integers (C-num) and communication overhead (com(bits)). Besides, an instance is given in the com-eg row by setting to show the differences.
– | Fischlin | DGK | Our scheme | |
round | 6 | 4 | 4 | 4 |
C-num | ||||
com(bits) | ||||
com-eg(KB) | 45000 | 1125 | 45000 | 375 |
Here, we note that is not suitable for a large auction scheme since it may need to create a transaction with heavy payload (not counting NIZK messages, 4MB for 10 bidders and 40MB for 100 bidders) while a light transaction less than 400KB is required in our scheme. An auction can be done in 5 blocks (an additional block to broadcast the winner) in several minutes considering there may be complaints submitted. If there is a complaint, the auctioneer needs to handle it and publishes complaint result in another block wasting a block of time. At the beginning of the auction, the auctioneer can set a deadline (e.g. several blocks in the future) for bidders to submit commitments and deposits similar to registration in the real. Then, each bidder submits a commitment to his bid via a transaction transferring some deposits to . The deposits can be redeemed by revealing his bid or refunded by the auctioneer at the end of the auction. Since the auctioneer is assumed to be semi-honest, the honest bidders will not lose their deposits.
6 Conclusions
In this paper, three-party comparison protocols are given, which are executed among a judge and two competitors. The judge learns the comparison results and the ranking while protecting the private integers of competitors. As applications of three-party comparisons, multi-party integer comparisons including joint bidding and online auction, are presented. All schemes run in a constant number of blocks with the help of blockchain. Besides, blockchain-based commitment is used to encourage the competitors to perform correctly. Security proofs of the comparisons are also given. The complexity analysis of the auction shows that our scheme performs well with lower communication overhead and comparable time cost, compared with related designs.
References
- [1] Yao AC. How to Generate and Exchange Secrets (Extended Abstract). In: 27th Annual Symposium on Foundations of Computer Science. IEEE Computer Society, 1986 pp. 162–167.
- [2] Kolesnikov V, Sadeghi A, Schneider T. Improved Garbled Circuit Building Blocks and Applications to Auctions and Computing Minima. In: Cryptology and Network Security, CANS 2009, Proceedings, volume 5888. Springer, 2009 pp. 1–20.
- [3] Applebaum B, Ishai Y, Kushilevitz E, Waters B. Encoding Functions with Constant Online Rate or How to Compress Garbled Circuits Keys. In: Advances in Cryptology - CRYPTO 2013 - Proceedings, volume 8043. Springer, 2013 pp. 166–184.
- [4] Chou T, Orlandi C. The Simplest Protocol for Oblivious Transfer. In: LATINCRYPT 2015 - 4th International Conference on Cryptology and Information Security in Latin America, Proceedings, volume 9230. Springer, 2015 pp. 40–58.
- [5] Fischlin M. A Cost-Effective Pay-Per-Multiplication Comparison Method for Millionaires. In: CT-RSA 2001, Proceedings, volume 2020. Springer, 2001 pp. 457–472.
- [6] Damgård I, Geisler M, Krøigaard M. Efficient and Secure Comparison for On-Line Auctions. In: Information Security and Privacy, 12th Australasian Conference, ACISP 2007, Proceedings, volume 4586. Springer, 2007 pp. 416–430.
- [7] Carlton R, Essex A, Kapulkin K. Threshold Properties of Prime Power Subgroups with Application to Secure Integer Comparisons. In: CT-RSA 2018 - Proceedings, volume 10808. Springer, 2018 pp. 137–156.
- [8] Abspoel M, Bouman NJ, Schoenmakers B, de Vreede N. Fast Secure Comparison for Medium-Sized Integers and Its Application in Binarized Neural Networks. In: CT-RSA 2019 - Proceedings, volume 11405. Springer, 2019 pp. 453–472.
- [9] Bourse F, Sanders O, Traoré J. Improved Secure Integer Comparison via Homomorphic Encryption. In: CT-RSA 2020 - Proceedings, volume 12006 of Lecture Notes in Computer Science. Springer, 2020 pp. 391–416.
- [10] Eskeland S. Privacy-Preserving Greater-Than Integer Comparison without Binary Decomposition. In: Proceedings of the 17th International Joint Conference on e-Business and Telecommunications, ICETE 2020 - Volume 2: SECRYPT. ScitePress, 2020 pp. 340–348.
- [11] Goldreich O, Micali S, Wigderson A. How to Play any Mental Game or A Completeness Theorem for Protocols with Honest Majority. In: Proceedings of the 19th Annual ACM Symposium on Theory of Computing, 1987, New York, New York, USA. ACM, 1987 pp. 218–229.
- [12] Brandt F. Fully Private Auctions in a Constant Number of Rounds. In: Financial Cryptography, 7th International Conference, FC 2003, volume 2742. Springer, 2003 pp. 223–238.
- [13] Galal HS, Youssef AM. Verifiable Sealed-Bid Auction on the Ethereum Blockchain. In: Financial Cryptography and Data Security - FC 2018 International Workshops, volume 10958. Springer, 2018 pp. 265–278.
- [14] Tian Y, Song B, Ma T, Al-Dhelaan A, Al-Dhelaan M. Bi-Tier Differential Privacy for Precise Auction-Based People-Centric IoT Service. IEEE Access, 2021. 9:55036–55044.
- [15] Teja PR, Mishra PK. Sealed Bid Single Price Auction Model (SBSPAM)-Based Resource Allocation for 5G Networks. Wirel. Pers. Commun., 2021. 116(3):2633–2650.
- [16] Ni T, Chen Z, Xu G, Zhang S, Zhong H. Differentially Private Double Auction with Reliability-Aware in Mobile Crowd Sensing. Ad Hoc Networks, 2021. 114:102450.
- [17] Sarenche R, Salmasizadeh M, Ameri MH, Aref MR. A secure and privacy-preserving protocol for holding double auctions in smart grid. Inf. Sci., 2021. 557:108–129.
- [18] Sánchez DC. Raziel: Private and Verifiable Smart Contracts on Blockchains. CoRR, 2018. abs/1807.09484. URL http://arxiv.org/abs/1807.09484.
- [19] Kosba AE, Miller A, Shi E, Wen Z, Papamanthou C. Hawk: The Blockchain Model of Cryptography and Privacy-Preserving Smart Contracts. In: IEEE Symposium on Security and Privacy, SP 2016. 2016 pp. 839–858.
- [20] Goldwasser S, Micali S. Probabilistic Encryption and How to Play Mental Poker Keeping Secret All Partial Information. In: Proceedings of the 14th Annual ACM Symposium on Theory of Computing. ACM, 1982 pp. 365–377.
- [21] Boneh D, Franklin MK. Efficient Generation of Shared RSA Keys (Extended Abstract). In: Advances in Cryptology - CRYPTO ’97, Proceedings, volume 1294. Springer, 1997 pp. 425–439.
- [22] Blass E, Kerschbaum F. Strain: A Secure Auction for Blockchains. In: Computer Security - 23rd European Symposium on Research in Computer Security, ESORICS 2018, Proceedings, volume 11098. Springer, 2018 pp. 87–110.
- [23] Ma J, Qi B, Lv K. Fully private auctions for the highest bid. In: Proceedings of the ACM Turing Celebration Conference - China, ACM TUR-C 2019. ACM, 2019 pp. 64:1–64:6.
- [24] Ma J, Qi B, Lv K. Constant-round Auction with Insulated Bidders. SCIENCE CHINA Information Sciences. URL https://www.sciengine.com/publisher/scp/journal/SCIS/doi/10.1007/s11432-019-2666-8?slug=abstract.
- [25] Lorange P, Contractor F. Cooperative Strategies In International Business. volume 14. 1989 pp. 465–467.
- [26] Andrychowicz M, Dziembowski S, Malinowski D, Mazurek L. Secure Multiparty Computations on Bitcoin. In: 2014 IEEE Symposium on Security and Privacy, SP 2014. IEEE Computer Society, 2014 pp. 443–458.
- [27] Schoenmakers B, Tuyls P. Practical Two-Party Computation Based on the Conditional Gate. In: Advances in Cryptology - ASIACRYPT 2004, Proceedings, volume 3329. Springer, 2004 pp. 119–136.
- [28] Sander T, Young AL, Yung M. Non-Interactive CryptoComputing For NC. In: 40th Annual Symposium on Foundations of Computer Science, FOCS ’99, 17-18 October, 1999, New York, NY, USA. IEEE Computer Society, 1999 pp. 554–567.
- [29] Ogata W, Kurosawa K, Sako K, Takatani K. Fault tolerant anonymous channel. In: Information and Communication Security, First International Conference, ICICS’97, Proceedings, volume 1334. Springer, 1997 pp. 440–444.
- [30] Reiter MK, Wang X. Fragile mixing. In: Proceedings of the 11th ACM Conference on Computer and Communications Security, CCS 2004. ACM, 2004 pp. 227–235.
- [31] Katz J. Efficient and Non-malleable Proofs of Plaintext Knowledge and Applications. In: Advances in Cryptology - EUROCRYPT 2003, Proceedings, volume 2656. Springer, 2003 pp. 211–228.
- [32] Guillou LC, Quisquater J. A Practical Zero-Knowledge Protocol Fitted to Security Microprocessor Minimizing Both Transmission and Memory. In: Advances in Cryptology - EUROCRYPT ’88, Proceedings, volume 330. Springer, 1988 pp. 123–128.