## 3 Security Analysis
### Parameter Estimation in the Asymptotic Case
Under the weak randomness model, [PERSON] wants to get more information, so she (he) may perform the attenuation operation on the quantum states from a random part by a certain probability, but cannot perform that on the quantum states from a non-random part. The attacker's attenuation operation increases the non-randomness of the quantum states reaching [PERSON], which leads to the increasing of the amount of information controlled by [PERSON]. Because of the attenuation operation, we can assume that the bit error rate only happens in the random part, while the non-random part does not produce bit errors. As long as [PERSON] controls the attenuation to make the final error rate less than a reasonable value, [PERSON] and [PERSON] cannot detect the presence of [PERSON], so [PERSON] implements a weak-random attack. In this case, the non-random probability on [PERSON]'s side can be amplified by considering the signal loss so that the maximal transmission distance may be seriously decreased and the single photon counting rate in \(Z\) windows \(s_{1}^{Z}\), which is used to generate the secret key, decreases, and the bit error rate in \(X\) windows \(e_{1}^{X}\) increases. Then, we estimate the parameters within the effects of weak randomness on SNS TF-QKD in the asymptotic case. Firstly, we may analyze the state preparation step under the weak randomness condition. In the case where both [PERSON] and [PERSON] choose a signal window, [PERSON] then sends quantum states and [PERSON] does not send quantum states, or [PERSON] sends quantum states and [PERSON] does not send quantum states, and the probability of the states prepared by [PERSON] or [PERSON] with randomness is \(2p_{z0}(1-p_{z0})\mu_{z}e^{-\mu_{z}}(1-p_{1})(1-p_{2})\), and the probability with non-randomness is \(2p_{z0}(1-p_{z0})\mu_{z}e^{-\mu_{z}}(1-(1-p_{1})(1-p_{2}))=2p_{z0}(1-p_{z0})\mu _{z}e^{-\mu_{z}}(p_{1}+p_{2}-p_{1}p_{2})\). Here, the probability of quantum states with non-randomness prepared by [PERSON] is \(p_{1}\), and the probability of quantum states with non-randomness prepared by [PERSON] is \(p_{2}\). In the practical QKD system, [PERSON] can control the attenuation of the quantum states in the channel, and only attenuates the quantum states of the random part to ensure that the non-random part of the quantum states reach [PERSON] without attenuation. At the [PERSON]'s side, the proportion of non-random quantum states from the non-random part increases, and the proportion of quantum states from the random part decreases. In order to acquire more information, [PERSON] may make the non-random scale of [PERSON] as large as possible. To ensure that she (he) may not be detected by both communicators, [PERSON] must control the probability of attenuation or the attack will fail. Here, we calculate the probability of signal loss of the coherent states from the random set:  
\[p_{loss1}=2p_{z0}(1-p_{z0})\mu_{z}e^{-\mu_{z}}\frac{s_{1}^{Z}-(p_{1}+p_{2}-p_{1 }p_{2})}{1-(p_{1}+p_{2}-p_{1}p_{2})}, \tag{5}\]  
From the Equation (5), we can conclude the proportion of quantum states reaching [PERSON] with non-randomness:  
\[p_{non-rand1}=\frac{p_{1}+p_{2}-p_{1}p_{2}}{s_{1}^{Z}}, \tag{6}\]  
The proportion of quantum states reaching [PERSON] with randomness is:  
\[p_{rand1}=\frac{s_{1}^{Z}-(p_{1}+p_{2}-p_{1}p_{2})}{s_{1}^{Z}}. \tag{7}\]  
Since the quantum states of the random part are attenuated, the effective counting rate \(s_{1}^{Z}\) in the \(Z\) window and the bit error rate \(e_{1}^{X}\) in the X window will change. In fact, the quantum states of the non-random set cannot generate the security key, and only the quantum states of the random set may generate the security key.