1 Introduction
Quantum cryptography uses the unconventional properties of quantum mechanics like entanglement theory [1], no cloning theorem [2] etc. to perform cryptographic tasks. It provides unconditional security and innovative ways of communicating. There are many modes of quantum communication, such as Quantum Key Distribution (QKD) [3, 4, 5, 6, 7, 8, 9, 10], quantum secret sharing [11, 12, 13, 14, 15, 16], Quantum Secure Direct Communication (QSDC) [17, 18, 19, 20, 21, 22, 23, 24, 25, 26] etc., which have been widely explored over the past 30 years.
In classical cryptography, sending a message from Alice to Bob always requires a key. In particular, one shared secret key is required for any symmetric key protocol and a pair of keys (one public key and one private key of the receiver Bob) is required for any asymmetric or public key protocol. Interestingly, in quantum domain there exist some protocols for secure message transmission that does not explicitly require any key. QSDC is one such protocol. In this protocol, the sender (Bob) and receiver (Alice) first share twoparticle entangled states (namely, one of the Bell state) and each of them takes one particle from each pair. After that, Bob encodes his state with one of the four unitary operations, which are called Pauli matrices [27], , , , and to encode the information , , , and respectively and sends it to Alice. Then Alice measures the twoparticle state (one from Bob and another from her) in Bell basis to decode Bob’s message [17]. One of the famous QSDC protocol is PingPong Protocol (PPP) [28], where the receiver first prepares two qubit entangled states and ping the sender with one qubit. Then sender encodes her information by performing or on that qubit and pong it to the receiver. Many other QSDC protocol have been analyzed in several works using different approaches [18, 19, 20, 21, 22, 23, 24, 25, 26].
Quantum Dialogue (QD) can be thought as a two way QSDC protocol. Nowadays it is a very important research topic in quantum cryptography. In QD, Alice and Bob can send messages to each other simultaneously in the same channel. Quantum dialogue was first proposed by BA Nguyen in 2004 [29]. Nguyen first found out some drawback in the socalled PPP [28] and improved it. Then they extended the PPP to a QD protocol such that Alice and Bob can exchange their secret message directly. At the same time, Zhanjun Zhang also gave the idea of secure direct bidirectional communication [30]. In 2005 MAN ZhongXiao et al. showed that the QD protocol proposed by Nguyen was insecure against intercept and resend attack strategy [31]. They modified the protocol in such a way that intercept and resend attack can be detected. After that, Yan XIA et al. proposed a QD protocol using the GHZ state, which is also a modified version of Nguyen’s protocol [32]. In 2006, Ji Xin and Zhang Shou proposed a QD protocol based on singlephoton [33]. Recently various research work have been done in this area [34, 35, 36, 37, 38, 39, 40, 41].
In 2017, A. Maitra proposed a Measurement Device Independent Quantum Dialogue (MDIQD) protocol [42]. In that protocol, there are two legitimate parties, namely Alice and Bob, who want to communicate simultaneously. There is an untrusted third party (UTP), who helps them to communicate. In the MDIQD model, this UTP may itself act as an eavesdropper. First, Alice and Bob share a key using BB84 QKD [3]. Then they prepare qubits corresponding to their messages and the shared key. They send their qubits the UTP. After receiving the qubits from Alice and Bob, the UTP measures the qubits and declares the results. From the measurement results, Alice and Bob guess the messages of each other. They discard almost half of the qubits to prevent information leakage and prove that their scheme is secure under this adversarial model.
Our Contributions
In this paper, we first revisit the MDIQD protocol of A. Maitra [42] in Section 2. Then in Section 3 we propose two modifications of MDIQD. We reduce the number of discarded qubits to almost the half of their count. In addition, we make use of some of their discarded qubits to communicate securely. In our two protocols we use two different techniques to choose the discarded qubits. For this, Alice and Bob generate some sequences depending on the key and the measurement results. Based on the sequences’ terms, they decide which measurement results to keep. Details are given in Algorithm 2 and Algorithm 3. For better understanding we give two examples of our protocols in Section 3.3. We also discuss about the difference between the two protocols in Section 3.6. Section 4 concludes our results.
Notations
Throughout the paper we use some notations and we describe those common notations here.

[label=]

basis basis;

, ;

basis basis;

;

;

;

;

, ;

, ;

Bell basis basis;

is a finite sequence of length ;

th element of ;

= bit complement of ;


Probability of occurrence of an event ;

Probability of occurrence of an event given that the event has already occurred.
2 Revisiting the MDIQD Protocol of A. Maitra [42]
In this section we revisit the MDIQD protocol proposed in [42]. They composed two different protocols (BB84 [3] and a modified version of measurement device independent quantum key distribution [10]) to propose their protocol. There are two parts in their protocol. In the first part, two legitimate parties Alice and Bob perform BB84 QKD [3] to generate a shared key between themselves. In the second part, they prepare their qubits corresponding to their message with the help of . The encoding procedure is given in Algorithm 1.
Alice and Bob send their qubits to an UTP (Eve). Then UTP measures the two qubit states in Bell basis (i.e., basis) and announces the result. From the result Alice (Bob) decodes the message of Bob (Alice) (see Table 1).
Message Bits of  Prepared qubits of  Probability (Eve’s end)  
Alice  Bob  Alice  Bob  
It is clear from Table 1 that,

if the prepared qubit of Alice is (, then Alice guesses message bit of Bob with probability as follows:

if the prepared qubit of Alice is (, then Alice guesses message bit of Bob with probability as follows:
Similarly Bob can guess the communicated bit of Alice. Hence both can exchange their message simultaneously.
Now we can see from Table 1, if the measurement result is or then Eve knows the XOR of the communicated bits between Alice and Bob. In that case Eve has bit information. To avoid the information leakage, Alice and Bob discard the measurement result when it is or .
After that, Alice and Bob estimate the error between the channel. If the UTP cheats, that can also be detected from this checking. If the error lies between a tolerable range they continue the protocol, else they abort.
3 Efficient Measurement Device Independent Quantum Dialogue Protocols
In the previous section, we discussed the MDIQD protocol given in [42]. Here we propose two efficient MDIQD protocols which are modifications of [42]. In our protocols, after the key generation step as [42], let the shared key between two legitimate parties Alice and Bob be . They calculate the bit , . Then both of our protocols are the same as [42] upto the step where the UTP announces the measurement results. In the next step, Alice and Bob estimate the error in the channel (process is also same as [42]). If the estimated error lies between a tolerable range they continue the protocol, else they abort. In the protocol of [42], Alice and Bob discard almost half of the measurement results. We reduce the number of discarded measurement results by generating some sequences and computing some functions of the sequences.
3.1 Our First Efficient Measurement Device Independent Quantum Dialogue Protocol
After the error estimation phase, let the number of remaining measurement results be , Alice and Bob make a finite sequence containing the measurement results. i.e., is the th measurement result announced by the UTP, for and . They keep all the measurement results s where . Among the remaining measurement results, they choose some of them to keep and discard the others. For , if and , then Alice and Bob keep that . Else they discard that . Using Table 2 and Table 3, they guess the message bit of each other corresponding to all the measurement results which they kept. Details are given in Algorithm 2.

Alice and Bob share a bit key stream () between themselves using BB84 protocol.

They calculate , .

Let bit message of Alice and Bob be and respectively.

For , Alice (Bob) prepares the qubits at her (his) end according to the following strategy:

if () and , set ;

if () and , set ;

if () and , set ;

if () and , set .


Alice (Bob) sends to the third party (TP).

For , the UTP measures the two qubits and in Bell basis and announces the result.

Alice and Bob make a finite sequence containing the measurement results, i.e., for , is the th measurement result announced by the UTP, where .

They randomly choose number of measurement results from the sequence to estimate the error, where is a small fraction.

They reveal their respective guesses for these rounds.

If estimated error is greater than some predefined threshold value, then they abort. Else continue and goto next step.

Their remaining sequence of measurement results is relabeled as , where .

They update their bit key to an bit key by discarding number of key bits corresponding to above rounds. The updated key is relabeled as .

They generate a finite sequence such that

Then they generate another finite sequence such that

Alice and Bob share a bit key stream () between themselves using BB84 protocol.

They calculate , .

Let bit message of Alice and Bob be and respectively.

For , Alice (Bob) prepares the qubits at her (his) end according to the following strategy:

if () and , set ;

if () and , set ;

if () and , set ;

if () and , set .


Alice (Bob) sends to the third party (TP).

For , the UTP measures the two qubits and in Bell basis and announces the result.

Alice and Bob make a finite sequence containing the measurement results, i.e., for , is the th measurement result announced by the UTP, where .

They randomly choose number of measurement results from the sequence to estimate the error, where is a small fraction.

They reveal their respective guesses for these rounds.

If estimated error is greater than some predefined threshold value, then they abort. Else continue and goto next step.

Their remaining sequence of measurement results is relabeled as , where .

They update their bit key to an bit key by discarding number of key bits corresponding to above rounds. The updated key is relabeled as .

They generate a finite sequence such that

Then they generate another two finite sequence and such that

For Alice’s message ():

if , then Alice and Bob consider the th measurement result . Bob guesses Alice’s message bit using Table 3.

Else they discard .


For Bob’s message ():

if , then Alice and Bob consider the th measurement result . Alice guesses Bob’s message bit using Table 2

Else they discard .

3.2 Our Second Efficient Measurement Device Independent Quantum Dialogue Protocol
After the error estimation phase, let the number of remaining measurement results be , Alice and Bob make a finite sequence containing the measurement results. i.e., is the th measurement result announced by the UTP, for and . They keep all the measurement results s where . Among the remaining measurement results, they choose some to keep and discard other.
To choose the measurement results for Alice’s message, they will do the following:
for , if and , then Alice and Bob keep that . Else they discard that . Using Table 3, Bob guesses the message bit of Alice corresponding to all the measurement results which they kept.
To choose the measurement results for Bob’s message, they will do the following:
for , if and , then Alice and Bob keep that . Else they discard that . Using Table 2, Alice guesses the message bit of Bob corresponding to all the measurement results which they kept. In this case the length of final messages of Alice and Bob may differ.
Details are given in Algorithm 3.
3.3 Examples of Quantum Dialogue using our proposed Protocols
Let us take an example to understand our protocols more clearly. Here we skip the error estimation phase.
3.3.1 Quantum Dialogue Protocol using Algorithm 2

Let be the shared key between Alice and Bob, then .

Let Alice’s message be ,

Let Bob’s message be .

Alice’s encrypted message
. 
Bob’s encrypted message
. 
Alice and Bob send their respective sequences of qubits and to the UTP and the UTP measures the two qubits (one from Alice and one from Bob) in Bell basis and announces the results.

Let be the sequence

is the sequence .

is the sequence .

Then is the sequence .

Alice and Bob consider the th message bit pair if . That is, they consider as Alice’s message and as Bob’s message.
3.3.2 Quantum Dialogue Protocol using Algorithm 3

Let be the shared key between Alice and Bob, then .

Let Alice’s message be ,

Let Bob’s message be .

Alice’s encrypted message
. 
Bob’s encrypted message
. 
Alice and Bob send their respective sequences of qubits and to the UTP and the UTP measures the two qubits (one from Alice and one from Bob) in Bell basis and announces the results.

Let be the sequence

is the sequence .

is the sequence .

is the sequence .

Then is the sequence and

is the sequence .

For Alice’s message, Alice and Bob consider the th () measurement result only when and discard other cases. That is, they consider as Alice’s message.

For Bob’s message, Alice and Bob consider the th () measurement result only when and discard other cases. That is, they consider as Bob’s message.
3.4 Correctness of Our Proposed Protocols
In our proposed protocols, Alice and Bob first prepare qubits corresponding to their messages and shared key and then send those qubits to the third party (TP). After that, the UTP measures each two qubit state (one from Alice and one from Bob) in Bell basis and announces the result. Now, there may arise four cases and from help of Table 1 we can say the followings:

if the prepared qubit of Alice is (, then Alice guesses message bit of Bob with probability as follows:

if the prepared qubit of Alice is (, then Alice guesses message bit of Bob with probability as follows:
From the above knowledge, we construct Table 2, which contents the information of Alice’s guess about Bob’s message for different cases.
Key  Alice’s  Alice’s  Alice’s guess about when  

bit  bit  qubit  
0  0  0  0  1  1  
0  1  1  1  0  0  
1  0  0  1  0  1  
1  1  1  0  1  0 
Similar thing happens for Bob too. So we construct Table 3, which contents the information of Bob’s guess about Alice’s message for different cases.
Key  Bob’s  Bob’s  Bob’s guess about when  

bit  bit  qubit  
0  0  0  0  1  1  
0  1  1  1  0  0  
1  0  0  1  0  1  
1  1  1  0  1  0 
3.5 Security Analysis of Our Proposed Protocols
Both of our proposed protocols for Quantum Dialogue are modifications ofthe Quantum Dialogue protocol given in [42]. In their protocol they have considered only the cases where the measurement results were or and discard the cases for and . But in our protocols, we have used all the cases where the measurement results are , and also some cases where the measurement results are , . We have done some classical computation to choose which results to take. Since in [42], the authors had done the security analysis of the protocol for the cases where the measurement results were or , so it is sufficient for us to analyze the security of rest of the part of the protocols.
Before we proceed, let us first define the advantage of an adversary. It measures the success of an attack by an adversary on a cryptographic scheme. The advantage distinguishes the output of a cryptographic algorithm from that of a uniformly random source. If the advantage of an adversary for an algorithm is negligible, i.e., it is less than some predefined threshold value, then the algorithm is said to be secure. The word “negligible” usually means “within ” where is a security parameter associated with the algorithm.
Advantage: For our purpose, the advantage of an adversary A is the absolute value of the differences between the probabilities of the events and , where Guessing a random message “” from the message space, and Guessing the same message “” from the message space using our algorithm. That is, .
Our protocol is said to be secure if , where is the security parameter.
We have an bit key and , . Alice’s bit message is and Bob’s bits message is . Let there be number of zeros in the finite sequence . The UTP knows the value of if (when , the UTP knows that the communicated bits of Alice and Bob are same or different). Let us consider the following.

, where if is th zero in the finite sequence .

bit substring of , where , if is the th zero of the sequence .

bit substring of , where , if is the th zero of the sequence .

The UTP knows .
3.5.1 Security Analysis of our first Proposed Protocol
In our first protocol, we keep the th () message pair if and discard the others. Let Number of cases where , . Let us define some events first.

Keeping the th message bit pair .

Knowing our new message pair.

Guessing a random message pair of length .
So, , .
Thus, . Again, .
Now the expected value of . Substituting this in the above expression, we get and .
Hence the advantage is, .
Now
(assuming that .)
.
So for a predefined security parameter , if max, then , i.e., our protocol is secure. We can also adjust the value of
by padding some random message bits.
3.5.2 Security Analysis of our second Proposed Protocol
In our second protocol, we keep the th bit of Alice’s message if , the th bit of Bob’s message if , and discard the rest.
Let Number of cases where , . Let us define some events first.

Keeping , the th message bit of Alice.

Keeping , the th message bit of Bob.

Knowing Alice’s and Bob’s new message and respectively.

Guessing two random message and of length and respectively.
So, and .
Using the expectation of calculated earlier, we have . Again, .
Thus, the advantage of the UTP is, .
Now
(assuming that .)
.
So for a predefined security parameter , if max, then , i.e., our protocol is secure. We can also adjust the value of by padding some random message bits.
3.6 Difference Between Our Two Protocols
Both of our proposed protocols for quantum dialogue are modifications of the quantum dialogue protocol given in [42]. In these protocols, the UTP measures each two qubit state (one from Alice and one from Bob) in Bell basis and announces the result. Alice and Bob make a finite sequence