8

Linux では、 はどのくらいランダムなの/dev/urandom/でしょうか? 安全と見なされますか?

また、1 のストリームを取得することは可能ですか?

4

3 に答える 3

9

4.5 年後: これは悪いアドバイスです。詳細については、これらの リンクのいずれかを参照してください。

Linux で暗号化キーを生成している場合は/dev/random、たとえそれがブロックされたとしても、多くのビットは必要ありません。

ランダムなテスト データの生成や予測不可能なセッション ID の生成など、それ以外の場合/dev/urandomは問題ありません。ほとんどのシステムには、出力が予測できないほどのエントロピーのソース (キーボードとマウスのイベントのタイミング、ネットワーク パケットなど) があります。

于 2009-12-08T19:35:50.217 に答える
4

マニュアルページを確認してください:

Yarrow is a fairly resilient algorithm, and is believed to be resistant
     to non-root.  The quality of its output is however dependent on regular
     addition of appropriate entropy. If the SecurityServer system daemon
     fails for any reason, output quality will suffer over time without any
     explicit indication from the random device itself.

     Paranoid programmers can counteract this risk somewhat by collecting
     entropy of their choice (e.g. from keystroke or mouse timings) and seed-
     ing it into random directly before obtaining important random numbers.
于 2009-12-08T18:35:50.393 に答える