liveBook · Manning

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.

How 3 Manning books explain it

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.

Read how Software Security for Developers explains cryptographically secure random number generator →

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

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.