Two approaches that use a block cipher to build a Pseudo-Random Number Generator (PRNG) and have gained widespread acceptance are Counter (CTR) mode and Cipher Feedback (CFB) mode.
1. Counter (CTR) mode: In CTR mode, the block cipher is used as a key stream generator. It works by encrypting a unique counter value for each block of output. The counter values are incremented for each block, and the resulting encrypted blocks are XORed with the input data to produce the pseudorandom output. CTR mode offers parallel encryption and is well-suited for generating random numbers in high-performance scenarios.
2. Cipher Feedback (CFB) mode: CFB mode turns a block cipher into a self-synchronizing stream cipher. It operates by encrypting the previous ciphertext block and then XORing the resulting output with the plaintext to generate the pseudorandom output. CFB mode can handle any input length and offers error propagation, making it suitable for applications where random numbers are needed on-the-fly.
Both CTR mode and CFB mode provide efficient and secure ways to generate pseudorandom numbers using a block cipher. They have been widely adopted in cryptographic systems and applications that require reliable and unpredictable random number generation.
To know more about