A key generator is used in many cryptographic to generate a sequence with many pseudo-random characteristics. This sequence is used as an encryption key at one end of communication, and as a decryption key at the other.
Examples of key generators include linear feedback shift registers (LFSR) and the Solitaire (or Pontifex) cipher.