Pseudorandom Number Generator (PRNG)

Updated Aug 1, 2026

A pseudorandom number generator (PRNG) is an algorithm that produces a sequence of numbers that appears random but is generated by a deterministic process. Starting from an initial value called a seed, the algorithm applies a fixed mathematical formula to produce each subsequent number. Given the same seed, a PRNG always produces the same sequence.

Key facts

  • PRNGs are deterministic. The output only looks random. Anyone who knows the seed and the algorithm can reproduce the entire sequence.

  • A cryptographically secure PRNG (CSPRNG) is a PRNG built to resist prediction, even by an attacker who sees part of the output sequence. Standard PRNGs used in general-purpose software are not secure enough for cryptographic use.

  • A true random number generator (TRNG) is different from a PRNG. A TRNG draws entropy from a physical process and is not deterministic. When a Tangem wallet is created, a true random number generator (TRNG) on a secure element generates the private key, avoiding reliance on deterministic PRNGs for key creation.

  • Random number generation quality is critical to private key security. A weak or predictable PRNG can allow an attacker to reconstruct private keys, as happened in the 2013 Android SecureRandom vulnerability.

  • Random number generation also underlies seed phrase creation in software wallets. The software generates a large random number called entropy, which is then converted into a sequence of words from the BIP39 word list. Tangem's default setup skips this by storing keys directly in a secure chip, with BIP39 phrases available optionally.

  • Non-custodial wallets, including hardware wallets, depend on strong randomness at key generation, since the private key it produces is the sole basis of ownership.

See also

Private Key · Seed Phrase · BIP39 · Non-Custodial Wallet