Inter CPU 中 RDRAND and RDSEED的區別
在考慮製作測試真正隨機數生成卦的時候,發現有文件指出,RDSEED 和 RDRAND 的區別是 RDRAND 採用的是 128-bit AES 密鑰的 CTR-DRBG,而 RDSEED 則是直接從真隨機數發生器中獲得輸出(兩者並不是直接使用真隨機發生器的輸出,這些輸出是做過 AES-CBC-MAC 處理的,防止外界通過觀測輸出瞭解內部運行的細節)
在Inter的《The Difference Between RDRAND and RDSEED》中指出,兩者使用間的區別:
“The decision process for which instruction to use is mercifully simple, and based on what the output will be used for.
- If you wish to seed another pseudorandom number generator (PRNG), use RDSEED
- For all other purposes, use RDRAND
That's it. RDSEED is intended for seeding a software PRNG of arbitrary width. RDRAND is intended for applications that merely require high-quality random numbers.”
如果打算用來作為其它偽隨機數生成器的種子的時候那麼就可以考慮RDSEED,不然就使用RNRAND。
