What are the exhaustion characteristics of RDRAND on Ivy Bridge?

前端 未结 3 793
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-04 09:36

After reviewing the Intel Digital Random Number Generator (DRNG) Software Implementation Guide, I have a few questions about what happens to the internal state of the genera

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-04 09:57

    Regarding 2: http://download.intel.com/products/processor/manual/253665.pdf, 7.3.17

    The CF indicates that the demand for random data exceeds the throughput of the DRNG.

    Regarding 1:

    If it is performance you are concerned about, why not read 64bit random value from the DRNG, then you can read 2bits from that 32 times, before you need to call the instruction again. You don't have to invoke new rdrand every time you need to bits.

提交回复
热议问题