1 Introduction
Since quantum mechanics was introduced into the cryptography field, quantum cryptography has attracted significantly more attention attention. Due to the characteristics of quantum unconditional security, many quantum cryptography protocols such as quantum key distribution (QKD) [
1–
3], quantum secure direct communication (QSDC) [
4–
10], quantum secret sharing (QSS) [
11–
13], and quantum teleportation (QT) [
14,
15] have been proposed to solve various security problems. Some researchers have also studied protocols for continuous variable quantum communication [
16,
17].
Recently, quantum private comparison (QPC) has become an important branch in quantum cryptography. Based on the properties of quantum mechanics, the participants can determine whether their secret inputs are equal without disclosing their own secrets to each other. In 2009, Yang
et al. [
18] presented a pioneering QPC scheme based on Bell states and a hash function. Since then, a large number of QPC protocols have been proposed utilizing entangled states such as Einstein–Podolsky–Rosen (EPR) pairs [
18,
22,
24,
26,
27] and Greenberger–Horne–Zeilinger (GHZ) states [
19,
21].
However, these QPC protocols [
18–
27] are feasible in the ideal scenario, but they are not secure in the practical scenario where faults (including noise and error) exist in the quantum channel and measurement. To solve this problem, in 2013, Li
et al. [
28] presented a novel QPC scheme based on GHZ states that used error-correcting code (ECC) against noise. However, through analyzing Li
et al.’s QPC scheme, we found it is insecure under a special attack, called the twice-Hadamard-CNOT attack. To be specific, if any malicious party performed the twice-Hadamard-CNOT attack, he or she could obtain another party’s secret input, which goes against the QPC principles [
29]. Here, the twice-Hadamard-CNOT attack is essentially a special controlled-NOT (CNOT) operation used to attack the communication process. The CNOT operation has also been used in other attacks [
30] and quantum repeaters [
31]. To fix the loophole in Li
et al.’s QPC scheme, a simple solution is proposed that utilizes a permutation operator before the third party (TP) distributes the particles to the participants.
The remainder of this paper is organized as follows. Li et al.’s QPC protocol is briefly reviewed in Section 2. In Section 3, we analyze the security of Li et al.’s QPC protocol by introducing the twice-Hadamard-CNOT attack and an improved scheme in the QPC protocol is given in to fix the loophole in Section 4. Finally, our conclusions are summarized in Section 5.
2 Review of Li et al.’s QPC protocol
In Ref. [
28], to guarantee the security of the QPC protocol in the practical scenario, Li
et al. proposed a novel two-party QPC scheme using quantum ECC and the block transmission method [
4]. The protocol consists of the following eight steps.
1) Alice, Bob, and Calvin prepare a [] ECC that uses a m bit code word to encode an n bit word. The ECC can correct l error bits in the code word with the error-correcting function according to the fault rate of the noise scenario. We suppose that the generator matrix of the ECC is G and the check matrix is Q. Then, Alice, Bob, and Calvin encode and to and , respectively, using the generator matrix G:
2) Calvin prepares m triplet GHZ states that all have the state
where and are measured in the Z basis, and are measured in the X basis, and . Then, Calvin divides the GHZ states into three sequences, SA, SB, and SC, which include the first, second, and third particles of all GHZ states, respectively.
3) Calvin randomly prepares decoy photons in states . He inserts these decoy photons into SA and SB at random positions to form the sequences and , respectively. Calvin retains the quantum sequence SC and sends the sequence to Alice and to Bob.
4) When Alice and Bob receive and , respectively, Calvin announces the positions and measurement bases of the decoy photons. Alice and Bob measure decoy photons in the same base and announce their outcomes. If the error rate exceeds a rational threshold, Calvin aborts the protocol and restarts from Step i). Otherwise, there is no eavesdropper, and the protocol continues to the next step.
5) Alice and Bob recover SA and SB, respectively, by discarding the decoy photons. Then, Alice, Bob, and Calvin measure SA, SB, and SC in X basis, respectively. If the measurement result is (), then they encode the result as the classical bit 0 (1). Thus, Alice, Bob, and Calvin will each obtain m bits from SA, SB and SC, respectively. We denote the resulting m bit strings as , , and .
6) Alice and Bob calculate and , respectively. They announce and to Calvin.
7) Calvin calculates and finds the m bit sequence .
8) Then, Calvin uses the check matrix Q to verify if the number of error bits exceeds the threshold l. If it does, Calvin aborts the protocol and restarts from Step 1). Otherwise, he obtains the n bit sequence by decoding with an error-correcting function . If there is at least one bit 1 in , Calvin announces . Otherwise, he announces .
3 Twice-Hadamard-CNOT attack on Li et al.’s QPC protocol
As analyzed in Ref. [
28], some well-known attacks such as the intercept-resend attack, measurement-resend attack, and entanglement-resend attack can be detected in Li
et al.’s QPC protocol. However, we found it cannot resist a special attack, i.e., the twice-Hadamard-CNOT attack. To be specific, if either Alice or Bob performs the twice-Hadamard-CNOT attack, he or she can get the other party’s secret input without being detected. The detailed procedure of the twice-Hadamard-CNOT attack is given as follows.
Without loss of generality, we suppose Bob is malicious and wants to get Alice’s secret input. First, Bob prepares m auxiliary particles all in the state . Then, the GHZ state and an auxiliary particle compose a composite system:
where the subscripts C, A, and B represent the particles in the hand of Calvin, Alice, and Bob, respectively, and the subscript e represents an auxiliary particle.
In Step 3), when Calvin sends the sequence to Alice, Bob may intercept and execute a Hadamard (H) operation on every particle in to form sequence . Then, Bob performs a CNOT operation on every particle in and the corresponding auxiliary particle e. Here, the particle in is the control qubit, while particle e is the target qubit. After the CNOT operation, Bob performs another H operation on every particle in to restore sequence to and sends to Alice. The transmitting sequence remains unchanged.
When Calvin announces the position of the decoy photons in Step 4), Bob can discard the auxiliary particles e corresponding to the decoy photons in . Then, in Step 5), after Bob recovers SB by discarding the decoy photons, he executes an H operation on every particle in SB to form sequence . Bob performs a CNOT operation on every particle (control particle) in and the corresponding auxiliary particle e (target particle). He then performs an H operation on every auxiliary particle and on particle in , which restores to SB. Now, the state of the composite system is changed to
From Eq. (5), the following rule can be deduced: if e is , particle A and particle B are in the same state, and if e is , particles A and B are in different states.
After Alice announces in Step 6), Bob measures m auxiliary particles in the X basis and obtains the measurement result . According to and the rule from Eq. (5), Bob can obtain Alice’s states . Because has been announced by Alice, Bob can calculate , that is, he can find Alice’s secret input .
The twice-Hadamard-CNOT attack can be intuitively demonstrated by Fig. 1.
4 The improved scheme
To fix the loophole of Li et al.’s QPC protocol, we apply a permutation operator † before TP sends the particle sequences to all participants. To be specific, Step 3), Step 4), and Step 5) in the original protocol need to be modified as follows.
3′) Calvin randomly prepares two groups of -length decoy photons sequences in , namely and , and concatenates () with () to form the extended sequence (). Then, Calvin applies a permutation operator on () to create a new sequence () and sends the new sequence to Alice and to Bob.
4′) When Alice and Bob receive and , Calvin announces the coordinates of the decoy qubits , () sent to Alice and Bob and the corresponding measurement bases. Note that Calvin does not disclose the actual order of the message qubits. Then, Alice and Bob measure the decoy qubits in the same bases and announce their outcomes. If the error rate exceeds a rational threshold, Calvin aborts the protocol and restarts from Step 1); otherwise, there is no eavesdropper, and the protocol continues to the next step.
5′) Alice and Bob discard their decoy photons and denote the remaining qubits in their hands as and (i.e., and ), respectively. Then, Alice, Bob, and Calvin measure , , and SC in the X basis, respectively, and obtain m bits, , , and ), respectively. After they have completed the measurement operation, Calvin immediately announces the actual order of the message qubits (). Using this information, Alice (Bob) can rearrange () to correspond with the original order of SA (SB).
As shown above, the key point is to add a permutation operator
Π in Li
et al.’s QPC scheme. Thus, our improved protocol inherits the security properties of the original protocol, i.e., it can resist the intercept-resend attack, measurement-resend attack, entanglement-resend attack, and some special inner attacks successfully discussed in Ref. [
28]. Now, let us examine whether our improved scheme can resist the twice-Hadamard-CNOT attack. Similarly, we suppose the malicious Bob aims to find Alice’s secret input. In Step 3’), since Calvin disrupts the sequences
and
using
to find
and
, the orders of transmitted sequences
and
are fully disturbed. After discarding the decoy qubits
RA and
RB in Step 5’), Alice and Bob can only find
and
and cannot recover the original sequences
SA and
SB because
is only known by Calvin. Thus, even if Bob launch the twice-Hadamard-CNOT attack, he cannot find the final state
. That is to say, Bob cannot determine the correlations between Alice’s and Bob’s qubits by measuring the auxiliary particles
e.
For simplicity, we take a simple two-bit private comparison as an example without considering ECC and the decoy photons. In this case, suppose Alice’s input is 10, Bob’s input is 11, and Calvin prepares two GHZ states all in the state given in Eq. (3),
In Step 3’), Calvin executes the permutation operator on sequence and . Then, the system may be changed into
After Bob performs the twice-Hadamard-CNOT attack, the composite system that consists of the GHZ state and the auxiliary particle becomes
From the above equation, we cannot find the correlations between the states of A1 and B1 (A2 and B2) according to the final state of the auxiliary particle e1 (e2). Bob cannot steal Alice’s input by measuring the auxiliary particles. Therefore, our improvement can resist the twice-Hadamard-CNOT attack.
5 Conclusion
In a secure QPC protocol, we must guarantee any participant only knows his or her own secret input without obtaining any other participant’s secret input. In this paper, we reviewed and analyzed Li et al.’s two-party QPC protocol and found that it cannot resist the twice-Hadamard-CNOT attack, i.e., if one participant (Bob) launches this attack, he can get the other party’s (Alice’s) secret input without being detected. To avoid this loophole, we adopt a permutation operator to rearrange the quantum sequences sent to Alice and Bob from Calvin. Moreover, the analysis shows the security of our improved scheme can be guaranteed.
Although we showed that Li
et al.’s protocol cannot resist the twice-Hadamard-CNOT attack, some other protocols [
32,
33] also show weakness under this special attack. Many published quantum cryptography protocols have continually been identified as insecure. Perhaps one of the reasons for this insecurity is that we are used to applying the non-formalized analytical method (also called the attack-verification method) to verify the protocols, where some given attacks are listed to assault the present protocols. Obviously, this simple and crude analytical method has some shortcomings: (i) it lacks strictness because we cannot list all kinds of attacks, and (ii) even if a protocol can be proved to be secure against the known attacks, we cannot confirm that the protocol is flawless. Currently, formalism analysis and automated verification techniques have been extensively utilized for analyzing the security of the classic protocols and have demonstrated many achievements. It is possible that formalism analysis for quantum protocols will be the best choice to solve the above problems, and this is one direction of our future work.
© Higher Education Press and Springer-Verlag Berlin Heidelberg 2015