In a traditional Ceasar Cipher, you pick a specific offset such as "plus three" so that to encrypt each character of a message you count three letters up from the input and to decrypt you count three letters down from the input. For example, "APPLE" would become "DSSOH" where D is A+3, S is P+3, and so on.

I saw a variant of this where the key is used as the seed of a random number generator instead of a constant offset, and those random offsets are then used to encode the message. This has the advantage that the same input characters are not mapped to the same output characters. For example, my RNG might generate a sequence of 3 7 5 0 2, so then "APPLE" would become "DWULG" where D is A+3, W is P+7, U is P+5, etc.

Since the random number generator is deterministic, you can re-seed the RNG with the original key and generate the same random sequence to decode.

Is there a specific name for this type of cipher?


1 Answer 1


In short, it is a stream cipher.

The security of the random number generator is crucial in this design. Also, the key exchange ( the seed transfer) is not defined. To be good use Diffie-Hellman Key exchange and use a KDF to derive the seed.

Modern design is AES in CTR mode where the CTR mode of operation turns a block cipher into a stream cipher and that doesn't require padding. The better use the AES-GCM that provides Confidentiality, Integrity, and Authentication. Another one is ChaCha stream cipher and in Authenticated mode it is ChaCha20-Poly1305.

  • 1
    $\begingroup$ Thank you for the answer and the comparison to modern approaches! $\endgroup$
    – David
    Mar 19, 2020 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.