Same Seed in PRNGID: 336 | Date: (C)2012-05-14 (M)2022-10-10 |
Type: weakness | Status: DRAFT |
Abstraction Type: Base |
Description
A PRNG uses the same seed each time the product is initialized.
If an attacker can guess (or knows) the seed, then he/she may be able to
determine the "random" number produced from the PRNG.
Applicable PlatformsLanguage Class: All
Time Of Introduction
- Architecture and Design
- Implementation
Common Consequences
Scope | Technical Impact | Notes |
---|
OtherAccess_Control | OtherBypass protection
mechanism | |
Detection MethodsNone
Potential Mitigations
Phase | Strategy | Description | Effectiveness | Notes |
---|
Architecture and Design | | Do not reuse PRNG seeds. Consider a PRNG that periodically re-seeds
itself as needed from a high quality pseudo-random output, such as
hardware devices. | | |
Architecture and DesignRequirements | Libraries or Frameworks | Use products or modules that conform to FIPS 140-2 [R.336.1] to avoid
obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random
Number Generators"). | | |
Relationships
Related CWE | Type | View | Chain |
---|
CWE-336 ChildOf CWE-905 | Category | CWE-888 | |
Demonstrative Examples (Details)
- The following Java code uses the same seed value for a statistical
PRNG on every invocation.
White Box Definitions None
Black Box Definitions None
Taxynomy Mappings
Taxynomy | Id | Name | Fit |
---|
PLOVER | | Same Seed in PRNG | |
CERT Java Secure Coding | MSC02-J | Generate strong random numbers | |
References:
- Information Technology Laboratory, National Institute of
Standards and Technology .SECURITY REQUIREMENTS FOR CRYPTOGRAPHIC
MODULES. 2001-05-25.