## 4 Results and Analysis  
Figure 8 shows the variation curve of BER measured by Alice. The red curve represents the BER curve measured when the bases of Alice and Bob are inconsistent. The green curve represents the BER curve measured when both bases are consistent. The data length N for BER measurements are 100-bit, 200-bit, 500-bit and 1000-bit, respectively. It can be seen that the BER with consistency basis is significantly lower than the BER with inconsistency basis. The average BER of all data is expressed as C, which is taken as the judgment threshold. C is the average value of BER. When the BER is higher than C, the basis is considered consistent; when the BER is lower than C, the basis is considered inconsistent. For the case of consistent basis, Basis A is coded as 1 and Basis B is coded as 0. With the increase of N, the sampling points of BER become sparse, and the corresponding key encoding rate decreases. At this time, the BER is further away from the mean C and the key consistency rate rises. Since [PERSON] only knows whether the bases of [PERSON] and [PERSON] are the same, it does  
Figure 7: Spectrogram of data (**a**) before and (**b**) after down sampling.  
not know the specific bases used by [PERSON] and [PERSON]. Therefore, [PERSON] cannot get the key and the security of the system is guaranteed.  
The meaning of not sending data is only a hypothesis made in this paper, and this paper does not consider the situation of sending data. If [PERSON] can send data, it involves authentication-related fields. You can judge whether [PERSON] has replaced [PERSON] by measuring the strength change of the signal and other factors. If [PERSON] and [PERSON] declare a basis, doing so would make the generated key unsafe because [PERSON] would have the correct key. Man-in-the-middle attacks, which must be resolved through authentication, are another area of research. The application scenario of this paper is only for the way of spectral eavesdropping, and other attack methods are not discussed in this article.  
We followed the following steps: 10 kpbs = 1E9/1E5 = 1E4; divide 1E9 bit/s by 1000 bits to get the BER of 1E6. Because we use 1000 bits to calculate a BER, we can get 1E6 BERs. After quantization, encoding and key post-processing, the negotiated key needs to discard some invalid keys during the negotiation process, which reduces the key rate and finally obtains 1E4 keys. Figure 9a shows the relationship between the key distribution rate and the BER sampling interval. With the increase of the BER sampling interval, the key distribution rate decreases. When the BER sampling interval is 0.3 us, the key distribution rate is 10 kbit/s. Figure 9b shows the relationship between key consistency rate and BER sampling interval. As the BER sampling interval increases, the key consistency rate increases gradually. When the BER sampling interval is 0.3 us, the key consistency rate reaches 98%. Figure 9c shows the relationship between the 0/1 proportion of the key and the BER sampling interval. The 0/1 proportion of the key fluctuates around 50%, which indicates that the key has good randomness. When the segment length is greater than 0.3 us, the key consistency rate is greater than 98%, and the error correction coding can be used to further improve the key consistency rate. The key negotiated in this scheme is random--mainly because the optical quantum noise itself is a truly random noise--the BER obtained is also random, and the key negotiated is also random.  
Figure 8: BER variation curves of same-basis and different-basis.