Securely Computing the Manhattan Distance under the Malicious Model and Its Applications
Abstract
:1. Introduction
- Firstly, the protocol in Reference [29] is analyzed and found that some situations may be attacked by malicious participants.
- According to the possible attacks of malicious participants, we design a new MPC protocol for computing the Manhattan distance can resist malicious attacks. In the process of designing the protocol, we use the Goldwasser–Micali and Paillier encryption algorithm, the cut-choose and zero-knowledge proof methods are used. The secure computation of the Manhattan distance will be converted into the Millionaires’ problem to further improve the efficiency of the protocol.
- The real/ideal model paradigm method is used to prove the security of the proposed malicious model MPC protocol. The performance and efficiency of the protocol are analyzed and simulated by experiments compared with existing protocols.
2. Related Work
3. Preparatory Knowledge
3.1. Paillier Encryption Algorithm
3.2. Goldwasser–Micali Encryption Algorithm
3.3. Zero-Knowledge Proof
- The certifier selects random numbers and , calculates , , and finally publishes .
- The verifier can verify whether is established. If it is true, the verifier believes that the conclusion is correct, that is, the certifier knows the secret .
3.4. Encoding
3.4.1. Encoding Rule
3.4.2. Calculation Principle
3.5. Security Definition under the Malicious Model
4. The MPC Protocol of Computing Manhattan Distance under the Semi-Honest Model
Algorithm 1 Securely computing the Manhattan distance under the semi-honest model |
Input: Alice owns point
and Bob owns point
. Output:. Preparation: Alice and Bob construct the vectors and corresponding to point and point respectively using the coding rules.
The protocol ends. |
5. The MPC Protocol of Computing Manhattan Distance under the Malicious Model
- In Step 3 of Algorithm 1, the result can only be calculated by Alice (Bob has no private key), which is unfair to Bob.
- There may be a malicious attack in step 3, that is, Alice may tell Bob the wrong calculation result or terminate the protocol. In the end, Alice gets the right result, while Bob may get the wrong result or not.
5.1. Specific Protocol
Algorithm 2 Securely computing the Manhattan distance under the malicious model |
Input: Alice owns point and Bob owns point . Output: . Preparation stage:
Processing steps:
The Protocol ends. |
5.2. Correctness Analysis
- The main purpose of the first six steps in Algorithm 2 is that Alice and Bob calculate the Manhattan distance respectively. In this process, Alice and Bob decrypt using their own GM private key, so they cannot get each other’s information. At the same time, in order to prevent the other party from obtaining its own information, the obtained ciphertext is randomly scrambled in steps 2 and 5 and then sent to the other party.
- In 7–16 steps, the problem of calculating Manhattan distance has been skillfully transformed into the socialist millionaires’ problem.
- In step 13, Alice must calculate correctly, otherwise, it cannot be proved by the zero-knowledge, that is, cheating is impossible. If in the remaining group also satisfies and Bob selects , Bob can calculate after publishing .
- In this process, if Alice wants to successfully implement the malicious behavior, she can only select a that does not meet the requirements, which is not found in the verification in step 8 and is selected by Bob in step 10, so Bob will not get the correct result. But Alice cannot get , because is unsolvable (an equation has two unknown numbers).
- If Alice uses the above method to cheat, the maximum success rate of deception is that in group , groups meet the requirements, and only one group does not meet the requirements, that is, the maximum probability is . When the probability of success is the largest (i.e., one group does not meet the requirements), when the probability of success of deception is and five groups do not meet the requirements, the probability of success of deception is reduced to . When , these two probabilities are reduced to and respectively. If the group greater than does not meet the requirements, the probability of successful deception will be reduced to 0 (it will always be found in the verification stage). Similarly, Bob’s probability of successful malicious behavior is the same as Alice’s. Therefore, the protocol is secure.
5.3. Example Description
- Alice encrypts vector with to get , and sends to Bob.
- Bob encrypts vector with to obtain: , and calculates the ciphertext based on the XOR homomorphism of GM encryption system. Bob randomly disturbs the sequence of elements in to get and sends it to Bob.
- Alice decrypts term by term using to get and calculates: .
- Bob encrypts vector with to get: , and sends to Alice.
- Alice encrypts vector with to obtain: , and calculates the ciphertext . Alice randomly disturbs the sequence of elements in to get and then sent it to Bob.
- Bob decrypts term by term with to obtain and calculates .
- In steps 7–12, Alice and Bob follow Algorithm 2, which will not be described in detail.
5.4. Security Proof
- in the actual protocol is honest, so will send right to TTP. According to dishonest ’s strategy, decides what information to send to TTP. Consequently, the input of is .
- TTP obtains the and calculates .
- dresses up as and executes with , that is, selects and makes .
- ①
- and execute and send the information to in step 7 based on Algorithm 2.
- ②
- In step 8, verifies the information he asked to publish.
- ③
- In step 9, publishes the information required by .
- ④
- In steps 10–12, selects, calculates, and publishes the information according to .
- ⑤
- In step 13, is calculated and published.
- ⑥
- In step 14, the information sequence is obtained.
- Alice gets the result and ignores TTP, then is sent to Bob by TTP, so:
- Conversely, is sent to Bob by TTP, then:
- According to dishonest ’s strategy, decides what information to send to TTP. Therefore, the input value sends to TTP is .
- is obtained by TTP to calculate .
- executes with by dressing up as , that is, selects simulation protocol and makes .
- ①
- and execute the protocol and send in step 7 to .
- ②
- In step 9, verifies the information he asked to publish in step 8.
- ③
- In steps 10–12, selects, calculates, and publishes the information according to .
- ④
- In step 13, calculates and publishes it.
- ⑤
- In step 14, the information sequence is obtained.
- receives the message and ignores TTP, so:
- Conversely, that is:
6. Performance Analysis
6.1. Overall Performance Comparison
6.2. Computational Complexity
6.3. Communication Complexity
6.4. Experimental Simulation
7. Applications
- Computing distance is a measurement method. Manhattan distance is often used to measure the length of the path in many scientific studies. For example, in the study of biological cryptography, it is often necessary to judge whether the two biological templates are the same or similar. In data mining and machine learning, we often judge the analogy and similarity of individuals. When consuming products, it will also judge the similarity of consumers. Therefore, the similarity of different individuals can be deduced by calculating the distance value of individual feature vectors, that is, the protocol for MPC of Manhattan distance is the basic module for constructing the secret calculation vector similarity protocol.
- The Manhattan distance between two points can better protect personal privacy and solve the constrained optimization problem. As shown in Figure 4, both military sides select military bases in an area, and neither side wants the other party to know where their military bases are located. At the same time, the military exchanges between the two sides are close, and the driving distance between the two military bases should be moderate, that is, the distance should be appropriate. In such an actual scene, the range size of the specified area is equivalent to the given complete set. Both parties just select the appropriate coordinate system in the area, and the location of the military bases of both parties is selected within the range of the complete set. For the suitability of the distance, both parties can jointly calculate the Manhattan distance between two points to make appropriate adjustments.
- 3.
- Today, with the development of information, information search and matching have practical application value. The location relationship between the security decision vector and the vector interval is the solution to solve the secure searching and matching. The problem of the relationship between the security decision vector and the vector set can also be solved by computing the Manhattan distance securely.
8. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
, Both and are large primes | |
Plaintext | |
Ciphertext | |
The public and private keys of Alice’s GM encryption system | |
The public and private keys of Bob’s GM encryption system | |
The public key of Alice’s Paillier encryption system | |
The public key of Bob’s Paillier encryption system | |
The private key of Alice’s Paillier encryption system | |
The public key of Bob’s Paillier encryption system | |
The process of converting encrypted plaintext into ciphertext | |
The process of decrypting ciphertext into plaintext | |
Random numbers | |
Results for a random permutation of the ciphertext | |
Encrypted calculation with A’s public key | |
Encrypted calculation with B’s public key | |
The function calculation results of and in the ideal case | |
The function calculation results of and in the practical case | |
Function calculation results |
References
- Ishai, Y.; Rijmen, V. Advances in cryptology-eurocrypt 2019. In Proceedings of the 38th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Darmstadt, Germany, 19–23 May 2019; Springer: Berlin/Heidelberg, Germany, 2019; pp. 94–97. [Google Scholar]
- Wang, Z.; Pang, X.; Chen, Y. Privacy-preserving crowd-sourced statistical data publishing with an untrusted server. IEEE Trans. Mob. Comput. 2018, 18, 1356–1367. [Google Scholar] [CrossRef]
- Zhou, J.; Feng, Y.; Wang, Z.; Guo, D. Using secure multi-party computation to protect privacy on a permissioned blockchain. Sensors 2021, 21, 1540. [Google Scholar] [CrossRef] [PubMed]
- Wu, D.; Si, S.; Wu, S. Dynamic trust relationships aware data privacy protection in mobile crowd-sensing. IEEE Internet Things J. 2017, 5, 2958–2970. [Google Scholar] [CrossRef]
- Fălămaş, D.E.; Marton, K.; Suciu, A. Assessment of Two Privacy Preserving Authentication Methods Using Secure Multiparty Computation Based on Secret Sharing. Symmetry 2021, 13, 894. [Google Scholar] [CrossRef]
- Yao, A.C. Protocols for secure computations. In Proceedings of the 23rd Annual Symposium on Foundation of Computer Science (SFCS 1982), Chicago, IL, USA, 3–5 November 1982. [Google Scholar]
- Goldreich, O. Foundations of Cryptography; Basic Applications; Cambridge University Press: Cambridge, UK, 2009; Volume 2. [Google Scholar]
- Cramer, R.; Damgard, I.B.; Nielsen, J.B. Secure Multiparty Compution; Cambridge University Press: Cambridge, UK, 2015. [Google Scholar]
- Hunt, T.; Jia, Z.; Miller, V.; Szekely, A.; Hu, Y. Telekine: Secure computing with cloud {GPUs}. In Proceedings of the 17th USENIX Symposium on Networked Systems Design and Implementation (NSDI 2020), Santa Clara, CA, USA, 25–27 February 2020. [Google Scholar]
- Jiang, J.; Tang, L.; Gu, K.; Jia, W. Secure computing resource allocation framework for open fog computing. Comput. J. 2020, 63, 567–592. [Google Scholar] [CrossRef]
- Shen, H.; Liu, Y.; Xia, Z.; Zhang, M. An efficient aggregation scheme resisting on malicious data mining attacks for smart grid. Inf. Sci. 2020, 526, 289–300. [Google Scholar] [CrossRef]
- Wang, J.; Wu, L.; Zeadally, S.; Khan, M.K.; He, D. Privacy-preserving data aggregation against malicious data mining attack for IoT-enabled smart grid. ACM Trans. Sens. Netw. 2021, 3, 1–25. [Google Scholar] [CrossRef]
- Akram, A.; Giannakou, A.; Akella, V.; Lowe, J.; Peisert, S. Performance analysis of scientific computing workloads on general purpose TEEs. In Proceedings of the 35th IEEE International Parallel & Distributed Processing Symposium (IPDPS), Portland, OR, USA, 17–21 May 2021. [Google Scholar]
- Rao, V.S.; Satyanarayana, N. Experimental analysis and comparative study of secure data outsourcing schemes in cloud. Int. J. Cloud Comput. 2019, 1, 83–101. [Google Scholar] [CrossRef]
- Li, W.; Meng, P.; Hong, Y.; Cui, X. Using deep learning to preserve data confidentiality. Appl Intell 2020, 50, 341–353. [Google Scholar] [CrossRef]
- Zhang, K.X.; Yang, C.; Li, S.D. Privacy preserving string matching. J. Cryptologic Res. 2022, 9, 619–632. [Google Scholar] [CrossRef]
- Fakroon, M.; Alshahrani, M.; Gebali, F.; Traore, I. Secure remote anonymous user authentication scheme for smart home environment. IoT 2020, 9, 100158. [Google Scholar] [CrossRef]
- Li, S.D.; Xu, W.T.; Wang, W.L. Secure Maximum (Minimum) Computation in Malicious Model. Chin. J. Comput. 2021, 44, 2076–2089. [Google Scholar]
- Liu, X.; Xu, Y.; Xu, G. Secure Judgment of Point and Line Relationship Against Malicious Adversaries and Its Applications. J. Internet Technol. 2022, 23, 1019–1027. [Google Scholar]
- Liu, X.; Zhang, R.L.; Xu, G. Securely determine the inclusion relation of a point and a convex polygon in malicious model. J. Cryptologic Res. 2022, 9, 524–534. [Google Scholar] [CrossRef]
- Resende, A.; Railsback, D.; Dowsley, R. Fast privacy-preserving text classification based on secure multiparty computation. IEEE Trans. Inf. Forensics Secur. 2022, 17, 428–442. [Google Scholar] [CrossRef]
- Wang, Q.; Guo, Y.; Wang, X.; Ji, T.; Yu, L.; Li, P. AI at the edge: Blockchain-empowered secure multiparty learning with heterogeneous models. IEEE Internet Things J. 2020, 10, 9600–9610. [Google Scholar] [CrossRef]
- Tran, A.T.; Luong, T.D.; Karnjana, J. An efficient approach for privacy preserving decentralized deep learning models based on secure multi-party computation. Neurocomputing 2021, 422, 245–262. [Google Scholar] [CrossRef]
- Shutty, N.; Wootters, M. Low-bandwidth recovery of linear functions of Reed-Solomon-encoded data. arXiv 2021, arXiv:2107.11847. [Google Scholar] [CrossRef]
- Fosli, I.; Ishai, Y.; Kolobov, V.I.; Wootters, M. On the download rate of homomorphic secret sharing. arXiv 2021, arXiv:2111.10126. [Google Scholar] [CrossRef]
- Roy, L.; Singh, J. Large message homomorphic secret sharing from DCR and applications. In Proceedings of the 41st Annual International Cryptology Conference (CRYPTO 2021), Virtual Event, 16–20 August 2021. [Google Scholar] [CrossRef]
- Naor, M.; Pinkas, B. Efficient oblivious transfer protocols. In Proceedings of the twelfth annual ACM-SIAM symposium on Discrete algorithms (SODA ’01), Washington, DC, USA, 7–9 January 2001. [Google Scholar]
- Lindell, Y.; Pinkas, B. Secure two-party computation via cut-and-choose oblivious transfer. J. Cryptology 2012, 25, 680–722. [Google Scholar] [CrossRef] [Green Version]
- Fang, L.; Li, S.; Dou, J. Secure manhattan distance computation. J. Cryptologic Res. 2019, 4, 512–525. [Google Scholar] [CrossRef]
- Dou, J.; Ge, X.; Wang, Y. Secure Manhattan distance computation and its application. J. Comput. Sci. 2020, 2, 352–365. [Google Scholar] [CrossRef]
- Liu, C.; Zhu, L.; He, X.; Chen, J. Enabling privacy-preserving shortest distance queries on encrypted graph data. IEEE Trans. Dependable Secur. Comput. 2018, 18, 192–204. [Google Scholar] [CrossRef] [Green Version]
- Li, S.D.; Wang, W.; Du, R. Protocol for millionaires’ problem in malicious model. Sci. Sin. Inf. 2021, 1, 75–88. [Google Scholar] [CrossRef]
- Paillier, P. Public-key cryptosystems based on composite degree residuosity classes. In Proceedings of the international Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT′99), Prague, Czech Republic, 2–6 May 1999. [Google Scholar]
- Goldwasser, S.; Micali, S. Probabilistic encryption & how to play mental poker keeping secret all partial information. In Proceedings of the fourteenth annual ACM symposium on Theory of computing (STOC’82), San Francisco, CA, USA, 5–7 May 1982. [Google Scholar] [CrossRef]
- Chaum, D.; Pedersen, T.P. Transferred cash grows in size. In Proceedings of the workshop on the Theory and Application of Cryptographic Techniques (EUROCRYPT ′92), Balatonfüred, Hungary, 24–28 May 1992. [Google Scholar]
Protocol | Fairness | Cryptography Tools | Resist Malicious Attacks |
---|---|---|---|
Fang [29] | unfair | GM | × |
Dou [30] | unfair | Paillier | × |
Liu [31] | unfair | Symmetric cryptography | × |
Algorithm 2 | fair | GM, Paillier | √ |
Protocol | Computational Complexity | Rounds of Communication | Resist Malicious Attacks |
---|---|---|---|
Fang [29] | 2 | No | |
Dou [30] | 3 | No | |
Liu [31] | 3 | No | |
Algorithm 2 | 4 | Yes |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liu, X.; Liu, X.; Zhang, R.; Luo, D.; Xu, G.; Chen, X. Securely Computing the Manhattan Distance under the Malicious Model and Its Applications. Appl. Sci. 2022, 12, 11705. https://doi.org/10.3390/app122211705
Liu X, Liu X, Zhang R, Luo D, Xu G, Chen X. Securely Computing the Manhattan Distance under the Malicious Model and Its Applications. Applied Sciences. 2022; 12(22):11705. https://doi.org/10.3390/app122211705
Chicago/Turabian StyleLiu, Xin, Xiaomeng Liu, Ruiling Zhang, Dan Luo, Gang Xu, and Xiubo Chen. 2022. "Securely Computing the Manhattan Distance under the Malicious Model and Its Applications" Applied Sciences 12, no. 22: 11705. https://doi.org/10.3390/app122211705
APA StyleLiu, X., Liu, X., Zhang, R., Luo, D., Xu, G., & Chen, X. (2022). Securely Computing the Manhattan Distance under the Malicious Model and Its Applications. Applied Sciences, 12(22), 11705. https://doi.org/10.3390/app122211705