Description
The device uses an algorithm that is predictable and generates a pseudo-random number.
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.
Potential Impact
Confidentiality
Read Application Data
Demonstrative Examples
reg in_sr, entropy16_valid;
reg [15:0] entropy16;
assign entropy16_o = entropy16;
assign entropy16_valid_o = entropy16_valid;
always @ (*)
begin
in_sr = ^ (poly_i [15:0] & entropy16 [15:0]);
endMitigations & Prevention
It is highly recommended to use a true random number generator (TRNG) to ensure the security of encryption schemes. Hardware-based TRNGs generate unpredictable, unbiased, and independent random numbers because they employ physical phenomena, e.g., electrical noise, as sources to generate random numbers.
It is highly recommended to use a true random number generator (TRNG) to ensure the security of encryption schemes. Hardware-based TRNGs generate unpredictable, unbiased, and independent random numbers because they employ physical phenomena, e.g., electrical noise, as sources to generate random numbers.
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2021-3692 | PHP framework uses mt_rand() function (Marsenne Twister) when generating tokens |
Related Weaknesses
Frequently Asked Questions
What is CWE-1241?
CWE-1241 (Use of Predictable Algorithm in Random Number Generator) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The device uses an algorithm that is predictable and generates a pseudo-random number.
How can CWE-1241 be exploited?
Attackers can exploit CWE-1241 (Use of Predictable Algorithm in Random Number Generator) to read application data. This weakness is typically introduced during the Architecture and Design, Implementation phase of software development.
How do I prevent CWE-1241?
Key mitigations include: It is highly recommended to use a true random number generator (TRNG) to ensure the security of encryption schemes. Hardware-based TRNGs generate unpredictable, unbiased, and independent random number
What is the severity of CWE-1241?
CWE-1241 is classified as a Base-level weakness (Medium abstraction). It has been observed in 1 real-world CVEs.