Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MSC02-EX0: Using the default constructor for java.util.Random applies a seed value that is "very likely to be distinct from any other invocation of this constructor" [API 2006] and may improve security marginally. As a result, it may be used only for noncritical applications operating on nonsensitive data. Java's default seed uses the system's time in milliseconds. When used, explicit documentation of this exception is required.

...

CVE-2006-6969

Related Guidelines

SEI CERT C Coding Standard

MSC30-C. Do not use the rand() function for generating pseudorandom numbers

SEI CERT C++ Coding Standard

MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers

MITRE CWE

CWE-327. Use of a broken or risky cryptographic algorithm

 

CWE-330. Use of insufficiently random values

 

CWE-332. Insufficient entropy in PRNG

 

CWE-336. Same seed in PRNG

 

CWE-337. Predictable seed in PRNG

Bibliography

[API 2006

Class Random

[API 2006]

Class SecureRandom

[FindBugs 2008]

BC. Random objects created and used only once

[Monsch 2006]

 

 

...