OSDN Git Service

Update random.4
authorAkihiro MOTOKI <amotoki@gmail.com>
Sun, 11 Jan 2015 11:56:14 +0000 (20:56 +0900)
committerAkihiro MOTOKI <amotoki@gmail.com>
Sun, 11 Jan 2015 11:56:14 +0000 (20:56 +0900)
draft/man4/random.4

index defb49d..b8d9316 100644 (file)
@@ -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