CWE-1241 · Słabość
Use of Predictable Algorithm in Random Number Generator
- Abstrakcja
- Bazowa
- Status
- Szkic
- Dodano
- 10 lutego 2020
- Ostatnia zmiana
- 11 grudnia 2025
Opis
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.
Skutki
Confidentiality
Read Application Data
Zapobieganie
Architecture and Design
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.
Implementation
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.
Przykłady podatności
- CVE-2021-3692 PHP framework uses mt_rand() function (Marsenne Twister) when generating tokens
Słabość nadrzędna
Kiedy powstaje
- Architecture and Design
- Implementation — In many cases, the design originally defines a cryptographically secure random number generator, but is then changed during implementation due to unforeseen constraints.
Dotyczy
System on Chip
Uwagi
As of CWE 4.5, terminology related to randomness, entropy, and predictability can vary widely. Within the developer and other communities, "randomness" is used heavily. However, within cryptography, "entropy" is distinct, typically implied as a measurement. There are no commonly-used definitions, even within standards documents and cryptography papers. Future versions of CWE will attempt to define these terms and, if necessary, distinguish between them in ways that are appropriate for different communities but do not reduce the usability of CWE for mapping, understanding, or other scenarios.
Źródła
- rng_16.v — 2021
Wpis z katalogu CWE 4.20.