1 Introduction

Quantum private comparison is an imperative branch of quantum cryptography, which helps two participants to compare the magnitude of their secrets. The concept of private comparison was first introduced by Yao [1], where two participants, namely, Alice and Bob can compare their wealth but without disclosing their values. Hereafter, Boudot et al. [2] proposed a variant private comparison protocol which can decide whether the private secrets of two parties are identical or not. However, Colbeck [3] pointed out that it is impossible to ensure unconditional security of the functional computation in two-party scenario. Therefore, a third party (TP) is introduced who assists during the secure private comparison. In this regard, at the beginning TP was assumed to be an honest participant in several private comparison protocols [4, 5], where TP assists during the accomplishment of the private comparison of two participants. However, in reality, a completely honest TP is unrealistic because TP may try to attack the quantum system in order to comprehend participants’ private information. Hence, the concept of semi-honest TP was introduced in various protocols [69], where TP may attempt to infer the private information of the participants but he/she has to execute the procedure of protocol faithfully Particularly, in 2009, Yang et al. [6] proposed the first QPC protocol, where the secrets of two parties can be compared on the decoy photon and EPR pairs, and its security was guaranteed by one-way hash function, which utilizes to encipher their own secrets by both of the players. Moreover, to resist some special attacks (like Trojan horse attacks) in their round trip transmissions, a number of special devices (wavelength filter and photon number splitter (PNS)) are inserted in every round, which decreases the qubit efficiency. Soon after, Chen et al. [7] proposed a more efficient protocol, which utilized the triplet entangled states and simple single-particle measurement.

Subsequently, in 2012 Yang et al. proposed a QPC protocol [10] where TP is allowed to perform any sort of attacks to derive participants’ private secrets except colluding with any participant We designate this third party as an almost-dishonest TP. However Zhang et al. [11] pointed out some security issues existing in Yang et al.’s protocol. Besides, they also proposed two strategies to ensure the security of private comparison in a QPC protocol: first the participants (Alice and Bob) need to have a pre-shared key between them to encrypt their own secrets; second, the participants need to execute extra procedure (such as initial state checking process) for preventing TP from being misbehaved on the initial state Afterwards, in 2013 Liu et al. [12] proposed an efficient quantum private comparison protocol employing single photons and collective detection, where two participants need to have a pre-shared key between them.

However, for the QPC based on the first strategy, the participants have to perform a Quantum key distribution (QKD) protocol in advance for establishing a pre-shared key between them. Moreover to perform the initial state checking process in the second strategy, some parts of the initial states have to be used for verifying whether TP performs any cheating in the initial states or not (eg., TP may forge the other initial states instead of the correct ones in a QPC protocol in order to infer participants’ private information.) Because of the above reasons, these two strategies not only consume extra photons but also require additional procedures which impair the efficiency.

Furthermore, all the aforesaid QPC protocols [612] are based on the assumption that the quantum channel is noiseless. In fact in reality, some unpredictable noises may interfere with the quantum channel, such as fluctuation of the birefringence in optical fiber. Once the photons transmitted under the quantum channel with noises, the transmitted photons would be damaged and lose their fidelity. Photons traveling inside a time window which holds the noise fluctuation [13] will suffer from the same noise, which is called the collective noise. Generally, collective noise can be divided into two types, which are collective-dephasing noise and collective-rotation noise [1417]. The transmitted photons are affected in collective-dephasing noise (collective-rotation noise) that can be considered as the effect of the unitary operator U d (U r ) [18]. And the transformations of the quantum states suffered from these two types of collective noise are described in (1) and (2), respectively. In addition, |0〉 and |1〉 indicate respectively the horizontal and vertical polarization states, and parameter 𝜃 is expressed as the fluctuation coefficient of the noise with time.

  • The obstruction of collective-dephasing noise can be represented as follows:

$$ \begin{array}{l} U_{d} =\left( {{\begin{array}{*{20}c} 1 & 0 \\ 0 & {e^{i\theta }} \end{array} }} \right) \\ U_{d} \left|0 \right\rangle =\left( {{\begin{array}{*{20}c} 1 & 0 \\ 0 & {e^{i\theta }} \end{array} }} \right)\left( {{\begin{array}{*{20}c} 1 \\ 0 \end{array} }} \right)=\left( {{\begin{array}{*{20}c} 1 \\ 0 \end{array} }} \right)=\left|0 \right\rangle \\ U_{d} \left|1 \right\rangle =\left( {{\begin{array}{*{20}c} 1 & 0 \\ 0 & {e^{i\theta }} \end{array} }} \right)\left( {{\begin{array}{*{20}c} 0 \\ 1 \end{array} }} \right)=\left( {{\begin{array}{*{20}c} 0 \\ {e^{i\theta }} \end{array} }} \right)=e^{i\theta }\left|1 \right\rangle \end{array} $$
(1)
  • The obstruction of collective-rotation noise can be represented as follows:

$$ \begin{array}{l} U_{r} =\left( {{\begin{array}{*{20}c} {\cos \theta } & {-\sin \theta } \\ {\sin \theta } & {\cos \theta } \end{array} }} \right) \\ U_{r} \left|0 \right\rangle =\left( {{\begin{array}{*{20}c} {\cos \theta } & {-\sin \theta } \\ {\sin \theta } & {\cos \theta } \end{array} }} \right)\left( {{\begin{array}{*{20}c} 1 \\ 0 \end{array} }} \right)=\left( {{\begin{array}{*{20}c} {\cos \theta } \\ {\sin \theta } \end{array} }} \right)=\cos \theta \left|0 \right\rangle +\sin \theta \left|1 \right\rangle \\ U_{r} \left|1 \right\rangle =\left( {{\begin{array}{*{20}c} {\cos \theta } & {-\sin \theta } \\ {\sin \theta } & {\cos \theta } \end{array} }} \right)\left( {{\begin{array}{*{20}c} 0 \\ 1 \end{array} }} \right)=\left( {{\begin{array}{*{20}c} {-\sin \theta } \\ {\cos \theta } \end{array} }} \right)=-\sin \theta \left|0 \right\rangle +\cos \theta \left|1 \right\rangle \end{array} $$
(2)

On the other hand, decoherence-free (DF) states [14, 1921], which can repel the collective noise, are often used by the various schemes over the collective noise channels [13, 16, 18, 22, 23]. In 2013, Huang et al. [17] proposed a quantum private comparison protocol of equality with collective detection over collective noise channels where the collective detection process is used for checking the existence of any eavesdropper However, although a collective detection process executes in their QPC protocol, the participants have to equip with some special devices (wavelength filter and PNS) to prevent Trojan horse attacks. Besides, like the first strategy mentioned in [11], the participants need to perform a key sharing process in advance to ensure the security of their information, which blights the qubit efficiency.

Recently, He [35] proposed a QPC protocol, which can prevent Trojan horse attacks without any additional equipment (wavelength filter and PNS) support. However, in order to accomplish QPC, the protocol requires to pre-execute QKD three times in advance and that impairs the qubit efficiency of the protocol.

1.1 Problem Statement and Motivation

Even though, some existing schemes such as [17, 35], can accomplish QPC in simple way, where the trustworthiness of TP is similar to ours, however, in order to do that they require to separately execute QKD, initial state checking process, etc. which impair their qubit efficiency Besides, to resist the collective noise, the existing QPC protocols use DF states, where the coding density of DF states is lower than the GHZ (GHZ-like) states. Nevertheless, for the detection of Trojan horse attack, some of the existing QPC protocols require half of transmitted qubits consumption along with some devices such as, wavelength filter and photon number splitter, which may cause addition overhead as well. Therefore, it is greatly desirable to have an efficient way for accomplishing QPC, without any aforesaid additional burden such as executing QKD, initial state checking process, etc. In fact, these are the issues greatly motivate us to propose an expeditious quantum private comparison protocol based on a particular rule rather than the two strategies mentioned in [11]. The rule is constructed in accordance with the entanglement swapping property of GHZ (GHZ-like) states where the coding density of GHZ (GHZ-like) states \(\left (\frac {\mathrm {2}}{3}\right )\), used in collective-dephasing noise (collective-rotation noise) is higher than the coding density of DF states \(\left (\frac {\mathrm {1}}{2}\right )\) As a consequence, we do not require any pre-shared key between the participants (Alice and Bob) or even any initial state checking process, which can ensure higher qubit efficiency as compare to others over collective noise channels (shown in Section 5). In addition, our proposed quantum private comparison protocol can resist several attacks like eavesdropping attacks, insider attacks and Trojan horse attacks without any additional equipment support such as, wavelength filter and PNS support.

Paper Organization

The rest of the paper is organized as follows. In Section 2, we present some preliminary concepts and the general setting of the proposed scheme. The Section 3 describes the proposed QPC protocol whose security and qubit efficiency are analyzed in Sections 4 and 5 respectively. Finally, a concluding remark is given in Section 6.

2 Preliminaries

This section demonstrates the logical quantum states in Greenberger-Horne-Zeilinger (GHZ) states that can resist the collective-dephasing noise (shown in Section 2.1). On the other hand, here we also illustrate the logical quantum states in GHZ-like states, which can repel the collective-rotation noise (described in Section 2.2).

2.1 The Logical Quantum States to Resist the Collective-Dephasing Noise

According to [16], to resist the collective-dephasing noise, two logical qubits |0 d 〉 and |1 d 〉, respectively, can be constructed from two physical qubit product states |0〉|1〉 and |1〉|0〉, where the subscript “d” represents the logical qubits against the collective-dephasing noise. In addition, \(\left | +_{d}\right \rangle =\frac {1}{\sqrt {2}}(\left |0_{d}\right \rangle +\left |1_{d}\right \rangle ) \) and \(\left | -_{d}\right \rangle =\frac {1}{\sqrt {2}}(\left |0_{d}\right \rangle -\left |1_{d}\right \rangle )\), denote the superposition of |0 d 〉 and |1 d 〉 can also withstand the collective-dephasing noise. In order to avoid the collective-dephasing noise, this work uses the GHZ states as shown in (3), where the 2 nd and 3 rd qubits of those GHZ states transfer via the collective-dephasing noise channel are invariant as the same as the logical qubits (|0 d 〉 and |1 d 〉 ).

$$ {\begin{array}{l} \left|G{1} \right\rangle_{123} =\frac{1}{\sqrt 2 }(\left|010 \right\rangle +\left|101 \right\rangle )_{123} =\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|1_{d} \right\rangle _{23} +\left|1 \right\rangle_{1} \left|0_{d} \right\rangle _{23} ), \\ \left|G{2} \right\rangle_{123} =\frac{1}{\sqrt 2 }(\left|010 \right\rangle -\left|101 \right\rangle )_{123} =\frac{1}{\sqrt 2 }(\left| 0\right\rangle_{1} \left|1_{d} \right\rangle_{23} -\left| 1\right\rangle_{1} \left|0_{d} \right\rangle_{23} ), \\ \left|G{3} \right\rangle_{123} =\frac{1}{\sqrt 2 }(\left|001 \right\rangle +\left| 110\right\rangle )_{123} =\frac{1}{\sqrt 2 }(\left| 0\right\rangle_{1} \left| 0_{d}\right\rangle_{23} +\left| 1\right\rangle_{1} \left| 1_{d}\right\rangle_{23} ), \\ \left|G4 \right\rangle_{123} =-\frac{1}{\sqrt 2 }(\left|001 \right\rangle -\left|110 \right\rangle )_{123} =-\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|0_{d} \right\rangle_{23} -\left| 1\right\rangle_{1} \left|1_{d} \right\rangle _{23} ). \end{array}} $$
(3)

, where the subscript i denotes the it h qubit of |G1〉123,|G2〉123, |G3〉123 and |G4〉123.

2.2 The Logical Quantum States to Resist the Collective-Rotation Noise

In order to combat the collective-rotation noise, two logical qubits |0 r 〉 and |1 r 〉, respectively, are formed by two Bell states |Φ+〉 and |Ψ〉 which are unaffected by rotating phase, where the subscript “r” denotes that the logical qubits against the collective-rotation noise [16], whereas \(\left |+_{r}\right \rangle =\frac {1}{\sqrt {2}}(\left |0_{r}\right \rangle +\left |1_{r}\right \rangle ) \) and \(\left |-_{r}\right \rangle =\frac {1}{\sqrt {2}}(\left |0_{r}\right \rangle -\left |1_{r}\right \rangle )\), represent the superposition of |0 r 〉 and |1 r 〉 which can also withstand the collective-rotation noise. Hence, this work uses the GHZ-like states as shown in (4), where the 2 nd and 3 rd qubits of those GHZ-like states transfer via the collective-rotation noise channel are invariant as the same as the logical qubits (|0 r 〉 and |1 r 〉)

$$ {\begin{array}{l} \left|Gl1 \right\rangle_{123} =\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|{\Psi}^{-} \right\rangle_{23} +\left|1 \right\rangle_{1} \left|{\Phi}^{+} \right\rangle_{23} )=\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|1_{r} \right\rangle _{23} +\left| 1\right\rangle_{1} \left|0_{r} \right\rangle_{23} ), \\ \left|Gl2 \right\rangle_{123} =\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|{\Psi}^{-} \right\rangle _{23} -\left|1 \right\rangle_{1} \left|{\Phi}^{+} \right\rangle_{23} )=\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|1_{r} \right\rangle _{23} -\left|1\right\rangle_{1} \left|0_{r}\right\rangle_{23} ), \\ \left| Gl3\right\rangle_{123} =\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left| {\Phi}^{+}\right\rangle _{23} +\left|1 \right\rangle_{1} \left| {\Psi}^{-}\right\rangle_{23} )=\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|0_{r} \right\rangle_{23} +\left|1 \right\rangle_{1} \left|1_{r} \right\rangle _{23} ), \\ \left|Gl4 \right\rangle_{123} =\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|{\Phi}^{+} \right\rangle_{23} -\left|1 \right\rangle_{1} \left|{\Psi}^{-} \right\rangle _{23} )=\frac{1}{\sqrt 2 }(\left|0 \right\rangle_{1} \left|0_{r} \right\rangle -\left|1 \right\rangle_{1} \left|1_{r} \right\rangle_{23} ). \end{array}} $$
(4)

, where the subscript i denotes the it h qubit of |G l1〉123,|G l2〉123, |G l3〉123 and |G l4〉123.

2.3 The Entanglement Swapping Properties of GHZ States and GHZ-Like States

This section demonstrates the measurement results of entanglement swapping of GHZ states over collective-dephasing noise as well as the measurement results of entanglement swapping of GHZ-like states over collective-rotation noise.

The entanglement swapping can be performed among three uncorrelated GHZ states over the collective-dephasing noise Each of the GHZ states can be chosen in one of the four GHZ states {|G1〉123,|G2〉123,|G3〉123,|G4〉123} As an example, here we prepare the three GHZ states |G1〉123, |G1〉456 and |G1〉789, where the subscript numbers indicate the order of qubits Originally, there is no entangled relationship among the 1 st, 8 th and 9 th (4 th, 2 nd and 3 rd or 7 th, 5 th and 6 th) qubits until one performs the GHZ measurement on them. In other words, a correlation of entanglement among the 1 st, 8 th and 9 th (4 th, 2 nd and 3 rd or 7 th, 5 th and 6 th) qubits based on GHZ measurement is built, which is exemplified by the following equation.

$$ \begin{array}{l} \left|G1 \right\rangle_{123} \otimes \left|G1 \right\rangle_{456} \otimes \left| G1\right\rangle_{789} \\ =\frac{1}{\sqrt 2 }(\left| 010\right\rangle +\left|101 \right\rangle )_{123} \otimes \frac{1}{\sqrt 2 }(\left|010 \right\rangle +\left|101 \right\rangle )_{456} \otimes \frac{1}{\sqrt 2 }(\left|010 \right\rangle +\left|101 \right\rangle )_{789} \\ =\frac{1}{2\sqrt 2 }(\left|010010010 \right\rangle +\left|010010101 \right\rangle +\left|010101010 \right\rangle +\left| 010101101\right\rangle \\ +\left| 101010010\right\rangle +\left| 101010101\right\rangle +\left|101101010 \right\rangle +\left|101101101 \right\rangle )_{123456789} \\ =\frac{1}{2\sqrt 2 }(\left|010010010 \right\rangle +\left|001010110\right\rangle +\left|010110001 \right\rangle +\left| 001110101\right\rangle \\ +\left| 110001010\right\rangle +\left| 101001110\right\rangle +\left|110101001 \right\rangle +\left|101101101 \right\rangle )_{189423756} \\ =\frac{1}{4}(\left| G1\right\rangle_{189} (\left|G1 \right\rangle \left|G1 \right\rangle +\left|G2 \right\rangle \left|G2 \right\rangle +\left|G3 \right\rangle \left|G3 \right\rangle +\left|G4 \right\rangle \left|G4 \right\rangle )_{423756} \\ +\left| G2\right\rangle_{189} (\left|G1 \right\rangle \left|G2 \right\rangle +\left|G2 \right\rangle \left|G1 \right\rangle -\left|G3 \right\rangle \left|G4 \right\rangle +\left|G4 \right\rangle \left|G3 \right\rangle )_{423756} \\ +\left|G3 \right\rangle_{189} (\left| G1\right\rangle \left|G3 \right\rangle +\left|G2 \right\rangle \left|G4 \right\rangle +\left|G3 \right\rangle \left|G1 \right\rangle -\left| G4\right\rangle \left|G2 \right\rangle )_{423756} \\ -\left| G4\right\rangle_{189} (\left|G1 \right\rangle \left|G4 \right\rangle +\left|G2 \right\rangle \left|G3 \right\rangle -\left|G3 \right\rangle \left|G2 \right\rangle +\left|G4 \right\rangle \left|G1 \right\rangle )_{423756} ) \end{array} $$
(5)

According to (5), for instance, if the measurement result of the 1 st, 8 th and 9 th qubits is |G1〉189, then the measurement results of the 4 th, 2 nd and 3 rd qubits and the 7 th, 5 th and 6 th qubits are |G1〉423|G1〉756, |G2〉423|G2〉756, |G3〉423|G3〉756 or |G4〉423|G4〉756.

In order to perform the entanglement swapping under the collective-rotation noise, the way is similar to the method of the entanglement swapping using the GHZ states over the collective-dephasing noise. Each of the GHZ-like states can be selected in one of the four GHZ-like states {|G l1〉123,|G l2〉123,|G l3〉123,|G l4〉123} For example, if the three GHZ-like states |G l1〉123, |G l1〉456 and |G l1〉789 used in the same way of the entanglement swapping, then the measurement results by using the GHZ-like measurement are illustrated in the following.

$$ \begin{array}{l} \left|Gl1 \right\rangle_{123} \otimes \left|Gl1 \right\rangle_{456} \otimes \left|Gl1 \right\rangle_{789} \\ =\frac{1}{\sqrt 2 }(\left|001 \right\rangle -\left|010 \right\rangle +\left|100 \right\rangle +\left| 111\right\rangle )_{123} \otimes \frac{1}{\sqrt 2 }(\left|001 \right\rangle -\left|010 \right\rangle +\left|100 \right\rangle +\left|111 \right\rangle )_{456} \\ \otimes \frac{1}{\sqrt 2 }(\left|001 \right\rangle -\left| 010\right\rangle +\left|100 \right\rangle +\left|111 \right\rangle )_{789} \\ =\frac{1}{8}\left( {\begin{array}{l} \left|001001001 \right\rangle -\left|001001010 \right\rangle +\left| 001001100\right\rangle +\left|001001111 \right\rangle \\ -\left| 001010001\right\rangle +\left| 001010010\right\rangle -\left|001010100 \right\rangle -\left|001010111 \right\rangle \\ +\left|001100001 \right\rangle -\left| 001100010\right\rangle +\left|001100100 \right\rangle +\left|001100111 \right\rangle \\ +\left| 001111001\right\rangle -\left| 001111010\right\rangle +\left|001111100 \right\rangle +\left|001111111 \right\rangle \\ -\left| 010001001\right\rangle +\left| 010001010\right\rangle -\left|010001100 \right\rangle -\left|010001111 \right\rangle \\ +\left|010010001 \right\rangle -\left| 010010010\right\rangle +\left|010010100 \right\rangle -\left|010010111 \right\rangle \\ -\left|010100001 \right\rangle +\left| 010100010\right\rangle -\left|010100100 \right\rangle -\left|010100111 \right\rangle \\ -\left| 010111001\right\rangle +\left| 010111010\right\rangle -\left| 010111100\right\rangle -\left|010111111 \right\rangle \\ +\left|100001001 \right\rangle -\left| 100001010\right\rangle +\left|100001100 \right\rangle +\left|100001111 \right\rangle \\ -\left|100010001 \right\rangle +\left|100010010 \right\rangle -\left|100010100 \right\rangle -\left|100010111 \right\rangle \\ +\left|100100001 \right\rangle -\left|100100010 \right\rangle +\left| 100100100\right\rangle +\left|100100111 \right\rangle \\ +\left| 100111001\right\rangle -\left|100111010 \right\rangle +\left| 100111100\right\rangle +\left|100111111 \right\rangle \\ +\left| 111001001\right\rangle -\left|111001010 \right\rangle +\left|111001100 \right\rangle +\left|111001111 \right\rangle \\ -\left| 111010001\right\rangle +\left|111010010 \right\rangle -\left|111010100 \right\rangle -\left|111010111 \right\rangle \\ +\left|111100001 \right\rangle -\left|111100010 \right\rangle +\left|111100100 \right\rangle +\left|111100111 \right\rangle \\ +\left| 111111001\right\rangle -\left|111111010 \right\rangle +\left|111111100 \right\rangle +\left|111111111 \right\rangle \end{array}} \right)_{123456789} \\ =\frac{1}{8}\left( {\begin{array}{l} (\left|Gl1 \right\rangle +\left| Gl2\right\rangle )(\left|Gl1 \right\rangle +\left|Gl2 \right\rangle )(\left| Gl1\right\rangle +\left| Gl2\right\rangle ) \\ +(\left|Gl3 \right\rangle +\left|Gl4 \right\rangle )(\left| Gl1\right\rangle +\left|Gl2 \right\rangle )(\left| Gl3\right\rangle -\left|Gl4 \right\rangle ) \\ +(\left| Gl1\right\rangle +\left| Gl2\right\rangle )(\left|Gl3 \right\rangle -\left|Gl4 \right\rangle )(\left| Gl3\right\rangle +\left| Gl4\right\rangle ) \\ +(\left|Gl3 \right\rangle +\left|Gl4 \right\rangle )(\left|Gl3 \right\rangle -\left|Gl4 \right\rangle )(\left|Gl1 \right\rangle -\left|Gl2 \right\rangle ) \\ +(\left|Gl3 \right\rangle -\left|Gl4 \right\rangle )(\left|Gl3 \right\rangle +\left|Gl4 \right\rangle )(\left|Gl1 \right\rangle +\left|Gl2 \right\rangle ) \\ +(\left| Gl1\right\rangle -\left|Gl2 \right\rangle )(\left|Gl3 \right\rangle +\left|Gl4 \right\rangle )(\left|Gl3 \right\rangle -\left|Gl4 \right\rangle ) \\ +(\left| Gl3\right\rangle -\left|Gl4 \right\rangle )(\left|Gl1 \right\rangle -\left|Gl2 \right\rangle )(\left| Gl3\right\rangle +\left|Gl4 \right\rangle ) \\ +(\left|Gl1 \right\rangle -\left|Gl2 \right\rangle )(\left|Gl1 \right\rangle -\left|Gl2 \right\rangle )(\left| Gl1\right\rangle -\left|Gl2 \right\rangle ) \end{array}} \right)_{189423756} \\ =\frac{1}{4}\left( {\begin{array}{l} \left|Gl1\right\rangle_{189} (\left|Gl1 \right\rangle \left|Gl1 \right\rangle +\left|Gl2 \right\rangle \left|Gl2 \right\rangle +\left|Gl3 \right\rangle \left|Gl3 \right\rangle -\left| Gl4\right\rangle \left|Gl4 \right\rangle )_{423756} \\ +\left| Gl2\right\rangle_{189} (\left|Gl1 \right\rangle \left|Gl2 \right\rangle +\left|Gl2 \right\rangle \left| Gl1\right\rangle +\left|Gl3 \right\rangle \left|Gl4 \right\rangle -\left|Gl4 \right\rangle \left|Gl3 \right\rangle )_{423756} \\ +\left| Gl3\right\rangle_{189} (\left|Gl1 \right\rangle \left|Gl3 \right\rangle -\left| Gl2\right\rangle \left|Gl4 \right\rangle +\left|Gl3 \right\rangle \left|Gl1 \right\rangle +\left| Gl4\right\rangle \left| Gl2\right\rangle )_{423756} \\ -\left| Gl4\right\rangle_{189} (\left| Gl1\right\rangle \left|Gl4 \right\rangle -\left|Gl2 \right\rangle \left|Gl3 \right\rangle +\left| Gl3\right\rangle \left|Gl2 \right\rangle +\left|Gl4 \right\rangle \left|Gl1 \right\rangle )_{423756} \end{array}} \right) \end{array} $$
(6)

As a result, the measurement results of the other examples are shown in Table 1. Here, the state |C1〉 represents the GHZ state |G1〉 or GHZ-like state |G l1〉. Similarly, the states |C2〉, |C3〉 and |C4〉 respectively represent |G2〉 or |G l2〉, |G3〉 or |G l3〉 and |G4〉 or |G l4〉.

Table 1 The transformation table of the entanglement swapping of all the three GHZ (GHZ-like) states used in the proposed scheme

According to Table 1 we assume that the four states |C1〉,|C2〉,|C3〉,|C4〉 are two classical bits, i.e., “00”, “01”, “10” and “11”, respectively. Now, based on the initial states and the corresponding measurement results in Table 1, we can construct a rule

$$ (IS_{123} \oplus MR_{189} )\oplus (IS_{456} \oplus MR_{423} )\oplus (IS_{789} \oplus MR_{756} )=00 $$
(7)

, where I S 123, I S 456 and I S 789 are the initial states of GHZ (GHZ-like) states, M R 189, M R 423 and M R 756 are the measurement results, and ⊕ is a bitwise exclusive-OR operation. For instance if I S 123, I S 456 and I S 789 are all in the state |C1〉, and M R 189, M R 423 and M R 756 are separately in the states C2189, C3423 and C4756, then the result of the equation can be described as follows:

$$\begin{array}{l} (C1_{123} \oplus C2_{189} )\oplus (C1_{456} \oplus C3_{423} )\oplus (C1_{789} \oplus C4_{756} ) \\ =(00\oplus 01)\oplus (00\oplus 10)\oplus (00\oplus 11) \\ =01\oplus 10\oplus 11 \\ =00 \end{array} $$

Consequently, the equation (7) will be used in the proposed QPC protocol in Section 4.

3 Proposed QPC Protocol

This section comprises of the proposed expeditious QPC protocol shown in Fig. 1 which can be immune to collective-dephasing noise. The proposed QPC protocol is based on the equation (7) and it uses the initial states as GHZ states The protocol consists of the following steps.

Fig. 1
figure 1

The proposed QPC protocol

Step1 :

TP prepares a sequence of n GHZ states randomly chosen from {|G1〉,|G2〉,|G3〉,|G4〉}and then takes the 1 st, 2 nd and 3 rd qubits of each GHZ states to form two new sequences\(G_{TP1} =\{{q_{1}^{j}} \}\) and \(G_{TP2} =\{{q_{2}^{j}} ,{q_{3}^{j}} \}\), where j = 1,2,3,..., n denotes the first to n-th GHZ state. Then, TP prepares n logical qubits which are robust in the collective noise for public discussion, called decoy logical qubits. And they are randomly selected from {|0 d 〉|1 d 〉|+ d 〉|− d 〉}, and then inserts the selected decoy logical qubits into the sequence G T P2 to from a resultant sequence \(G_{TP2}^{\ast } \) After that TP transmits the sequence \(G_{TP2}^{\ast } \) to Alice Similarly, Alice and Bob prepare a sequence of n GHZ states randomly chosen from {|G1〉,|G2〉,|G3〉,|G4〉} and selects the 1 st, 2 nd and 3 rd qubits of each GHZ states to form two new sequences (\(G_{A1} =\{{a_{1}^{j}} \}\) and \(G_{A2} =\{{a_{2}^{j}} ,{a_{3}^{j}} \})\) and (\(G_{B1} =\{{b_{1}^{j}} \}\) and \(G_{B2} =\{{b_{2}^{j}} ,{b_{3}^{j}} \})\) respectively, where j = 1,2,3,..., n. Hereafter, both Alice and Bob prepare n decoy logical qubits and randomly insert them into the sequence G A2 and G B2 to form the resultant sequences \(G_{A2}^{\ast } \) and \(G_{B2}^{\ast } \) respectively. Subsequently, Alice transmits the resultant sequence \(G_{A2}^{\ast } \) to Bob and Bob transmits the resultant sequence \(G_{B2}^{\ast } \) to TP.

Step2 :

When TP receives the sequence \(G_{B2}^{\ast } \) from Bob, then TP requests Bob to announce the positions and the bases of the decoy logical qubits Eventually, TP extracts the decoy logical qubits from the received sequence and performs the corresponding measurement on them and subsequently returns the measurement results to Bob, which helps to comprehend the existence of any eavesdropper. In the similar way, both Alice and Bob can check \(G_{TP2}^{\ast } \) and \(G_{A2}^{\ast } \)respectively to verify whether there exist any eavesdropper or not. If so, then the participants abort the protocol. Otherwise, they will continue the next step.

Step3 :

After verifying the process of eavesdropping check in Step2, All TP, Alice and Bob need to keep two sequences (G T P1 G B2), (G A1 G T P2) and (G B1 G A2), respectively. Hereafter, TP, Alice and Bob perform the GHZ measurement on each pair in (G T P1 G B2), (G A1 G T P2) and (G B1 G A2) respectively to acquire the measurement results\(MR_{TP}^{j} M{R_{A}^{j}} \) and \(M{R_{B}^{j}} \), where j = 1,2,3,..., n.

Step4 :

After performing the GHZ measurement, TP requires Alice and Bob to return their information for equality comparison Then Alice encodes two bits of her private secret (denoted as \(SA={S_{A}^{j}} )\) by using her measurement result \(M{R_{A}^{j}} \) and the initial state \(I{S_{A}^{j}} \), which can be represented as \({O_{A}^{j}} ={S_{A}^{j}} \oplus M{R_{A}^{j}} \oplus I{S_{A}^{j}} \). Similarly, Bob also encodes his private secret \(SB={S_{B}^{j}} \) by using \(M{R_{B}^{j}} \) and \(I{S_{B}^{j}} \), i.e., \({O_{B}^{j}} ={S_{B}^{j}} \oplus M{R_{B}^{j}} \oplus I{S_{B}^{j}} \). Afterwards, both Alice and Bob, respectively send their results \({O_{A}^{j}} \) and \({O_{B}^{j}} \) to TP.

Step5 :

When TP receives \({O_{A}^{j}} \) and \({O_{B}^{j}} \) from Alice and Bob respectively, then he calculates \(R^{j}=MR_{TP}^{j} \oplus IS_{TP}^{j} \oplus {O_{A}^{j}} \oplus {O_{B}^{j}} ={S_{A}^{j}} \oplus {S_{B}^{j}} \) (as known in (8)), where \({S_{A}^{j}} \oplus {S_{B}^{j}} \in \{00,01,10,11\}\). Hereafter, TP also calculates \(V=\sum \limits _{j=1}^{n} {\vee \left ({S_{A}^{j}} \oplus {S_{B}^{j}} \right )} \), which denotes the result for equality comparison If the V is 00 which means S A = S B, Then TP sends to Alice and Bob respectively; otherwise, TP sends value 1 to them, which signifies S AS B.

Step6 :

Finally, in this way, using their received values from TP, both Alice and Bob can comprehend that their private secrets are identical or not.

Precisely, based on the (7) (see Section 2) TP can derive\(R^{j}=MR_{TP}^{j} \oplus IS_{TP}^{j} \oplus {O_{A}^{j}} \oplus {O_{B}^{j}} \), which can be represented as follows:

$$\begin{array}{@{}rcl@{}}</p><p class="noindent">R^{j}&=&MR_{TP}^{j} \oplus IS_{TP}^{j} \oplus {O_{A}^{j}} \oplus {O_{B}^{j}} \\ &=&MR_{TP}^{j} \oplus IS_{TP}^{j} \oplus \left( M{R_{A}^{j}} \oplus I{S_{A}^{j}} \oplus {S_{A}^{j}} \right)\oplus \left( M{R_{B}^{j}} \oplus I{S_{B}^{j}} \oplus {S_{B}^{j}} \right) \\ &=&\left[\left( MR_{TP}^{j} \oplus IS_{TP}^{j} \right)\oplus \left( M{R_{A}^{j}} \oplus I{S_{A}^{j}} \right)\oplus \left( M{R_{B}^{j}} \oplus I{S_{B}^{j}} \right)\right]\oplus {S_{A}^{j}} \oplus {S_{B}^{j}} \\ &=&00\oplus {S_{A}^{j}} \oplus {S_{B}^{j}} \\ &=&{S_{A}^{j}} \oplus {S_{B}^{j}} \end{array} $$
(8)

Note that, in order to repel the collective-rotation noise, the proposed QPC protocol can be used with a sequence of n GHZ-like states in {|G l1〉,|G l2〉,|G l3〉,|G l4〉} states and the decoy logical qubits which are randomly chosen from one of the four states {|0 r 〉|1 r 〉|+ r 〉|− r 〉}.

4 Security Analyses

This section illustrates the security analyses of the proposed QPC protocol against several attacks, which is divided into three subsections. Section 4.1 analyzes that the proposed protocol can withstand the eavesdropping attacks, and the proposed protocol against the insider attacks is described in Section 4.2. Finally, Section 4.3 demonstrates that the proposed scheme can even be immune to the Trojan horse attacks.

4.1 Eavesdropping Attacks

In the proposed QPC protocol, Eve, a malicious attacker, may attack the quantum channel by performing some well-known attacks, such as intercept-and-resend attack [16, 24], entangle-and-measure attack [2527] and measure-and-resend [28] However, in Step1 (see Section 3), the decoy logical qubits are randomly chosen and inserted in the sequences G T P2, G A2 and G B2 respectively. Since, Eve does not know the positions and the bases of the decoy logical qubits. Hence, she cannot intercept and forge the decoy logical qubits. According to [16, 29], any existence of Eve can be detected in Step2 through the public discussion between two participants (TP and Alice, Alice and Bob, and Bob and TP ). In addition, Eve will be detected with the probability \(1-\left (\frac {3}{4}\right )^{n}\), where n indicates the number of the decoy logical qubits, and \(\frac {3}{4}\) can be thought as the probability that Eve can escape from the eavesdropping checks of each decoy logical qubit. If n is big enough, then the detection rate of eavesdropping checks is close to 1 Hence, it can be argued that the proposed protocol can resist the eavesdropping attacks.

4.2 Insider Attacks

In general, the inside participants (Alice and Bob) have more power than the outside attacker (Eve) to attack the quantum system, who can eavesdrop the secrets without being detected On the other hand, the third party (TP) who helps the inside participants to accomplish the protocol may also desire to attack in the quantum system, where TP may even steal the secrets from the inside participants. Hence, the security analysis of the insider attacks in the proposed QPC protocol is divided into two parts: the participant’s attack and TP’s attack.

The Inside Participant’s (Alice’s or Bob’s) Attack

In this part we assume that the incredible participant Alice may try to acquire Bob’s secret, however Alice cannot cooperate with an almost-dishonest TP who cannot collude with any participant. When Alice attempts to intercept the transmitted quantum sequence from Bob to TP in Step1, then she will be detected in setp2 like the malicious attacker in Section 4.1. Alternatively, Alice may try to infer Bob’s secret \(SB={S_{B}^{j}} \) according to \({O_{B}^{j}} ={S_{B}^{j}} \oplus M{R_{B}^{j}} \oplus I{S_{B}^{j}} \), which is transferred from Bob to TP in Step4. However, Alice do not know any information about Bob’s measurement results \(M{R_{B}^{j}} \) and Bob’s initial states \(I{S_{B}^{j}} \); as a result, she cannot acquire Bob’s secret \(SB={S_{B}^{j}} \) completely Similarly, Bob also cannot obtain Alice’s secret in the similar way as Alice.

TP’s Attack

This work assumed that TP is an almost-dishonest party, i.e. TP may perform any sort of attack but cannot conspire with either Alice or Bob. In the similar way, TP may try to intercept the quantum sequence transmitted from Alice to Bob in Step1, which can be considered as eavesdropping attacks described in Section 4.1. Besides, TP may try to infer Alice’s secret \(SA={S_{A}^{j}} \) (Bob’s secret \(SB={S_{B}^{j}} )\) from \({O_{A}^{j}} ={S_{A}^{j}} \oplus M{R_{A}^{j}} \oplus I{S_{A}^{j}} \) \(\left ({O_{B}^{j}} ={S_{B}^{j}} \oplus M{R_{B}^{j}} \oplus I{S_{B}^{j}} \right )\); unfortunately, TP cannot know the measurement results \(M{R_{A}^{j}} \) \(\left (M{R_{B}^{j}}\right )\) and the initial states \(I{S_{A}^{j}} \) \(\left (I{S_{B}^{j}}\right )\), so TP cannot infer any secret from \({O_{A}^{j}} \) \(\left ({O_{B}^{j}} \right )\) published by Alice (Bob).

4.3 The Trojan Horse Attacks

Suppose Eve, an eavesdropper, who attempts to attach enough imperceptible spy qubits to all the qubits individually in the transmitted quantum sequences \(G_{TP2}^{\ast } \), \(G_{A2}^{\ast } \) and \(G_{B2}^{\ast } \) in Step1 (see Section 3) for intercepting the participants’ secrets. However, in order to deal with the Trojan horse attacks over the quantum system, one can detect or remove the spy qubits by equipping with quantum devices, such as the wavelength filter and the PNS [3032] which are used in several protocols Unfortunately, employing these quantum devices for solving the Trojan horse attacks will cause the loss in the precious qubits as well as the cost in hardware devices. Conversely, the quantum sequences \(G_{TP2}^{\ast } \), \(G_{A2}^{\ast } \) and \(G_{B2}^{\ast } \) are transmitted only once in the proposed protocol. That is, Eve filtered out the spy qubits inserted by herself is impossible. Consequently, the proposed QPC protocol is naturally free from the Trojan horse attacks.

4.4 Security over a Lossy Quantum Channel

This subsection shows that the proposed QPC protocol is remains secure under a lossy channel. That is, the quantum channel between TP and Alice (Alice and Bob, or Bob and TP) is lossy. We also assume that Eve has the capability of building an ideal channel with any user. Eve may try to intercept the logical qubits transmitted from TP to Alice (Alice to Bob, or Bob to TP) so as to reveal Alice’s and Bob’s secrets. As an illustration, Eve intercepts the logical qubits transmitted from TP to Alice, and she holds some logical qubits (e.g., m logical qubits) and then sends the remaining logical qubits (2nm logical qubits) to Alice through an ideal channel. However, these m intercepted logical qubits will not be received by Alice if Eve makes this attack. Thus, in Step2 of our protocol, Alice has to notify TP and Bob that which logical qubits have being received and which logical qubits are lost in the transmission process (Bob notifies Alice and TP, TP notifies Bob and Alice). Then, TP, Alice and Bob use the received logical qubits to perform the public discussion and the entanglement swapping with GHZ measurement. Afterward, Alice and Bob encode their secrets on their own measurement results and the corresponded initial states to obtain the results \({O_{A}^{j}} \) and \({O_{B}^{j}} \), and then they sends \({O_{A}^{j}} \) and \({O_{B}^{j}} \) to TP, which is shown in Step4. Because Eve cannot acquire any information about the initial states and the measurement results, our protocol maintains secure in this case.

5 Analysis of the Qubit Efficiency

Let the qubit efficiency be defined as \(\eta =\frac {c}{q}\) [16, 33, 34], where cdenotes the total number of classical bits which are used for comparison of equality, and q denotes the total number of the generated qubits in the protocol. Moreover, let us assume that the detections of the eavesdropping attacks and the Trojan horse attacks should consume a half of the transmitted qubits respectively [3739].

Table 2 compares our proposed QPC scheme with Huang et al.’s scheme [17] and He’s scheme [35], where the capabilities of the TP is similar to ours [40]. In Huang et al.’s scheme, the TP prepares n logical qubits (i.e., 2n qubits) which can carry one classical bit, and Alice generated n decoy logical qubits (i.e., 2n qubits) for the eavesdropping check. Moreover, Alice and Bob need to consume half of the transmitted qubits for the detections of the Trojan horse attacks repressively, so the qubit efficiency is \(\frac {n}{(2n+2n)\cdot 2\cdot 2}=\frac {1}{16}=6.25~\% \). However, in Huang et al.’s scheme, Alice and Bob utilize 2n decoy logical qubits (i.e., 4n qubits) for generating an n-bit key to protect their private secrets. As a result, the total qubit efficiency in Huang et al.’s scheme is \(\frac {n}{(2n+2n)\cdot 2\cdot 2+4n}=\frac {1}{20}=5~\% \).

Table 2 The comparison of Huang et al.’s scheme and He’s scheme and the proposed scheme

Now, as far as the He’s scheme is concerned, all the participants need to pre-share key between them in advance. In this regard, we consider the most efficient QKD [36] to achieve the pre-sharing key processes and also use logical qubits to resist collective-dephasing noise (collective-rotation noise). Each QKD process totally costs n logical qubits (i.e., 2n qubits) for sharing key and n decoy logical qubits (i.e., 2n qubits) for detecting eavesdropping attacks. As a result, the qubit efficiency in He’s scheme is \(\frac {n}{(2n+2n)\cdot 3}=\frac {1}{12}=8.33~\%\).

On the other hand, in the proposed QPC protocol, TP, Alice and Bob separately prepare n GHZ states (i.e., 3n qubits) to compare two secret bits and also generate n decoy logical qubits (i.e., 2n qubits) for the eavesdropping check. Consequently, the qubit efficiency in the proposed QPC protocol is \(\frac {2n}{9n+6n}=\frac {1}{7.5}=13.33~\% \). Obviously, the qubit efficiency of the proposed QPC protocol is better than both Huang et al.’s scheme and He’s scheme. More precisely, Huang et al.’s scheme accomplish QPC by separately integrating with other primitives support such as QKD, some devices to resist Trojan horse attacks. On the other hand, the QPC protocol proposed by He does not require any equipment for preventing Trojan horse attacks. Because of that He’s protocol provides higher qubit efficiency then Huang et al.’s scheme. However, like Huang et al.’s scheme, the QPC protocol proposed by He also requires to execute a QKD protocol three times in advance and that impairs the qubit efficiency On the contrary, our proposed protocol accomplish without the aforesaid primitives support and that makes our proposed scheme more efficient than both Huang et al.’s scheme and He’s protocol. The details of the comparison is shown in Table 2.

6 Conclusion

In this article, we have proposed an expeditious quantum private comparison protocol with the help of an almost-dishonest third party. As compared to other existing solutions, our proposed scheme has some notable advantages, where we do not require any pre-shared key between the participants, and even we need not to perform any initial state checking process to verify any cheating of the TP. Security analysis shows that the proposed scheme can resolve several issues like eavesdropping attacks, insider attacks, and Trojan horse attacks. Consequently, the proposed collective-noise resistant QPC protocol can ensure higher qubit efficiency as compared to others over collective-dephasing noise, collective-rotation noise.