This paper examines secure two-party computation of functions, which depend only on the Hamming distance of the inputs of the two parties.We present efficient protocols for computing these functions.In particular, we present protocols which are secure in the sense of full simulatability against malicious adversaries.We then show applications of HDOT.These include protocols for checking similarity between documents without disclosing additional information about them (these protocols are based on algorithms of Broder et al. for computing document similarity based on the Jaccard measure).Another application is a variant of symmetric private information retrieval (SPIR), which can be used if the server's database contains N entries, at most N / logN of which have individual values, and the rest are set to some default value.The receiver does not learn whether it receives an individual value or the default value.This variant of PIR is unique since it can be based on the existence of OT alone.
This paper presents a semi-quantum private comparison and Hamming distance computation protocol based on
d-dimensional Bell states. The proposed protocol enables two parties, with the assistance of a trusted third party (TP), to determine whether their private information is identical and compute the Hamming distance without disclosing their secrets. In this protocol, the TP prepares
d-dimensional Bell states and distributes the entangled particles to Alice and Bob. Alice and Bob predetermine specific positions where they will perform REFLECT or MEASURE operations. Based on their measurement results, both parties encode their secret information and transmit the results to the TP via a classical channel. The TP then compares the data by incorporating pre-recorded offsets to determine whether the secrets are equal and to compute the Hamming distance, while ensuring that no private information is directly exposed. Compared to existing protocols, the proposed method demonstrates broader applicability in scenarios with limited quantum resources. To validate the protocol, we provide concrete examples demonstrating its theoretical and practical feasibility. Furthermore, security and efficiency analyses confirm its robustness against various external attacks and potential internal threats, including dishonest TP behavior.