Question
Write a program in Java to decrypt a simple substitution cipher. Your program should take the ciphertext as input, then 1. Compute and display letter
Write a program in Java to decrypt a simple substitution cipher. Your program should take the ciphertext as input, then
1. Compute and display letter frequency counts.
2. Allow the user to guess a key and display the results of the corresponding "decryption" with the putative key.
3. Allow the user to try step 2 as many times as needed until getting the correct plaintext (the text that makes sense). Alternatively, you can allow the user to try each mapping one by one. For example, the user can choose to substitute 'C' as 'a', and see the result after substitution. Your goal is to be able to find the key. Finally, output the correct key in all UPPERCASES, so that the first letter is the corresponding ciphertext for plaintext 'a', the second letter is mapping to 'b', ..., the 26th letter is mapping to 'z'.
For example, key=LHFGKTMPZECBQRIYAUSODJWNVX means...
[plaintextCIPHERTEXTaLbHcFdGeTfMhPhZjEkCmBnQoRpIqYrAsUtSuOvDwJxWyNzVX]Step 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