X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=release%2Fman4%2Frandom.4;fp=release%2Fman4%2Frandom.4;h=b8d93161a20bf51f54aadd10ca737584cb405453;hb=c800968123c1f3d1053d2bccf84d6478601ba9c4;hp=defb49da7fe1ed535930d11b6e56eb77b25c81d6;hpb=eec286a8d4482074ffbfd3c794bad739235f2890;p=linuxjm%2FLDP_man-pages.git diff --git a/release/man4/random.4 b/release/man4/random.4 index defb49da..b8d93161 100644 --- a/release/man4/random.4 +++ b/release/man4/random.4 @@ -58,17 +58,13 @@ random, urandom \- カーネル乱数ソースデバイス 利用可能なデータが返される。 利用可能なバイトが全くない場合、 \fBread\fP(2) は \-1 を返し、 \fIerrno\fP に \fBEAGAIN\fP が設定される。 .LP -A read from the \fI/dev/urandom\fP device will not block waiting for more -entropy. If there is not sufficient entropy, a pseudorandom number -generator is used to create the requested bytes. As a result, in this case -the returned values are theoretically vulnerable to a cryptographic attack -on the algorithms used by the driver. Knowledge of how to do this is not -available in the current unclassified literature, but it is theoretically -possible that such an attack may exist. If this is a concern in your -application, use \fI/dev/random\fP instead. \fBO_NONBLOCK\fP has no effect when -opening \fI/dev/urandom\fP. When calling \fBread\fP(2) for device -\fI/dev/urandom\fP signals will not be handled until after the requested random -bytes have been generated. +\fI/dev/urandom\fP デバイスから読み出しでは、 エントロピーがより高くなるのを待つためのブロックは行われない。 +十分なエントロピーがない場合、 要求されたバイトを作成するのに疑似乱数生成器が使用される。 その結果、 +この場合の返り値はこのドライバで使われているアルゴリズムに基づく暗号攻撃に対して、 論理的には弱くなることになる。 +この攻撃をどのように行うかという事については、現在研究論文などの 形で入手できる資料はない、しかし、そのような攻撃は論理的に存在可能である。 +もし、この事が心配なら、(\fI/dev/urandom\fP ではなく) \fI/dev/random\fP を利用すればいい。 \fBO_NONBLOCK\fP は +\fI/dev/urandom\fP をオープンする際には効果がない。 デバイス \fI/dev/urandom\fP に対して \fBread\fP(2) +を呼び出した際、 要求されたランダムバイトが生成されるまでシグナルは処理されない。 .LP \fI/dev/random\fP や \fI/dev/urandom\fP に書き込みを行うと、 書き込まれたデータでエントロピー・プールが更新される。 しかし、 エントロピー・カウントが増えるわけではない。 つまり、 \fI/dev/random\fP と \fI/dev/urandom\fP