2031
Weakness ID : 1241
Structure : Simple
Abstraction : Base
Description
The device uses an algorithm that is predictable and generates a pseudo-random number.
Extended Description
Pseudo-random number generator algorithms are predictable because their registers have a finite
number of possible states, which eventually lead to repeating patterns. As a result, pseudo-random
number generators (PRNGs) can compromise their randomness or expose their internal state
to various attacks, such as reverse engineering or tampering. It is highly recommended to use
hardware-based true random number generators (TRNGs) to ensure the security of encryption
schemes. TRNGs generate unpredictable, unbiased, and independent random numbers because
they employ physical phenomena, e.g., electrical noise, as sources to generate random numbers.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 330 Use of Insufficiently Random Values 814
Relevant to the view "Software Development" (CWE-699)
Nature Type ID Name Page
MemberOf 1213 Random Number Issues 2477
Applicable Platforms
Technology : System on Chip (Prevalence = Undetermined)
Common Consequences
Scope Impact Likelihood
Confidentiality Read Application Data High
Potential Mitigations
Phase: Architecture and Design
A true random number generator should be specified for cryptographic algorithms.
Phase: Implementation
A true random number generator should be implemented for cryptographic algorithms.
Demonstrative Examples
Example 1:
Suppose a cryptographic function expects random value to be supplied for the crypto algorithm.
During the implementation phase, due to space constraint, a cryptographically secure randomnumber-
generator could not be used, and instead of using a TRNG (True Random Number
Generator), a LFSR (Linear Feedback Shift Register) is used to generate a random value. While an
LFSR will provide a pseudo-random number, its entropy (measure of randomness) is insufficient for
a cryptographic algorithm.
Example 2:
CWE Version 4.14
CWE-1241: Use of Predictable Algorithm in Random Number Generator
CWE-1241: Use of Predictable Algorithm in Random Number Generator