## 4 Security Analysis of the Intercept-and-Resend Attack  
[PERSON] can perform an intercept-and-resend attack, one of the well-known attacks achieved through randomly measuring qubits that [PERSON] sent in any of the two bases [63]. After that, [PERSON] forwards to [PERSON] the qubits prepared in states corresponding to her measurement outcomes [2]. For example, suppose we have an ordered set \(S=\{|0\rangle,|1\rangle,|+\rangle,|-\rangle\}\) of the possible states of the qubits; we can use the following probability transition matrix to represent the effect of [PERSON]'s actions:  
\[P_{E|A}=\left( \begin{array}{ccc}\frac{\cos^{2}\theta}{2}&\frac{\sin^{2} \theta}{2}&\frac{1}{4}(1-\sin 2\theta)&\frac{1}{4}(\sin 2\theta+1)\\ \frac{\sin^{2}\theta}{2}&\frac{\cos^{2}\theta}{2}&\frac{1}{4}(\sin 2\theta+1)& \frac{1}{4}(1-\sin 2\theta)\\ \frac{1}{4}(\sin 2\theta+1)&\frac{1}{4}(1-\sin 2\theta)&\frac{\cos^{2}\theta}{2}& \frac{\sin^{2}\theta}{2}\\ \frac{1}{4}(1-\sin 2\theta)&\frac{1}{4}(\sin 2\theta+1)&\frac{\sin^{2}\theta}{2}& \frac{\cos^{2}\theta}{2}\\ \end{array} \right), \tag{7}\]  
where the matrix elements represent the conditional probabilities \(p(e|a)\) obtained by [PERSON], given that [PERSON] prepares a particular state. Notably, \(p(a,e)\) denotes the joint probabilitythat [PERSON] prepares a state \(|\psi\rangle_{A}\in\{|0\rangle,|1\rangle,|+\rangle,|-\rangle\}\) and [PERSON] receives a state \(|\psi\rangle_{E}\in\{|0\rangle,|1\rangle,|+\rangle,|-\rangle\}\), given as follows:  
\[p(a,e)=p(e|a)p(a)=p(a|e)p(e), \tag{8}\]  
where \(p(a)=1/4\) represents the probability that [PERSON] prepares a state \(|\psi\rangle_{A}\in\{|0\rangle,|1\rangle,|+\rangle,|-\rangle\}\), while \(p(e)=1/4\) denotes the probability that [PERSON] acquires measurement outcomes that correspond to a state \(|\psi\rangle_{E}\in\{|0\rangle,|1\rangle,|+\rangle,|-\rangle\}\). Therefore, we can deduce that \(p(a|e)=p(e|a)\). As a result, in Table 1, we summarize the results of the joint probabilities according to the following:  
We can use mutual information to measure the amount of information that [PERSON] gains from each measurement. This is expressed as:  
\[I(A:E)=H(A)-H(A|E), \tag{9}\]  
where  
\[H(A)=-\sum_{i=1}^{4}p(i)\log_{2}p(i)=-\sum 4\Big{(}\frac{1}{4}\log_{2}\frac{1}{ 4}\Big{)}=-\log_{2}\frac{1}{4}, \tag{10}\]  
and  
\[H(A|E)= -\sum_{a,e}p(a,e)\log_{2}p(a|e)\] \[= -\Big{(}\frac{\cos^{2}\theta}{2}\log_{2}\frac{\cos^{2}\theta}{2}+ \frac{\sin^{2}\theta}{2}\log_{2}\frac{\sin^{2}\theta}{2}+\frac{1-\sin 2 \theta}{4}\log_{2}\frac{1-\sin 2\theta}{4}\] \[+\frac{1+\sin 2\theta}{4}\log_{2}\frac{1+\sin 2\theta}{4} \Big{)}. \tag{11}\]  
To simplify Equation (9), let \(\varepsilon=\sin^{2}\theta\). This implies that \(\varepsilon\) takes values that belong to \([0,1]\). If we substitute \(\varepsilon\) into Equation (9), it yields the following form:  
\[I(A:E)= -\log_{2}\frac{1}{4}+\frac{1-\varepsilon}{2}\log_{2}\frac{1- \varepsilon}{2}+\frac{\varepsilon}{2}\log_{2}\frac{\varepsilon}{2}+\frac{1- 2\sqrt{\varepsilon(1-\varepsilon)}}{4}\log_{2}\frac{1-2\sqrt{\varepsilon(1- \varepsilon)}}{4}\] \[+\frac{1+2\sqrt{\varepsilon(1-\varepsilon)}}{4}\log_{2}\frac{1+ 2\sqrt{\varepsilon(1-\varepsilon)}}{4}. \tag{12}\]  
We now analyze two types of intercept-and-resend methods that [PERSON] could engage. Firstly, [PERSON] could break the quantum channel between [PERSON] and [PERSON] and slide her devices between the communicating parties, as shown in Figure 1a. As a result, we find that the