Generate KeccakPRG pseudo-random output with reseedable entropy and configurable capacity.
About
KeccakPRG is a pseudo-random generator based on Keccak, using a sponge construction with configurable capacity to generate random output from seed entropy with support for reseeding and forward secrecy.
Specifications
Output SizeVariable
StandardKeccakPRG specification (XKCP)
Standard Year2016
Use Cases
—Cryptographically secure random generation
—Key stream generation for encryption
—Reseedable random number generation
—Forward secrecy implementations
—Deterministic random bit generation (DRBG)
Frequently Asked Questions
KeccakPRG is a Pseudo-Random Generator based on Keccak. Unlike hash functions that produce fixed output, PRGs can generate unlimited pseudo-random output from a seed. It supports reseeding and is designed for cryptographic randomness generation.
Use crypto.getRandomValues for system randomness. Use KeccakPRG for deterministic randomness from a seed (simulations, reproducible testing), key stream generation, or when you need reseedable PRG with forward secrecy.
KeccakPRG is sponge-based; AES-CTR is block cipher-based. KeccakPRG has built-in rate limiting via capacity. Both are secure when properly seeded. KeccakPRG may be preferred in SHA-3 environments; AES-CTR is more widely hardware-accelerated.