## 2 SNS Protocol with UB
### Security Analysis  
In the SNS protocol, Z-data are generated from effective events when [PERSON] ([PERSON]) sends a signal state while [PERSON] ([PERSON]) does not. Therefore, the security of the SNS protocol is equivalent to that of the BB84 protocol with a decoy-state scheme. Equation (2) holds under asymptotic conditions. However, the key challenge lies in accurately estimating \(s_{1}^{L},\mathrm{e}_{1}^{U}\). For X-data, when both communicating parties select decoy states of the same intensity, the output two-mode quantum state is given by \(|\varphi\rangle=|\sqrt{\pi}e^{i\delta_{A}}\rangle\otimes|\sqrt{\pi}e^{i\delta_ {B}}\rangle\), where \(\mu\) represents the average photon number of the decoy state. Although the random phases \(\delta_{A}\) and \(\delta_{B}\) in X-data satisfy Equation (1), indicating that \(\delta_{A}-\delta_{B}\) is not random, the value of \(\delta_{A}+\delta_{B}\)remains random. We define a new variable \(\delta_{\pm}=\delta_{A}\pm\delta_{B}\). Under this new variable, the output quantum state becomes [25]  
\[|\varphi\rangle=|\sqrt{\mu}e^{i\frac{\delta+\delta-}{2}}\rangle\otimes|\sqrt{\mu }e^{\frac{\delta+\delta-}{2}}\rangle. \tag{8}\]  
In [PERSON]'s view, the dual light field state can be regarded as a mixed state represented by \(|\varphi\rangle\) due to the random selection of \(\delta_{+}\) over the interval \([0,2\pi)\). Therefore, the SNS protocol confirms that after transmission through the channel, the dual light field state can be expressed as shown in Equation (9). \[\rho_{AB}=\sum_{k}p_{k}|\psi_{k}\rangle\langle\psi_{k}|. \tag{9}\]  
In Equation (9), \(|\psi_{k}\rangle\) denotes the component of the joint state of the two optical fields containing a total of \(k\) photons, while \(p_{k}\) represents the probability of this joint state occurring. This indicates that the decoy-state method can be applied to estimate the count rate and bit error rate of the single-photon component based on the X-data. Specifically, this applies to partial signals corresponding to zero-, single-, and two-photon components, where k = 0, 1, or 2 can be expressed as the following equations. \[|\psi_{0}\rangle=|0\rangle_{A}|0\rangle_{B},p_{0}=e^{-2\mu}, \tag{10}\]  
\[|\psi_{1}\rangle=\frac{1}{\sqrt{2}}(|0\rangle_{A}|1\rangle_{B}+e^{i\Delta}|1 \rangle_{A}|0\rangle_{B}),p_{1}=2\mu e^{-2\mu}, \tag{11}\]  
\[|\psi_{2}\rangle=\frac{1}{\sqrt{2}}(|0\rangle_{A}|2\rangle_{B}+2e^{i\Delta}|1 \rangle_{A}|1\rangle_{B}+e^{i2\Delta}|2\rangle_{A}|0\rangle_{B}),p_{2}=2\mu^{2 }e^{-2\mu}, \tag{12}\]  
\[\Delta=\delta_{A}+\gamma_{A}-\delta_{B}-\gamma_{B}. \tag{13}\]  
Under untrusted source conditions, as opposed to ideal light source conditions, each communicating party emits arbitrary quantum states as  
\[\left|\psi_{A(B)}\right\rangle=\sum_{n=0}^{\infty}e^{in(\delta_{A(B)}+\gamma_ {A(B)})}\sqrt{P_{n,A(B)}(\mu)}|n\rangle_{A(B)}. \tag{14}\]  
Referring to the SNS protocol [25], a new variable \(\delta_{\pm}=\delta_{A}\pm\delta_{B}\) is defined, which leads to [PERSON]'s observation that the joint state sent by the two communicating parties can be expressed as  
\[\rho_{AB}=\int_{0}^{2\pi}P(|\psi_{A}\rangle\otimes|\psi_{B}\rangle)d\delta_{+}, \tag{15}\]  
\(P(|x\rangle)=|x\rangle\langle x|\) refers to the density operator. Calculating and normalizing Equation (15) yields the result. \[\rho_{AB}=\sum_{n}p_{n}(\mu)|\psi_{n}\rangle\langle\psi_{n}|, \tag{16}\]  
\[|\psi_{n}\rangle=\frac{1}{\sqrt{P_{n}(\mu)}}\sum_{k=0}^{n}\sqrt{P_{k,A}(\mu) P_{n-k,B}(\mu)}|k\rangle_{A}|n-k\rangle_{B}, \tag{17}\]  
\[\rho_{AB}=\sum_{k}p_{k}|\psi_{k}\rangle\langle\psi_{k}|. \tag{9}\]0  
Further analysis shows that when the light source conditions of both communicating parties are consistent,  
\[\rho_{AB}=\sum_{k}p_{k}|\psi_{k}\rangle\langle\psi_{k}|. \tag{9}\]1  
the single-photon component of \(\rho_{AB}\) can be expressed as \[\rho_{AB}=\sum_{k}p_{k}|\psi_{k}\rangle\langle\psi_{k}|. \tag{9}\]2  
This means that the same results can be obtained as with ideal light sources even under untrusted light source conditions.