A PRNG, or pseudorandom number generator, is a function that produces numbers that look random but are generated by an algorithm. A PRNG is useful when software needs unpredictable-looking values for testing, sampling, games, or interface behavior. In security, though, the quality of the generator matters: if the output can be predicted, the whole cryptographic process can fail.
Cyber attackers often target weak PRNGs because predictable values can expose session tokens, nonces, salts, IVs, or even wallet seeds. If a program uses a non-cryptographic PRNG or seeds it with time or other low-entropy data, an attacker may be able to guess future outputs and recreate secret material. Defenders avoid this by using cryptographically secure random number generators for anything that protects identity, encryption, or key generation. In practice, a safe PRNG choice is one of the simplest ways to prevent a serious compromise.


