# Tripartite Quantum Key Distribution Implemented with Imperfect Sources
## 4 Security Analysis  
After completing the required rounds to extract a raw key, the three legitimate parties possess bit strings that are partially correlated. Thus, the parameter estimation step follows this to compute the bit error rate (BER) measured on a key basis. The quantum bit error rate is expressed as  
\[E_{Z_{A}Z_{B}Z_{C}}=\frac{Y_{QZ_{QZ_{1}Z_{2}}}^{Z}+Y_{QZ_{1}Z_{1Z}}^{Z}+Y_{1Z_{2} \partial_{2}1_{Z}}^{Z}+Y_{1Z_{2}\partial_{2}U_{2}}^{Z}+Y_{1Z_{2}\partial_{2}}^ {Z}+Y_{QZ_{1}\partial_{2}}^{Z}}{Y_{QZ_{0}2_{1Z}}^{Z}+Y_{QZ_{1}Z_{2}\partial_{ 2}}^{Z}+Y_{1Z_{2}\partial_{2}U_{2}}^{Z}+Y_{1Z_{2}\partial_{2}}^{Z}+Y_{0Z_{1} \partial_{2}U_{2}}^{Z}+Y_{0Z_{2}\partial_{2}U_{2}}^{Z}+Y_{1Z_{2}\partial_{2}}^ {Z}}. \tag{11}\]  
The notation \(Y_{I_{Z}\partial_{2}U_{2}}^{Z}\) represents the probability that [PERSON] prepares the states \(|\phi_{I\!Z}\rangle\) and [PERSON] and [PERSON] select the \(Z\) basis and obtain the bit values \(k\) and \(m\) when they measure their systems. The results obtained by measuring the complementary bases are employed to evaluate the information gained by [PERSON]. To estimate the knowledge of [PERSON] about the key, a depolarising channel is considered where \(E_{ZZZ}\leq 15.9\%\)[30]. As a result, the bound on [PERSON]'s knowledge of the key is found, per [51], to be  
\[I_{E}=(1-E_{Z_{A}Z_{B}Z_{C}})h\Bigg{(}\frac{1+u_{\max}}{2}\Bigg{)}-E_{Z_{A}Z_{ B}Z_{C}}h\Bigg{(}\frac{1+v(u_{\max})}{2}\Bigg{)}+E_{Z_{A}Z_{B}Z_{C}}\text{log}_{2}7, \tag{12}\]  
where  
\[u_{\max}=\min\Bigg{[}\frac{1}{1-E_{Z_{A}Z_{B}Z_{C}}}\sqrt{C/4},1\Bigg{]},\]  
\[v(u_{\max})=\sqrt{\frac{49}{19}\Big{[}C/4-(1-E_{Z_{A}Z_{B}Z_{C}})^{2}u_{\max} ^{2}\Big{]}}/E_{Z_{A}Z_{B}Z_{C}}.\]  
The statistical quantity, \(C\), is defined as follows:  
\[C= \langle X_{A}X_{B}X_{C}\rangle^{2}+\langle X_{A}Y_{B}X_{C} \rangle^{2}+\langle X_{A}X_{B}Y_{C}\rangle^{2}+\langle Y_{A}X_{B}X_{C}\rangle^ {2}+\langle Y_{A}Y_{B}X_{C}\rangle^{2} \tag{14}\] \[+\langle Y_{A}X_{B}Y_{C}\rangle^{2}+\langle Y_{A}Y_{B}Y_{C} \rangle^{2}+\langle X_{A}Y_{B}Y_{C}\rangle^{2}.\]  
The term \(\langle I_{A}I_{B}I_{C}\rangle\) where \(\Gamma\in\{X,Y\}\) indicates an expectation value that [PERSON] will prepare the two states according to basis \(I_{A}\) and [PERSON] and [PERSON] will perform measurements on bases \(I_{B}\) and \(I_{C}\) on the states they receive, respectively. Moreover, one can demonstrate that the statistical quantity \(C\) does not depend on the value of \(\beta\) by substituting the relations \(X_{B}\), \(Y_{B}\) and \(X_{C}\), \(Y_{C}\) in Equation (14). In order to estimate \(C\), the quantity \(\beta\) is allowed to change slowly in sufficiently brief intervals, allowing the exchange of a secure key. Typically, a QKD experiment runs for a considerable length of time in order to acquire sufficient data to estimate the average values used to compute the parameter \(C\) in Equation (14). During this time, the drift of reference frames erodes the estimated correlations and reduces the value of \(C\), thus compromising the security of the key generation protocol. Therefore, in order for the protocol to be secure, the communicating parties must collect enough signals to generate a key above the finite size effects in an interval that allows for minimal variation of \(\beta\). If a longer key is required, the communication parties can terminate the protocol after collecting a certain number of signals and restart the protocol several times until a long enough key is acquired. In terms of error rates, the expression in Equation (14) can be expressed as  
\[C =(1-2E_{X_{A}X_{B}X_{C}})^{2}+(1-2E_{X_{A}X_{B}Y_{C}})^{2}+(1-2E_ {X_{A}Y_{B}Y_{C}})^{2}+(1-2E_{Y_{A}X_{B}X_{C}})^{2} \tag{15}\] \[+(1-2E_{Y_{A}Y_{B}X_{C}})^{2}+(1-2E_{X_{A}Y_{B}X_{C}})^{2}+(1-2E_ {Y_{A}X_{B}Y_{C}})^{2}+(1-2E_{Y_{A}Y_{B}Y_{C}})^{2}.\]  
The above error rates are evaluated by following the technique in [41], which is based on the complementarity principle introduced by [PERSON] [44, 45].