The Caesar cipher

Task 5: The Caesar cipher, also known as the Caesar shift or Caesar’s code, is one of the simplest and oldest encryption techniques. It is a type of substitution cipher in which each letter in the plaintext is shifted a fixed number of positions down or

Hi there, it looks like you’ve posted a school asignment. It would be unethical of us to give you the answers, however I can offer some guidance.

The Caesar Cipher is the same as the ROT cipher, ROT standing for rotation (as far as I know). The concept of this cipher is to literally rotate the alphabet by a certain number of letters (the Caesar Cipher or ROT 13 cipher uses 13) so that each letter corresponds to a different letter, creating a very basic form of encryption.

Here’s an example:

ABCDEFGHIJKLMNOPQRSTUVWXYZ

The character thirteen to the right of A is N, so if we rotated this alphabet we’d get:

NOPQRSTUVWXYZABCDEFGHIJKLM

So each letter maps to a rotated letter, scrambling a message.

AN, BO, CP, etc

Essentially, if you need to implement this in code, you will want to be able to map each character to its rotated character (probably best if you allow for any rotation, however just 13 would simplify things a lot).

6 Likes