Answered step by step
Verified Expert Solution
Question
1 Approved Answer
cipher.txt KEKPRLBNOLMKYBPRGPBMMLTJLJBAZIPTKVRLKPVILIVJBAZWBATVKYBWUSMLIRAKIPVGPBMTPORLIRRL KSJBNCYLIEKJBAZWBATVKYIPSBQRLKATVKPBNOLRBAIGKNVATVRWNVRQNCBQICCBQRLKARLTVTVOBTPO RBAIGKTRLIWYQBWCIWOKJBAZIPTKVCTGKOBBOCKIPYATJWBVBQRRBOKRUIJGRLKRWNVRRLKSCBVRKEKP TQRLKSVNJJKKYTPCTATRTPOOBEKWPAKPRVNWEKTCCIPJKKEKPTQRLKSVNJJKKYTPTAZWBETPORLKTWBM PTPRKWPICVKJNWTRSRLKUKVRRLKSCCUKIUCKRBVISTVMKLIEKVKJNWKYBNWVKCEKVQWBARLKPVIKDJKZ RQBWRLKZIWRVRLIRMKKTRLKWYBPRGPBMIUBNRBWJIPRRICGIUBNR please code in C++ The provided file ciphertext.txt contains a message which has been encrypted using a simple
cipher.txt
KEKPRLBNOLMKYBPRGPBMMLTJLJBAZIPTKVRLKPVILIVJBAZWBATVKYBWUSMLIRAKIPVGPBMTPORLIRRL KSJBNCYLIEKJBAZWBATVKYIPSBQRLKATVKPBNOLRBAIGKNVATVRWNVRQNCBQICCBQRLKARLTVTVOBTPO RBAIGKTRLIWYQBWCIWOKJBAZIPTKVCTGKOBBOCKIPYATJWBVBQRRBOKRUIJGRLKRWNVRRLKSCBVRKEKP TQRLKSVNJJKKYTPCTATRTPOOBEKWPAKPRVNWEKTCCIPJKKEKPTQRLKSVNJJKKYTPTAZWBETPORLKTWBM PTPRKWPICVKJNWTRSRLKUKVRRLKSCCUKIUCKRBVISTVMKLIEKVKJNWKYBNWVKCEKVQWBARLKPVIKDJKZ RQBWRLKZIWRVRLIRMKKTRLKWYBPRGPBMIUBNRBWJIPRRICGIUBNR
please code in C++
The provided file ciphertext.txt contains a message which has been encrypted using a simple substitution cipher. You are to create a program which can assist a cryptanalyst by providing the following functionality: 1. Compute and display the frequency analysis of the ciphertext. 2. Decrypt the ciphertext using a key provided by the analyst. 3. Guess the key of the cipher. In order to guess the key, the following procedure should be followed: 1. Compute the frequency ordering of the letters appearing in the ciphertext, and guess a potential decryption key by mapping them to the standard English letter frequency ordering: ETAOINSHRDLCUMWFGYPBVKJXQZ. 2. Analyze the quality of your potential key by counting the number of words from the provided dictionary.txt file which appear in the decoded message. 3. Permute the guessed key in order to increase the number of dictionary words the decrypted text contains, until further permutations no longer improve its quality. Your program should print out the final key that it computed as well as the resulting decoded message. Do not forget that your program must also be able to facilitate manual cryptanalysis as described above- your program is not expected to reproduce the exact plaintext, but rather get close enough such that an analyst (or you, in this case) can easily determine the true keyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started