A CSPRNG is a deterministic generator intended for cryptographic use. Pseudorandom does not mean weak: resistance to an adversary under stated assumptions matters. The algorithm, entropy source and consuming code must be assessed separately.
RFC 4086 distinguishes cryptographically strong sequences from ordinary simulation generators. Knowing part of the output should not allow the rest to be guessed. Statistical tests alone do not prove this property; a predictable seed can undermine even complex-looking output. [RFC 4086 — Cryptographically strong sequences]
NIST SP 800-90A Rev. 1 specifies Hash_DRBG, HMAC_DRBG and CTR_DRBG. The CSPRNG label does not certify every implementation. Identify the mechanism, its parameters and entropy acquisition, rather than only the name of a hash function. [NIST SP 800-90A Rev. 1 — DRBG mechanisms and compromise resistance]
Backtracking resistance protects earlier outputs after present state is exposed. Prediction resistance concerns future outputs; NIST SP 800-90A connects it to effective incorporation of fresh entropy. Neither property automatically implies the other or recovery through another call alone. [NIST SP 800-90A Rev. 1 — DRBG mechanisms and compromise resistance]
OpenSSL 3.5 documents 1 for success, 0 for other failure and -1 for an unsupported method in RAND_bytes() and RAND_priv_bytes(). Generation may be refused when the entropy source fails. Applications must check the result rather than use an unverified buffer. [OpenSSL 3.5 — RAND_bytes return values and errors]
libsodium randombytes_buf_deterministic() produces the same sequence for the same seed, useful for tests. Restoring a virtual machine snapshot can repeat state and output. Test reproducibility does not guarantee independent secrets across copies. [libsodium — Random data and deterministic testing]
libsodium randombytes_uniform() provides uniform selection below an upper bound without the bias of a simple remainder operation. Good input bytes alone do not ensure correct mapping into the target range. Keys must also follow the relevant algorithm’s rules. [libsodium — Random data and deterministic testing]
RFC 8439 requires that a nonce not repeat with the same key; a random appearance alone does not prove uniqueness. RFC 6979 instead describes deterministic creation of the signing value k. A CSPRNG is therefore no universal substitute for protocol rules. [RFC 8439 — Nonce uniqueness] [RFC 6979 — Deterministic signing]
Record the library version, mechanism, initialization, errors and behavior after state restoration or cloning. OpenSSL and libsodium documentation describes their specific functions, not the security of arbitrary wallets. Good generation also cannot prevent a later backup leak. [OpenSSL 3.5 — RAND_bytes return values and errors] [libsodium — Random data and deterministic testing]
For the clearest picture, read this entry together with Cryptographic Entropy, Random Number Generator, Deterministic RNG, Seed Generation. The reverse links also lead from Dice Roll Entropy, Cryptographic Entropy, Random Number Generator, Deterministic RNG.