Morteza Kashi
C++ programs enciphering a cipher text that has been ciphered using a Caesar cipher in a mono alphabetic ciphering procedure
In this problem we have a cipher text. The cipher text is an encrypted version of a plain text. We know that this is a mono alphabetic cipher and also we know that it is a Caesar cipher.
You can find the cipher text by clicking in the following link:
We have to find the frequency of alphabets in that cipher text. By comparing the frequency of the letters in that cipher text and the frequency of letters in English language , we can find out about the key of the Caesar cipher.
Please find the frequency table for 1-letter group ,2-letter group and 3-letter group of letters in english in the following link:
Please find the C++ code for finding the frequency of letters by clicking on the following link:
Please click on the following link, should you want to see the execution of the program. To do that, Save the file "Cipher.exe" on your desktop or somewhere else on your computer. Then, double click on it to see the execution of the program.
The input file for this program is Cipher.txt on the C drive. The output of the program would be on Result.txt on C drive.
Comparing the frequency of the letters in English and that in the cipher text, we find out that 'e' is replaced by 'X in cipher text. So we find out that the key of the cipher is 19. So we must subtract each alphabet from 19 mod 26 to get the same alphabet in the plain text.
Please find the C++ program for doing this task:
Please click on the following link, should you want to see the execution of the program. To do that, Save the file "FinalCipher.exe" on your desktop or somewhere else on your computer. Then, double click on it to see the execution of the program.
The input file for this program is Cipher.txt and the output is output.txt which is the final plain text. These two files would be placed on C drive as it is designed in the program.
Please contact me by clicking HERE and filling out the coming simple form, should you have any question about this program.