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...

Write a program in Java to decrypt a simple substitution cipher. Your

[plaintextCIPHERTEXTaLbHcFdGeTfMhPhZjEkCmBnQoRpIqYrAsUtSuOvDwJxWyNzVX]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!