True randomness is surprisingly hard to come by. Computers are deterministic machines — feed them the same input and they always give the same output. Yet almost everything secure, from your encrypted messages to the lottery, needs a steady supply of unpredictable bits.
The fix is a pseudorandom generator (PRG): a small, deterministic program that takes a short truly-random seed — say 128 coin flips — and stretches it into a much longer stream of bits. The stream isn't really random; it's completely determined by the seed. And yet, to anyone who doesn't know the seed, it looks perfectly random.
That's the whole trick, and it's the foundation of every stream cipher: keep one short secret, and you can generate a keystream as long as the message you want to hide.
Comments
Loading comments...