Cryptographically secure random number generator
A cryptographically secure random number generator produces computationally unpredictable values while resisting prediction and recovery of its internal state by feasible adversaries.
Hacking Cryptography
A cryptographically secure pseudorandom number generator is a pseudorandom number generator whose output and state-recovery properties satisfy security requirements against computationally bounded adversaries.
- How it is used
- Supplies fast cryptographic randomness from entropy-derived seeds for keys, nonces, and related operations.
- How deep it goes
- Explains the Init, Next, and Output state-machine model, then tests it against seed guessing, state recovery, and backdoored constants.
- Examples
- Uses time-based seed guessing, MT19937 state cloning, DUAL_EC_DRBG constants, and a 1 GB video keystream scenario.
- What you can do after
- Operate/configure it by selecting a CSPRNG, seeding from health-tested entropy, and periodically reseeding it.
Read how Hacking Cryptography explains cryptographically secure random number generator →
Software Security for Developers
A cryptographically secure random number generator produces values that are computationally unpredictable and suitable for cryptographic keys and initialization vectors.
- How it is used
- Generates unpredictable keys and initialization vectors for AES and other cryptographic operations.
- How deep it goes
- Defines the security requirement and Java implementation, but defers randomness theory and mathematical proofs.
- Examples
- Uses Java SecureRandom byte generation and fresh 96-bit IVs for AES-GCM encryption.
- What you can do after
- Apply it via java.security.SecureRandom to generate cryptographic keys and fresh AES-GCM IVs.
Real-World Cryptography
A cryptographically secure pseudorandom number generator is a pseudorandom number generator whose outputs are computationally indistinguishable from uniform random values and whose state resists recovery from observed outputs.
- How it is used
- Supplies fast security randomness when collecting unpredictable entropy is slow.
- How deep it goes
- Explains seeds, deterministic expansion, uniform indistinguishability, state resistance, and secrecy properties without implementation detail.
- Examples
- Uses a seed-to-sequence diagram and contrasts observed outputs with uniform choices.
- What you can do after
- Evaluate/understand when a fast pseudorandom generator can replace slow entropy collection for security randomness.
Read how Real-World Cryptography explains cryptographically secure random number generator →
Related concepts
- pseudo-random number generatorkind of · A pseudorandom number generator is a deterministic computational process that uses an initial seed or internal state to produce a sequence with random-like statistical properties.
- random_passwordused by · random_password is a Terraform resource type from the hashicorp/random provider that generates a random password value and treats it as sensitive.
- keystreamproduces · A keystream is a sequence of cryptographic bits or symbols generated for combination with plaintext or ciphertext in a stream cipher.
- true random number generatoruses · A true random number generator produces unpredictable values by sampling nondeterministic physical phenomena rather than relying solely on deterministic algorithms.
- Dual ECincludes · Dual EC is an elliptic-curve-based deterministic pseudorandom number generator whose design permits state recovery if its generator points have a hidden mathematical relation.
- generatorkind of · A generator is a computational component or construct that produces data or values from inputs, representations, context, or specified constraints.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


