# Description
Implement a simple shift cipher like Caesar and a more secure substitution cipher.
## Step 1
"If he had anything confidential to say, he wrote it in cipher, that is, by so changing the order of the letters of the alphabet, that not a word could be made out.
If anyone wishes to decipher these, and get at their meaning, he must substitute the fourth letter of the alphabet, namely D, for A, and so with the others."
—Suetonius, Life of Julius Caesar
Ciphers are very straight-forward algorithms that allow us to render text less readable while still allowing easy deciphering.
They are vulnerable to many forms of cryptanalysis, but Caesar was lucky that his enemies were not cryptanalysts.
The Caesar cipher was used for some messages from Julius Caesar that were sent afield.
Now Caesar knew that the cipher wasn't very good, but he had one ally in that respect: almost nobody could read well.
So even being a couple letters off was sufficient so that people couldn't recognize the few words that they did know.
Your task is to create a simple shift cipher like the Caesar cipher.
This image is a great example of the Caesar cipher:
This file has been truncated. show original
refers to Caesar Cipher. Eponym - Wikipedia indicates when the name is an adjective, only the name should be capitalized. So Caesar Cipher should be Caesar cipher. The Wikipedia article for Caesar cipher also uses this convention so we should too.
We did this change recently for Hamming Distance to Hamming distance.
1 Like
Oops, this should have gone into Building Exercism if a friendly moderator could move it please.
IsaacG
February 11, 2025, 4:46am
3
And here I thought proper names with fully title cased. Fixing that sounds good to me!
English is weird. I had to Google this myself since I was fairly sure it was Caesarian cipher. You have a Julian calendar not a Julius calendar.
IsaacG
February 11, 2025, 5:08am
5
It makes perfect sense. It’s like Caeser salad and not like Pythagorean theorem. Caeser wouldn’t like his name modified!
1 Like
Makes sense to me too, so I filed a PR
1 Like
IsaacG
February 11, 2025, 1:08pm
7
In general, it might be good to check if the OP was hoping to file their own PR before filing one yourself. We ask people to check on the forum before filing a PR. The PR shouldn’t be “sniped” from them; that discourages the ask-first process.
1 Like
yep, sorry I jumped on it a little too fast.
1 Like