Graph
Cryptographically Secure Pseudorandom Number Generator

🎲Cryptographically Secure Pseudorandom Number Generator

NEW

Also known as: CSPRNG, DRBG

A pseudorandom number generator suitable for cryptographic use due to unpredictability and resistance to attacks.

DESCRIPTION

A cryptographically secure pseudorandom number generator produces numbers that are computationally indistinguishable from true randomness for adversaries, given appropriate entropy and seeding. CSPRNGs underpin key generation, nonces, salts, and secure tokens. Standards such as NIST SP 800-90A define approved deterministic random bit generators. Using non-cryptographic PRNGs for security threatens confidentiality and integrity.

ALTERNATIVE DEFINITIONS

NIST SP 800-90A Rev. 1

A DRBG is a deterministic algorithm that, given an initial seed, outputs a sequence of bits that are computationally indistinguishable from random bits to an observer without knowledge of the seed.

Formalizes deterministic generation and indistinguishability under standard assumptions.

Source

IETF RFC 4086

For security, random numbers must be unpredictable; cryptographic applications require generators that produce bits lacking any predictable patterns to adversaries.

Stresses unpredictability requirements for security-sensitive contexts.

Source

Microsoft Learn

Represents a cryptographic random number generator, which generates random numbers suitable for use in cryptography.

Vendor API definition focused on secure random usage.

Source

Entropy Seed NIST SP 800-90A RFC 4086 Random Number Generator Key Generation Nonce

COMPETING TERMS

Pseudorandom Number Generator Hardware Random Number Generator

RELATIONS

KNOWLEDGE AREAS

Data Security Mathematics Software Engineering

TARGET AUDIENCE

Cybersecurity Engineer Security Architect Software Developer DevOps Engineer Chief Information Security Officer

EXTERNAL SOURCES

  • Wikipedia - Cryptographically secure pseudorandom number generator
  • NIST - DRBG specifications and guidance
  • OWASP - Secure randomness and storage guidance
  • IETF - Randomness requirements for security

TOP QUESTIONS

Why use a CSPRNG instead of a PRNG?

CSPRNGs resist prediction and attack, ensuring secure keys and tokens, unlike typical PRNGs designed for simulation or performance.

Category: Misunderstanding

What makes a CSPRNG secure?

Proper entropy sources, strong seeding, vetted algorithms, and adherence to standards like NIST SP 800-90A ensure security.

Category: Requirements

What are common mistakes using CSPRNGs?

Reusing seeds, inadequate entropy, rolling your own generator, or using non-crypto PRNGs for security tasks.

Category: Mistakes

How do operating systems provide CSPRNGs?

APIs like /dev/urandom, CryptGenRandom, and RandomNumberGenerator supply secure randomness to applications.

Category: Overview

What is the risk of weak randomness?

Predictable keys and tokens enable breaches, impersonation, and data compromise.

Category: Risks

How to test randomness quality?

Use statistical test suites and compliance checks, but rely on vetted algorithms rather than custom designs.

Category: HowTo

Are hardware RNGs better than CSPRNGs?

Hardware RNGs provide entropy; CSPRNGs scale and manage distribution. Combine them for robust randomness.

Category: Opinion

Where to start learning about CSPRNGs?

Read NIST 800-90A, RFC 4086, and OWASP guidance; review OS-level APIs.

Category: Overview

What is a DRBG in NIST terminology?

A deterministic random bit generator—a standardized CSPRNG producing pseudo-random bits from a seed.

Category: Definition