CWE一覧に戻る
CWE-335

疑似乱数生成器(PRNG)におけるシードの誤った使い方

Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG)
脆弱性 レビュー中
JA

この製品は疑似乱数生成器(PRNG)を使用していますが、シードを正しく管理していません。

PRNGは決定論的であり、その出力はランダムに見えるが
実際にエントロピーを生み出すことはできない。エントロピーのためには
暗号的に安全でユニークなシードに依存する。
適切なシーディングはPRNGの安全な動作に不可欠である。
PRNGの安全な運用には適切なシーディングが不可欠である。

シードの管理は主に2つの分野に分けられる:

PRNGは入力としてシードを必要とする。
PRNGは、乱数と機能的に区別できない数のストリームを生成するために、入力としてシードを必要とする。
PRNGは、乱数と機能的に区別できない数のストリームを生成するために、入力としてシードを必要とする。 この出力は多くの場合、暗号の用途には十分である、
暗号の用途には十分であるが、PRNGの出力は
PRNGの出力は、入力として提供されるシードによって直接決定される。
によって直接決定される。シードが第三者によって確認できる場合、PRNGの全出力は第三者に知られることになる、
PRNGの全出力を知ることができる。
となります。そのため、シードは秘密にしておく必要があります。
推測できないことが理想的です。例えば
はシードとしては不適切かもしれない。PRNGがシードされた
PRNGがシードされたおおよその時間を知ることで
可能な鍵空間が大幅に減少する。

シードは必ずしも一意である必要はないが、シードを再利用すると、シードが発見された場合に攻撃を受ける可能性がある。

EN

The product uses a Pseudo-Random Number Generator (PRNG) but does not correctly manage seeds.

PRNGs are deterministic and, while their output appears
random, they cannot actually create entropy. They rely on
cryptographically secure and unique seeds for entropy so
proper seeding is critical to the secure operation of the
PRNG.

Management of seeds could be broken down into two main areas:

PRNGs require a seed as input to generate a stream of
numbers that are functionally indistinguishable from
random numbers. While the output is, in many cases,
sufficient for cryptographic uses, the output of any
PRNG is directly determined by the seed provided as
input. If the seed can be ascertained by a third party,
the entire output of the PRNG can be made known to
them. As such, the seed should be kept secret and
should ideally not be able to be guessed. For example,
the current time may be a poor seed. Knowing the
approximate time the PRNG was seeded greatly reduces
the possible key space.

Seeds do not necessarily need to be unique, but reusing seeds may open up attacks if the seed is discovered.

Scope: Access Control, Other / Impact: Bypass Protection Mechanism; Other
MITRE公式ページ — CWE-335