在通訊科技發達的現代,亂數的存在變得愈來愈重要,很多加密演算法其實就會需要亂數來讓其加密的結果更不容易被破解,所以亂數的品質就變得愈來愈重要,傳統的電腦習慣使用偽亂數,但偽亂數最大的問題就是背後有公式,一旦被發現公式整套亂數系統就不能使用,所以我們希望可以找到一個能產生足夠亂且背後無公式的亂數產生方法。 我們使用的方法是利用量子的技巧去產生亂數,因為量子本身就有隨機性存在,所以利用這種自然性質產生的亂數就符合無公式的要求,然而產生出來的亂數還是有可能不夠亂,所以這時候就需要萃取器去把亂數再進一步打亂,我們這邊比較了兩種萃取器,Hashing和Trevisan,結果Hashing在萃取結果上不但不輸Trevisan,效率還遠超過後者。 同時我們也分析源頭在怎麼樣的設定下可以產生出品質比較好的原始亂數,這樣再配上我們的萃取器就可以錦上添花,讓亂數的品質提升再提升,首先我們理論推導出光源愈squeeze萃取出來的有效位元數就愈多,第二個發現是在沒有鎖頻的情況下,頻寬愈高產生出來的亂數愈好,鎖頻的情況則無明顯差異,第三個發現是取樣頻率愈慢產生出來的亂數品質也會愈好,第四個發現是1055nm的光源會比1064nm的光源表現得更好,最後把取樣頻率設定成兩倍的低通濾波器頻率也會讓產生出來的亂數品質比較好。 最後我們評價亂數品質是使用autocorrelation和NIST的亂數標準,在我們的實驗中不管亂數原始的品質如何,在經過我們萃取之後autocorrelation幾乎都可以獲得改善,NIST的測試也會因為萃取過而有獲得改善。
In the modern era of advanced communication technology, the presence of random number has become increasingly important. Many encryption algorithms actually rely on random number to make their encryption results harder to crack. Therefore, the quality of random number is becoming more and more crucial. Traditional computers typically use pseudorandom numbers, but the biggest problem with pseudorandom numbers is that they are generated based on formulas. Once the formula is discovered, the entire random number system becomes compromised. Therefore, we aim to find a method that can produce sufficiently random numbers without any underlying formula. The method we use is based on quantum techniques to generate random number. Since quantum mechanics inherently involves randomness, random number generated through these natural properties meets the requirement of having no underlying formula. However, the generated randomness may still not be sufficiently random, so a random number extractor is needed to further shuffle the random number. We compared two types of extractors: Hashing and Trevisan, and found that Hashing not only performs as well as Trevisan in terms of the extraction result but is also much more efficient. At the same time, we analyzed the conditions under which the source can generate better-quality raw random number. With our extractor, we can further enhance the quality of random number. First, we theoretically deduced that the more the light source is squeezed, the more effective bits can be extracted. The second finding is that in the absence of frequency locking, higher bandwidth produces better random number. However, there is no significant difference when frequency locking is applied. The third finding is that a slower sampling frequency results in better-quality random number. The fourth finding is that a 1055nm light source performs better than a 1064nm light source. Finally, setting the sampling frequency to twice the low-pass filter cutoff frequency also improves the quality of the generated random number. Lastly, we evaluate the quality of the random numbers using autocorrelation and the NIST random number standard. In our experiments, regardless of the original quality of the random numbers, the autocorrelation is almost always improved after our extraction process, and the NIST tests also show improvement due to the extraction.