## 4 Security Analysis of the Intercept-and-Resend Attack
\begin{table}
\begin{tabular}{c c c c c} \hline \multirow{2}{*}{**[PERSON] Sends**} & \multicolumn{4}{c}{**[PERSON] Obtains**} \\ \cline{2-5}  & \(|\emptyset\rangle\) & \(|\textbf{1}\rangle\) & \(|+\rangle\) & \(|-\rangle\) \\ \hline \(|0\rangle\) & \(\cos^{2}\theta/8\) & \(\sin^{2}\theta/8\) & \((1-\sin 2\theta)/16\) & \((1+\sin 2\theta)/16\) \\ \(|1\rangle\) & \(\sin^{2}\theta/8\) & \(\cos^{2}\theta/8\) & \((1+\sin 2\theta)/16\) & \((1-\sin 2\theta)/16\) \\ \(|+\rangle\) & \((1+\sin 2\theta)/16\) & \((1-\sin 2\theta)/16\) & \(\cos^{2}\theta/8\) & \(\sin^{2}\theta/8\) \\ \(|-\rangle\) & \((1-\sin 2\theta)/16\) & \((1+\sin 2\theta)/16\) & \(\sin^{2}\theta/8\) & \(\cos^{2}\theta/8\) \\ \hline \end{tabular}
\end{table} 
Table 1: A summary of joint probabilities when [PERSON] prepares a particular state and [PERSON] obtains measurement outcomes corresponding to each of the four states on qubits that [PERSON] sent. transition probability matrix, which describes the change between the states prepared by [PERSON] and those obtained by [PERSON], can be shown to be:  
\[P_{B|E}=\left( \begin{array}{ccc}\frac{\cos^{2}\phi}{2}&\frac{\sin^{2}\phi}{2}& \frac{1}{4}(1-\sin 2\phi)&\frac{1}{4}(\sin 2\phi+1)\\ \frac{\sin^{2}\phi}{2}&\frac{\cos^{2}\phi}{2}&\frac{1}{4}(\sin 2\phi+1)&\frac{1}{4}(1- \sin 2\phi)\\ \frac{1}{4}(\sin 2\phi+1)&\frac{1}{4}(1-\sin 2\phi)&\frac{\cos^{2}\phi}{2}& \frac{\sin^{2}\phi}{2}\\ \frac{1}{4}(1-\sin 2\phi)&\frac{1}{4}(\sin 2\phi+1)&\frac{\sin^{2}\phi}{2}& \frac{\cos^{2}\phi}{2}\end{array} \right). \tag{13}\]  
The matrix \(P_{A,B}\), which denotes the joint probabilities of [PERSON] and [PERSON]'s states, can be calculated as follows:  
\[P_{A,B}=\frac{1}{4}\times P_{E|A}\times P_{B|E}. \tag{14}\]  
In Table 2, we summarize the joint probabilities, and based on this strategy, elements in the table are provided as:  
\[a =\frac{\cos^{2}\theta}{8}\times\frac{\cos^{2}\phi}{2}+\frac{\sin^{ 2}\theta}{8}\times\frac{\sin^{2}\phi}{2}+\frac{1-\sin 2\theta}{16}\times \frac{1+\sin 2\phi}{4}+\frac{1+\sin 2\theta}{16}\times\frac{1-\sin 2\phi}{4}, \tag{15}\] \[b =\frac{\cos^{2}\theta}{8}\times\frac{\sin^{2}\phi}{2}+\frac{\sin^ {2}\theta}{8}\times\frac{\cos^{2}\phi}{2}+\frac{1-\sin 2\theta}{16}\times \frac{1-\sin 2\phi}{4}+\frac{1+\sin 2\theta}{16}\times\frac{1+\sin 2\phi}{4},\] (16) \[c =\frac{\cos^{2}\theta}{8}\times\frac{1-\sin 2\phi}{4}+\frac{\sin^{ 2}\theta}{8}\times\frac{1+\sin 2\phi}{4}+\frac{1-\sin 2\theta}{16}\times \frac{\cos^{2}\phi}{2}+\frac{1+\sin 2\theta}{16}\times\frac{\sin^{2}\phi}{2},\] (17) \[d =\frac{\cos^{2}\theta}{8}\times\frac{1+\sin 2\phi}{4}+\frac{\sin^{ 2}\theta}{8}\times\frac{1-\sin 2\phi}{4}+\frac{1-\sin 2\theta}{16}\times \frac{\sin^{2}\phi}{2}+\frac{1+\sin 2\theta}{16}\times\frac{\cos^{2}\phi}{2}. \tag{18}\]  
During the sifting stage, the terms \(c\) and \(d\) in Table 2 reduce to zero. Accordingly, \(Q\), after sifting, becomes:  
\[Q=\frac{b}{a+b}=\frac{2-\cos 2(\theta+\phi)}{4}. \tag{19}\]  
Figure 1: An illustration of the two intercept-and-resend attack strategies. The quantum channel is denoted by straight arrows, while dashed arrows depict lossless classical channels. (**a**) [PERSON] breaks the quantum channel between [PERSON] and [PERSON] and places her devices between the two parties. (**b**) [PERSON] places her preparation device at a location close to, possibly inside, [PERSON]’s lab and connects her measurement and preparation devices by a lossless classical channel. The letters P and M represent preparation and measurement devices, respectively. However, in the case where \(\theta=\phi\), which means that the level of noise in both channels is equal, then \(Q\) becomes  
\[Q_{1}=\frac{1+2\sin^{2}2\theta}{4}. \tag{20}\]  
As the second eavesdropping strategy that [PERSON] could deploy, the preparation device is placed near, or even where possible, inside [PERSON]'s lab. After that, [PERSON] links the measurement and preparation devices using a lossless classical channel [63]. This is shown in Figure 1b.