IntelligenceAlgorithmscsprng
Cryptographically strong random number generation
Random number generators meant for keys and nonces, such as the operating system generator behind getrandom, crypto.getRandomValues or the DRBGs of SP 800-90A. Weak or reused randomness is a common cause of key and signature leaks, regardless of the algorithm that consumes it.
In short
What a quantum computer changes.
- Quantum effect
- Not applicable
- Family
- OtherRests on a problem the source does not state.
- What it means
- This entry is not a hardness assumption that a quantum computer would change. It is a building block, such as a random number generator, that other algorithms depend on. Its quality still matters: weak or reused randomness can leak keys whatever algorithm consumes it. The quantum question belongs to the algorithms that use it.
This describes the family, not any project that uses it.
33 in the catalogue
Packages that provide it
| Package | Provides |
|---|---|
| @noble/ciphersnpm | Pure TypeScript symmetric cipher library: ChaCha20-Poly1305 and XChaCha20-Poly1305, XSalsa20-Poly1305, AES in GCM, GCM-SIV, SIV, CTR, CBC, CFB, ECB and key-wrap modes, and FF1 format-preserving encryption. |
| sjclnpm | Stanford JavaScript Crypto Library; the default npm build provides AES in CCM, OCB2 and GCM modes, SHA-256, HMAC, PBKDF2 and a Fortuna-style random generator. |
| libsodium-wrappersnpm | libsodium compiled to WebAssembly and JavaScript with generated wrappers: X25519, Ed25519, XSalsa20-Poly1305 and ChaCha20-Poly1305 encryption, BLAKE2b, SHA-2, SHA-3, HMAC, Argon2 password hashing, ML-KEM-768 and the X-Wing hybrid KEM. |
| libsodium-wrappers-sumonpm | The sumo build of libsodium.js: everything in libsodium-wrappers plus scrypt password hashing and lower-level functions. |
| sodium-nativenpm | Low-level native Node.js bindings to libsodium: X25519, Ed25519, XSalsa20-Poly1305 and ChaCha20-Poly1305 encryption, BLAKE2b, SHA-2, HMAC, Argon2 and scrypt, plus a PBKDF2-SHA512 extension. |
| node-forgenpm | Pure JavaScript cryptography and PKI toolkit: RSA signing and encryption, Ed25519, AES (including GCM), DES and RC2, SHA-1, SHA-2, MD5, HMAC, PBKDF2, a Fortuna-based random generator, X.509, PKCS formats and a TLS implementation. |
| crypto-browserifynpm | Browser port of the Node.js crypto module that re-exports the browserify packages for hashes, HMAC, PBKDF2, AES, Diffie-Hellman, ECDH, RSA and ECDSA signing and RSA encryption. |
| ethersnpm | Ethereum library with secp256k1 signing, recovery and ECDH, Keccak-256, SHA-2, RIPEMD-160, HMAC, PBKDF2 and scrypt helpers, BIP-39 and BIP-32 wallets, and encrypted JSON keystores. |
| ethereum-cryptographynpm | Collection of the primitives Ethereum uses: secp256k1, BN254 and BLS12-381 curves, Keccak, SHA-2, RIPEMD-160, BLAKE2b, PBKDF2, scrypt, AES, BIP-32, BIP-39 and random bytes. |
| micro-eth-signernpm | Minimal Ethereum library for secp256k1 transaction and message signing, legacy and EIP-2335 keystores, EIP-2333 key derivation, and KZG and PeerDAS blob commitments. |
| @metamask/browser-passwordernpm | Password-based encryption of JavaScript objects using a PBKDF2-derived key and AES-GCM from the Web Crypto API. |
| ecpairnpm | Bitcoin secp256k1 key pair class with ECDSA and Schnorr signing and verification on top of an injected secp256k1 library. |
| bip39npm | BIP-39 mnemonic generation and validation, with a SHA-256 checksum and PBKDF2-HMAC-SHA512 seed derivation. |
| @scure/bip39npm | BIP-39 mnemonic generation and validation, with a SHA-256 checksum and PBKDF2-HMAC-SHA512 seed derivation. |
| @iden3/js-cryptonpm | iden3 primitives: Baby Jubjub EdDSA, Poseidon, SHA-256 and random bytes. |
| @polkadot/util-cryptonpm | Polkadot crypto utilities: sr25519, Ed25519 and secp256k1 keys and signatures, BLAKE2, Keccak, SHA-2, HMAC, PBKDF2, scrypt, NaCl secretbox and encrypted JSON. |
| @cosmjs/cryptonpm | CosmJS cryptography: secp256k1 and Ed25519 signing, SHA-2, Keccak-256, RIPEMD-160, HMAC, BIP-39, SLIP-10, Argon2id and XChaCha20-Poly1305. |
| @libp2p/cryptonpm | libp2p key and crypto primitives: Ed25519, secp256k1, ECDSA P-256, P-384 and P-521, and RSA keys, ephemeral ECDH, AES-GCM, HMAC and PBKDF2. |
| @ton/cryptonpm | TON crypto primitives: SHA-256, SHA-512, HMAC-SHA-512, PBKDF2-SHA-512, TON mnemonics, Ed25519 signing, NaCl secret boxes and SLIP-10 Ed25519 HD keys. |
| ringcrates.io | Cryptographic library largely derived from BoringSSL, offering ECDSA P-256 and P-384, Ed25519, RSA signatures, X25519 and ECDH, AES-GCM, ChaCha20-Poly1305, SHA-1 and SHA-2, HMAC, HKDF, PBKDF2 and a system random generator. |
| aws-lc-rscrates.io | ring-compatible Rust API over the AWS-LC C library, adding ML-KEM, ML-DSA, RSA encryption, raw AES modes and an optional FIPS build. |
| aws-lc-syscrates.io | Low-level generated FFI bindings to the AWS-LC C cryptography library, which aws-lc-rs wraps. |
| opensslcrates.io | Rust bindings to OpenSSL covering TLS, X.509, RSA, DSA, Diffie-Hellman, elliptic curve and Edwards curve keys, symmetric ciphers, hashes, MACs and key derivation. |
| openssl-syscrates.io | Raw FFI declarations for the OpenSSL C library, used by the openssl crate. |
| boringcrates.io | Rust bindings to BoringSSL with TLS support, RSA, DSA, Diffie-Hellman, ECDSA and ECDH, Ed25519 and X25519, ML-KEM, ML-DSA, HPKE, AEAD ciphers, hashes, HMAC and key derivation. |
| mbedtlscrates.io | Rust wrapper for Mbed TLS covering TLS, X.509, RSA, ECDSA, ECDH, Diffie-Hellman, AES and ChaCha20-Poly1305, hashes, HMAC, HKDF, PBKDF2 and DRBG random generators. |
| botancrates.io | Rust wrapper for the Botan C++ library, exposing ciphers, hashes, MACs, KDFs, password hashing, random generators, X.509 and classical and post-quantum public key algorithms. |
| dryoccrates.io | Pure Rust libsodium-compatible library with crypto_box, secretbox, Ed25519 signatures, BLAKE2b, SHA-2, SHA-3, HMAC, HKDF, Argon2 password hashing, ML-KEM-768, X-Wing and HPKE sealed boxes. |
| sodiumoxidecrates.io | Rust bindings to libsodium: X25519 crypto_box, XSalsa20-Poly1305 secretbox, Ed25519 signatures, ChaCha20-Poly1305 and AES-256-GCM AEADs, SHA-2, BLAKE2b, HMAC, Argon2 and scrypt password hashing. |
| libsodium-syscrates.io | Raw FFI bindings to the libsodium C library, used by sodiumoxide. |
| randcrates.io | Random number generation library whose default generator, rand::rng(), is automatically seeded from the operating system and intended for unpredictable output. |
| rand_chachacrates.io | ChaCha-based cryptographic random number generators (ChaCha8, ChaCha12 and ChaCha20). |
| getrandomcrates.io | Cross-platform access to the operating system random number generator. |
1 listed
Sources
- SP 800-90A Rev. 1: Recommendation for Random Number Generation Using Deterministic Random Bit Generatorscsrc.nist.govRetrieved 3 December 2026
Full record
- Identifier
- csprng
- Kind
- rng
- Family
- Other
- Rests on
- Not stated
- Quantum effect
- Not applicable
Standards
- SP 800-90A Rev. 1Recommendation for Random Number Generation Using Deterministic Random Bit GeneratorsNIST, final, published 24 June 2015Checked 3 December 2026